buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION); final Com...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION); final Com...
private void processMessageBeans(final DeploymentUnit deploymentUnit, final Collection<AnnotationInstance> messageBeanAnnotations, final CompositeIndex compositeIndex) throws DeploymentUnitProcessingException { if (messageBeanAnnotations.isEmpty()) return; final EjbJarDescription ejbJar...
private void processMessageBeans(final DeploymentUnit deploymentUnit, final Collection<AnnotationInstance> messageBeanAnnotations, final CompositeIndex compositeIndex) throws DeploymentUnitProcessingException { if (messageBeanAnnotations.isEmpty()) return; final EjbJarDescription ejbJar...
private void processSessionBeans(final DeploymentUnit deploymentUnit, final List<AnnotationInstance> sessionBeanAnnotations, final SessionBeanComponentDescription.SessionBeanType annotatedSessionBeanType) { final EjbJarDescription ejbJarDescription = getEjbJarDescription(deploymentUnit); final Serv...
private void processSessionBeans(final DeploymentUnit deploymentUnit, final List<AnnotationInstance> sessionBeanAnnotations, final SessionBeanComponentDescription.SessionBeanType annotatedSessionBeanType) { final EjbJarDescription ejbJarDescription = getEjbJarDescription(deploymentUnit); final Serv...
public static Test suite() { return new TestSuite(TestSequencedHashMap.class); }
public static Test suite() { return BulkTest.makeSuite(TestSequencedHashMap.class); }
private DeploymentInfo createServletConfig() throws StartException { try { mergedMetaData.resolveAnnotations(); final DeploymentInfo d = new DeploymentInfo(); d.setContextPath(contextPath); if (mergedMetaData.getDescriptionGroup() != null) { d....
private DeploymentInfo createServletConfig() throws StartException { try { mergedMetaData.resolveAnnotations(); final DeploymentInfo d = new DeploymentInfo(); d.setContextPath(contextPath); if (mergedMetaData.getDescriptionGroup() != null) { d....
public void startChannels() throws IOException, URISyntaxException { ProtocolChannelClient.Configuration<ManagementChannel> configuration = new ProtocolChannelClient.Configuration<ManagementChannel>(); configuration.setEndpointName(ENDPOINT_NAME); configuration.setUriScheme(URI_SCHEME); ...
public void startChannels() throws IOException, URISyntaxException { ProtocolChannelClient.Configuration<ManagementChannel> configuration = new ProtocolChannelClient.Configuration<ManagementChannel>(); configuration.setEndpointName(ENDPOINT_NAME); configuration.setUriScheme(URI_SCHEME); ...
protected void execute(DeploymentProcessorTarget processorTarget) { if (deployment != null && !deployment.isEmpty()) { processorTarget.addDeploymentProcessor(Constants.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_APP_CLIENT, new ApplicationClientStructureProcessor(dep...
protected void execute(DeploymentProcessorTarget processorTarget) { if (deployment != null && !deployment.isEmpty()) { processorTarget.addDeploymentProcessor(Constants.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_APP_CLIENT, new ApplicationClientStructureProcessor(dep...
protected void execute(DeploymentProcessorTarget processorTarget) { //DUP's that are used even for app client deployments processorTarget.addDeploymentProcessor(EJB3Extension.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_REGISTER_JBOSS_ALL_XML_PARSER, new JBossAllXmlParse...
protected void execute(DeploymentProcessorTarget processorTarget) { //DUP's that are used even for app client deployments processorTarget.addDeploymentProcessor(EJB3Extension.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_REGISTER_JBOSS_ALL_EJB, new JBossAllXmlParserRegist...
protected void execute(DeploymentProcessorTarget processorTarget) { // set Hibernate persistence provider as the default provider javax.persistence.spi.PersistenceProviderResolverHolder.setPersistenceProviderResolver( PersistenceProviderResolverImpl.getIn...
protected void execute(DeploymentProcessorTarget processorTarget) { // set Hibernate persistence provider as the default provider javax.persistence.spi.PersistenceProviderResolverHolder.setPersistenceProviderResolver( PersistenceProviderResolverImpl.getIn...
protected void execute(DeploymentProcessorTarget processorTarget) { processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_JSF_VERSION, new JSFVersionProcessor(model)); processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, P...
protected void execute(DeploymentProcessorTarget processorTarget) { processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_JSF_VERSION, new JSFVersionProcessor(model)); processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, P...
public static void registerJBossXMLParsers() { DeployerChainAddHandler.addDeploymentProcessor(ServerService.SERVER_NAME, Phase.STRUCTURE, Phase.STRUCTURE_REGISTER_JBOSS_ALL_XML_PARSER, new JBossAllXmlParserRegisteringProcessor<DeploymentDependencies>(ROOT_1_0, DeploymentDependencies.ATTACHMENT_KEY, Deployme...
public static void registerJBossXMLParsers() { DeployerChainAddHandler.addDeploymentProcessor(ServerService.SERVER_NAME, Phase.STRUCTURE, Phase.STRUCTURE_REGISTER_JBOSS_ALL_DEPLOYMENT_DEPS, new JBossAllXmlParserRegisteringProcessor<DeploymentDependencies>(ROOT_1_0, DeploymentDependencies.ATTACHMENT_KEY, Dep...
protected void execute(DeploymentProcessorTarget processorTarget) { final SharedWebMetaDataBuilder sharedWebBuilder = new SharedWebMetaDataBuilder(model.clone()); final SharedTldsMetaDataBuilder sharedTldsBuilder = new SharedTldsMetaDataBuilder(model.clone()); ...
protected void execute(DeploymentProcessorTarget processorTarget) { final SharedWebMetaDataBuilder sharedWebBuilder = new SharedWebMetaDataBuilder(model.clone()); final SharedTldsMetaDataBuilder sharedTldsBuilder = new SharedTldsMetaDataBuilder(model.clone()); ...
protected void execute(DeploymentProcessorTarget processorTarget) { processorTarget.addDeploymentProcessor(WeldExtension.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_REGISTER_JBOSS_ALL_XML_PARSER, new JBossAllXmlParserRegisteringProcessor<>(WeldJBossAllParser.ROOT_ELEMENT, WeldJBossAllCo...
protected void execute(DeploymentProcessorTarget processorTarget) { processorTarget.addDeploymentProcessor(WeldExtension.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_REGISTER_JBOSS_ALL_WELD, new JBossAllXmlParserRegisteringProcessor<>(WeldJBossAllParser.ROOT_ELEMENT, WeldJBossAllConfigur...
private void handleReadError(ServerHttpResponse response, String error, String sessionId) { try { response.setStatusCode(HttpStatus.INTERNAL_SERVER_ERROR); response.getBody().write(error.getBytes("UTF-8")); } catch (IOException ex) { throw new SockJsException("Failed to send error: " + error, sessionId,...
private void handleReadError(ServerHttpResponse response, String error, String sessionId) { try { response.setStatusCode(HttpStatus.INTERNAL_SERVER_ERROR); response.getBody().write(error.getBytes(UTF8_CHARSET)); } catch (IOException ex) { throw new SockJsException("Failed to send error: " + error, sessi...
public void handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, AbstractHttpSockJsSession sockJsSession) throws SockJsException { super.handleRequestInternal(request, response, wsHandler, sockJsSession); try { response.getBody().write("ok".getBytes("UTF-...
public void handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, AbstractHttpSockJsSession sockJsSession) throws SockJsException { super.handleRequestInternal(request, response, wsHandler, sockJsSession); try { response.getBody().write("ok".getBytes(UTF8_...
E get(K key, boolean lock); /* * JBoss, Home of Professional Open Source. * Copyright 2006, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can re...
E get(K key, boolean lock); /* * JBoss, Home of Professional Open Source. * Copyright 2006, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can re...
setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES). /* * 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...
setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES). /* * 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...
public Annotation[] getAnnotations() { if (field != null) { if (cachedFieldAnnotations == null) { cachedFieldAnnotations = field.getAnnotations(); } return cachedFieldAnnotations; } else if (methodParameter != null) { return methodParameter.getParameterAnnotations(); } else { return null; } ...
public Annotation[] getAnnotations() { if (field != null) { if (cachedFieldAnnotations == null) { cachedFieldAnnotations = field.getAnnotations(); } return cachedFieldAnnotations; } else if (methodParameter != null) { return methodParameter.getMethod().getAnnotations(); } else { return null; ...
protected ServiceController<?> getService(final OperationContext context, final ModelNode operation) throws OperationFailedException { final String name = Util.getNameFromAddress(operation.require(OP_ADDR)); ServiceController<?> controller = context.getServiceRegistry(tru...
protected ServiceController<?> getService(final OperationContext context, final ModelNode operation) throws OperationFailedException { final String name = Util.getNameFromAddress(operation.require(OP_ADDR)); ServiceController<?> controller = context.getServiceRegistry(fal...
private void scheduleExpiration(K id, boolean cancel) { if (this.timeout != null) { Future<?> future = cancel ? this.expirationFutures.remove(id) : this.expirationFutures.put(id, this.executor.schedule(new RemoveTask<K>(this, id), this.timeout.getValue(), this.timeout.getTimeUnit())); ...
private void scheduleExpiration(K id, boolean cancel) { if (this.timeout != null && timeout.getValue() != -1) { Future<?> future = cancel ? this.expirationFutures.remove(id) : this.expirationFutures.put(id, this.executor.schedule(new RemoveTask<K>(this, id), this.timeout.getValue(), this.timeout...
private void scheduleExpirationPassivation(K id) { if (this.executor != null) { StatefulTimeoutInfo timeout = this.store.getTimeout(); if (timeout != null) { this.schedule(this.expirationFutures, id, this.removeTaskFactory, timeout.getValue(), timeout.getTimeUnit()); ...
private void scheduleExpirationPassivation(K id) { if (this.executor != null) { StatefulTimeoutInfo timeout = this.store.getTimeout(); if (timeout != null && timeout.getValue() != -1) { this.schedule(this.expirationFutures, id, this.removeTaskFactory, timeout.getValue...
private ServiceController<WebHost> addCommonHost(OperationContext context, ServiceVerificationHandler verificationHandler, String hostName, List<String> aliases, String serverName, ServiceName virtualHostServiceName, PathAddress parent) { WebHostService s...
private ServiceController<WebHost> addCommonHost(OperationContext context, ServiceVerificationHandler verificationHandler, String hostName, List<String> aliases, String serverName, ServiceName virtualHostServiceName, PathAddress parent) { WebHostService s...
public synchronized void start(StartContext context) throws StartException { final StandardHost host = new StandardHost(); host.setAppBase(tempPathInjector.getValue()); host.setName(name); for(final String alias : aliases) { host.addAlias(alias); } if(acce...
public synchronized void start(StartContext context) throws StartException { final StandardHost host = new StandardHost(); host.setAppBase(tempPathInjector.getValue()); host.setName(name); for(final String alias : aliases) { host.addAlias(alias); } if(acce...
public void inject(final Host host) throws InjectionException { final Context context = this.context.getValue(); // Check if this is the default webapp for the host if (("/" + "ROOT").equals(context.getPath())) { context.setPath(""); } // Add the context to host ...
public void inject(final Host host) throws InjectionException { final Context context = this.context.getValue(); // Check if this is the default webapp for the host if (("/" + host.getDefaultWebapp()).equals(context.getPath())) { context.setPath(""); } // Add the ...
protected void deployComponent(final DeploymentPhaseContext phaseContext, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ServiceTarget serviceTarget = phaseContext.getServiceTarget(...
protected void deployComponent(final DeploymentPhaseContext phaseContext, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ServiceTarget serviceTarget = phaseContext.getServiceTarget(...
public int hashCode() { return b*17 + t ; }
public int hashCode() { return b*17 + super.hashCode(); }
public Object clone() { ZipArchiveEntry entry = null; try { entry = new ZipArchiveEntry( (java.util.zip.ZipEntry)super.clone() ); } catch( final Exception e ) { // impossible as extra data is in correct format e.printStackTrace(...
public Object clone() { ZipArchiveEntry entry = null; try { entry = new ZipArchiveEntry( (java.util.zip.ZipEntry)super.clone() ); } catch( final Exception e ) { // impossible as extra data is in correct format e.printStackTrace(...
private T[] buildArray(final int length) { return (T[]) Array.newInstance(field.getZero().getClass(), length); }
private T[] buildArray(final int length) { return (T[]) Array.newInstance(field.getRuntimeClass(), length); }
public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { final DeploymentReflectionIndex index = context.getDeploymentU...
public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { final DeploymentReflectionIndex index = context.getDeploymentU...
public void configure(DeploymentPhaseContext context, ComponentConfiguration componentConfiguration, ViewDescription description, ViewConfiguration configuration) throws DeploymentUnitProcessingException { // add the instance associating interceptor to the *start of the invocation in...
public void configure(DeploymentPhaseContext context, ComponentConfiguration componentConfiguration, ViewDescription description, ViewConfiguration configuration) throws DeploymentUnitProcessingException { // add the instance associating interceptor to the *start of the invocation in...
public Object processInvocation(final InterceptorContext context) throws Exception { SessionID sessionId = (SessionID) context.getPrivateData(SessionID.class); return new StatefulSerializedProxy(serviceName, sessionId); }
public Object processInvocation(final InterceptorContext context) throws Exception { SessionID sessionId = context.getPrivateData(SessionID.class); return new StatefulSerializedProxy(serviceName, sessionId); }
public void configureDependency(final ServiceBuilder<?> serviceBuilder, ComponentStartService service) throws DeploymentUnitProcessingException { serviceBuilder.addDependency(serviceName); } }); //if this is an ejb add the EJB interceptors if (description...
public void configureDependency(final ServiceBuilder<?> serviceBuilder, ComponentStartService service) throws DeploymentUnitProcessingException { serviceBuilder.addDependency(serviceName); } }); //if this is an ejb add the EJB interceptors if (description...
private void processClassAnnotations(ClassInfo beanClass, MethodIntf methodIntf, CompositeIndex index, EJBComponentDescription componentDescription) throws DeploymentUnitProcessingException { final DotName superName = beanClass.superName(); if (superName != null) { ClassInfo superClass =...
private void processClassAnnotations(ClassInfo beanClass, MethodIntf methodIntf, CompositeIndex index, EJBComponentDescription componentDescription) throws DeploymentUnitProcessingException { final DotName superName = beanClass.superName(); if (superName != null) { ClassInfo superClass =...
public void undeploy(final DeploymentUnit context) { } protected void processFieldResource(final DeploymentPhaseContext phaseContext, final FieldInfo fieldInfo, final String name, final String type, final EEModuleClassDescription classDescription, final AnnotationInstance annotation, final EEModuleDescript...
public void undeploy(final DeploymentUnit context) { } protected void processFieldResource(final DeploymentPhaseContext phaseContext, final FieldInfo fieldInfo, final String name, final String type, final EEModuleClassDescription classDescription, final AnnotationInstance annotation, final EEModuleDescript...
private void processMethod(final DeploymentUnit deploymentUnit, final EJBResourceWrapper annotation, final MethodInfo methodInfo, final EEModuleDescription eeModuleDescription) { final String methodName = methodInfo.name(); if (!methodName.startsWith("set") || methodInfo.args().length != 1) { ...
private void processMethod(final DeploymentUnit deploymentUnit, final EJBResourceWrapper annotation, final MethodInfo methodInfo, final EEModuleDescription eeModuleDescription) { final String methodName = methodInfo.name(); if (!methodName.startsWith("set") || methodInfo.args().length != 1) { ...
private static void processMethodRef(final DeploymentUnit unit, final WSRefAnnotationWrapper annotation, final MethodInfo methodInfo) throws DeploymentUnitProcessingException { final String methodName = methodInfo.name(); if (!methodName.startsWith("set") || methodInfo.args().length != 1) { ...
private static void processMethodRef(final DeploymentUnit unit, final WSRefAnnotationWrapper annotation, final MethodInfo methodInfo) throws DeploymentUnitProcessingException { final String methodName = methodInfo.name(); if (!methodName.startsWith("set") || methodInfo.args().length != 1) { ...
public int complete(String buffer, int cursor, List candidates) { int firstCharIndex = 0; while(firstCharIndex < buffer.length()) { if(!Character.isWhitespace(buffer.charAt(firstCharIndex))) { break; } ++firstCharIndex; } if(first...
public int complete(String buffer, int cursor, List candidates) { int firstCharIndex = 0; while(firstCharIndex < buffer.length()) { if(!Character.isWhitespace(buffer.charAt(firstCharIndex))) { break; } ++firstCharIndex; } if(first...
public CSVLexer(final CSVFormat format, final ExtendedBufferedReader in) { super(format, in); } /** * Returns the next token. * <p/> * A token corresponds to a term, a record change or an end-of-file indicator. * * @param token * an existing Token object to ...
public CSVLexer(final CSVFormat format, final ExtendedBufferedReader in) { super(format, in); } /** * Returns the next token. * <p/> * A token corresponds to a term, a record change or an end-of-file indicator. * * @param token * an existing Token object to ...
public CSVLexer1306663(final CSVFormat format, final ExtendedBufferedReader in) { super(format, in); } /** * Returns the next token. * <p/> * A token corresponds to a term, a record change or an end-of-file indicator. * * @param tkn an existing Token object to reuse. The ca...
public CSVLexer1306663(final CSVFormat format, final ExtendedBufferedReader in) { super(format, in); } /** * Returns the next token. * <p/> * A token corresponds to a term, a record change or an end-of-file indicator. * * @param tkn an existing Token object to reuse. The ca...
public CSVLexer1306667(final CSVFormat format, final ExtendedBufferedReader in) { super(format, in); } /** * Returns the next token. * <p/> * A token corresponds to a term, a record change or an end-of-file indicator. * * @param tkn an existing Token object to reuse. The ca...
public CSVLexer1306667(final CSVFormat format, final ExtendedBufferedReader in) { super(format, in); } /** * Returns the next token. * <p/> * A token corresponds to a term, a record change or an end-of-file indicator. * * @param tkn an existing Token object to reuse. The ca...
public void testSendMessage() throws JMSException, NamingException { final InitialContext ctx = new InitialContext(); final QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("java:/JmsXA"); final QueueConnection connection = factory.createQueueConnection(); connect...
public void testSendMessage() throws JMSException, NamingException { final InitialContext ctx = new InitialContext(); final QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("java:/JmsXA"); final QueueConnection connection = factory.createQueueConnection(); connect...
public void sendMessage() throws Exception { final InitialContext ctx = new InitialContext(); final TopicConnectionFactory factory = (TopicConnectionFactory) ctx.lookup("java:/JmsXA"); final TopicConnection connection = factory.createTopicConnection(); connection.start(); try...
public void sendMessage() throws Exception { final InitialContext ctx = new InitialContext(); final TopicConnectionFactory factory = (TopicConnectionFactory) ctx.lookup("java:/JmsXA"); final TopicConnection connection = factory.createTopicConnection(); connection.start(); try...
protected synchronized Channel getChannel() throws IOException { if (closed) { throw MESSAGES.objectIsClosed( ModelControllerClient.class.getSimpleName()); } if (strategy == null) { try { final ProtocolChannelClient.Configuration configuration = Protoc...
protected synchronized Channel getChannel() throws IOException { if (closed) { throw MESSAGES.objectIsClosed( ModelControllerClient.class.getSimpleName()); } if (strategy == null) { try { final ProtocolChannelClient.Configuration configuration = Protoc...
public VectorialPointValuePair doOptimize() throws FunctionEvaluationException, OptimizationException, IllegalArgumentException { // iterate until convergence is reached VectorialPointValuePair current = null; for (boolean converged = false; !converged;) { incrementIter...
public VectorialPointValuePair doOptimize() throws FunctionEvaluationException, OptimizationException, IllegalArgumentException { // iterate until convergence is reached VectorialPointValuePair current = null; for (boolean converged = false; !converged;) { incrementIter...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { if (restart) { //Add to the exit code so that we get respawned System.exit(ExitCodes.HOST_CONTROLLER_ABORT_EXIT_CODE + 1); } else { ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { if (restart) { //Add to the exit code so that we get respawned System.exit(ExitCodes.RESTART_PROCESS_FROM_STARTUP_SCRIPT); } else { ...
public AccessTimeoutDetails getAccessTimeout(Method method) { final EJBBusinessMethod ejbMethod = new EJBBusinessMethod(method); final AccessTimeoutDetails accessTimeout = this.methodAccessTimeouts.get(ejbMethod); if (accessTimeout != null) { return accessTimeout; } ...
public AccessTimeoutDetails getAccessTimeout(Method method) { final EJBBusinessMethod ejbMethod = new EJBBusinessMethod(method); final AccessTimeoutDetails accessTimeout = this.methodAccessTimeouts.get(ejbMethod); if (accessTimeout != null) { return accessTimeout; } ...
public void testExcelPrintAllArrayOfLists() throws IOException { final StringWriter sw = new StringWriter(); final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.EXCEL); printer.printRecords((Object) new List[] { Arrays.asList("r1c1", "r1c2"), Arrays.asList("r2c1", "r2c2") }); ass...
public void testExcelPrintAllArrayOfLists() throws IOException { final StringWriter sw = new StringWriter(); final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.EXCEL); printer.printRecords(new List[] { Arrays.asList("r1c1", "r1c2"), Arrays.asList("r2c1", "r2c2") }); assertEquals...
public int getRawValue(int holder) { return (holder & _mask); }
public int getRawValue(int holder) { return holder & _mask; }
public static boolean isInnerClass(Class cls) { if (cls == null) { return false; } return (cls.getName().indexOf(INNER_CLASS_SEPARATOR_CHAR) >= 0); }
public static boolean isInnerClass(Class cls) { if (cls == null) { return false; } return cls.getName().indexOf(INNER_CLASS_SEPARATOR_CHAR) >= 0; }
public static boolean isThrowableNested() { return (THROWABLE_CAUSE_METHOD != null); }
public static boolean isThrowableNested() { return THROWABLE_CAUSE_METHOD != null; }
public String getMessage(String baseMsg) { StringBuffer msg = new StringBuffer(); if (baseMsg != null) { msg.append(baseMsg); } Throwable nestedCause = ExceptionUtils.getCause(this.nestable); if (nestedCause != null) { String causeMsg = nestedCause.ge...
public String getMessage(String baseMsg) { StringBuffer msg = new StringBuffer(); if (baseMsg != null) { msg.append(baseMsg); } Throwable nestedCause = ExceptionUtils.getCause(this.nestable); if (nestedCause != null) { String causeMsg = nestedCause.ge...
public boolean containsDouble(double value) { return (value >= min && value <= max); }
public boolean containsDouble(double value) { return value >= min && value <= max; }
public boolean containsFloat(float value) { return (value >= min && value <= max); }
public boolean containsFloat(float value) { return value >= min && value <= max; }
public boolean nextBoolean() { return (Math.random() > 0.5); }
public boolean nextBoolean() { return Math.random() > 0.5; }
public boolean containsNumber(Number number) { if (number == null) { return false; } if (number.getClass() != min.getClass()) { throw new IllegalArgumentException("The number must be of the same type as the range numbers"); } int compareMin = ((Compara...
public boolean containsNumber(Number number) { if (number == null) { return false; } if (number.getClass() != min.getClass()) { throw new IllegalArgumentException("The number must be of the same type as the range numbers"); } int compareMin = ((Compara...
public int compareTo(Object obj) { MutableByte other = (MutableByte) obj; byte anotherVal = other.value; return (value < anotherVal ? -1 : (value == anotherVal ? 0 : 1)); }
public int compareTo(Object obj) { MutableByte other = (MutableByte) obj; byte anotherVal = other.value; return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1); }
public int compareTo(Object obj) { MutableLong other = (MutableLong) obj; long anotherVal = other.value; return (value < anotherVal ? -1 : (value == anotherVal ? 0 : 1)); }
public int compareTo(Object obj) { MutableLong other = (MutableLong) obj; long anotherVal = other.value; return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1); }
protected String parseToken(String pattern, int[] indexRef) { StringBuffer buf = new StringBuffer(); int i = indexRef[0]; int length = pattern.length(); char c = pattern.charAt(i); if (c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z') { // Scan a run of the same cha...
protected String parseToken(String pattern, int[] indexRef) { StringBuilder buf = new StringBuilder(); int i = indexRef[0]; int length = pattern.length(); char c = pattern.charAt(i); if (c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z') { // Scan a run of the same c...
private static int getErrorResponseCode(String failureMsg) { // WFLY-2037. This is very hacky; better would be something like an internal failure-http-code that // is set on the response from the OperationFailedException and stripped from non-HTTP interfaces. // But this will do for now. ...
private static int getErrorResponseCode(String failureMsg) { // WFLY-2037. This is very hacky; better would be something like an internal failure-http-code that // is set on the response from the OperationFailedException and stripped from non-HTTP interfaces. // But this will do for now. ...
public static boolean exists(PathAddress address, ModelControllerClient client) throws IOException, MgmtOperationException { final PathElement element = address.getLastElement(); final PathAddress subAddress = address.subAddress(0, address.size() -1); final boolean checkType = element.isWild...
public static boolean exists(PathAddress address, ModelControllerClient client) throws IOException, MgmtOperationException { final PathElement element = address.getLastElement(); final PathAddress subAddress = address.subAddress(0, address.size() -1); final boolean checkType = element.isWild...
private void recurseList(final BSPTree<Euclidean1D> node, final List<Interval> list, final double lower, final double upper) { if (node.getCut() == null) { if ((Boolean) node.getAttribute()) { // this leaf cell is an insi...
private void recurseList(final BSPTree<Euclidean1D> node, final List<Interval> list, final double lower, final double upper) { if (node.getCut() == null) { if ((Boolean) node.getAttribute()) { // this leaf cell is an insi...
public Vector3D intersection(final Line line) { final Vector3D direction = line.getDirection(); final double dot = w.dotProduct(direction); if (FastMath.abs(dot) < 1.0e-10) { return null; } final Vector3D point = (Vector3D) line.toSpace(Vector1D.ZERO); ...
public Vector3D intersection(final Line line) { final Vector3D direction = line.getDirection(); final double dot = w.dotProduct(direction); if (FastMath.abs(dot) < 1.0e-10) { return null; } final Vector3D point = line.toSpace(Vector1D.ZERO); final ...
public void testDoubleLoad() throws Exception { empiricalDistribution2.load(dataArray); // testData File has 10000 values, with mean ~ 5.0, std dev ~ 1 // Make sure that loaded distribution matches this Assert.assertEquals(empiricalDistribution2.getSampleStats().getN(),1000,10E-7); ...
public void testDoubleLoad() throws Exception { empiricalDistribution2.load(dataArray); // testData File has 10000 values, with mean ~ 5.0, std dev ~ 1 // Make sure that loaded distribution matches this Assert.assertEquals(empiricalDistribution2.getSampleStats().getN(),1000,10E-7); ...
public void processDeployment(DeploymentUnitContext context) throws DeploymentUnitProcessingException { if(context.getAttachment(ModuleConfig.ATTACHMENT_KEY) != null) return; final VirtualFile deploymentRoot = getVirtualFileAttachment(context); final MountHandle deploymentRootMou...
public void processDeployment(DeploymentUnitContext context) throws DeploymentUnitProcessingException { if(context.getAttachment(ModuleConfig.ATTACHMENT_KEY) != null) return; final VirtualFile deploymentRoot = getVirtualFileAttachment(context); final MountHandle deploymentRootMou...
private void addOperationAuthorizationResult(OperationContext context, ModelNode result, ModelNode operation, String operationName) { AuthorizationResult authorizationResult = context.authorizeOperation(operation, false); result.get(EXECUTE).set(authorizationResult.getDecision() == Decis...
private void addOperationAuthorizationResult(OperationContext context, ModelNode result, ModelNode operation, String operationName) { AuthorizationResult authorizationResult = context.authorizeOperation(operation); result.get(EXECUTE).set(authorizationResult.getDecision() == Decision.PER...
protected void execute(final DeploymentProcessorTarget processorTarget) { processorTarget.addDeploymentProcessor(LoggingExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_LOGGING_CONFIG, LoggingDeploymentUnitProcessor.INSTANCE); } }, Stage.RUNTIME); f...
protected void execute(final DeploymentProcessorTarget processorTarget) { processorTarget.addDeploymentProcessor(LoggingExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_LOGGING_CONFIG, LoggingDeploymentUnitProcessor.INSTANCE); } }, Stage.RUNTIME); f...
public void validateResolvedParameter(String parameterName, ModelNode value) throws OperationFailedException { //TODO implement validateResolvedParameter throw new UnsupportedOperationException(); } }); static SimpleAttributeDefinition DATASOURCE_DRIVER = new SimpleAttri...
public void validateResolvedParameter(String parameterName, ModelNode value) throws OperationFailedException { //TODO implement validateResolvedParameter throw new UnsupportedOperationException(); } }); static SimpleAttributeDefinition DATASOURCE_DRIVER = new SimpleAttri...
private List<String> getServerLaunchCommand(final String serverName, final String serverProcessName, final JvmElement jvm, final PropertiesElement systemProperties) { List<String> command = new ArrayList<String>(); // if (false) { // // Example: run at high priority on *NIX // args.a...
private List<String> getServerLaunchCommand(final String serverName, final String serverProcessName, final JvmElement jvm, final PropertiesElement systemProperties) { List<String> command = new ArrayList<String>(); // if (false) { // // Example: run at high priority on *NIX // args.a...
public ServerEnvironment(Properties props, InputStream stdin, PrintStream stdout, PrintStream stderr, String processName, InetAddress processManagerAddress, Integer processManagerPort, InetAddress serverManagerAddress, Integer serverManagerPort, boolean standalone) { this.standalone = standalone...
public ServerEnvironment(Properties props, InputStream stdin, PrintStream stdout, PrintStream stderr, String processName, InetAddress processManagerAddress, Integer processManagerPort, InetAddress serverManagerAddress, Integer serverManagerPort, boolean standalone) { this.standalone = standalone...
public Cluster(Map<String, SupervisorDetails> supervisors, Map<String, SchedulerAssignmentImpl> assignments){ this.supervisors = new HashMap<String, SupervisorDetails>(supervisors.size()); this.supervisors.putAll(supervisors); this.assignments = new HashMap<String, SchedulerAssignmentImpl>(a...
public Cluster(Map<String, SupervisorDetails> supervisors, Map<String, SchedulerAssignmentImpl> assignments){ this.supervisors = new HashMap<String, SupervisorDetails>(supervisors.size()); this.supervisors.putAll(supervisors); this.assignments = new HashMap<String, SchedulerAssignmentImpl>(a...
private long parse(final Reader in, boolean traverseColumns) throws IOException { final CSVFormat format = CSVFormat.DEFAULT.withIgnoreSurroundingSpaces(false); long recordCount = 0; for (final CSVRecord record : format.parse(in)) { recordCount++; if (traverseColumns)...
private long parse(final Reader in, boolean traverseColumns) throws IOException { final CSVFormat format = CSVFormat.defaults().withIgnoreSurroundingSpaces(false).build(); long recordCount = 0; for (final CSVRecord record : format.parse(in)) { recordCount++; if (trave...
public void serviceFailed(ServiceController<? extends Object> serviceController, StartException reason) { if(deploymentStopped.compareAndSet(false, true)) { log.errorf("Deployment [%s] failed to start correctly. Completely shutting down deployment. Please see additional errors for details.", d...
public void serviceFailed(ServiceController<?> serviceController, StartException reason) { if(deploymentStopped.compareAndSet(false, true)) { log.errorf("Deployment [%s] failed to start correctly. Completely shutting down deployment. Please see additional errors for details.", deploymentServic...
public void listenerAdded(ServiceController<? extends Object> controller) { synchronized(dependents) { dependents.put(controller.getName(), controller); } } } }
public void listenerAdded(ServiceController<?> controller) { synchronized(dependents) { dependents.put(controller.getName(), controller); } } } }
public static Void combine(DomainModel domainModel, HostModel hostModel, String serverName, List<AbstractServerModelUpdate<?>> list) { final ServerElement serverElement = hostModel.getServer(serverName); final String serverGroupName = serverElement.getServerGroup(); final ServerGroupElement ...
public static Void combine(DomainModel domainModel, HostModel hostModel, String serverName, List<AbstractServerModelUpdate<?>> list) { final ServerElement serverElement = hostModel.getServer(serverName); final String serverGroupName = serverElement.getServerGroup(); final ServerGroupElement ...
private TldMetaData parseTLD(VirtualFile tld) throws DeploymentUnitProcessingException { if (IMPLICIT_TLD.equals(tld.getName())) { // Implicit TLDs are different from regular TLDs return new TldMetaData(); } InputStream is = null; try { ...
private TldMetaData parseTLD(VirtualFile tld) throws DeploymentUnitProcessingException { if (IMPLICIT_TLD.equals(tld.getName())) { // Implicit TLDs are different from regular TLDs return new TldMetaData(); } InputStream is = null; try { ...
public static double[] normalizeArray(double[] values, double normalizedSum) throws ArithmeticException, IllegalArgumentException { if (Double.isInfinite(normalizedSum)) { throw MathRuntimeException.createIllegalArgumentException( "Cannot normalize to an infinite v...
public static double[] normalizeArray(double[] values, double normalizedSum) throws ArithmeticException, IllegalArgumentException { if (Double.isInfinite(normalizedSum)) { throw MathRuntimeException.createIllegalArgumentException( "Cannot normalize to an infinite v...
public TransactionManager getTransactionManager() throws Exception { return this.tm; } }
public TransactionManager getTransactionManager() { return this.tm; } }
public ServiceName readObject(ObjectInput input) throws IOException, ClassNotFoundException { return ServiceName.parse(input.readUTF()); } }
public ServiceName readObject(ObjectInput input) throws IOException { return ServiceName.parse(input.readUTF()); } }
public UUID readObject(ObjectInput input) throws IOException, ClassNotFoundException { return new UUID(input.readLong(), input.readLong()); } }
public UUID readObject(ObjectInput input) throws IOException { return new UUID(input.readLong(), input.readLong()); } }
public boolean isBitSet(final Byte key, final int bitIndex, final int lengthInBits) { return (key & mask(bitIndex)) != 0; }
public boolean isBitSet(final Byte key, final int bitIndex, final int lengthInBits) { return (key.intValue() & mask(bitIndex)) != 0; }
public boolean isBitSet(final Integer key, final int bitIndex, final int lengthInBits) { return (key & mask(bitIndex)) != 0; }
public boolean isBitSet(final Integer key, final int bitIndex, final int lengthInBits) { return (key.intValue() & mask(bitIndex)) != 0; }
public boolean isBitSet(final Long key, final int bitIndex, final int lengthInBits) { return (key & mask(bitIndex)) != 0; }
public boolean isBitSet(final Long key, final int bitIndex, final int lengthInBits) { return (key.longValue() & mask(bitIndex)) != 0; }
public boolean isBitSet(final Short key, final int bitIndex, final int lengthInBits) { return (key & mask(bitIndex)) != 0; }
public boolean isBitSet(final Short key, final int bitIndex, final int lengthInBits) { return (key.intValue() & mask(bitIndex)) != 0; }
public void testSolveBadAccuracy() throws MathException { try { // bad accuracy UnivariateRealSolverUtils.solve(sin, 0.0, 4.0, 0.0); fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { // expected } }
public void testSolveBadAccuracy() throws MathException { try { // bad accuracy UnivariateRealSolverUtils.solve(sin, 0.0, 4.0, 0.0); // fail("Expecting IllegalArgumentException"); // TODO needs rework since convergence behaviour was changed } catch (IllegalArgumen...
private void processService(ServiceController<? extends Bundle> controller) { controller.removeListener(this); Map<ServiceName, Tuple> bundlesToStart = null; synchronized (this) { ServiceName key = controller.getName(); ...
private void processService(ServiceController<? extends Bundle> controller) { controller.removeListener(this); Map<ServiceName, Tuple> bundlesToStart = null; synchronized (this) { ServiceName key = controller.getName(); ...
public Long getValue() { return new Long(this.value); }
public Long getValue() { return Long.valueOf(this.value); }
public interface Constraint { /* * JBoss, Home of Professional Open Source. * Copyright 2013, 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 can redistrib...
public interface Constraint { /* * JBoss, Home of Professional Open Source. * Copyright 2013, 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 can redistrib...
public interface ConstraintFactory extends Comparable<ConstraintFactory> { /* * JBoss, Home of Professional Open Source. * Copyright 2013, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. ...
public interface ConstraintFactory extends Comparable<ConstraintFactory> { /* * JBoss, Home of Professional Open Source. * Copyright 2013, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. ...
public abstract ManagementPermission createScopedPermission(Constraint constraint); }
public abstract ManagementPermission createScopedPermission(Constraint constraint, int constraintIndex); }
protected void execute(DeploymentProcessorTarget processorTarget) { final SharedWebMetaDataBuilder sharedWebBuilder = new SharedWebMetaDataBuilder(model.clone()); final SharedTldsMetaDataBuilder sharedTldsBuilder = new SharedTldsMetaDataBuilder(model.clone()); ...
protected void execute(DeploymentProcessorTarget processorTarget) { final SharedWebMetaDataBuilder sharedWebBuilder = new SharedWebMetaDataBuilder(model.clone()); final SharedTldsMetaDataBuilder sharedTldsBuilder = new SharedTldsMetaDataBuilder(model.clone()); ...
DeploymentUnitProcessingException equivilentNamespacesInJBossXml(QName key, QName 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 cont...
DeploymentUnitProcessingException equivilentNamespacesInJBossXml(QName key, QName 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 cont...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ResourceRoot root = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT); VirtualFile descriptor = null...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ResourceRoot root = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT); VirtualFile descriptor = null...
public void undeploy(String runtimeName) throws ServerDeploymentException { ServerDeploymentActionResult actionResult; try { DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan(); builder = builder.undeploy(runtimeName).remove(runtimeName); Deploym...
public void undeploy(String runtimeName) throws ServerDeploymentException { ServerDeploymentActionResult actionResult; try { DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan(); builder = builder.undeploy(runtimeName).andRemoveUndeployed(); Deplo...
public void send(HashMap<String, IConnection> connections) { for (String hostPort : bundles.keySet()) { IConnection connection = connections.get(hostPort); if (null != connection) { ArrayList<ArrayList<TaskMessage>> bundle = bundles.get(hostPort); Iterator<TaskMessage> iter = getBundl...
public void send(HashMap<String, IConnection> connections) { for (String hostPort : bundles.keySet()) { IConnection connection = connections.get(hostPort); if (null != connection) { ArrayList<ArrayList<TaskMessage>> bundle = bundles.get(hostPort); Iterator<TaskMessage> iter = getBundl...
protected ModelNode buildRequestWithoutHeaders(CommandContext ctx) throws CommandFormatException { final ModelNode req = super.buildRequestWithoutHeaders(ctx); final ModelNode steps = req.get(Util.STEPS); final String xaPropsStr = xaProps.getValue(ctx.getParsedCommandLine()); if(xaP...
protected ModelNode buildRequestWithoutHeaders(CommandContext ctx) throws CommandFormatException { final ModelNode req = super.buildRequestWithoutHeaders(ctx); final ModelNode steps = req.get(Util.STEPS); final String xaPropsStr = xaProps.getValue(ctx.getParsedCommandLine()); if(xaP...
public ModelNode toOperationRequest(CommandContext ctx) throws CommandFormatException { ModelNode request = new ModelNode(); ModelNode addressNode = request.get(Util.ADDRESS); if(address.isEmpty()) { addressNode.setEmptyList(); } else { Iterator<Node> iterator...
public ModelNode toOperationRequest(CommandContext ctx) throws CommandFormatException { ModelNode request = new ModelNode(); ModelNode addressNode = request.get(Util.ADDRESS); if(address.isEmpty()) { addressNode.setEmptyList(); } else { Iterator<Node> iterator...
package org.jboss.as.test.integration.ejb.entity.cmp.cascadedelete.ejb; /* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contribut...
package org.jboss.as.test.integration.ejb.entity.cmp.cascadedelete.ejb; /* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contribut...
package org.jboss.as.test.integration.ejb.entity.cmp.cascadedelete.ejb; /* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contribut...
package org.jboss.as.test.integration.ejb.entity.cmp.cascadedelete.ejb; /* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contribut...
package org.jboss.as.test.integration.ejb.entity.cmp.cascadedelete.ejb; /* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contribut...
package org.jboss.as.test.integration.ejb.entity.cmp.cascadedelete.ejb; /* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contribut...
package org.jboss.as.test.integration.ejb.entity.cmp.cascadedelete.ejb; /* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contribut...
package org.jboss.as.test.integration.ejb.entity.cmp.cascadedelete.ejb; /* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contribut...