buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public int hashCode() { return 37 * (37 * 17 + getNumerator()) + getDenominator(); }
public int hashCode() { return 37 * (37 * 17 + numerator) + denominator; }
public void initialize(ExtensionContext context) { final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, 1, 0); final ManagementResourceRegistration subsystemRegistration = subsystem.registerSubsystemModel(JacORBSubsystemResource.INSTANCE); subsystemRegistration.r...
public void initialize(ExtensionContext context) { final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, 1, 1); final ManagementResourceRegistration subsystemRegistration = subsystem.registerSubsystemModel(JacORBSubsystemResource.INSTANCE); subsystemRegistration.r...
public void initialize(ExtensionContext context) { final boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid(); final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, 1, 0); final ManagementResourceRegistration registration = subsystem.registerSu...
public void initialize(ExtensionContext context) { final boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid(); final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, 1, 1); final ManagementResourceRegistration registration = subsystem.registerSu...
public void initialize(ExtensionContext context) { final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION, MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_API_MICRO_VERSION); subsystem.registerXMLElement...
public void initialize(ExtensionContext context) { final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION, MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_API_MICRO_VERSION); subsystem.registerXMLElement...
public void handleCancellation() { if (count.decrementAndGet() == 0) { // some action } } }; for (final ModelNode operation : operations) { count.incrementAndGet(); operation.get(OPERATION_HEADERS, ROLLB...
public void handleCancellation() { if (count.decrementAndGet() == 0) { // some action } } }; for (final ModelNode operation : operations) { count.incrementAndGet(); operation.get(OPERATION_HEADERS, ROLLB...
private void activate(final String deploymentName, String runtimeName, final byte[] deploymentHash, final ServiceName deploymentServiceName, final ServiceActivatorContext context, final ServiceContainer serviceContainer) { log.infof("Activating deployment: %s", deploymentName); Closeable handle = n...
private void activate(final String deploymentName, String runtimeName, final byte[] deploymentHash, final ServiceName deploymentServiceName, final ServiceActivatorContext context, final ServiceContainer serviceContainer) { log.infof("Activating deployment: %s", deploymentName); Closeable handle = n...
private String state; @PersistenceContext(type = PersistenceContextType.TRANSACTION, unitName = "H2DS", properties = @PersistenceProperty(name = "hibernate.hbm2ddl.auto", value = "create-drop"))
private String state; @PersistenceContext(type = PersistenceContextType.EXTENDED, unitName = "H2DS", properties = @PersistenceProperty(name = "hibernate.hbm2ddl.auto", value = "create-drop"))
public void testSetExcelStrategy() { CSVStrategy strategy = CSVStrategy.EXCEL_STRATEGY; assertEquals(strategy.getDelimiter(), ';'); assertEquals(strategy.getEncapsulator(), '"'); assertEquals(strategy.getCommentStart(), '\0'); assertEquals(false, strategy.getIgnoreLeadingWhitespaces()); asser...
public void testSetExcelStrategy() { CSVStrategy strategy = CSVStrategy.EXCEL_STRATEGY; assertEquals(strategy.getDelimiter(), ','); assertEquals(strategy.getEncapsulator(), '"'); assertEquals(strategy.getCommentStart(), '\0'); assertEquals(false, strategy.getIgnoreLeadingWhitespaces()); asser...
protected ApplicationContext createPortletApplicationContext(ApplicationContext parent) { Class<?> contextClass = getContextClass(); if (logger.isDebugEnabled()) { logger.debug("Portlet with name '" + getPortletName() + "' will try to create custom ApplicationContext context of class '" + contextClass...
protected ApplicationContext createPortletApplicationContext(ApplicationContext parent) { Class<?> contextClass = getContextClass(); if (logger.isDebugEnabled()) { logger.debug("Portlet with name '" + getPortletName() + "' will try to create custom ApplicationContext context of class '" + contextClass...
public final void init() throws PortletException { if (logger.isInfoEnabled()) { logger.info("Initializing portlet '" + getPortletName() + "'"); } // Set bean properties from init parameters. try { PropertyValues pvs = new PortletConfigPropertyValues(getPortletConfig(), this.requiredProperties); Be...
public final void init() throws PortletException { if (logger.isInfoEnabled()) { logger.info("Initializing portlet '" + getPortletName() + "'"); } // Set bean properties from init parameters. try { PropertyValues pvs = new PortletConfigPropertyValues(getPortletConfig(), this.requiredProperties); Be...
protected WebApplicationContext createWebApplicationContext(ApplicationContext parent) { Class<?> contextClass = getContextClass(); if (this.logger.isDebugEnabled()) { this.logger.debug("Servlet with name '" + getServletName() + "' will try to create custom WebApplicationContext context of class '" + ...
protected WebApplicationContext createWebApplicationContext(ApplicationContext parent) { Class<?> contextClass = getContextClass(); if (this.logger.isDebugEnabled()) { this.logger.debug("Servlet with name '" + getServletName() + "' will try to create custom WebApplicationContext context of class '" + ...
public final void init() throws ServletException { if (logger.isDebugEnabled()) { logger.debug("Initializing servlet '" + getServletName() + "'"); } // Set bean properties from init parameters. try { PropertyValues pvs = new ServletConfigPropertyValues(getServletConfig(), this.requiredProperties); Be...
public final void init() throws ServletException { if (logger.isDebugEnabled()) { logger.debug("Initializing servlet '" + getServletName() + "'"); } // Set bean properties from init parameters. try { PropertyValues pvs = new ServletConfigPropertyValues(getServletConfig(), this.requiredProperties); Be...
public MultiValueMap<String, String> getTargetRequestParams() { return targetRequestParams; }
public MultiValueMap<String, String> getTargetRequestParams() { return this.targetRequestParams; }
public void setJbossHome(String path) { this.jbossHome = path; } }
public void setJBossHome(String path) { this.jbossHome = path; } }
public void reset() { } }); integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(), pb.getFinalTime(), new double[pb.getDimension()]); } }
public void init(double t0, double[] y0, double t) { } }); integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(), pb.getFinalTime(), new double[pb.getDimension()]); } }
public void reset() { } }); integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(), pb.getFinalTime(), new double[pb.getDimension()]); } }
public void init(double t0, double[] y0, double t) { } }); integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(), pb.getFinalTime(), new double[pb.getDimension()]); } }
public void reset() { } }); integrator.integrate(problem, problem.getInitialTime(), problem.getInitialState(), problem.getFinalTime(), new double[problem.getDimension()]); } }
public void init(double t0, double[] y0, double t) { } }); integrator.integrate(problem, problem.getInitialTime(), problem.getInitialState(), problem.getFinalTime(), new double[problem.getDimension()]); } }
public void invoke(int state, InvocationContext context) { // HttpMetadata is guaratied to be available because we registered // this type as required input HttpMetadata metadata = context.getAttachment(HttpMetadata.class); // Register HttpMetadata on STARTING if (state == B...
public void invoke(int state, InvocationContext context) { // HttpMetadata is guaratied to be available because we registered // this type as required input HttpMetadata metadata = context.getAttachment(HttpMetadata.class); // Register HttpMetadata on STARTING if (state == B...
public void parseMissing() throws Exception { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Unable to find test group 'missing' when parsing " + "testGroups value: 'performance, missing'. Available groups include: " + "[LONG_RUNNING,PERFORMANCE,JMXMP]"); TestGroup.parse("performanc...
public void parseMissing() throws Exception { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Unable to find test group 'missing' when parsing " + "testGroups value: 'performance, missing'. Available groups include: " + "[LONG_RUNNING,PERFORMANCE,JMXMP,CI]"); TestGroup.parse("perform...
public void execute(RuntimeTaskContext context) throws OperationFailedException { final ServiceTarget serviceTarget = context.getServiceTarget(); try { final FileHandlerService service = new FileHandlerService(); fi...
public void execute(RuntimeTaskContext context) throws OperationFailedException { final ServiceTarget serviceTarget = context.getServiceTarget(); try { final FileHandlerService service = new FileHandlerService(); fi...
public void execute(RuntimeTaskContext context) throws OperationFailedException { final ServiceTarget serviceTarget = context.getServiceTarget(); try { final PeriodicRotatingFileHandlerService service = new PeriodicRotatingFileHandlerServic...
public void execute(RuntimeTaskContext context) throws OperationFailedException { final ServiceTarget serviceTarget = context.getServiceTarget(); try { final PeriodicRotatingFileHandlerService service = new PeriodicRotatingFileHandlerServic...
public void execute(RuntimeTaskContext context) throws OperationFailedException { final ServiceTarget serviceTarget = context.getServiceTarget(); try { final SizeRotatingFileHandlerService service = new SizeRotatingFileHandlerService(); ...
public void execute(RuntimeTaskContext context) throws OperationFailedException { final ServiceTarget serviceTarget = context.getServiceTarget(); try { final SizeRotatingFileHandlerService service = new SizeRotatingFileHandlerService(); ...
public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { try { _metricsConsumer = (IMetricsConsumer)Class.forName(_consumerClassName).newInstance(); } catch (Exception e) { throw new RuntimeException("Could not instantiate a class listed in con...
public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { try { _metricsConsumer = (IMetricsConsumer)Class.forName(_consumerClassName).newInstance(); } catch (Exception e) { throw new RuntimeException("Could not instantiate a class listed in con...
public void getResourceValue(final ResolutionContext resolutionContext, final ServiceBuilder<?> serviceBuilder, final DeploymentPhaseContext phaseContext, final Injector<ManagedReferenceFactory> injector) { final String applicationName = resolutionContext.getApplicationName(); final String moduleNam...
public void getResourceValue(final ResolutionContext resolutionContext, final ServiceBuilder<?> serviceBuilder, final DeploymentPhaseContext phaseContext, final Injector<ManagedReferenceFactory> injector) { final String applicationName = resolutionContext.getApplicationName(); final String moduleNam...
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { this.addHandler.installRuntimeServices(context, model, null); } else { context.revertReloadRequire...
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { this.addHandler.installRuntimeServices(context, operation, model, null); } else { context.revertRe...
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { this.add.installRuntimeServices(context, model, null); } else { context.revertReloadRequired(); ...
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { this.add.installRuntimeServices(context, operation, model, null); } else { context.revertReloadReq...
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { StrictMaxPoolAdd.INSTANCE.installRuntimeService(context, model, null); } else { context.revertRelo...
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { StrictMaxPoolAdd.INSTANCE.installRuntimeService(context, operation, model, null); } else { context...
public void testTransformer_1_3_0() throws Exception { KernelServices services = super.installInController(AdditionalInitialization.MANAGEMENT, getSubsystemXml()); checkSubsystemTransformer(services, ModelVersion.create(1, 3)); }
public void testTransformer_1_3_0() throws Exception { KernelServices services = super.installInController(AdditionalInitialization.MANAGEMENT, getSubsystemXml()); checkModelAgainstDefinition(services, ModelVersion.create(1, 3)); }
public void testRFC4180() { assertEquals(null, RFC4180.getCommentStart()); assertEquals(',', RFC4180.getDelimiter()); assertEquals(null, RFC4180.getEscape()); assertEquals(false, RFC4180.getIgnoreEmptyLines()); assertEquals(Character.valueOf('"'), RFC4180.getQuoteChar()); ...
public void testRFC4180() { assertEquals(null, RFC4180.getCommentStart()); assertEquals(',', RFC4180.getDelimiter()); assertEquals(null, RFC4180.getEscape()); assertFalse(RFC4180.getIgnoreEmptyLines()); assertEquals(Character.valueOf('"'), RFC4180.getQuoteChar()); ass...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { // get hold of the deployment unit DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); // fetch the EjbJarMetaData if (!isEjbDeployment(deploymentUnit)) { // ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { // get hold of the deployment unit DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); // fetch the EjbJarMetaData if (!isEjbDeployment(deploymentUnit)) { // ...
protected boolean applyUpdateToRuntime(final OperationContext context, final ModelNode operation, String attributeName, final ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<String> handbackHolder) throws OperationFailedException { final St...
protected boolean applyUpdateToRuntime(final OperationContext context, final ModelNode operation, String attributeName, final ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<String> handbackHolder) throws OperationFailedException { final St...
public State execute() { State continuingState = new ValidateUserState(theConsole, stateValues); if (stateValues.isSilentOrNonInteractive() == false) { stateValues.setPassword(null); // If interactive we want to be sure to capture this. /* * Prompt for username. ...
public State execute() { State continuingState = new ValidateUserState(theConsole, stateValues); if (stateValues.isSilentOrNonInteractive() == false) { stateValues.setPassword(null); // If interactive we want to be sure to capture this. /* * Prompt for username. ...
public State execute() { if (stateValues.isSilentOrNonInteractive() == false) { if (rePrompt == false) { // Password requirements. RestrictionLevel level = stateValues.getOptions().getCheckUtil().getRestrictionLevel(); if (!RestrictionLevel.RELAX.e...
public State execute() { if (stateValues.isSilentOrNonInteractive() == false) { if (rePrompt == false) { // Password requirements. RestrictionLevel level = stateValues.getOptions().getCheckUtil().getRestrictionLevel(); if (!RestrictionLevel.RELAX.e...
public State execute() { theConsole.printf(AddUser.NEW_LINE); theConsole.printf(DomainManagementLogger.ROOT_LOGGER.filePrompt()); theConsole.printf(AddUser.NEW_LINE); String temp = theConsole.readLine("(a): "); if (temp == null) { /* * This will ret...
public State execute() { theConsole.printf(AddUser.NEW_LINE); theConsole.printf(DomainManagementLogger.ROOT_LOGGER.filePrompt()); theConsole.printf(AddUser.NEW_LINE); String temp = theConsole.readLine("(a): "); if (temp == null) { /* * This will ret...
public State execute() { PasswordCheckResult result = stateValues.getOptions().getCheckUtil().check(false, stateValues.getUserName(), stateValues.getPassword()); final boolean warnResult = PasswordCheckResult.Result.WARN.equals(result.getResult()); final boole...
public State execute() { PasswordCheckResult result = stateValues.getOptions().getCheckUtil().check(false, stateValues.getUserName(), stateValues.getPassword()); final boolean warnResult = PasswordCheckResult.Result.WARN.equals(result.getResult()); final boole...
public State execute() { String enteredRealm = stateValues.getRealm(); if (enteredRealm.length() == 0) { return new ErrorState(theConsole, DomainManagementLogger.ROOT_LOGGER.realmMustBeSpecified(), new PromptRealmState(theConsole, stateValues), stateValues); } if (stateV...
public State execute() { String enteredRealm = stateValues.getRealm(); if (enteredRealm.length() == 0) { return new ErrorState(theConsole, DomainManagementLogger.ROOT_LOGGER.realmMustBeSpecified(), new PromptRealmState(theConsole, stateValues)); } if (stateValues.getFile...
public State execute() { if (stateValues.isExistingDisabledUser() || stateValues.isExistingEnabledUser()) { State duplicateContinuing = stateValues.isSilentOrNonInteractive() ? null : new PromptNewUserState(theConsole, stateValues); ...
public State execute() { if (stateValues.isExistingDisabledUser() || stateValues.isExistingEnabledUser()) { State duplicateContinuing = stateValues.isSilentOrNonInteractive() ? null : new PromptNewUserState(theConsole, stateValues); ...
private static NumberGuessState parseState(HttpResponse response, String sessionId) throws IllegalStateException, IOException { Pattern smallestPattern = Pattern.compile("<span id=\"numberGuess:smallest\">([^<]+)</span>"); Pattern biggestPattern = Pattern.compile("<span id=\"numberGuess:biggest\">([...
private static NumberGuessState parseState(HttpResponse response, String sessionId) throws IllegalStateException, IOException { Pattern smallestPattern = Pattern.compile("<span id=\"numberGuess:smallest\">([^<]+)</span>"); Pattern biggestPattern = Pattern.compile("<span id=\"numberGuess:biggest\">([...
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { HttpSession session = req.getSession(true); Stateful bean = (Stateful) session.getAttribute("bean"); if (bean == null) { try { bean = (Stateful) new Initi...
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { HttpSession session = req.getSession(true); Stateful bean = (Stateful) session.getAttribute("bean"); if (bean == null) { try { bean = (Stateful) new Initi...
protected final T getHornetQComponentControl(final OperationContext context, final ModelNode operation, final boolean forWrite) throws OperationFailedException { final ServiceName hqServiceName = MessagingServices.getHornetQServiceName(PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR)...
protected final T getHornetQComponentControl(final OperationContext context, final ModelNode operation, final boolean forWrite) throws OperationFailedException { final ServiceName hqServiceName = MessagingServices.getHornetQServiceName(PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR)...
private void handleReadAttribute(OperationContext context, ModelNode operation) { final AddressControl addressControl = getAddressControl(context, operation); if (addressControl == null) { ManagementUtil.rollbackOperationWithNoHandler(context, operation); return; } ...
private void handleReadAttribute(OperationContext context, ModelNode operation) { final AddressControl addressControl = getAddressControl(context, operation); if (addressControl == null) { ManagementUtil.rollbackOperationWithResourceNotFound(context, operation); return; ...
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)...
public BicubicSplineFunction(double[] a) { this.a = new double[N][N]; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { this.a[i][j] = a[i + N * j]; } } }
public BicubicSplineFunction(double[] a) { this.a = new double[N][N]; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { this.a[i][j] = a[i * N + j]; } } }
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); fina...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); fina...
private static ModelNode validateResolvedModel(final AttributeDefinition definition, final OperationContext context, final ModelNode subModel) throws OperationFailedException { final String attributeName = definition.getName(); final boolean has = s...
private static ModelNode validateResolvedModel(final AttributeDefinition definition, final OperationContext context, final ModelNode subModel) throws OperationFailedException { final String attributeName = definition.getName(); final boolean has = s...
protected Map<String, Object> filterModel(Map<String, Object> model) { Map<String, Object> result = new HashMap<String, Object>(model.size()); Set<String> renderedAttributes = !CollectionUtils.isEmpty(this.renderedAttributes) ? this.renderedAttributes : model.keySet(); for (Map.Entry<String, Object> entry : ...
protected Map<String, Object> filterModel(Map<String, Object> model) { Map<String, Object> result = new HashMap<String, Object>(model.size()); Set<String> renderedAttributes = !CollectionUtils.isEmpty(this.renderedAttributes) ? this.renderedAttributes : model.keySet(); for (Map.Entry<String, Object> entry : ...
public void registerJodaTimeFormatting() { JodaTimeConverters.registerConverters(this.formatterRegistry.getConverterRegistry()); DateTimeFormatter jodaDateFormatter = getJodaDateFormatter(); this.formatterRegistry.addFormatterForFieldType(LocalDate.class, new ReadablePartialPrinter(jodaDateFormatter), new DateT...
public void registerJodaTimeFormatting() { JodaTimeConverters.registerConverters(this.formatterRegistry.getConverterRegistry()); DateTimeFormatter jodaDateFormatter = getJodaDateFormatter(); this.formatterRegistry.addFormatterForFieldType(LocalDate.class, new ReadablePartialPrinter(jodaDateFormatter), new DateT...
public void handleRollback(OperationContext context, ModelNode operation) { try { RaOperationUtil.removeIfActive(context, raName); } catch (OperationFailedException e) { } ...
public void handleRollback(OperationContext context, ModelNode operation) { try { RaOperationUtil.removeIfActive(context, raName, idName); } catch (OperationFailedException e) { }...
private void loadStats(String resource, Object u) throws Exception { DescriptiveStatistics d = null; SummaryStatistics s = null; if (u instanceof DescriptiveStatistics) { d = (DescriptiveStatistics) u; } else { s = (SummaryStatistics) u; } ...
private void loadStats(String resource, Object u) throws Exception { DescriptiveStatistics d = null; SummaryStatistics s = null; if (u instanceof DescriptiveStatistics) { d = (DescriptiveStatistics) u; } else { s = (SummaryStatistics) u; } ...
protected RandomGenerator makeGenerator() { return new Well1024a(1000); }
protected RandomGenerator makeGenerator() { return new Well1024a(1001); }
public T create();
T create(); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "Licens...
public synchronized void start() { if (millisecondTimeout != -1) { expiryThread = new ExpirationTask(); expiryThread.setDaemon(true); expiryThread.start(); expiryThread.setName("Expiry Thread for SFSB " + beanName); } }
public synchronized void start() { if (millisecondTimeout >= 0) { expiryThread = new ExpirationTask(); expiryThread.setDaemon(true); expiryThread.start(); expiryThread.setName("Expiry Thread for SFSB " + beanName); } }
public static boolean isReachable() { if (reachable == null) { if (System.getProperties().contains(TEST_TRANSFORMERS_EAP)) { try { InetAddress.getByName(EAP_REPOSITORY_HOST); reachable = true; } catch (UnknownHostException e...
public static boolean isReachable() { if (reachable == null) { if (System.getProperties().containsKey(TEST_TRANSFORMERS_EAP)) { try { InetAddress.getByName(EAP_REPOSITORY_HOST); reachable = true; } catch (UnknownHostExceptio...
public Double getZ() { throw new MathRuntimeException("?"); }
public Double getZ() { throw new MathRuntimeException(LocalizedFormats.SIMPLE_MESSAGE, "?"); }
public List<T> multiGet(List<List<Object>> keys) { List<T> ret = new ArrayList<T>(); for(List<Object> key: keys) { ret.add(db.get(key)); }
public List<T> multiGet(List<List<Object>> keys) { List<T> ret = new ArrayList(); for(List<Object> key: keys) { ret.add(db.get(key)); }
public int getConfidentialPort(HttpServerExchange exchange) { int port = exchange.getHostPort(); return host.getValue().getServer().getValue().lookupSecurePort(port); } }; }
public int getConfidentialPort(HttpServerExchange exchange) { int port = exchange.getDestinationAddress().getPort(); return host.getValue().getServer().getValue().lookupSecurePort(port); } }; }
IllegalStateException illegalStateFailedToRegisterModule(@Cause Throwable th, Module module); /* * 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 individ...
IllegalStateException illegalStateFailedToRegisterModule(@Cause Throwable th, Module module); /* * 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 individ...
public void testResourceAdapters() throws Exception { ModelNode model = getModel("ra.xml", "some.rar"); if (model == null) return; // Check model.. Properties params = ParseUtils.raCommonProperties(); ModelNode raCommonModel = model.get("subsystem", "resource-ada...
public void testResourceAdapters() throws Exception { ModelNode model = getModel("ra.xml", "some.rar"); if (model == null) return; // Check model.. Properties params = ParseUtils.raCommonProperties(); ModelNode raCommonModel = model.get("subsystem", "resource-ada...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODU...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODU...
private void writeServerProfile(final XMLExtendedStreamWriter writer, final ModelMarshallingContext context) throws XMLStreamException { ModelNode profileNode = context.getModelNode(); writer.writeStartElement(Element.PROFILE.getLocalName()); writer.writeAttribute(Attribute.PROFILE.getLoca...
private void writeServerProfile(final XMLExtendedStreamWriter writer, final ModelMarshallingContext context) throws XMLStreamException { ModelNode profileNode = context.getModelNode(); writer.writeStartElement(Element.PROFILE.getLocalName()); writer.writeAttribute(Attribute.NAME.getLocalNa...
public Cancellable execute(NewOperationContext context, ModelNode operation, ResultHandler resultHandler) { final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR)); final String name = address.getLastElement().getValue(); final String path = operation.require(CommonA...
public Cancellable execute(NewOperationContext context, ModelNode operation, ResultHandler resultHandler) { final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR)); final String name = address.getLastElement().getValue(); final String path = operation.require(CommonA...
private void writeAcceptorAndConnectorContent(final XMLExtendedStreamWriter writer, final Property property) throws XMLStreamException { writer.writeAttribute(Attribute.NAME.getLocalName(), property.getName()); final ModelNode value = property.getValue(); if (has(value, SOCKET_BINDING)) { ...
private void writeAcceptorAndConnectorContent(final XMLExtendedStreamWriter writer, final Property property) throws XMLStreamException { writer.writeAttribute(Attribute.NAME.getLocalName(), property.getName()); final ModelNode value = property.getValue(); if (has(value, SOCKET_BINDING)) { ...
private <T extends DeploymentUnitProcessor> void addDeploymentProcessor(final BatchBuilder batchBuilder, final T deploymentUnitProcessor, final long priority) { final DeploymentUnitProcessorService<T> deploymentUnitProcessorService = new DeploymentUnitProcessorService<T>(deploymentUnitProcessor); ba...
private <T extends DeploymentUnitProcessor> void addDeploymentProcessor(final BatchBuilder batchBuilder, final T deploymentUnitProcessor, final long priority) { final DeploymentUnitProcessorService<T> deploymentUnitProcessorService = new DeploymentUnitProcessorService<T>(deploymentUnitProcessor); ba...
public void handle(HttpExchange exchange) throws IOException { final Headers requestHeaders = exchange.getRequestHeaders(); final Headers responseHeaders = exchange.getResponseHeaders(); // Redirect back if there is no realm to log out of if (realm == null) { responseHea...
public void handle(HttpExchange exchange) throws IOException { final Headers requestHeaders = exchange.getRequestHeaders(); final Headers responseHeaders = exchange.getResponseHeaders(); // Redirect back if there is no realm to log out of if (realm == null) { responseHea...
public ChangeSetResults perform(ArchiveInputStream in, ArchiveOutputStream out) throws IOException { ChangeSetResults results = new ChangeSetResults(); Set workingSet = new LinkedHashSet(changes); for (Iterator it = workingSet.iterator(); it.hasNext();) { ...
public ChangeSetResults perform(ArchiveInputStream in, ArchiveOutputStream out) throws IOException { ChangeSetResults results = new ChangeSetResults(); Set workingSet = new LinkedHashSet(changes); for (Iterator it = workingSet.iterator(); it.hasNext();) { ...
package org.jboss.as.controller.interfaces; /** * */ package org.jboss.as.model.socket; import java.io.Serializable; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; /** * A criteria used to determine what IP address to use for an interface. * * @author Brian Stans...
package org.jboss.as.controller.interfaces; /** * */ package org.jboss.as.controller.interfaces; import java.io.Serializable; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; /** * A criteria used to determine what IP address to use for an interface. * * @author Br...
public ModelNode getModelDescription(Locale locale) { final ModelNode subsystem = new ModelNode(); subsystem.get(DESCRIPTION).set("The JAXR subsystem"); subsystem.get(HEAD_COMMENT_ALLOWED).set(true); subsystem.get(TAIL_COMMENT_ALLOWED).set(true); subsy...
public ModelNode getModelDescription(Locale locale) { final ModelNode subsystem = new ModelNode(); subsystem.get(DESCRIPTION).set("The JAXR subsystem"); subsystem.get(HEAD_COMMENT_ALLOWED).set(true); subsystem.get(TAIL_COMMENT_ALLOWED).set(true); subsy...
public interface BeanGroupFactory<G, I, T> extends Creator<G, BeanGroupEntry<I, T>, Void>, Locator<G, BeanGroupEntry<I, T>>, Evictor<G>, Remover<G> { /* * JBoss, Home of Professional Open Source. * Copyright 2013, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt f...
public interface BeanGroupFactory<G, I, T> extends Creator<G, BeanGroupEntry<I, T>, Void>, Locator<G, BeanGroupEntry<I, T>>, Evictor<G>, Remover<G> { /* * JBoss, Home of Professional Open Source. * Copyright 2013, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt f...
public Bean<G, I, T> createBean(I id, G groupId, T bean) { InfinispanEjbLogger.ROOT_LOGGER.tracef("Creating bean %s associated with group %s", id, groupId); BeanGroup<G, I, T> group = this.groupFactory.createGroup(groupId, this.groupFactory.createValue(groupId)); group.addBean(id, bean); ...
public Bean<G, I, T> createBean(I id, G groupId, T bean) { InfinispanEjbLogger.ROOT_LOGGER.tracef("Creating bean %s associated with group %s", id, groupId); BeanGroup<G, I, T> group = this.groupFactory.createGroup(groupId, this.groupFactory.createValue(groupId, null)); group.addBean(id, bean...
public Session<L> createSession(String id) { Session<L> session = this.factory.createSession(id, this.factory.createValue(id)); final Time time = this.defaultMaxInactiveInterval; session.getMetaData().setMaxInactiveInterval(time.getValue(), time.getUnit()); return new SchedulableSess...
public Session<L> createSession(String id) { Session<L> session = this.factory.createSession(id, this.factory.createValue(id, null)); final Time time = this.defaultMaxInactiveInterval; session.getMetaData().setMaxInactiveInterval(time.getValue(), time.getUnit()); return new Schedulab...
public interface SessionFactory<V, L> extends Creator<String, V, Void>, Locator<String, V>, Remover<String>, Evictor<String> { /* * 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 * distribut...
public interface SessionFactory<V, L> extends Creator<String, V, Void>, Locator<String, V>, Remover<String>, Evictor<String> { /* * 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 * distribut...
public CoarseSessionsKey readObject(ObjectInput input) throws IOException, ClassNotFoundException { return new CoarseSessionsKey(input.readUTF()); } }
public CoarseSessionsKey readObject(ObjectInput input) throws IOException { return new CoarseSessionsKey(input.readUTF()); } }
public static Archive<?> deploy() { JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "cmp-commerce.jar"); jar.addPackage(OrderByQueryTestCase.class.getPackage()); jar.addAsManifestResource(OrderByQueryTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml"); jar.addAsManifest...
public static Archive<?> deploy() { JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "cmp-commerce.jar"); jar.addPackage(OrderByQueryTestCase.class.getPackage()); jar.addAsManifestResource(OrderByQueryTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml"); jar.addAsManifest...
public void replaceQueryParam() { UriComponentsBuilder builder = UriComponentsBuilder.newInstance().queryParam("baz", "qux", 42); builder.replaceQueryParam("baz", "xuq", 24); UriComponents result = builder.build(); assertEquals("baz=xuq&baz=24", result.getQuery()); builder = UriComponentsBuilder.newInsta...
public void replaceQueryParam() { UriComponentsBuilder builder = UriComponentsBuilder.newInstance().queryParam("baz", "qux", 42); builder.replaceQueryParam("baz", "xuq", 24); UriComponents result = builder.build(); assertEquals("baz=xuq&baz=24", result.getQuery()); builder = UriComponentsBuilder.newInsta...
public void testReciprocalZero() { Assert.assertEquals(Complex.ZERO.reciprocal(), Complex.NaN); }
public void testReciprocalZero() { Assert.assertEquals(Complex.ZERO.reciprocal(), Complex.INF); }
package org.apache.commons.codec; /* * 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, Versi...
package org.apache.commons.codec; /* * 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, Versi...
package org.apache.commons.codec; /* * 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, Versi...
package org.apache.commons.codec; /* * 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, Versi...
package org.apache.commons.codec; /* * 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, Versi...
package org.apache.commons.codec; /* * 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, Versi...
package org.apache.commons.codec; /* * 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, Versi...
package org.apache.commons.codec; /* * 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, Versi...
package org.apache.commons.codec; /* * 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, Versi...
package org.apache.commons.codec; /* * 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, Versi...
package org.apache.commons.codec; /* * 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, Versi...
package org.apache.commons.codec; /* * 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, Versi...
package org.apache.commons.codec.language.bm; /* * 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 Li...
package org.apache.commons.codec.language.bm; /* * 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 Li...
private void parseRemoteDomainController2_0(final XMLExtendedStreamReader reader, final ModelNode address, Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException { boolean requireDiscoveryOptions = false; boolean hasDiscoveryOptions = false; switch (expectedN...
private void parseRemoteDomainController2_0(final XMLExtendedStreamReader reader, final ModelNode address, Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException { boolean requireDiscoveryOptions = false; boolean hasDiscoveryOptions = false; switch (expectedN...
public static Archive<?> deployment() { WebArchive war = ShrinkWrap.create(WebArchive.class, "distributable.war"); war.addClass(SimpleServlet.class); war.addAsWebInfResource(SimpleWebTestCase.class.getPackage(), "web.xml"); System.out.println(war.toString(true)); return war; ...
public static Archive<?> deployment() { WebArchive war = ShrinkWrap.create(WebArchive.class, "distributable.war"); war.addClass(SimpleServlet.class); war.setWebXML(SimpleWebTestCase.class.getPackage(), "web.xml"); System.out.println(war.toString(true)); return war; }
public CSVLexer(CSVFormat format, 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 caller is respons...
public CSVLexer(CSVFormat format, 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 caller is respons...
public ListAttributeDefinition(final String name, final String xmlName, final boolean allowNull, final int minSize, final int maxSize, final ParameterValidator elementValidator) { super(name, xmlName, null, ModelType.LIST, allowNull, false, MeasurementUnit.NONE, new ListVa...
public ListAttributeDefinition(final String name, final String xmlName, final boolean allowNull, final int minSize, final int maxSize, final ParameterValidator elementValidator) { super(name, xmlName, null, ModelType.LIST, allowNull, false, MeasurementUnit.NONE, new ListVa...
public void configureDependency(final ServiceBuilder<?> serviceBuilder, final ComponentStartService service) throws DeploymentUnitProcessingException { serviceBuilder.addDependency(description.getCreateServiceName(), CmpEntityBeanComponent.class, factory.getComponentInjector(...
public void configureDependency(final ServiceBuilder<?> serviceBuilder, final ComponentStartService service) throws DeploymentUnitProcessingException { serviceBuilder.addDependency(description.getCreateServiceName(), CmpEntityBeanComponent.class, factory.getComponentInjector(...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; } Collection<?> sourceCollection = (Collection<?>) source; Object array = Array.newInstance(targetType.getElementType(), sourceCollection.size()); int i = 0; for (Object source...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; } Collection<?> sourceCollection = (Collection<?>) source; Object array = Array.newInstance(targetType.getElementType(), sourceCollection.size()); int i = 0; for (Object source...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; } Collection<?> sourceCollection = (Collection<?>) source; if (sourceCollection.size() == 0) { return null; } Object firstElement = sourceCollection.iterator().next(); ret...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; } Collection<?> sourceCollection = (Collection<?>) source; if (sourceCollection.size() == 0) { return null; } Object firstElement = sourceCollection.iterator().next(); ret...
@Message(id = 67, value = "Servlet class not defined for servlet %s") /* * 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. * * ...
@Message(id = 67, value = "Servlet class not defined for servlet %s") /* * 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 String toString() { StringBuilder builder = new StringBuilder(ClassUtils.getShortClassName(this, null)); builder.append("("); builder.append(getLeftElement()); builder.append(","); builder.append(getRightElement()); builder.append(")"); return builder.t...
public String toString() { StringBuilder builder = new StringBuilder(this.getClass().getSimpleName()); builder.append("("); builder.append(getLeftElement()); builder.append(","); builder.append(getRightElement()); builder.append(")"); return builder.toString()...
public static Test suite() { TestSuite suite = new TestSuite(); suite.setName("Commons-Lang (all) Tests"); suite.addTest(LangTestSuite.suite()); suite.addTest(BuilderTestSuite.suite()); suite.addTest(EnumTestSuite.suite()); suite.addTest(org.apache.commons.lang.enum.E...
public static Test suite() { TestSuite suite = new TestSuite(); suite.setName("Commons-Lang (all) Tests"); suite.addTest(LangTestSuite.suite()); suite.addTest(BuilderTestSuite.suite()); suite.addTest(EnumTestSuite.suite()); suite.addTest(org.apache.commons.lang.enum.E...
public void initialize(ExtensionContext context) { // Register the remoting subsystem final SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME); registration.registerXMLElementWriter(NewRemotingSubsystemParser.INSTANCE); final ManagementResourceRegistrati...
public void initialize(ExtensionContext context) { // Register the remoting subsystem final SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME); registration.registerXMLElementWriter(RemotingSubsystem11Parser.INSTANCE); final ManagementResourceRegistratio...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); fina...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); fina...
public ClassLoader getClassLoader() { return componentClassLoader; } }; this.endpointFactory = new JBossMessageEndpointFactory(componentClassLoader, service, (Class<Object>) getComponentClass()); this.deliveryActive = deliveryActive; }
public ClassLoader getClassLoader() { return componentClassLoader; } }; this.endpointFactory = new JBossMessageEndpointFactory(componentClassLoader, service, (Class<Object>) getComponentClass(), messageListenerInterface); this.deliveryActive = deliveryActi...
IllegalStateException couldNotBackUp(@Cause IOException cause, String absolutePath, String absolutePath1); /* * 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 listi...
IllegalStateException couldNotBackUp(@Cause IOException cause, String absolutePath, String absolutePath1); /* * 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 listi...
public void setFormatterName(String formatterName) { this.formatterName = formatterName; } void writeLogItem(AuditLogItem item) { try { initialize(); String formattedItem = item.format(formatter); writeLogItem(formattedItem); failureCount = 0;...
public void setFormatterName(String formatterName) { this.formatterName = formatterName; } void writeLogItem(AuditLogItem item) { try { initialize(); String formattedItem = item.format(formatter); writeLogItem(formattedItem); failureCount = 0;...
public Date getDate() { return date; }
public Date getDate() { return (Date)date.clone(); }
public void updateHandler(AuditLogHandler handler) { config.lock(); try { AuditLogHandler existing = config.getConfiguredHandler(handler.getName()); if (!handler.compare(existing)){ if (handlerUpdateTask == null){ handlerUpdateTask = new Ha...
public void updateHandler(AuditLogHandler handler) { config.lock(); try { AuditLogHandler existing = config.getConfiguredHandler(handler.getName()); if (!handler.isDifferent(existing)){ if (handlerUpdateTask == null){ handlerUpdateTask = ne...
public void testPerson() { Person p = new Person(); p.name = "John Q. Public"; p.age = 45; p.smoker = true; String pBaseStr = p.getClass().getName(); assertEquals(pBaseStr + "[name=John Q. Public,age=45,smoker=true]", new ToStringBuilder(p).append("name", p.name).appe...
public void testPerson() { Person p = new Person(); p.name = "John Q. Public"; p.age = 45; p.smoker = true; String pBaseStr = "ToStringStyleTest.Person"; assertEquals(pBaseStr + "[name=John Q. Public,age=45,smoker=true]", new ToStringBuilder(p).append("name", p.name)....