buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
import org.wildfly.security.manager.action.GetClassLoaderAction; /* * 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 ...
import org.wildfly.security.manager.action.GetClassLoaderAction; /* * 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 ...
import org.wildfly.security.manager.action.GetClassLoaderAction; /* * 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. * * Th...
import org.wildfly.security.manager.action.GetClassLoaderAction; /* * 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. * * Th...
private void processAroundInvoke(final EEModuleDescription eeModuleDescription, final AnnotationTarget target) { if (!(target instanceof MethodInfo)) { throw new IllegalArgumentException("@AroundInvoke is only valid on method targets."); } final MethodInfo methodInfo = MethodInfo...
private void processAroundInvoke(final EEModuleDescription eeModuleDescription, final AnnotationTarget target) { if (!(target instanceof MethodInfo)) { throw new IllegalArgumentException("@AroundInvoke is only valid on method targets."); } final MethodInfo methodInfo = MethodInfo...
public static boolean isParsable(final String str) { if( StringUtils.endsWith( str, "." ) ) { return false; } if( StringUtils.startsWith( str, "-" ) ) { return isDigits( StringUtils.replaceOnce( StringUtils.substring( str, 1 ), ".", StringUtils.EMPTY ) ); } el...
public static boolean isParsable(final String str) { if( StringUtils.endsWith( str, "." ) ) { return false; } if( StringUtils.startsWith( str, "-" ) ) { return isDigits( StringUtils.replaceOnce( str.substring(1), ".", StringUtils.EMPTY ) ); } else { ...
protected void addExtraServices(ServiceTarget target) { super.addExtraServices(target); target.addService(Services.JBOSS_SERVICE_MODULE_LOADER, new ServiceModuleLoader(null)).install(); } }) .setSubsystemXml(getSubsystemXml()); Kern...
protected void addExtraServices(ServiceTarget target) { super.addExtraServices(target); target.addService(Services.JBOSS_SERVICE_MODULE_LOADER, new ServiceModuleLoader(null)).install(); } }) .setSubsystemXml(getSubsystemXml()); Kern...
ZipShort getHeaderId(); /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0...
ZipShort getHeaderId(); /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0...
protected static final SimpleAttributeDefinition MODULE = new SimpleAttributeDefinitionBuilder(Constants.MODULE, ModelType.STRING).setXmlName(Constants.MODULE).setAllowNull(true) .setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICES).setValidator(new StringLengthValidator(1)).build();
protected static final SimpleAttributeDefinition MODULE = new SimpleAttributeDefinitionBuilder(Constants.MODULE, ModelType.STRING).setXmlName(Constants.MODULE).setAllowNull(false) .setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICES).setValidator(new StringLengthValidator(1)).build();
private static void usage(Throwable t) throws Exception { System.out.println("Caught " + t.toString()); System.out.println("Please make sure your domain.xml includes the H2DS datasource in its <profile name=\"default\"> element."); System.out.println("An example configuration is as follows:\...
private static void usage(Throwable t) throws Exception { System.out.println("Caught " + t.toString()); System.out.println("Please make sure your domain.xml includes the H2DS datasource in its <profile name=\"default\"> element."); System.out.println("An example configuration is as follows:\...
private static void usage(Throwable t) throws Exception { System.out.println("Caught " + t.toString()); System.out.println("Please make sure your standalone.xml includes the H2DS datasource in its <profile> element."); System.out.println("An example configuration is as follows:\n"); ...
private static void usage(Throwable t) throws Exception { System.out.println("Caught " + t.toString()); System.out.println("Please make sure your standalone.xml includes the H2DS datasource in its <profile> element."); System.out.println("An example configuration is as follows:\n"); ...
private static void usage(Throwable t) throws Exception { System.out.println("Caught " + t.toString()); System.out.println("This is most likely due to the following:"); System.out.println("Please make sure your standalone.xml includes the H2DS datasource in its <profile> element."); ...
private static void usage(Throwable t) throws Exception { System.out.println("Caught " + t.toString()); System.out.println("This is most likely due to the following:"); System.out.println("Please make sure your standalone.xml includes the H2DS datasource in its <profile> element."); ...
private static StringAsset getWebXml() { return new StringAsset("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "\n" + "<web-app version=\"3.0\"\n" + " xmlns=\"http://java.sun.com/xml/ns/javaee\"\n" + " xmlns:xsi=\"http://www.w...
private static StringAsset getWebXml() { return new StringAsset("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "\n" + "<web-app version=\"3.0\"\n" + " xmlns=\"http://java.sun.com/xml/ns/javaee\"\n" + " xmlns:xsi=\"http://www.w...
private static final String persistence_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> " + "<persistence xmlns=\"http://java.sun.com/xml/ns/persistence\" version=\"1.0\">" + " <persistence-unit name=\"mypc\">" + " <description>Persistence Unit." + " ...
private static final String persistence_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> " + "<persistence xmlns=\"http://java.sun.com/xml/ns/persistence\" version=\"1.0\">" + " <persistence-unit name=\"mypc\">" + " <description>Persistence Unit." + " ...
private static final String persistence_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> " + "<persistence xmlns=\"http://java.sun.com/xml/ns/persistence\" version=\"1.0\">" + " <persistence-unit name=\"mypc\">" + " <description>Persistence Unit." + " ...
private static final String persistence_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> " + "<persistence xmlns=\"http://java.sun.com/xml/ns/persistence\" version=\"1.0\">" + " <persistence-unit name=\"mypc\">" + " <description>Persistence Unit." + " ...
private static final String persistence_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> " + "<persistence xmlns=\"http://java.sun.com/xml/ns/persistence\" version=\"1.0\">" + " <persistence-unit name=\"mypc\">" + " <description>Persistence Unit." + " ...
private static final String persistence_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> " + "<persistence xmlns=\"http://java.sun.com/xml/ns/persistence\" version=\"1.0\">" + " <persistence-unit name=\"mypc\">" + " <description>Persistence Unit." + " ...
private static final String persistence_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> " + "<persistence xmlns=\"http://java.sun.com/xml/ns/persistence\" version=\"1.0\">" + " <persistence-unit name=\"ejb3-persistence-test-pu\">" + " <jta-data-source>java:/H2DS</jta-...
private static final String persistence_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> " + "<persistence xmlns=\"http://java.sun.com/xml/ns/persistence\" version=\"1.0\">" + " <persistence-unit name=\"ejb3-persistence-test-pu\">" + " <jta-data-source>java:jboss/datas...
public static List asList(Object array) { return new ArrayList(array); }
public static List asList(Object array) { return array != null ? new ArrayList(array) : null; }
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { SecurityClient client = null; try { InitialContext ctx = new InitialContext(); client = SecurityClientFactory.getSecurityClie...
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { SecurityClient client = null; try { InitialContext ctx = new InitialContext(); client = SecurityClientFactory.getSecurityClie...
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { SecurityClient client = null; try { InitialContext ctx = new InitialContext(); client = SecurityClientFactory.getSecurityClie...
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { SecurityClient client = null; try { InitialContext ctx = new InitialContext(); client = SecurityClientFactory.getSecurityClie...
Set<String> getDefaultProfiles(); /* * 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/licenses/LICE...
Set<String> getDefaultProfiles(); /* * 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/licenses/LICE...
public void testIsAllSet() { for (int j = 0; j < 0x3F80; j += 0x80) { assertTrue(!bf_multi.isAllSet(j)); assertTrue(!bf_zero.isAllSet(j)); } assertTrue(bf_multi.isAllSet(0x3F80)); assertTrue(!bf_single.isAllSet(0)); assertTrue(bf_single.isAllSet(0x4000...
public void testIsAllSet() { for (int j = 0; j < 0x3F80; j += 0x80) { assertTrue(!bf_multi.isAllSet(j)); assertTrue(bf_zero.isAllSet(j)); } assertTrue(bf_multi.isAllSet(0x3F80)); assertTrue(!bf_single.isAllSet(0)); assertTrue(bf_single.isAllSet(0x4000)...
public long getRecordNumber() { return recordNumber; } /** * Parses the next record from the current point in the stream. * * @return the record as an array of values, or <tt>null</tt> if the end of the stream has been reached * @throws IOException * on parse er...
public long getRecordNumber() { return recordNumber; } /** * Parses the next record from the current point in the stream. * * @return the record as an array of values, or <tt>null</tt> if the end of the stream has been reached * @throws IOException * on parse er...
public static final SimpleAttributeDefinition PROTOCOL = new SimpleAttributeDefinitionBuilder( CommonAttributes.PROTOCOL, ModelType.STRING, true).setValidator( new EnumValidator<Protocol>(Protocol.class, true, false)) .setDefaultValue(new ModelNode(Protocol.REMOTE.toStrin...
public static final SimpleAttributeDefinition PROTOCOL = new SimpleAttributeDefinitionBuilder( CommonAttributes.PROTOCOL, ModelType.STRING, true).setValidator( new EnumValidator<Protocol>(Protocol.class, true, false)) .setDefaultValue(new ModelNode(Protocol.HTTP_REMOTING....
package org.springframework.ui.binding.binder; /* * Copyright 2004-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/...
package org.springframework.ui.binding.binder; /* * Copyright 2004-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/...
public String decorate(String s) { return "#" + s + "#"; }
public String decorate(String s) { return "#TestService#" + s; }
public ServerInterfaceElement(InterfaceElement fullySpecified) { super(fullySpecified.getName(), fullySpecified.getCriteriaElements()); if (!fullySpecified.isFullySpecified()) { throw new IllegalArgumentException(fullySpecified + " is not fully specified"); } }
public ServerInterfaceElement(InterfaceElement fullySpecified) { super(fullySpecified); if (!fullySpecified.isFullySpecified()) { throw new IllegalArgumentException(fullySpecified + " is not fully specified"); } }
public int hashCode() { return this.id.hashCode() ^ this.getClass().hashCode(); }
public int hashCode() { return this.id.hashCode() ^ this.getClass().getName().hashCode(); }
public void handleRequest(HttpServerExchange exchange) throws Exception { if (!commonChecks(exchange)) { return; } boolean isUpload = UPLOAD_REQUEST.equals(exchange.getCanonicalPath()); if (Methods.POST.equals(exchange.getRequestMethod())) { if (isUpload) { ...
public void handleRequest(HttpServerExchange exchange) throws Exception { if (!commonChecks(exchange)) { return; } boolean isUpload = UPLOAD_REQUEST.equals(exchange.getRequestPath()); if (Methods.POST.equals(exchange.getRequestMethod())) { if (isUpload) { ...
public void handleRequest(HttpServerExchange exchange) throws Exception { if (!exchange.getRequestMethod().equals(HTTP_GET)) { METHOD_NOT_ALLOWED_HANDLER.handleRequest(exchange); return; } String requestUrl = exchange.getRequestURL(); if (consoleHandler != nu...
public void handleRequest(HttpServerExchange exchange) throws Exception { if (!exchange.getRequestMethod().equals(HTTP_GET)) { METHOD_NOT_ALLOWED_HANDLER.handleRequest(exchange); return; } String requestUrl = exchange.getRequestURL(); if (consoleHandler != nu...
protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration) { GlobalOperationHandlers.registerGlobalOperations(rootRegistration, processType); rootRegistration.registerOperationHandler(ValidateAddressOperationHandler.OPERATION_NAME, ValidateAddressOperationHandl...
protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration) { GlobalOperationHandlers.registerGlobalOperations(rootRegistration, processType); rootRegistration.registerOperationHandler(ValidateAddressOperationHandler.DEFINITION, ValidateAddressOperationHandler.I...
public void setup(final ManagementClient managementClient) throws Exception { final List<ModelNode> updates = new ArrayList<ModelNode>(); ModelNode op = new ModelNode(); op.get(OP).set(ADD); op.get(OP_ADDR).add(SUBSYSTEM, "security"); op.get(OP_ADDR).add(SECURITY_DOMAIN, get...
public void setup(final ManagementClient managementClient, final String containerId) throws Exception { final List<ModelNode> updates = new ArrayList<ModelNode>(); ModelNode op = new ModelNode(); op.get(OP).set(ADD); op.get(OP_ADDR).add(SUBSYSTEM, "security"); op.get(OP_ADDR...
public void setup(final ManagementClient managementClient) { final List<ModelNode> updates = new ArrayList<ModelNode>(); ModelNode op = new ModelNode(); String securityDomain = "web-programmatic-login"; op.get(OP).set(ADD); op.get(OP_ADDR).add(SUBSYST...
public void setup(final ManagementClient managementClient, final String containerId) { final List<ModelNode> updates = new ArrayList<ModelNode>(); ModelNode op = new ModelNode(); String securityDomain = "web-programmatic-login"; op.get(OP).set(ADD); o...
public void testListFilesByExtension() throws Exception { final String[] extensions = {"xml", "txt"}; Collection files = FileUtils.listFiles(getLocalTestDirectory(), extensions, false); assertEquals(1, files.size()); Collection filenames = filesToFilenames(files); as...
public void testListFilesByExtension() throws Exception { String[] extensions = {"xml", "txt"}; Collection files = FileUtils.listFiles(getLocalTestDirectory(), extensions, false); assertEquals(1, files.size()); Collection filenames = filesToFilenames(files); assertTr...
public void registerOperations(ManagementResourceRegistration resourceRegistration) { super.registerOperations(resourceRegistration); // Other root resource operations XmlMarshallingHandler xmh = new XmlMarshallingHandler(configurationPersister); resourceRegistration.registerOperati...
public void registerOperations(ManagementResourceRegistration resourceRegistration) { super.registerOperations(resourceRegistration); // Other root resource operations XmlMarshallingHandler xmh = new XmlMarshallingHandler(configurationPersister); resourceRegistration.registerOperati...
public static final ListAttributeDefinition XML_NAMESPACES = new StringListAttributeDefinition.Builder(ModelDescriptionConstants.XML_NAMESPACES) .setAllowNull(false) .setStorageRuntime() .setValidator(new StringLengthValidator(1, Integer.MAX_VALUE, false, false)) .bui...
public static final ListAttributeDefinition XML_NAMESPACES = new StringListAttributeDefinition.Builder(ModelDescriptionConstants.XML_NAMESPACES) .setAllowNull(false) .setStorageRuntime() .setElementValidator(new StringLengthValidator(1, Integer.MAX_VALUE, false, false)) ...
public void testExpressions() throws OperationFailedException { ListAttributeDefinition ld = new StringListAttributeDefinition.Builder("test") .setAllowExpression(true) .setValidator(new StringLengthValidator(1, false, true)) .build(); ModelNode op = ...
public void testExpressions() throws OperationFailedException { ListAttributeDefinition ld = new StringListAttributeDefinition.Builder("test") .setAllowExpression(true) .setElementValidator(new StringLengthValidator(1, false, true)) .build(); ModelNod...
public static final ListAttributeDefinition DECLARED_ROLES = new PrimitiveListAttributeDefinition.Builder("declared-roles", ModelType.STRING) .setAllowNull(true) .setValidator(new StringLengthValidator(1)) .setStorageRuntime()
public static final ListAttributeDefinition DECLARED_ROLES = new PrimitiveListAttributeDefinition.Builder("declared-roles", ModelType.STRING) .setAllowNull(true) .setElementValidator(new StringLengthValidator(1)) .setStorageRuntime()
public static final PrimitiveListAttributeDefinition DISCOVERY_OPTIONS = new PrimitiveListAttributeDefinition.Builder(ModelDescriptionConstants.DISCOVERY_OPTIONS, ModelType.PROPERTY) .setAllowNull(true) .setValidator(new PropertyValidator(false, new StringLengthValidator(1))) .build();
public static final PrimitiveListAttributeDefinition DISCOVERY_OPTIONS = new PrimitiveListAttributeDefinition.Builder(ModelDescriptionConstants.DISCOVERY_OPTIONS, ModelType.PROPERTY) .setAllowNull(true) .setElementValidator(new PropertyValidator(false, new StringLengthValidator(1))) .build()...
public static final ListAttributeDefinition NAMES = new PrimitiveListAttributeDefinition.Builder(ModelDescriptionConstants.NAMES, ModelType.STRING) .setAllowNull(true) .setValidator(new StringLengthValidator(1)) .setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICES)
public static final ListAttributeDefinition NAMES = new PrimitiveListAttributeDefinition.Builder(ModelDescriptionConstants.NAMES, ModelType.STRING) .setAllowNull(true) .setElementValidator(new StringLengthValidator(1)) .setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICES)
public static final AttributeDefinition OPTIONS = new StringListAttributeDefinition.Builder(JvmAttributes.JVM_OPTIONS) .setValidator(new StringLengthValidator(1, true, true)) .setAllowNull(true)
public static final AttributeDefinition OPTIONS = new StringListAttributeDefinition.Builder(JvmAttributes.JVM_OPTIONS) .setElementValidator(new StringLengthValidator(1, true, true)) .setAllowNull(true)
protected static final StringListAttributeDefinition VIRTUAL_SERVER = new StringListAttributeDefinition.Builder(Constants.VIRTUAL_SERVER) .setAllowNull(true) .setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES) .setValidator(new StringLengthValidator(1, false)) ....
protected static final StringListAttributeDefinition VIRTUAL_SERVER = new StringListAttributeDefinition.Builder(Constants.VIRTUAL_SERVER) .setAllowNull(true) .setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES) .setElementValidator(new StringLengthValidator(1, false)) ...
protected static final ListAttributeDefinition WELCOME_FILES = new StringListAttributeDefinition.Builder(Constants.WELCOME_FILE) .setXmlName(Constants.WELCOME_FILE) .setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES) .setValidator(new StringLengthValidator(1, true, true)) ...
protected static final ListAttributeDefinition WELCOME_FILES = new StringListAttributeDefinition.Builder(Constants.WELCOME_FILE) .setXmlName(Constants.WELCOME_FILE) .setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES) .setElementValidator(new StringLengthValidator(1, true, t...
protected static final ListAttributeDefinition ALIAS = new StringListAttributeDefinition.Builder(Constants.ALIAS) .setXmlName(Constants.ALIAS) .setAllowNull(true) .setValidator(new StringLengthValidator(1, false)) .setFlags(...
protected static final ListAttributeDefinition ALIAS = new StringListAttributeDefinition.Builder(Constants.ALIAS) .setXmlName(Constants.ALIAS) .setAllowNull(true) .setElementValidator(new StringLengthValidator(1, false)) .se...
public static final PrimitiveListAttributeDefinition CONNECTOR_REFS = PrimitiveListAttributeDefinition.Builder.of(STATIC_CONNECTORS, STRING) .setAllowNull(true) .setAlternatives(CommonAttributes.DISCOVERY_GROUP_NAME) .setValidator(new StringLengthValidator(1)) .setXml...
public static final PrimitiveListAttributeDefinition CONNECTOR_REFS = PrimitiveListAttributeDefinition.Builder.of(STATIC_CONNECTORS, STRING) .setAllowNull(true) .setAlternatives(CommonAttributes.DISCOVERY_GROUP_NAME) .setElementValidator(new StringLengthValidator(1)) ...
public static final PrimitiveListAttributeDefinition CONNECTOR_REFS = PrimitiveListAttributeDefinition.Builder.of(CONNECTORS, STRING) .setAllowNull(true) .setValidator(new StringLengthValidator(1)) .setXmlName(CONNECTOR_REF_STRING)
public static final PrimitiveListAttributeDefinition CONNECTOR_REFS = PrimitiveListAttributeDefinition.Builder.of(CONNECTORS, STRING) .setAllowNull(true) .setElementValidator(new StringLengthValidator(1)) .setXmlName(CONNECTOR_REF_STRING)
public static final PrimitiveListAttributeDefinition CONNECTOR_REFS = PrimitiveListAttributeDefinition.Builder.of(STATIC_CONNECTORS, STRING) .setAllowNull(true) .setValidator(new StringLengthValidator(1)) .setXmlName(CONNECTOR_REF_STRING)
public static final PrimitiveListAttributeDefinition CONNECTOR_REFS = PrimitiveListAttributeDefinition.Builder.of(STATIC_CONNECTORS, STRING) .setAllowNull(true) .setElementValidator(new StringLengthValidator(1)) .setXmlName(CONNECTOR_REF_STRING)
public ModelNode correct(ModelNode newValue, ModelNode currentValue) { if (newValue.getType() != ModelType.LIST) { return newValue; } else { ModelNode correctValue = new ModelNode(); ...
public ModelNode correct(ModelNode newValue, ModelNode currentValue) { if (newValue.getType() != ModelType.LIST) { return newValue; } else { ModelNode correctValue = new ModelNode(); ...
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { final String operationName = operation.require(OP).asString(); final HornetQServerControl serverControl = getServerControl(context, operation); try { if (READ_ATTR...
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { final String operationName = operation.require(OP).asString(); final HornetQServerControl serverControl = getServerControl(context, operation); try { if (READ_ATTR...
public static void rollbackOperationWithNoHandler(OperationContext context, ModelNode operation) { context.getFailureDescription().set(ControllerMessages.MESSAGES.noHandler(READ_ATTRIBUTE_OPERATION, PathAddress.pathAddress(operation.require(OP_ADDR)))); context.setRollbackOnly(); context.com...
public static void rollbackOperationWithNoHandler(OperationContext context, ModelNode operation) { context.getFailureDescription().set(ControllerMessages.MESSAGES.noHandler(READ_ATTRIBUTE_OPERATION, PathAddress.pathAddress(operation.require(OP_ADDR)))); context.setRollbackOnly(); context.ste...
public void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { validator.validate(operation); final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); String queueName = PathAddress.pathAddress(operation.req...
public void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { validator.validate(operation); final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); String queueName = PathAddress.pathAddress(operation.req...
public void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); PathAddress pathAddress = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP...
public void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); PathAddress pathAddress = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP...
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { String opName = operation.require(ModelDescriptionConstants.OP).asString(); PathAddress address = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)); ...
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { String opName = operation.require(ModelDescriptionConstants.OP).asString(); PathAddress address = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)); ...
public void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { validator.validate(operation); final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); String factoryName = PathAddress.pathAddress(operation.r...
public void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { validator.validate(operation); final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); String factoryName = PathAddress.pathAddress(operation.r...
public void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { validator.validate(operation); final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); JMSQueueControl control = getControl(context, operation)...
public void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { validator.validate(operation); final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); JMSQueueControl control = getControl(context, operation)...
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { final String operationName = operation.require(OP).asString(); final JMSServerControl serverControl = getServerControl(context, operation); if (serverControl == null) { ...
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { final String operationName = operation.require(OP).asString(); final JMSServerControl serverControl = getServerControl(context, operation); if (serverControl == null) { ...
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { final ServiceName hqServiceName = MessagingServices.getHornetQServiceName(PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR))); final String operationName = oper...
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { final ServiceName hqServiceName = MessagingServices.getHornetQServiceName(PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR))); final String operationName = oper...
public void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { validator.validate(operation); final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); String topicName = PathAddress.pathAddress(operation.req...
public void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { validator.validate(operation); final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); String topicName = PathAddress.pathAddress(operation.req...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); String moduleName = resolveAttribute(JMSBridgeDefinition.MODULE, context, model); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); String moduleName = resolveAttribute(JMSBridgeDefinition.MODULE, context, model); ...
public static void after() throws Exception { try { cli.quit(); } finally { cli = null; } }
public static void after() throws Exception { try { if (cli != null) cli.quit(); } finally { cli = null; } }
public void SPR_10210() throws Exception { StandardEvaluationContext context = new StandardEvaluationContext(); context.setVariable("bridgeExample", new org.springframework.expression.spel.spr10210.D()); Expression parseExpression = parser.parseExpression("#bridgeExample.bridgetMethod()"); parseExpression.getV...
public void SPR_10210() throws Exception { StandardEvaluationContext context = new StandardEvaluationContext(); context.setVariable("bridgeExample", new org.springframework.expression.spel.spr10210.D()); Expression parseExpression = parser.parseExpression("#bridgeExample.bridgeMethod()"); parseExpression.getVa...
public void bridgetMethod() { } }
public void bridgeMethod() { } }
public O transform(I input);
O transform(I input); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (t...
private final ExtendedBufferedReader reader; /** INTERNAL API. but ctor needs to be called dynamically by PerformanceTest class */ Lexer(final CSVFormat format, final ExtendedBufferedReader reader) { this.reader = reader; this.delimiter = format.getDelimiter(); this.escape = mapNull...
private final ExtendedBufferedReader reader; /** INTERNAL API. but ctor needs to be called dynamically by PerformanceTest class */ Lexer(final CSVFormat format, final ExtendedBufferedReader reader) { this.reader = reader; this.delimiter = format.getDelimiter(); this.escape = mapNull...
public void testDefaultFormat() throws IOException { final String code = "" + "a,b#\n" // 1) + "\"\n\",\" \",#\n" // 2) + "#,\"\"\n" // 3) + "# Final comment\n"// 4) ; final String[][] res = { ...
public void testDefaultFormat() throws IOException { final String code = "" + "a,b#\n" // 1) + "\"\n\",\" \",#\n" // 2) + "#,\"\"\n" // 3) + "# Final comment\n"// 4) ; final String[][] res = { ...
public ModelNode getModel() { return super.getModel().clone(); }
public ModelNode getModel() { return super.getModel(); }
public static void notNull(Object parameter, String parameterName) { if (parameter == null) { throw new IllegalArgumentException("Parameter '" + parameterName + "' must not be null!"); } } }
public static void notNull(final Object parameter, final String parameterName) { if (parameter == null) { throw new IllegalArgumentException("Parameter '" + parameterName + "' must not be null!"); } } }
// package protected to give access without needing a synthetic accessor CSVFormat(final char delimiter, final Character quoteChar, final Quote quotePolicy, final Character commentStart, final Character escape, final boolean ignoreSurroundingSpaces, final boolean ignoreEmptyL...
// package protected to give access without needing a synthetic accessor CSVFormat(final char delimiter, final Character quoteChar, final Quote quotePolicy, final Character commentStart, final Character escape, final boolean ignoreSurroundingSpaces, final boolean ignoreEmptyL...
public void testCSVUrl() throws Exception { String line = readTestData(); assertNotNull("file must contain config line", line); final String[] split = line.split(" "); assertTrue(testName + " require 1 param", split.length >= 1); // first line starts with csv data file name ...
public void testCSVUrl() throws Exception { String line = readTestData(); assertNotNull("file must contain config line", line); final String[] split = line.split(" "); assertTrue(testName + " require 1 param", split.length >= 1); // first line starts with csv data file name ...
public void testTarArchiveLongNameCreation() throws Exception { String name = "testdata/12345678901234567890123456789012345678901234567890123456789012345678901234567890123456.xml"; byte[] bytes = name.getBytes(); assertEquals(bytes.length, 99); final File output = new File(dir, "bla...
public void testTarArchiveLongNameCreation() throws Exception { String name = "testdata/12345678901234567890123456789012345678901234567890123456789012345678901234567890123456.xml"; byte[] bytes = name.getBytes("UTF-8"); assertEquals(bytes.length, 99); final File output = new File(di...
public void setAttribute(String name, Object value) { // Name cannot be null if (name == null) throw MESSAGES.expiredSession(); // Null value is the same as removeAttribute() if (value == null) { removeAttribute(name); return; } /...
public void setAttribute(String name, Object value) { // Name cannot be null if (name == null) throw MESSAGES.expiredSession(); // Null value is the same as removeAttribute() if (value == null) { removeAttribute(name); return; } /...
public void bind(WebRequest request) { MutablePropertyValues mpvs = new MutablePropertyValues(request.getParameterMap()); if (request instanceof NativeWebRequest) { MultipartRequest multipartRequest = ((NativeWebRequest) request).getNativeRequest(MultipartRequest.class); if (multipartRequest != null) { b...
public void bind(WebRequest request) { MutablePropertyValues mpvs = new MutablePropertyValues(request.getParameterMap()); if (request instanceof NativeWebRequest) { MultipartRequest multipartRequest = ((NativeWebRequest) request).getNativeRequest(MultipartRequest.class); if (multipartRequest != null) { b...
public void testStringValues() { assertAllCandidates(Arrays.asList("last3", "link3", "other3")); assertSelectedCandidates(Arrays.asList("last3", "link3")); assertBufferPrefix("./"); assertContextPrefix("link1=link2"); }
public void testStringValues() { assertAllCandidates(Arrays.asList("last3", "link3", "other3")); assertSelectedCandidates(Arrays.asList("last3", "link3")); assertBufferPrefix("./"); assertContextPrefix("/link1=link2"); }
public void testStringValues() { assertAllCandidates(Arrays.asList("last2", "link2", "other2")); assertSelectedCandidates(Arrays.asList("last2", "link2")); assertBufferPrefix("./"); assertContextPrefix("link1"); }
public void testStringValues() { assertAllCandidates(Arrays.asList("last2", "link2", "other2")); assertSelectedCandidates(Arrays.asList("last2", "link2")); assertBufferPrefix("./"); assertContextPrefix("/link1"); }
public void testStringValues() { assertAllCandidates(Arrays.asList("last3", "link3", "other3")); assertSelectedCandidates(Arrays.asList("last3", "link3")); assertBufferPrefix("./link2/"); assertContextPrefix("link1"); }
public void testStringValues() { assertAllCandidates(Arrays.asList("last3", "link3", "other3")); assertSelectedCandidates(Arrays.asList("last3", "link3")); assertBufferPrefix("./link2/"); assertContextPrefix("/link1"); }
public void testStringValues() { assertAllCandidates(Arrays.asList("last4", "link4", "other4")); assertSelectedCandidates(Arrays.asList("last4", "link4")); assertBufferPrefix("./link2/link3="); assertContextPrefix("link1"); }
public void testStringValues() { assertAllCandidates(Arrays.asList("last4", "link4", "other4")); assertSelectedCandidates(Arrays.asList("last4", "link4")); assertBufferPrefix("./link2/link3="); assertContextPrefix("/link1"); }
public void testStringValues() { assertAllCandidates(Arrays.asList("last4", "link4", "other4")); assertSelectedCandidates(Arrays.asList("last4", "link4")); assertBufferPrefix("./"); assertContextPrefix("link1=link2/link3"); }
public void testStringValues() { assertAllCandidates(Arrays.asList("last4", "link4", "other4")); assertSelectedCandidates(Arrays.asList("last4", "link4")); assertBufferPrefix("./"); assertContextPrefix("/link1=link2/link3"); }
public void write(byte[] wBuf, int wOffset, int numToWrite) throws IOException { if ((currBytes + numToWrite) > currSize) { throw new IOException("request to write '" + numToWrite + "' bytes exceeds size in header of '" + currSi...
public void write(byte[] wBuf, int wOffset, int numToWrite) throws IOException { if ((currBytes + numToWrite) > currSize) { throw new IOException("request to write '" + numToWrite + "' bytes exceeds size in header of '" + currSi...
private void initCommands() { cmdRegistry.registerHandler(new PrefixHandler(), "cd", "cn"); cmdRegistry.registerHandler(new ClearScreenHandler(), "clear", "cls"); cmdRegistry.registerHandler(new CommandCommandHandler(cmdRegistry), "command"); cmdRegistry.registerHandler(new ConnectHa...
private void initCommands() { cmdRegistry.registerHandler(new PrefixHandler(), "cd", "cn"); cmdRegistry.registerHandler(new ClearScreenHandler(), "clear", "cls"); cmdRegistry.registerHandler(new CommandCommandHandler(cmdRegistry), "command"); cmdRegistry.registerHandler(new ConnectHa...
private final Map<Object, ManagedReference> instanceMap; public WebInjectionContainer(ClassLoader classloader, final ComponentRegistry componentRegistry) { this.classloader = classloader; this.componentRegistry = componentRegistry; this.instanceMap = new ConcurrentReferenceHashMap<Objec...
private final Map<Object, ManagedReference> instanceMap; public WebInjectionContainer(ClassLoader classloader, final ComponentRegistry componentRegistry) { this.classloader = classloader; this.componentRegistry = componentRegistry; this.instanceMap = new ConcurrentReferenceHashMap<Objec...
public void renderSimpleMap() throws Exception { Map<String, Object> model = new HashMap<String, Object>(); model.put("bindingResult", createMock("binding_result", BindingResult.class)); model.put("foo", "bar"); view.render(model, request, response); assertEquals("no-cache", response.getHeader("Pragma"));...
public void renderSimpleMap() throws Exception { Map<String, Object> model = new HashMap<String, Object>(); model.put("bindingResult", createMock("binding_result", BindingResult.class)); model.put("foo", "bar"); view.render(model, request, response); assertEquals("no-cache", response.getHeader("Pragma"));...
private static final Map<String, ORBInitializer> MAP; static { final Map<String, ORBInitializer> map = new HashMap<String, ORBInitializer>(); for (ORBInitializer element : values()) { final String name = element.getInitializerName(); if (name != null) map...
private static final Map<String, ORBInitializer> MAP; static { final Map<String, ORBInitializer> map = new HashMap<String, ORBInitializer>(); for (ORBInitializer element : values()) { final String name = element.getInitializerName(); if (name != null) map...
public FunctionEvaluationException(double argument) { super("Evaluation failed for argument = {0}", new Object[] { new Double(argument) }); this.argument = argument; }
public FunctionEvaluationException(double argument) { super("Evaluation failed for argument = {0}", new Object[] { Double.valueOf(argument) }); this.argument = argument; }
private Number parseNumber(String source, double value, ParsePosition pos) { Number ret = null; StringBuffer sb = new StringBuffer(); sb.append('('); sb.append(value); sb.append(')'); int n = sb.length(); int startIndex = pos.getIndex(); ...
private Number parseNumber(String source, double value, ParsePosition pos) { Number ret = null; StringBuffer sb = new StringBuffer(); sb.append('('); sb.append(value); sb.append(')'); int n = sb.length(); int startIndex = pos.getIndex(); ...
public void testComplexConstructor(){ MaxIterationsExceededException ex = new MaxIterationsExceededException(1000000, "Continued fraction convergents failed to converge for value {0}", new Object[] { new Double(1234567) }); assertNull(ex.getCause()); ...
public void testComplexConstructor(){ MaxIterationsExceededException ex = new MaxIterationsExceededException(1000000, "Continued fraction convergents failed to converge for value {0}", new Object[] { Double.valueOf(1234567) }); assertNull(ex.getCause()); ...
public void testFormatNumber() { ComplexFormat cf = ComplexFormat.getInstance(getLocale()); Double pi = new Double(Math.PI); String text = cf.format(pi); assertEquals("3" + getDecimalCharacter() + "14", text); }
public void testFormatNumber() { ComplexFormat cf = ComplexFormat.getInstance(getLocale()); Double pi = Double.valueOf(Math.PI); String text = cf.format(pi); assertEquals("3" + getDecimalCharacter() + "14", text); }
public void testNextPoisson() { try { randomData.nextPoisson(0); fail("zero mean -- expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { ; } Frequency f = new Frequency(); for (int i = 0; i<largeSampleSize; i++) { ...
public void testNextPoisson() { try { randomData.nextPoisson(0); fail("zero mean -- expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { ; } Frequency f = new Frequency(); for (int i = 0; i<largeSampleSize; i++) { ...
public void addValue(double v) { list.add(new Double(v)); }
public void addValue(double v) { list.add(Double.valueOf(v)); }
public void testN0andN1Conditions() throws Exception { List<Object> list = new ArrayList<Object>(); DescriptiveStatistics u = new ListUnivariateImpl( list ); assertTrue("Mean of n = 0 set should be NaN", Double.isNaN( u.getMean() ) ); assertTrue("Standard De...
public void testN0andN1Conditions() throws Exception { List<Object> list = new ArrayList<Object>(); DescriptiveStatistics u = new ListUnivariateImpl( list ); assertTrue("Mean of n = 0 set should be NaN", Double.isNaN( u.getMean() ) ); assertTrue("Standard De...
public void testEqualsAndHashCode() throws DimensionMismatchException { MultivariateSummaryStatistics u = new MultivariateSummaryStatistics(2, true); MultivariateSummaryStatistics t = null; int emptyHash = u.hashCode(); assertTrue(u.equals(u)); assertFalse(u.equals(t)); ...
public void testEqualsAndHashCode() throws DimensionMismatchException { MultivariateSummaryStatistics u = new MultivariateSummaryStatistics(2, true); MultivariateSummaryStatistics t = null; int emptyHash = u.hashCode(); assertTrue(u.equals(u)); assertFalse(u.equals(t)); ...
public void testEqualsAndHashCode() { SummaryStatistics u = createSummaryStatistics(); SummaryStatistics t = null; int emptyHash = u.hashCode(); assertTrue("reflexive", u.equals(u)); assertFalse("non-null compared to null", u.equals(t)); assertFalse("wrong type", u.eq...
public void testEqualsAndHashCode() { SummaryStatistics u = createSummaryStatistics(); SummaryStatistics t = null; int emptyHash = u.hashCode(); assertTrue("reflexive", u.equals(u)); assertFalse("non-null compared to null", u.equals(t)); assertFalse("wrong type", u.eq...
public double[] fit(Collection<WeightedObservedPoint> points) { // Perform the fit. return getOptimizer().optimize(getProblem(points)).getPoint(); }
public double[] fit(Collection<WeightedObservedPoint> points) { // Perform the fit. return getOptimizer().optimize(getProblem(points)).getPoint().toArray(); }
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> controllers) throws OperationFailedException { ROOT_LOGGER.activatingSubsystem(); controllers.addAll(installRuntimeServices(conte...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> controllers) throws OperationFailedException { ROOT_LOGGER.activatingSubsystem(); controllers.addAll(installRuntimeServices(conte...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { // remove the ProtocolDefaultsService context.removeService(ProtocolDefaultsService.SERVICE_NAME); String defaultStack = ModelNodes.asString(JGroupsSubsystemResour...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { // remove the ProtocolDefaultsService context.removeService(ProtocolDefaultsService.SERVICE_NAME); String defaultStack = ModelNodes.asString(JGroupsSubsystemResour...
private static void install(ServiceName name, int quorum, ServiceActivatorContext context) { InjectedValue<ServerEnvironment> env = new InjectedValue<>(); MyService service = new MyService(env); ServiceController<?> factoryService = context.getServiceRegistry().getRequiredService(SingletonSe...
private static void install(ServiceName name, int quorum, ServiceActivatorContext context) { InjectedValue<ServerEnvironment> env = new InjectedValue<>(); MyService service = new MyService(env); ServiceController<?> factoryService = context.getServiceRegistry().getRequiredService(SingletonSe...
public BatchEnvironmentService remove(final ClassLoader cl) { return services.remove(WildFlySecurityManager.getCurrentContextClassLoaderPrivileged()); }
public BatchEnvironmentService remove(final ClassLoader cl) { return services.remove(cl); }
protected static String performCall(final String url) throws ExecutionException, IOException, TimeoutException { return HttpRequest.get(url, 10, TimeUnit.SECONDS); }
protected static String performCall(final String url) throws ExecutionException, IOException, TimeoutException { return HttpRequest.get(url, 10, TimeUnit.MINUTES); // TODO (jrp) way to long only set for debugging }
static final String DEFAULT_CACHE_CONTAINER = "default-cache-container"; /* * 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. * ...
static final String DEFAULT_CACHE_CONTAINER = "default-cache-container"; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * ...
public synchronized <T> ClassReflectionIndex<T> getClassIndex(Class<T> clazz) { try { ClassReflectionIndex<T> index = (ClassReflectionIndex<T>) classes.get(clazz); if (index == null) { classes.put(clazz, index = new ClassReflectionIndex<T>(clazz, this)); }...
public synchronized <T> ClassReflectionIndex<T> getClassIndex(Class<T> clazz) { try { ClassReflectionIndex<T> index = (ClassReflectionIndex<T>) classes.get(clazz); if (index == null) { classes.put(clazz, index = new ClassReflectionIndex<T>(clazz, this)); }...
package org.jboss.as.test.integration.osgi.simple.bundleB; /* * 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 fre...
package org.jboss.as.test.integration.osgi.simple.bundleB; /* * 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 fre...
package org.jboss.as.test.integration.osgi.simple.bundleB; /* * 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 fre...
package org.jboss.as.test.integration.osgi.simple.bundleB; /* * 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 fre...
package org.jboss.as.test.integration.osgi.simple.bundleB; /* * 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 fre...
package org.jboss.as.test.integration.osgi.simple.bundleB; /* * 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 fre...