buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
private static void show(){ long tot = 0; if (num > 1) { for(int i=1; i < num; i++) { // skip first test tot += elapsedTimes[i]; } System.out.printf("%-20s: %5dms%n%n", "Average(not first)", (tot/(num-1))); } num=0; // ready for nex...
private static void show(){ long tot = 0; if (num > 1) { for(int i=1; i < num; i++) { // skip first test tot += elapsedTimes[i]; } System.out.printf("%-20s: %5dms%n%n", "Average(not first)", tot/(num-1)); } num=0; // ready for next ...
public CacheManager cacheManager() { SimpleCacheManager mgr = new SimpleCacheManager(); ArrayList<Cache> caches = new ArrayList<Cache>(); caches.add(new ConcurrentMapCache()); mgr.setCaches(caches); return mgr; } }
public CacheManager cacheManager() { SimpleCacheManager mgr = new SimpleCacheManager(); ArrayList<Cache> caches = new ArrayList<Cache>(); caches.add(new ConcurrentMapCache("")); mgr.setCaches(caches); return mgr; } }
public Map<Object, Object> invoke(Cache<K, Map<Object, Object>> cache) { return cache.getAdvancedCache().withFlags(local ? Flag.CACHE_MODE_LOCAL : Flag.SKIP_REMOTE_LOOKUP).remove(key); } }; this.invoker.invoke(this.sessionCache, operation); }
public Map<Object, Object> invoke(Cache<K, Map<Object, Object>> cache) { return cache.getAdvancedCache().withFlags(Flag.SKIP_CACHE_LOAD, local ? Flag.CACHE_MODE_LOCAL : Flag.SKIP_REMOTE_LOOKUP).remove(key); } }; this.invoker.invoke(this.sessionCache, operation); ...
public static ModelNode parseEnvironmentVariables(final XMLExtendedStreamReader reader, final Namespace expectedNs, ModelNode addOp) throws XMLStreamException { final ModelNode properties = new ModelNode(); while (reader.nextTag() != END_ELEMENT) { requireNamespace(reader, expectedNs); ...
public static ModelNode parseEnvironmentVariables(final XMLExtendedStreamReader reader, final Namespace expectedNs, ModelNode addOp) throws XMLStreamException { final ModelNode properties = new ModelNode(); while (reader.nextTag() != END_ELEMENT) { requireNamespace(reader, expectedNs); ...
protected Class resolveClass(ObjectStreamClass objectStreamClass) throws IOException, ClassNotFoundException { Class clazz = Class.forName(objectStreamClass.getName(), false, classLoader); if (clazz != null) { // the classloader knows of the class return...
protected Class<?> resolveClass(ObjectStreamClass objectStreamClass) throws IOException, ClassNotFoundException { Class clazz = Class.forName(objectStreamClass.getName(), false, classLoader); if (clazz != null) { // the classloader knows of the class ret...
protected static MessageDigest getDigest(String algorithm) { try { return MessageDigest.getInstance(algorithm); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e.getMessage()); } }
public static String shaHex(String data) { return new String(Hex.encodeHex(sha(data))); } }
protected boolean requiresRuntime(OperationContext context) { return context.isNormalServer() || context.getProcessType() == ProcessType.HOST_CONTROLLER; }
protected boolean requiresRuntime(OperationContext context) { return context.isNormalServer(); }
protected boolean requiresRuntime(OperationContext context) { return context.isNormalServer(); }
protected boolean requiresRuntime(OperationContext context) { return true; }
private void testRemoveXaDataSource() throws Exception { // remove data source cli.sendLine("xa-data-source remove --profile=" + profileNames[0] + " --jndi-name=java:jboss/datasources/TestXADS"); //check the data source is not listed cli.sendLine("cd /profile=" + profileNames[0] +...
private void testRemoveXaDataSource() throws Exception { // remove data source cli.sendLine("xa-data-source remove --profile=" + profileNames[0] + " --jndi-name=java:jboss/datasources/TestXADS"); //check the data source is not listed cli.sendLine("cd /profile=" + profileNames[0] +...
public void testRolloutPlan() throws Exception { addRolloutPlan(); testRolloutPlanDeployment(); removeRolloutPlan(); //fuckyouall }
public void testRolloutPlan() throws Exception { addRolloutPlan(); testRolloutPlanDeployment(); removeRolloutPlan(); }
static final String BATCHING = "batching"; /* * 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 software; you ...
static final String BATCHING = "batching"; /* * 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 software; you ...
public void handleRequest(final HttpServerExchange exchange) throws Exception { SecurityContext sc = exchange.getAttachment(UndertowSecurityAttachments.SECURITY_CONTEXT_ATTACHMENT); String previousContextID = null; String identity = null; try { SecurityActions.setSecurity...
public void handleRequest(final HttpServerExchange exchange) throws Exception { SecurityContext sc = exchange.getAttachment(UndertowSecurityAttachments.SECURITY_CONTEXT_ATTACHMENT); String previousContextID = null; String identity = null; try { SecurityActions.setSecurity...
private void flushDecompressBuffer(final OutputStream os) throws IOException { os.write(decompressBuf, 0, this.blockSize); System.arraycopy(decompressBuf, BLOCK_SIZE, decompressBuf, 0, this.blockSize); decompressBufIndex -= this.blockSize; }
private void flushDecompressBuffer(final OutputStream os) throws IOException { os.write(decompressBuf, 0, this.blockSize); System.arraycopy(decompressBuf, blockSize, decompressBuf, 0, this.blockSize); decompressBufIndex -= this.blockSize; }
package org.jboss.as.clustering.marshalling; /* * 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 software; yo...
package org.jboss.as.clustering.marshalling; /* * 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 software; yo...
package org.jboss.as.clustering.marshalling; /* * 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 software; yo...
package org.jboss.as.clustering.marshalling; /* * 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 software; yo...
package org.jboss.as.clustering.marshalling; /* * 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 individual contributors. * * This is free software; yo...
package org.jboss.as.clustering.marshalling; /* * 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 individual contributors. * * This is free software; yo...
package org.wildfly.clustering.singleton; /* * 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 software; you c...
package org.wildfly.clustering.singleton; /* * 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 software; you c...
package org.wildfly.clustering.singleton; /* * 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 software; you c...
package org.wildfly.clustering.singleton; /* * 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 software; you c...
public CoarseSessionCacheEntry<Object> readObject(ObjectInput input) throws IOException, ClassNotFoundException { return new CoarseSessionCacheEntry<Object>(this.externalizer.readObject(input)); }
public CoarseSessionCacheEntry<Object> readObject(ObjectInput input) throws IOException, ClassNotFoundException { return new CoarseSessionCacheEntry<>(this.externalizer.readObject(input)); }
public ServiceBuilder<SSOManagerFactory> build(ServiceTarget target, ServiceName name, SSOManagerConfiguration config) { @SuppressWarnings("rawtypes") InjectedValue<Cache> cache = new InjectedValue<Cache>(); return target.addService(name, new InfinispanSSOManagerFactory(cache)) ...
public ServiceBuilder<SSOManagerFactory> build(ServiceTarget target, ServiceName name, SSOManagerConfiguration config) { @SuppressWarnings("rawtypes") InjectedValue<Cache> cache = new InjectedValue<>(); return target.addService(name, new InfinispanSSOManagerFactory(cache)) .a...
public void mutate() { this.invoker.invoke(this.cache, new MutateOperation<String, V>(this.id, this.value), Flag.IGNORE_RETURN_VALUES); }
public void mutate() { this.invoker.invoke(this.cache, new MutateOperation<>(this.id, this.value), Flag.IGNORE_RETURN_VALUES); }
public CoarseSSOCacheEntry<?> readObject(ObjectInput input) throws IOException, ClassNotFoundException { CoarseSSOCacheEntry<?> entry = new CoarseSSOCacheEntry<Object>(); entry.setAuthenticationType(AuthenticationType.values()[input.readByte()]); entry.setUser(input.readUTF()); entry...
public CoarseSSOCacheEntry<?> readObject(ObjectInput input) throws IOException, ClassNotFoundException { CoarseSSOCacheEntry<?> entry = new CoarseSSOCacheEntry<>(); entry.setAuthenticationType(AuthenticationType.values()[input.readByte()]); entry.setUser(input.readUTF()); entry.setPa...
import org.jboss.as.clustering.marshalling.VersionedMarshallingConfiguration; /* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contribut...
import org.jboss.as.clustering.marshalling.VersionedMarshallingConfiguration; /* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contribut...
protected void performRuntime(NewOperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) { log.info("Activating Naming Subsystem"); NamingContext.initializeNamingManager(); final NamingStore...
protected void performRuntime(NewOperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) { log.info("Activating Naming Subsystem"); NamingContext.initializeNamingManager(); final NamingStore...
public void testHttpSocketBinding() throws IOException { final ModelNode address = new ModelNode(); address.add("socket-binding-group", "*"); address.add("socket-binding", "http"); address.protect(); final ModelNode operation = new ModelNode(); operation.get(OP).set(...
public void testHttpSocketBinding() throws IOException { final ModelNode address = new ModelNode(); address.add("socket-binding-group", "*"); address.add("socket-binding", "http"); address.protect(); final ModelNode operation = new ModelNode(); operation.get(OP).set(...
public ModelNode getModelDescription(Locale locale) { return MessagingDescriptions.getBroadcastGroupAdd(locale); } static void addBroadcastGroupConfigs(final Configuration configuration, final ModelNode model) throws OperationFailedException { if (model.hasDefined(CommonAttributes.BROADCAS...
public ModelNode getModelDescription(Locale locale) { return MessagingDescriptions.getBroadcastGroupAdd(locale); } static void addBroadcastGroupConfigs(final Configuration configuration, final ModelNode model) throws OperationFailedException { if (model.hasDefined(CommonAttributes.BROADCAS...
public byte[] fromMessage(Message<?> message) { byte[] payload; if (message.getPayload() instanceof byte[]) { payload = (byte[]) message.getPayload(); } else { throw new IllegalArgumentException( "stompContent is not byte[]: " + message.getPayload().getClass()); } ByteArrayOutputStream out = n...
public byte[] fromMessage(Message<?> message) { byte[] payload; if (message.getPayload() instanceof byte[]) { payload = (byte[]) message.getPayload(); } else { throw new IllegalArgumentException( "stompContent is not byte[]: " + message.getPayload().getClass()); } ByteArrayOutputStream out = n...
protected String toStringPayload() { return (getPayloadSize() > 80) ? getPayload().substring(0, 80) + "..." : getPayload(); }
protected String toStringPayload() { return (getPayloadSize() > 10) ? getPayload().substring(0, 10) + ".." : getPayload(); }
private static void compare(ModelNode node1, ModelNode node2, boolean ignoreUndefined, boolean ignoreType, Stack<String> stack) { if (! ignoreType) { Assert.assertEquals(getCompareStackAsString(stack) + " types", node1.getType(), node2.getType()); } if (node1.getType() == ModelTy...
private static void compare(ModelNode node1, ModelNode node2, boolean ignoreUndefined, boolean ignoreType, Stack<String> stack) { if (! ignoreType) { Assert.assertEquals(getCompareStackAsString(stack) + " types", node1.getType(), node2.getType()); } if (node1.getType() == ModelTy...
public void exchangePost() throws Exception { HttpHeaders requestHeaders = new HttpHeaders(); requestHeaders.set("MyHeader", "MyValue"); requestHeaders.setContentType(MediaType.TEXT_PLAIN); HttpEntity<String> requestEntity = new HttpEntity<String>(helloWorld, requestHeaders); HttpEntity<?> result = template....
public void exchangePost() throws Exception { HttpHeaders requestHeaders = new HttpHeaders(); requestHeaders.set("MyHeader", "MyValue"); requestHeaders.setContentType(MediaType.TEXT_PLAIN); HttpEntity<String> requestEntity = new HttpEntity<String>(helloWorld, requestHeaders); HttpEntity<Void> result = templa...
public Object convertValue(Object value, TypeDescriptor typeDescriptor) throws EvaluationException { try { return conversionService.executeConversion(value, typeDescriptor); } catch (ConverterNotFoundException cenfe) { throw new SpelException(cenfe, SpelMessages.TYPE_CONVERSION_ERROR, value.getClass(), typeD...
public Object convertValue(Object value, TypeDescriptor typeDescriptor) throws EvaluationException { try { return conversionService.convert(value, typeDescriptor); } catch (ConverterNotFoundException cenfe) { throw new SpelException(cenfe, SpelMessages.TYPE_CONVERSION_ERROR, value.getClass(), typeDescriptor....
IllegalStateException useOperationContextRemoveService(); /* * 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...
IllegalStateException useOperationContextRemoveService(); /* * 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...
private static <A extends Annotation> A findAnnotation(Class<?> clazz, Class<A> annotationType, Set<Annotation> visited) { Assert.notNull(clazz, "Class must not be null"); try { Annotation[] anns = clazz.getDeclaredAnnotations(); for (Annotation ann : anns) { if (ann.annotationType().equals(annotationTy...
private static <A extends Annotation> A findAnnotation(Class<?> clazz, Class<A> annotationType, Set<Annotation> visited) { Assert.notNull(clazz, "Class must not be null"); try { Annotation[] anns = clazz.getDeclaredAnnotations(); for (Annotation ann : anns) { if (ann.annotationType().equals(annotationTy...
package org.jboss.as.test.integration.osgi.bundleA; /* * 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 softw...
package org.jboss.as.test.integration.osgi.bundleA; /* * 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 softw...
package org.jboss.as.test.integration.osgi.bundleA; /* * 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 softw...
package org.jboss.as.test.integration.osgi.bundleA; /* * 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 softw...
package org.jboss.as.test.integration.osgi.bundleA; /* * 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 softw...
package org.jboss.as.test.integration.osgi.bundleA; /* * 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 softw...
package org.jboss.as.test.integration.osgi.classloading.bundle; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free ...
package org.jboss.as.test.integration.osgi.classloading.bundle; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free ...
package org.jboss.as.test.integration.osgi.classloading.bundle; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free ...
package org.jboss.as.test.integration.osgi.classloading.bundle; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free ...
package org.jboss.as.test.integration.osgi.jaxws.bundle; /* * JBoss, Home of Professional Open Source. * Copyright 2011, 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...
package org.jboss.as.test.integration.osgi.jaxws.bundle; /* * JBoss, Home of Professional Open Source. * Copyright 2011, 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...
public static final ServiceName SERVICE_NAME = ServiceName.JBOSS.append("deployment", "chain"); /**
ServiceName SERVICE_NAME = ServiceName.JBOSS.append("deployment", "chain"); /* * 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. ...
ServiceName DEPLOYMENT_PROCESSOR_SERVICE_NAME = ServiceName.JBOSS.append("deployment", "processor"); /* * 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 ...
ServiceName DEPLOYMENT_PROCESSOR_SERVICE_NAME = ServiceName.JBOSS.append("deployment", "processor"); /* * 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 ...
public static final ServiceName SOCKET_BINDING_MANAGER = ServiceName.JBOSS.append("socket-binding-manager");
ServiceName SOCKET_BINDING_MANAGER = ServiceName.JBOSS.append("socket-binding-manager"); /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors...
private void writeBroadcastGroups(final XMLExtendedStreamWriter writer, final ModelNode node) throws XMLStreamException { List<Property> properties = node.asPropertyList(); if (!properties.isEmpty()) { writer.writeStartElement(Element.BROADCAST_GROUPS.getLocalName()); for(fin...
private void writeBroadcastGroups(final XMLExtendedStreamWriter writer, final ModelNode node) throws XMLStreamException { List<Property> properties = node.asPropertyList(); if (!properties.isEmpty()) { writer.writeStartElement(Element.BROADCAST_GROUPS.getLocalName()); for(fin...
public static void main(String[] args) throws Exception { int exitCode = 0; CommandContext cmdCtx = null; boolean gui = false; try { String argError = null; List<String> commands = null; File file = null; boolean connect = false; ...
public static void main(String[] args) throws Exception { int exitCode = 0; CommandContext cmdCtx = null; boolean gui = false; try { String argError = null; List<String> commands = null; File file = null; boolean connect = false; ...
protected Interceptor create(Component component, InterceptorFactoryContext context) { if (component instanceof StatefulComponentDescription == false) { throw new IllegalArgumentException("Component " + component + " with component clas...
protected Interceptor create(Component component, InterceptorFactoryContext context) { if (component instanceof StatefulSessionComponent == false) { throw new IllegalArgumentException("Component " + component + " with component class: "...
public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException { return new TypedValue(((Map) target).get(name), TypeDescriptor.valueOf(Object.class)); }
public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException { return new TypedValue(((Map) target).get(name), TypeDescriptor.OBJECT); }
private ModelNode validateResponse(ModelNode operation, boolean validateResult) throws Exception { ModelNode response = null; log.info(operation.asString()); response = client.execute(operation); log.info(response.asString()); if (!SUCCESS.equals(response.get(OUTCOME).asStrin...
private ModelNode validateResponse(ModelNode operation, boolean validateResult) throws Exception { ModelNode response = null; log.info(operation.asString()); response = client.execute(operation); log.info(response.asString()); if (!SUCCESS.equals(response.get(OUTCOME).asStrin...
@Message(id = 11362, value = "Not authorized to read attribute: '%s'") /* * 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. * *...
@Message(id = 11362, value = "Not authorized to read attribute: '%s'") /* * 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. * *...
private ModelNode[] modelNodeAttributesInfo(MBeanAttributeInfo[] attributeInfos, ObjectName objectName) throws IOException, JMException { MBeanServerConnection connection = getConnection(); ModelNode attributes = new ModelNode(); ModelNode filtered = new ModelNode().setEmptyList(); M...
private ModelNode[] modelNodeAttributesInfo(MBeanAttributeInfo[] attributeInfos, ObjectName objectName) throws IOException, JMException { MBeanServerConnection connection = getConnection(); ModelNode attributes = new ModelNode(); ModelNode filtered = new ModelNode().setEmptyList(); M...
protected void handle(CommandContext ctx, String args) { } }
protected void doHandle(CommandContext ctx) { } }
protected void handle(CommandContext ctx, String args) { OperationRequestAddress prefix = ctx.getPrefix(); ctx.printLine(ctx.getPrefixFormatter().format(prefix)); } }
protected void doHandle(CommandContext ctx) { OperationRequestAddress prefix = ctx.getPrefix(); ctx.printLine(ctx.getPrefixFormatter().format(prefix)); } }
protected void handle(CommandContext ctx, String args) { ctx.terminateSession(); } }
protected void doHandle(CommandContext ctx) { ctx.terminateSession(); } }
public ByteOrderMark(final String charsetName, final int... bytes) { if (charsetName == null || charsetName.length() == 0) { throw new IllegalArgumentException("No charsetName specified"); } if (bytes == null || bytes.length == 0) { throw new IllegalArgumentException(...
public ByteOrderMark(final String charsetName, final int... bytes) { if (charsetName == null || charsetName.isEmpty()) { throw new IllegalArgumentException("No charsetName specified"); } if (bytes == null || bytes.length == 0) { throw new IllegalArgumentException("No ...
public static long freeSpaceKb(final long timeout) throws IOException { return freeSpaceKb(new File(".").getAbsolutePath(), timeout); } //----------------------------------------------------------------------- /** * Returns the free space on a drive or volume in a cross-platform manner. ...
public static long freeSpaceKb(final long timeout) throws IOException { return freeSpaceKb(new File(".").getAbsolutePath(), timeout); } //----------------------------------------------------------------------- /** * Returns the free space on a drive or volume in a cross-platform manner. ...
public static boolean isExtension(final String filename, final String extension) { if (filename == null) { return false; } if (extension == null || extension.length() == 0) { return indexOfExtension(filename) == NOT_FOUND; } final String fileExt = getE...
public static boolean isExtension(final String filename, final String extension) { if (filename == null) { return false; } if (extension == null || extension.isEmpty()) { return indexOfExtension(filename) == NOT_FOUND; } final String fileExt = getExten...
public MagicNumberFileFilter(final String magicNumber, final long offset) { if (magicNumber == null) { throw new IllegalArgumentException("The magic number cannot be null"); } if (magicNumber.length() == 0) { throw new IllegalArgumentException("The magic number must c...
public MagicNumberFileFilter(final String magicNumber, final long offset) { if (magicNumber == null) { throw new IllegalArgumentException("The magic number cannot be null"); } if (magicNumber.isEmpty()) { throw new IllegalArgumentException("The magic number must conta...
public static final byte[] decodeUrl(byte[] bytes) throws DecoderException { if (bytes == null) { return null; } ByteArrayOutputStream buffer = new ByteArrayOutputStream(); for (int i = 0; i < bytes.length; i++) { int b = bytes[i]; if (b == '+') { ...
public static final byte[] decodeUrl(byte[] bytes) throws DecoderException { if (bytes == null) { return null; } ByteArrayOutputStream buffer = new ByteArrayOutputStream(); for (int i = 0; i < bytes.length; i++) { int b = bytes[i]; if (b == '+') { ...
void emitBatch(TransactionAttempt tx, Object coordinatorMeta, TransactionalOutputCollector collector); package backtype.storm.transactional; import backtype.storm.task.TopologyContext; import backtype.storm.topology.IComponent; import java.math.BigInteger; import java.util.Map; public interface ITransactionalSpout e...
void emitBatch(TransactionAttempt tx, Object coordinatorMeta, TransactionalOutputCollector collector); package backtype.storm.transactional; import backtype.storm.task.TopologyContext; import backtype.storm.topology.IComponent; import java.math.BigInteger; import java.util.Map; public interface ITransactionalSpout e...
public void execute(Tuple input) { TransactionAttempt attempt = (TransactionAttempt) input.getValue(0); if(input.getSourceStreamId().equals(TransactionalSpoutCoordinator.TRANSACTION_COMMIT_STREAM_ID)) { _collector.ack(input); // can ack before since it doesn't matter if this ...
public void execute(Tuple input) { TransactionAttempt attempt = (TransactionAttempt) input.getValue(0); if(input.getSourceStreamId().equals(TransactionalSpoutCoordinator.TRANSACTION_COMMIT_STREAM_ID)) { _collector.ack(input); // can ack before since it doesn't matter if this ...
public Configuration(final ServerEnvironment serverEnvironment) { assert serverEnvironment == null : "serverEnvironment is null"; this.serverEnvironment = serverEnvironment; this.extensionRegistry = new ExtensionRegistry(serverEnvironment.getLaunchType().getProcessType()); ...
public Configuration(final ServerEnvironment serverEnvironment) { assert serverEnvironment != null : "serverEnvironment is null"; this.serverEnvironment = serverEnvironment; this.extensionRegistry = new ExtensionRegistry(serverEnvironment.getLaunchType().getProcessType()); ...
public Map<String, ModelNode> getChildTypeOverrideDescriptions(Locale locale) { return Collections.emptyMap(); } }); ...
public Map<String, ModelNode> getChildTypeOverrideDescriptions(Locale locale) { return Collections.emptyMap(); } }); ...
public Map<String, ModelNode> getChildTypeOverrideDescriptions(Locale locale) { return Collections.emptyMap(); } }); ...
public Map<String, ModelNode> getChildTypeOverrideDescriptions(Locale locale) { return Collections.emptyMap(); } }); ...
public double[] computeTheoreticalState(double t) { // solve Kepler's equation double E = t; double d = 0; double corr = 999.0; for (int i = 0; (i < 50) && (Math.abs(corr) > 1.0e-12); ++i) { double f2 = e * Math.sin(E); double f0 = d - f2; double f1 = 1 - e * Math.cos(E); ...
public double[] computeTheoreticalState(double t) { // solve Kepler's equation double E = t; double d = 0; double corr = 999.0; for (int i = 0; (i < 50) && (Math.abs(corr) > 1.0e-12); ++i) { double f2 = e * Math.sin(E); double f0 = d - f2; double f1 = 1 - e * Math.cos(E); ...
public AppClientXml(final ModuleLoader loader) { super(loader); }
public AppClientXml(final ModuleLoader loader) { super(loader, null); }
public void beforeClass() throws Exception { final ServiceTarget target = container.subTarget(); final StringConfigurationPersister persister = new StringConfigurationPersister(Collections.<ModelNode>emptyList(), new StandaloneXml(null)); final ControlledProcessState processState = new Contr...
public void beforeClass() throws Exception { final ServiceTarget target = container.subTarget(); final StringConfigurationPersister persister = new StringConfigurationPersister(Collections.<ModelNode>emptyList(), new StandaloneXml(null, null)); final ControlledProcessState processState = new...
public int compare(EventState es0, EventState es1) { return orderingSign * Double.compare(es0.getEventTime(), es1.getEventTime()); } }); for (final EventState state : eventsStates) { if (state.evaluateStep(interpolator)) { ...
public int compare(EventState es0, EventState es1) { return orderingSign * Double.compare(es0.getEventTime(), es1.getEventTime()); } }); for (final EventState state : eventsStates) { if (state.evaluateStep(interpolator)) { ...
public JaxrSubsystemTestCase() { super(JAXRConstants.SUBSYSTEM_NAME, new JAXRSubsystemExtension()); }
public JaxrSubsystemTestCase() { super(JAXRConstants.SUBSYSTEM_NAME, new JAXRExtension()); }
public void testCpioUnarchive() throws Exception { StringBuilder expected = new StringBuilder(); expected.append("./test1.xml<?xml version=\"1.0\"?>\n"); expected.append("<empty/>./test2.xml<?xml version=\"1.0\"?>\n"); expected.append("<empty/>\n"); CpioArchiveInputStream i...
public void testCpioUnarchive() throws Exception { StringBuilder expected = new StringBuilder(); expected.append("./test1.xml<?xml version=\"1.0\"?>\n"); expected.append("<empty/>./test2.xml<?xml version=\"1.0\"?>\n"); expected.append("<empty/>\n"); CpioArchiveInputStream i...
public ModelNode addResourceAttributeDescription(final ResourceBundle bundle, final String prefix, final ModelNode resourceDescription) { final ModelNode attr = new ModelNode(); attr.get(ModelDescriptionConstants.TYPE).set(attr.getType()); attr.get(ModelDescriptionConstants.DESCRIPTION).set(...
public ModelNode addResourceAttributeDescription(final ResourceBundle bundle, final String prefix, final ModelNode resourceDescription) { final ModelNode attr = new ModelNode(); attr.get(ModelDescriptionConstants.TYPE).set(type); attr.get(ModelDescriptionConstants.DESCRIPTION).set(getAttribu...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRI...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRI...
private static void writePrincipal(XMLExtendedStreamWriter writer, ModelNode principal) throws XMLStreamException { String elementName = principal.require(TYPE).asString().equals(GROUP) ? Element.GROUP.getLocalName() : Element.USER.getLocalName(); writer.writeStartElement(elementName);
private static void writePrincipal(XMLExtendedStreamWriter writer, ModelNode principal) throws XMLStreamException { String elementName = principal.require(TYPE).asString().equalsIgnoreCase(GROUP) ? Element.GROUP.getLocalName() : Element.USER.getLocalName(); writer.writeStartElement(elementName);
public void populateModel(Resource rootResource) { Resource management = Resource.Factory.create(); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.MAN...
public void populateModel(Resource rootResource) { Resource management = Resource.Factory.create(); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.MAN...
public void populateModel(Resource rootResource) { Resource management = Resource.Factory.create(); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.MAN...
public void populateModel(Resource rootResource) { Resource management = Resource.Factory.create(); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.MAN...
protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration) { HostModelUtil.createRootRegistry(rootRegistration, environment, ignoredRegistry, this, processType, authorizer); VersionModelInitializer.registerRootResource(rootResource, environment != null ? environ...
protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration) { HostModelUtil.createRootRegistry(rootRegistration, environment, ignoredRegistry, this, processType, authorizer); VersionModelInitializer.registerRootResource(rootResource, environment != null ? environ...
public Environment getCallEnvironment() { //TODO implement getCallEnvironment throw null; } } Resource createRootResource() { final Resource rootResource = Resource.Factory.create(); CoreManagementResourceDefinition.registerDomainResource(rootResource); ...
public Environment getCallEnvironment() { //TODO implement getCallEnvironment throw null; } } Resource createRootResource() { final Resource rootResource = Resource.Factory.create(); CoreManagementResourceDefinition.registerDomainResource(rootResource, n...
private QueueDefinition(final boolean registerRuntimeOnly, final boolean runtimeOnly, final String path, final AbstractAddStepHandler addHandler, final OperationStepHandler removeHandler) { super(PathElement.pathElement(path), MessagingExtension.getResourc...
private QueueDefinition(final boolean registerRuntimeOnly, final boolean runtimeOnly, final String path, final AbstractAddStepHandler addHandler, final OperationStepHandler removeHandler) { super(PathElement.pathElement(path), MessagingExtension.getResourc...
protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration) { // TODO maybe make creating of empty nodes part of the MNR description Resource managementResource = Resource.Factory.create(); // TODO - Can we get a Resource direct from CoreManagementResourceDefinit...
protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration) { // TODO maybe make creating of empty nodes part of the MNR description Resource managementResource = Resource.Factory.create(); // TODO - Can we get a Resource direct from CoreManagementResourceDefinit...
* an IDE content-assist point of view as they will see only the public mutator methods, reducing * any possible confusion. * * <p>Implementations should take care to allow for use of string-based bean names, placeholder * (<code>"${...}"</code>) and SpEL (<code>"#{...}</code>) expressions wherever they may be usef...
* an IDE content-assist point of view as they will see only the public mutator methods, reducing * any possible confusion. * * <p>Implementations should take care to allow for use of string-based bean names, placeholder * (<code>"${...}"</code>) and SpEL (<code>"#{...}</code>) expressions wherever they may be usef...
void execute(FeatureSpecification spec, SpecificationContext specificationContext); /* * 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...
void execute(FeatureSpecification spec, SpecificationContext specificationContext); /* * 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...
public void setExtra(byte[] extra) throws RuntimeException { try { setExtraFields(ExtraFieldUtils.parse(extra)); } catch (Exception e) { throw new RuntimeException(e.getMessage()); } }
public void setExtra(byte[] extra) throws RuntimeException { try { setExtraFields(ExtraFieldUtils.parse(extra)); } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } }
protected void populateModel(ModelNode existingModel, ModelNode newModel) throws OperationFailedException { Util.copyModel(existingModel,newModel,MailSubsystemModel.JNDI_NAME,MailSubsystemModel.DEBUG,MailSubsystemModel.SERVER_TYPE); }
protected void populateModel(ModelNode existingModel, ModelNode newModel) throws OperationFailedException { Util.copyModel(existingModel,newModel,MailSubsystemModel.JNDI_NAME,MailSubsystemModel.DEBUG,MailSubsystemModel.FROM); }
private String SUBSYSTEM_XML = " <subsystem xmlns=\"urn:jboss:domain:mail:1.0\">\n" + " <mail-session jndi-name=\"java:/Mail\" from=\"tomaz.cerar@gmail.com\" >\n" + " <smtp-server outbound-socket-binding-ref=\"mail-smtp\" ssl=\"true\">\n"...
private String SUBSYSTEM_XML = " <subsystem xmlns=\"urn:jboss:domain:mail:1.0\">\n" + " <mail-session jndi-name=\"java:/Mail\" from=\"tomaz.cerar@gmail.com\" >\n" + " <smtp-server outbound-socket-binding-ref=\"mail-smtp\" ssl=\"true\">\n"...
@ContextConfiguration(loader = AnnotationConfigContextLoader.class, classes = PojoAndStringConfig.class) /* * 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 ...
@ContextConfiguration(loader = AnnotationConfigContextLoader.class, classes = PojoAndStringConfig.class) /* * 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 ...
public static Properties raCommonProperties() { Properties params = new Properties(); params.put("archive", "some.rar"); params.put("transaction-support", "XATransaction"); params.put("bootstrap-context", "someContext"); return params; }
public static Properties raCommonProperties() { Properties params = new Properties(); params.put("archive", "some.rar"); params.put("transaction-support", "XATransaction"); params.put("bootstrap-context", "default"); return params; }
* @return true unless package/protected/private modifier detected */ static boolean isPackageAccess(int modifiers) { return (modifiers & ACCESS_TEST) == 0; } /** * Check a Member for basic accessibility. * @param m Member to check * @return true if <code>m</code> is accessi...
* @return true unless package/protected/private modifier detected */ static boolean isPackageAccess(int modifiers) { return (modifiers & ACCESS_TEST) == 0; } /** * Check a Member for basic accessibility. * @param m Member to check * @return true if <code>m</code> is accessi...
public HostModel getHostModel() { return hostController.getHostModel(); }
public HostModel getHostModel() { return hostController.getOldHostModel(); }
public String getName() { return "rollout-plan"; }
public String getName() { return "rollout"; }
public static String getPackageName(Class<?> cls) { if (cls == null) { return StringUtils.EMPTY; } return getPackageName(cls.getName()); }
public static String getPackageName(Class<?> cls) { if (cls == null) { return StringUtils.EMPTY; } return cls.getPackage().getName(); }
package org.springframework.messaging.converter; /* * 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.converter; /* * 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.converter; /* * 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.or...
package org.springframework.messaging.converter; /* * 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.or...
package org.springframework.messaging.handler; /* * 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/...
package org.springframework.messaging.handler; /* * 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/...
import org.springframework.messaging.converter.MessageConverter; /* * Copyright 2002-2012 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...
import org.springframework.messaging.converter.MessageConverter; /* * Copyright 2002-2012 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...
package org.springframework.messaging.handler.support; /* * 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.o...
package org.springframework.messaging.handler.support; /* * 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.o...
package org.springframework.messaging.handler.support; /* * 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.o...
package org.springframework.messaging.handler.support; /* * 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.o...
package org.springframework.messaging.handler.support; /** * Abstractions and classes for working with message-handling methods. */ package org.springframework.messaging.handler.method;
package org.springframework.messaging.handler.support; /** * Abstractions and classes for working with message-handling methods. */ package org.springframework.messaging.handler.support;
package org.springframework.messaging.support; /* * Copyright 2002-2010 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/...
package org.springframework.messaging.support; /* * Copyright 2002-2010 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/...
package org.springframework.messaging.tcp; /* * 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/licenses/...
package org.springframework.messaging.tcp; /* * 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/licenses/...
package org.springframework.messaging.tcp; /* * 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/licenses/...
package org.springframework.messaging.tcp; /* * 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/licenses/...
package org.springframework.messaging.tcp; /* * 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/licenses/...
package org.springframework.messaging.tcp; /* * 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/licenses/...
package org.springframework.messaging.tcp; /* * 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/licenses/...
package org.springframework.messaging.tcp; /* * 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/licenses/...