buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public PointVectorValuePair doOptimize() {
final ConvergenceChecker<PointVectorValuePair> checker
= getConvergenceChecker();
// Computation will be useless without a checker (see "for-loop").
if (checker == null) {
throw new NullArgumentException();
}
... | public PointVectorValuePair doOptimize() {
final ConvergenceChecker<PointVectorValuePair> checker
= getConvergenceChecker();
// Computation will be useless without a checker (see "for-loop").
if (checker == null) {
throw new NullArgumentException();
}
... |
protected KernelServices(ServiceContainer container, ModelController controller, StringConfigurationPersister persister,
ManagementResourceRegistration rootRegistration, OperationValidator operationValidator,
ModelVersion legacyModelVersion, boolean successfulBoot, Throwable bootError) {
... | protected KernelServices(ServiceContainer container, ModelController controller, StringConfigurationPersister persister,
ManagementResourceRegistration rootRegistration, OperationValidator operationValidator,
ModelVersion legacyModelVersion, boolean successfulBoot, Throwable bootError) {
... |
public static ModelNodeRegistration createHostRegistry(final ExtensibleConfigurationPersister configurationPersister, HostControllerEnvironment environment, DomainModelProxy domainModelProxy) {
final ModelNodeRegistration root = ModelNodeRegistration.Factory.create(HostDescriptionProviders.ROOT_PROVIDER);
... | public static ModelNodeRegistration createHostRegistry(final ExtensibleConfigurationPersister configurationPersister, HostControllerEnvironment environment, DomainModelProxy domainModelProxy) {
final ModelNodeRegistration root = ModelNodeRegistration.Factory.create(HostDescriptionProviders.ROOT_PROVIDER);
... |
protected boolean isFlashMapForRequest(FlashMap flashMap, HttpServletRequest request) {
if (flashMap.getTargetRequestPath() != null) {
String requestUri = this.urlPathHelper.getRequestUri(request);
if (!requestUri.equals(flashMap.getTargetRequestPath())
&& !requestUri.equals(flashMap.getTargetRequestPath(... | protected boolean isFlashMapForRequest(FlashMap flashMap, HttpServletRequest request) {
if (flashMap.getTargetRequestPath() != null) {
String requestUri = this.urlPathHelper.getOriginatingRequestUri(request);
if (!requestUri.equals(flashMap.getTargetRequestPath())
&& !requestUri.equals(flashMap.getTargetR... |
protected int getOrder(Object obj) {
if (obj instanceof Ordered) {
return ((Ordered) obj).getOrder();
}
if (obj != null) {
Class<?> clazz = (obj instanceof Class ? (Class) obj : obj.getClass());
Order order = clazz.getAnnotation(Order.class);
if (order != null) {
return order.value();
}
}
... | protected int getOrder(Object obj) {
if (obj instanceof Ordered) {
return ((Ordered) obj).getOrder();
}
if (obj != null) {
Class<?> clazz = (obj instanceof Class ? (Class) obj : obj.getClass());
Order order = AnnotationUtils.findAnnotation(clazz, Order.class);
if (order != null) {
return order.va... |
public DynamicBrokersReader(Map conf, String zkStr, String zkPath, String topic) {
_zkPath = zkPath;
_topic = topic;
try {
_curator = CuratorFrameworkFactory.newClient(
zkStr,
Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT)),
... | public DynamicBrokersReader(Map conf, String zkStr, String zkPath, String topic) {
_zkPath = zkPath;
_topic = topic;
try {
_curator = CuratorFrameworkFactory.newClient(
zkStr,
Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT)),
... |
return new FileUpdateTask(item, target, backup, modification);
/*
* JBoss, Home of Professional Open Source.
* Copyright 2012, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is... | return new FileUpdateTask(item, target, backup, modification);
/*
* JBoss, Home of Professional Open Source.
* Copyright 2012, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is... |
public static final SimpleAttributeDefinition POA_QUEUE_MAX = new SimpleAttributeDefinitionBuilder(
JacORBSubsystemConstants.POA_QUEUE_MAX, ModelType.INT, true)
.setDefaultValue(new ModelNode().set(100))
.setValidator(new IntRangeValidator(1, 500, true, false))
.setFl... | public static final SimpleAttributeDefinition POA_QUEUE_MAX = new SimpleAttributeDefinitionBuilder(
JacORBSubsystemConstants.POA_QUEUE_MAX, ModelType.INT, true)
.setDefaultValue(new ModelNode().set(100))
.setValidator(new IntRangeValidator(1, 200, true, false))
.setFl... |
public int read(byte[] buf, int off, int len) throws IOException {
int firstCount = 0;
int b = 0;
while ((len > 0) && (b >= 0)) {
b = readFirstBytes();
if (b >= 0) {
buf[off++] = (byte) (b & 0xFF);
len--;
firstCount++;
... | public int read(byte[] buf, int off, int len) throws IOException {
int firstCount = 0;
int b = 0;
while ((len > 0) && (b >= 0)) {
b = readFirstBytes();
if (b >= 0) {
buf[off++] = (byte) (b & 0xFF);
len--;
firstCount++;
... |
public boolean accept(File file) {
return FindingFilter.invert( this.invert, (file.length() == 0) == this.argument );
}
| public boolean accept(File file) {
return FindingFilter.invert( this.invert, (!file.isDirectory() && file.length() == 0) == this.argument );
}
|
package org.springframework.web.socket.sockjs.frame;
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org... | package org.springframework.web.socket.sockjs.frame;
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org... |
package org.springframework.web.socket.sockjs.frame;
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org... | package org.springframework.web.socket.sockjs.frame;
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org... |
public Object execute(Object source) throws ConversionExecutionException {
try {
// TODO shouldn't do all this if generic info is null - should cache executor after first iteration?
Map map = (Map) source;
Map targetMap = (Map) getImpl(targetType.getType()).newInstance();
Iterator<Map.Entry<?, ?>> it = m... | public Object execute(Object source) throws ConversionExecutionException {
try {
// TODO shouldn't do all this if generic info is null - should cache executor after first iteration?
Map map = (Map) source;
Map targetMap = (Map) getImpl(targetType.getType()).newInstance();
Iterator<Map.Entry<?, ?>> it = m... |
public void testListAllFilesWithNestedArchive() throws Exception {
final File input = getFile("archives/OSX_ArchiveWithNestedArchive.zip");
List results = new ArrayList();
final InputStream is = new FileInputStream(input);
ArchiveInputStream in = null;
try {
... | public void testListAllFilesWithNestedArchive() throws Exception {
final File input = getFile("OSX_ArchiveWithNestedArchive.zip");
List results = new ArrayList();
final InputStream is = new FileInputStream(input);
ArchiveInputStream in = null;
try {
in = ... |
package org.wildfly.iiop.openjdk;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2014, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redis... | package org.wildfly.iiop.openjdk;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2014, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redis... |
package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... | package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... |
package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... | package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... |
package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... | package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... |
package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... | package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... |
package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... | package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... |
package org.wildfly.iiop.openjdk.rmi.marshal;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free so... | package org.wildfly.iiop.openjdk.rmi.marshal;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free so... |
package org.wildfly.iiop.openjdk.rmi.marshal;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free so... | package org.wildfly.iiop.openjdk.rmi.marshal;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free so... |
package org.wildfly.iiop.openjdk.service;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2014, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you c... | package org.wildfly.iiop.openjdk.service;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2014, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you c... |
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
ServiceRegistry registry = context.getServiceRegistry(false);
ServiceController<... | protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
ServiceRegistry registry = context.getServiceRegistry(false);
ServiceController<... |
protected Object handleOperation(String operationName, OperationContext context, ModelNode operation) throws OperationFailedException {
if (GET_CONNECTOR_PAIRS_AS_JSON.equals(operationName)) {
BroadcastGroupControl control = getHornetQComponentControl(context, operation, false);
try ... | protected Object handleOperation(String operationName, OperationContext context, ModelNode operation) throws OperationFailedException {
if (GET_CONNECTOR_PAIRS_AS_JSON.equals(operationName)) {
BroadcastGroupControl control = getHornetQComponentControl(context, operation, false);
try ... |
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
... | protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
... |
protected Object handleAdditonalOperation(String operationName, ModelNode operation, OperationContext context,
QueueControl queueControl) throws OperationFailedException {
try {
if (LIST_SCHEDULED_MESSAGES.equals(operationName)) {
Strin... | protected Object handleAdditonalOperation(String operationName, ModelNode operation, OperationContext context,
QueueControl queueControl) throws OperationFailedException {
try {
if (LIST_SCHEDULED_MESSAGES.equals(operationName)) {
Strin... |
protected void addJndiNameToControl(String toAdd, String resourceName, HornetQServer server, OperationContext context) {
ManagementService mgmt = server.getManagementService();
ConnectionFactoryControl control = ConnectionFactoryControl.class.cast(mgmt.getResource(ResourceNames.JMS_CONNECTION_FACTOR... | protected void addJndiNameToControl(String toAdd, String resourceName, HornetQServer server, OperationContext context) {
ManagementService mgmt = server.getManagementService();
ConnectionFactoryControl control = ConnectionFactoryControl.class.cast(mgmt.getResource(ResourceNames.JMS_CONNECTION_FACTOR... |
protected void addJndiNameToControl(String toAdd, String resourceName, HornetQServer server, OperationContext context) {
ManagementService mgmt = server.getManagementService();
JMSQueueControl control = JMSQueueControl.class.cast(mgmt.getResource(ResourceNames.JMS_QUEUE + resourceName));
try... | protected void addJndiNameToControl(String toAdd, String resourceName, HornetQServer server, OperationContext context) {
ManagementService mgmt = server.getManagementService();
JMSQueueControl control = JMSQueueControl.class.cast(mgmt.getResource(ResourceNames.JMS_QUEUE + resourceName));
try... |
protected void addJndiNameToControl(String toAdd, String resourceName, HornetQServer server, OperationContext context) {
ManagementService mgmt = server.getManagementService();
TopicControl control = TopicControl.class.cast(mgmt.getResource(ResourceNames.JMS_TOPIC + resourceName));
try {
... | protected void addJndiNameToControl(String toAdd, String resourceName, HornetQServer server, OperationContext context) {
ManagementService mgmt = server.getManagementService();
TopicControl control = TopicControl.class.cast(mgmt.getResource(ResourceNames.JMS_TOPIC + resourceName));
try {
... |
public static void addService(final ServiceName sname, final String abstractPath, final ServiceTarget target) {
AbsolutePathService service = new AbsolutePathService(abstractPath);
target.addService(sname, service);
}
| public static void addService(final ServiceName sname, final String abstractPath, final ServiceTarget target) {
AbsolutePathService service = new AbsolutePathService(abstractPath);
target.addService(sname, service).install();
}
|
public static void addService(BatchBuilder batchBuilder, File root) {
MockServerDeploymentRepository service = new MockServerDeploymentRepository(root);
batchBuilder.addService(SERVICE_NAME, service);
}
| public static void addService(BatchBuilder batchBuilder, File root) {
MockServerDeploymentRepository service = new MockServerDeploymentRepository(root);
batchBuilder.addService(SERVICE_NAME, service).install();
}
|
public static void addService(BatchBuilder batchBuilder) {
ShutdownHandlerImpl service = new ShutdownHandlerImpl();
batchBuilder.addService(SERVICE_NAME, service);
}
| public static void addService(BatchBuilder batchBuilder) {
ShutdownHandlerImpl service = new ShutdownHandlerImpl();
batchBuilder.addService(SERVICE_NAME, service).install();
}
|
public void testAvailable() throws Exception {
for (final String csName : Charset.availableCharsets().keySet()) {
// prevent java.lang.UnsupportedOperationException at sun.nio.cs.ext.ISO2022_CN.newEncoder.
// also try and avoid the following Effor on Continuum
// java.lang... | public void testAvailable() throws Exception {
for (final String csName : Charset.availableCharsets().keySet()) {
// prevent java.lang.UnsupportedOperationException at sun.nio.cs.ext.ISO2022_CN.newEncoder.
// also try and avoid the following Effor on Continuum
// java.lang... |
public void testComparatorWithDoubleMetaphone() throws Exception {
StringEncoderComparator sCompare = new StringEncoderComparator(new DoubleMetaphone());
String[] testArray = { "Jordan", "Sosa", "Prior", "Pryor" };
List<String> testList = Arrays.asList(testArray);
String[] controlA... | public void testComparatorWithDoubleMetaphone() throws Exception {
StringEncoderComparator sCompare = new StringEncoderComparator(new DoubleMetaphone());
String[] testArray = { "Jordan", "Sosa", "Prior", "Pryor" };
List<String> testList = Arrays.asList(testArray);
String[] controlA... |
private static Version.AsVersion version;
static Version.AsVersion getVersion(Class<?> testClass) {
Version version = testClass.getAnnotation(Version.class);
if (version == null) {
throw new IllegalArgumentException("No @Version");
}
if (MixedDomainTestSuite.version... | private static Version.AsVersion version;
static Version.AsVersion getVersion(Class<?> testClass) {
Version version = testClass.getAnnotation(Version.class);
if (version == null) {
throw new IllegalArgumentException("No @Version");
}
if (MixedDomainTestSuite.version... |
public void processDeployment(DeploymentUnitContext context) throws DeploymentUnitProcessingException {
final VirtualFile deploymentRoot = VirtualFileAttachment.getVirtualFileAttachment(context);
TldsMetaData tldsMetaData = context.getAttachment(TldsMetaData.ATTACHMENT_KEY);
if (tldsMetaData... | public void processDeployment(DeploymentUnitContext context) throws DeploymentUnitProcessingException {
final VirtualFile deploymentRoot = VirtualFileAttachment.getVirtualFileAttachment(context);
TldsMetaData tldsMetaData = context.getAttachment(TldsMetaData.ATTACHMENT_KEY);
if (tldsMetaData... |
public void processDeployment(DeploymentUnitContext context) throws DeploymentUnitProcessingException {
WarMetaData warMetaData = context.getAttachment(WarMetaData.ATTACHMENT_KEY);
assert warMetaData != null;
DeploymentStructure structure = context.getAttachment(DeploymentStructure.ATTACHMEN... | public void processDeployment(DeploymentUnitContext context) throws DeploymentUnitProcessingException {
WarMetaData warMetaData = context.getAttachment(WarMetaData.ATTACHMENT_KEY);
assert warMetaData != null;
DeploymentStructure structure = context.getAttachment(DeploymentStructure.ATTACHMEN... |
public int compare(File file1, File file2) {
return (getType(file1) - getType(file2));
}
| public int compare(File file1, File file2) {
return getType(file1) - getType(file2);
}
|
public String toString() {
String delegate = (fileFilter != null ? fileFilter.toString() : filenameFilter.toString());
return super.toString() + "(" + delegate + ")";
}
| public String toString() {
String delegate = fileFilter != null ? fileFilter.toString() : filenameFilter.toString();
return super.toString() + "(" + delegate + ")";
}
|
public boolean accept(File dir, String name) {
return (pattern.matcher(name).matches());
}
| public boolean accept(File dir, String name) {
return pattern.matcher(name).matches();
}
|
public synchronized void reset() throws IOException {
if (!markSupported) {
throw new UnsupportedOperationException("Mark not supported");
}
if (mark < 0) {
throw new IOException("No position has been marked");
}
if (position > (mark + readlimit)) {
... | public synchronized void reset() throws IOException {
if (!markSupported) {
throw new UnsupportedOperationException("Mark not supported");
}
if (mark < 0) {
throw new IOException("No position has been marked");
}
if (position > mark + readlimit) {
... |
private File[] listFiles(File file) {
File[] children = null;
if (file.isDirectory()) {
children = (fileFilter == null) ? file.listFiles() : file.listFiles(fileFilter);
}
if (children == null) {
children = FileUtils.EMPTY_FILE_ARRAY;
}
if (comp... | private File[] listFiles(File file) {
File[] children = null;
if (file.isDirectory()) {
children = fileFilter == null ? file.listFiles() : file.listFiles(fileFilter);
}
if (children == null) {
children = FileUtils.EMPTY_FILE_ARRAY;
}
if (compar... |
public StringBuilderWriter(StringBuilder builder) {
this.builder = (builder != null ? builder : new StringBuilder());
}
| public StringBuilderWriter(StringBuilder builder) {
this.builder = builder != null ? builder : new StringBuilder();
}
|
private boolean chmod(File file, int mode, boolean recurse)
throws InterruptedException {
// TODO: Refactor this to FileSystemUtils
List<String> args = new ArrayList<String>();
args.add("chmod");
if (recurse) {
args.add("-R");
}
args.add(Inte... | private boolean chmod(File file, int mode, boolean recurse)
throws InterruptedException {
// TODO: Refactor this to FileSystemUtils
List<String> args = new ArrayList<String>();
args.add("chmod");
if (recurse) {
args.add("-R");
}
args.add(Inte... |
protected boolean isValidLine(String line) {
char c = line.charAt(line.length() - 1);
return ((c - 48) % 3 != 1);
}
};
try {
try {
iterator.remove();
fail("Remove is unsupported");
} catch (Un... | protected boolean isValidLine(String line) {
char c = line.charAt(line.length() - 1);
return (c - 48) % 3 != 1;
}
};
try {
try {
iterator.remove();
fail("Remove is unsupported");
} catch (Unsu... |
private static void checkXmlWriter(String text, String encoding, String defaultEncoding)
throws IOException {
String xml = createXmlContent(text, encoding);
String effectiveEncoding = encoding;
if (effectiveEncoding == null) {
effectiveEncoding = (defaultEncoding == n... | private static void checkXmlWriter(String text, String encoding, String defaultEncoding)
throws IOException {
String xml = createXmlContent(text, encoding);
String effectiveEncoding = encoding;
if (effectiveEncoding == null) {
effectiveEncoding = defaultEncoding == nu... |
private String resolveContextPath() {
if (deploymentName.equals(host.getValue().getDefaultWebModule())) {
return "/";
} else {
return contextPath;
}
}
| private String resolveContextPath() {
if (deploymentName.equals(host.getValue().getDefaultWebModule())) {
return "";
} else {
return contextPath;
}
}
|
public void dimension2() {
KMeansPlusPlusClusterer<EuclideanIntegerPoint> transformer =
new KMeansPlusPlusClusterer<EuclideanIntegerPoint>(new Random(1746432956321l));
EuclideanIntegerPoint[] points = new EuclideanIntegerPoint[] {
// first expected cluster
... | public void dimension2() {
KMeansPlusPlusClusterer<EuclideanIntegerPoint> transformer =
new KMeansPlusPlusClusterer<EuclideanIntegerPoint>(new Random(1746432956321l));
EuclideanIntegerPoint[] points = new EuclideanIntegerPoint[] {
// first expected cluster
... |
protected void applyUpdateBootAction(final BootUpdateContext updateContext) {
applyUpdate(updateContext, UpdateResultHandler.NULL, null);
updateContext.addDeploymentProcessor(new ResourceAdaptersAttachingProcessor(resourceAdapters), Phase.RESOURCE_ADAPTERS_ATTACHING_PROCESSOR);
}
| protected void applyUpdateBootAction(final BootUpdateContext updateContext) {
applyUpdate(updateContext, UpdateResultHandler.NULL, null);
updateContext.addDeploymentProcessor(INIT_ME, new ResourceAdaptersAttachingProcessor(resourceAdapters), Phase.RESOURCE_ADAPTERS_ATTACHING_PROCESSOR);
}
|
private PrivatelyShadowedChild privatelyShadowedChild;
private Class parentClass = PublicChild.class.getSuperclass();
| private PrivatelyShadowedChild privatelyShadowedChild;
private Class<?> parentClass = PublicChild.class.getSuperclass();
|
package org.springframework.config.java;
package org.springframework.config.java.model;
import java.lang.reflect.Method;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
/**
* Registers bean definition(s) for a particular method, usually based on its annotation metadata.
*
* <h3>Constrai... | package org.springframework.config.java;
package org.springframework.config.java;
import java.lang.reflect.Method;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
/**
* Registers bean definition(s) for a particular method, usually based on its annotation metadata.
*
* <h3>Constraints</h... |
package org.springframework.config.java;
/*
* Copyright 2002-2008 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/licens... | package org.springframework.config.java;
/*
* Copyright 2002-2008 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/licens... |
package org.springframework.config.java;
/*
* Copyright 2002-2008 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/licens... | package org.springframework.config.java;
/*
* Copyright 2002-2008 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/licens... |
package org.springframework.config.java;
package org.springframework.config.java.model;
import java.util.List;
/** Marker interface */
//TODO: SJC-242 document
//TODO: SJC-242 rename
public interface Validator {
boolean supports(Object object);
void validate(Object object, List<UsageError> errors);
} | package org.springframework.config.java;
package org.springframework.config.java;
import java.util.List;
/** Marker interface */
//TODO: SJC-242 document
//TODO: SJC-242 rename
public interface Validator {
boolean supports(Object object);
void validate(Object object, List<UsageError> errors);
} |
public void handleRollback(OperationContext context, ModelNode operation) {
timer.suspend();
}
});
} else {
throw EjbLogger.ROOT_LOGGER.timerIsActive(timer);
}
... | public void handleRollback(OperationContext context, ModelNode operation) {
timer.suspend();
}
});
} else {
throw EjbLogger.ROOT_LOGGER.timerIsActive(timer.getId());
}
... |
private HandlerAddHandler() {
}
static void launchServices(final OperationContext context, final PathAddress pathAddress , final ModelNode model, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException {
Handler newHand... | private HandlerAddHandler() {
}
static void launchServices(final OperationContext context, final PathAddress pathAddress , final ModelNode model, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException {
Handler newHand... |
public String getFailureDescription() {
return "cannot transform attributes: " + rejected.toString();
}
};
}
@Override
void tranformResource(final Resource resource, final PathAddress address, final ResourceContext context) throws OperationFailedException {
... | public String getFailureDescription() {
return "cannot transform attributes: " + rejected.toString();
}
};
}
@Override
void transformResource(final Resource resource, final PathAddress address, final ResourceContext context) throws OperationFailedException {... |
void transformResource(Resource resource, PathAddress address, ResourceContext context) throws OperationFailedException {
/*
* 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 f... | void transformResource(Resource resource, PathAddress address, ResourceContext context) throws OperationFailedException {
/*
* 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 f... |
private static void doCopyDirectory(File srcDir, File destDir, FileFilter filter,
boolean preserveFileDate, List<String> exclusionList) throws IOException {
// recurse
File[] files = filter == null ? srcDir.listFiles() : srcDir.listFiles(filter);
if (files == null) { // null if ... | private static void doCopyDirectory(File srcDir, File destDir, FileFilter filter,
boolean preserveFileDate, List<String> exclusionList) throws IOException {
// recurse
File[] files = filter == null ? srcDir.listFiles() : srcDir.listFiles(filter);
if (files == null) { // null if ... |
public static final OperationDefinition DEFINITION = new SimpleOperationDefinitionBuilder(OPERATION_NAME, JSFExtension.getResourceDescriptionResolver())
.withFlag(OperationEntry.Flag.READ_ONLY)
.build();
| public static final OperationDefinition DEFINITION = new SimpleOperationDefinitionBuilder(OPERATION_NAME, JSFExtension.getResourceDescriptionResolver())
.withFlags(OperationEntry.Flag.READ_ONLY, OperationEntry.Flag.RUNTIME_ONLY)
.build();
|
public static String getDeploymentUnitId(DeploymentUnit deploymentUnit) {
String id = deploymentUnit.getName();
if (deploymentUnit.getParent() != null) {
id = deploymentUnit.getParent().getName() + "." + id;
}
return id;
}
| public static String getDeploymentUnitId(DeploymentUnit deploymentUnit) {
String id = deploymentUnit.getName();
if (deploymentUnit.getParent() != null) {
id = deploymentUnit.getParent().getName() + "/" + id;
}
return id;
}
|
protected String getVariableValueAsString(Object variableValue) {
String variableValueString = super.getVariableValueAsString(variableValue);
return encodeUriVariableValues ? UriUtils.encode(variableValueString, uriComponent, false) :
variableValueString;
}
| protected String getVariableValueAsString(Object variableValue) {
String variableValueString = super.getVariableValueAsString(variableValue);
return encodeUriVariableValues ? UriUtils.encodeUriComponent(variableValueString, uriComponent) :
variableValueString;
}
|
public void execute(final NewOperationContext context, final ModelNode operation) throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(operation.require(ADDRESS));
NewStepHandler stepHandler = rootRegistration.getOperationHandler(address, operation.requir... | public void execute(final NewOperationContext context, final ModelNode operation) throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(operation.require(ADDRESS));
NewStepHandler stepHandler = rootRegistration.getOperationHandler(address, operation.requir... |
public void testJbossStructureSchema() throws Exception {
validateXsd("jboss-structure-1_0.xsd");
}
| public void testJbossStructureSchema() throws Exception {
validateXsd("jboss-deployment-structure-1_0.xsd");
}
|
public ManagedReference getReference() {
PersistenceUnitServiceImpl service = (PersistenceUnitServiceImpl) serviceRegistry.getRequiredService(puServiceName).getValue();
EntityManagerFactory emf = service.getEntityManagerFactory();
EntityManager entityManager;
bool... | public ManagedReference getReference() {
PersistenceUnitServiceImpl service = (PersistenceUnitServiceImpl) serviceRegistry.getRequiredService(puServiceName).getValue();
EntityManagerFactory emf = service.getEntityManagerFactory();
EntityManager entityManager;
bool... |
private static boolean deploymentHasPersistenceProvider(DeploymentUnit deploymentUnit) {
deploymentUnit = DeploymentUtils.getTopDeploymentUnit(deploymentUnit);
PersistenceProviderDeploymentHolder persistenceProviderDeploymentHolder = deploymentUnit.getAttachment(JpaAttachments.DEPLOYED_PERSISTENCE_... | private static boolean deploymentHasPersistenceProvider(DeploymentUnit deploymentUnit) {
deploymentUnit = DeploymentUtils.getTopDeploymentUnit(deploymentUnit);
PersistenceProviderDeploymentHolder persistenceProviderDeploymentHolder = deploymentUnit.getAttachment(JpaAttachments.DEPLOYED_PERSISTENCE_... |
private ModelAndView invokeHandleMethod(HttpServletRequest request,
HttpServletResponse response, HandlerMethod handlerMethod) throws Exception {
ServletWebRequest webRequest = new ServletWebRequest(request, response);
WebDataBinderFactory binderFactory = getDataBinderFactory(handlerMethod);
ModelFactory mo... | private ModelAndView invokeHandleMethod(HttpServletRequest request,
HttpServletResponse response, HandlerMethod handlerMethod) throws Exception {
ServletWebRequest webRequest = new ServletWebRequest(request, response);
WebDataBinderFactory binderFactory = getDataBinderFactory(handlerMethod);
ModelFactory mo... |
public void install() {
if(!installed) {
final ResourceInjectionConfiguration resource = new ResourceInjectionConfiguration(injectionTarget, new LookupInjectionSource(localContextName));
classDescription.getConfigurators().add(new InjectionConfigurator(resource));
install... | public void install() {
if(!installed) {
final ResourceInjectionConfiguration resource = new ResourceInjectionConfiguration(injectionTarget, new LookupInjectionSource(localContextName));
classDescription.getInjectionConfigurations().add(resource);
installed = true;
... |
public void convertAndSendWithCustomHeader() {
Map<String, Object> headers = Collections.singletonMap("key", "value");
this.messagingTemplate.convertAndSend("/foo", "data", headers);
List<Message<byte[]>> messages = this.messageChannel.getMessages();
Message<byte[]> message = messages.get(0);
SimpMessageHea... | public void convertAndSendWithCustomHeader() {
Map<String, Object> headers = Collections.<String, Object>singletonMap("key", "value");
this.messagingTemplate.convertAndSend("/foo", "data", headers);
List<Message<byte[]>> messages = this.messageChannel.getMessages();
Message<byte[]> message = messages.get(0);
... |
public static final OptionMap CONNECTION_OPTIONS = OptionMap.create(RemotingOptions.HEARTBEAT_INTERVAL, heartbeatInterval,
Options.READ_TIMEOUT, 45000);
static synchronized void installRemotingServicesIfNotInstalled(final ServiceTarget serviceTarget,
... | public static final OptionMap CONNECTION_OPTIONS = OptionMap.create(RemotingOptions.HEARTBEAT_INTERVAL, heartbeatInterval,
Options.READ_TIMEOUT, 45000);
static synchronized void installRemotingServicesIfNotInstalled(final ServiceTarget serviceTarget,
... |
protected void addExtraServices(final ServiceTarget target) {
ManagementRemotingServices.installRemotingEndpoint(target, ManagementRemotingServices.MANAGEMENT_ENDPOINT, "localhost", EndpointService.EndpointType.MANAGEMENT, null, null);
ServiceName tmpDirPath = ServiceName.JBOSS.append("s... | protected void addExtraServices(final ServiceTarget target) {
ManagementRemotingServices.installRemotingManagementEndpoint(target, ManagementRemotingServices.MANAGEMENT_ENDPOINT, "localhost", EndpointService.EndpointType.MANAGEMENT, null, null);
ServiceName tmpDirPath = ServiceName.JBOSS... |
protected void addExtraServices(final ServiceTarget target) {
ManagementRemotingServices.installRemotingEndpoint(target, ManagementRemotingServices.MANAGEMENT_ENDPOINT, "loaclhost", EndpointService.EndpointType.MANAGEMENT, null, null);
ServiceName tmpDirPath = ServiceName.JBOSS.append("s... | protected void addExtraServices(final ServiceTarget target) {
ManagementRemotingServices.installRemotingManagementEndpoint(target, ManagementRemotingServices.MANAGEMENT_ENDPOINT, "loaclhost", EndpointService.EndpointType.MANAGEMENT, null, null);
ServiceName tmpDirPath = ServiceName.JBOSS... |
public void activate(final ServiceActivatorContext serviceActivatorContext) throws ServiceRegistryException {
final ServiceTarget serviceTarget = serviceActivatorContext.getServiceTarget();
final ServiceName endpointName = managementSubsystemEndpoint ? RemotingServices.SUBSYSTEM_ENDPOINT : Managemen... | public void activate(final ServiceActivatorContext serviceActivatorContext) throws ServiceRegistryException {
final ServiceTarget serviceTarget = serviceActivatorContext.getServiceTarget();
final ServiceName endpointName = managementSubsystemEndpoint ? RemotingServices.SUBSYSTEM_ENDPOINT : Managemen... |
private static final OptionMap OPTIONS = OptionMap.create(RemotingOptions.RECEIVE_WINDOW_SIZE, WINDOW_SIZE);
static synchronized void installRemotingServicesIfNotInstalled(final ServiceTarget serviceTarget,
final String hostName,
... | private static final OptionMap OPTIONS = OptionMap.create(RemotingOptions.RECEIVE_WINDOW_SIZE, WINDOW_SIZE);
static synchronized void installRemotingServicesIfNotInstalled(final ServiceTarget serviceTarget,
final String hostName,
... |
public PropertyPath(String propertyPath) {
// a.b.c[i].d[key].e
String[] props = propertyPath.split("\\.");
if (props.length == 0) {
props = new String[] { propertyPath };
}
for (String prop : props) {
if (prop.contains("[")) {
int start = prop.indexOf('[');
int end = prop.indexOf(']', start);
... | public PropertyPath(String propertyPath) {
// a.b.c[i].d[key].e
String[] props = propertyPath.split("\\.");
if (props.length == 0) {
props = new String[] { propertyPath };
}
for (String prop : props) {
if (prop.contains("[")) {
int start = prop.indexOf('[');
int end = prop.indexOf(']', start);
... |
public String getSecurityDomain(final Deployment dep) {
String securityDomain = null;
for (final EJBEndpoint ejbEndpoint : getEjbEndpoints(dep)) {
String nextSecurityDomain = ejbEndpoint.getSecurityDomain();
if (nextSecurityDomain == null || nextSecurityDomain.isEmpty()) {
... | public String getSecurityDomain(final Deployment dep) {
String securityDomain = null;
for (final EJBEndpoint ejbEndpoint : getEjbEndpoints(dep)) {
String nextSecurityDomain = ejbEndpoint.getSecurityDomain();
if(nextSecurityDomain.isEmpty()) {
nextSecurityDoma... |
public void uriTemplateVarAndRequestParam() throws Exception {
request.addParameter("age", "35");
Map<String, String> uriTemplateVars = new HashMap<String, String>();
uriTemplateVars.put("name", "nameValue");
uriTemplateVars.put("age", "25");
request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTR... | public void uriTemplateVarAndRequestParam() throws Exception {
request.addParameter("age", "35");
Map<String, String> uriTemplateVars = new HashMap<String, String>();
uriTemplateVars.put("name", "nameValue");
uriTemplateVars.put("age", "25");
request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTR... |
public WeldClassFileInfo load(String key) throws Exception {
return new WeldClassFileInfo(key, index, annotationClassAnnotationsCache);
}
}
| public WeldClassFileInfo load(String key) throws Exception {
return new WeldClassFileInfo(key, index, annotationClassAnnotationsCache, moduleClassLoader);
}
}
|
public void shouldNeedNonNegativeInitialCapacity() throws Exception {
new ConcurrentReferenceHashMap<Integer, String>(0, 1);
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("InitialCapactity must not be negative");
new TestWeakConcurrentCache<Integer, String>(-1, 1);
}
| public void shouldNeedNonNegativeInitialCapacity() throws Exception {
new ConcurrentReferenceHashMap<Integer, String>(0, 1);
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("InitialCapacity must not be negative");
new TestWeakConcurrentCache<Integer, String>(-1, 1);
}
|
public void execute(OperationContext context, ModelNode operation) {
ModelNode model = context.readModelForUpdate(PathAddress.EMPTY_ADDRESS);
final String deploymentUnitName = model.require(RUNTIME_NAME).asString();
model.get(ENABLED).set(false);
DeploymentHandlerUtil.undeploy(conte... | public void execute(OperationContext context, ModelNode operation) {
ModelNode model = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel();
final String deploymentUnitName = model.require(RUNTIME_NAME).asString();
model.get(ENABLED).set(false);
DeploymentHandlerUtil.... |
public static final SimpleAttributeDefinition PATH =
new SimpleAttributeDefinitionBuilder(EJB3SubsystemModel.PATH, ModelType.STRING, true)
.setAllowExpression(true)
| public static final SimpleAttributeDefinition PATH =
new SimpleAttributeDefinitionBuilder(EJB3SubsystemModel.PATH, ModelType.STRING, false)
.setAllowExpression(true)
|
private void parseTimer(XMLExtendedStreamReader reader, List<TimerImpl> timers) throws XMLStreamException {
LoadableElements loadableElements = new LoadableElements();
TimerImpl.Builder builder = TimerImpl.builder();
final Set<String> required = new HashSet<>(Arrays.asList(new String[]{TIMED... | private void parseTimer(XMLExtendedStreamReader reader, List<TimerImpl> timers) throws XMLStreamException {
LoadableElements loadableElements = new LoadableElements();
TimerImpl.Builder builder = TimerImpl.builder();
final Set<String> required = new HashSet<>(Arrays.asList(new String[]{TIMED... |
private void closeEntry() throws IOException {
if (closed) {
throw new IOException("The stream is closed");
}
if (current == null) {
return;
}
// Ensure all entry bytes are read
if (bytesReadFromStream <= current.getCompressedSize()
... | private void closeEntry() throws IOException {
if (closed) {
throw new IOException("The stream is closed");
}
if (current == null) {
return;
}
// Ensure all entry bytes are read
if (bytesReadFromStream <= current.getCompressedSize()
... |
String argConnectionProperties();
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redis... | String argConnectionProperties();
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redis... |
public static void usage() {
CommandLineArgument.printUsage(System.out);
}
| public static void usage() {
CommandLineArgumentUsageImpl.printUsage(System.out);
}
|
public static void main(String[] args) throws Exception {
Config config = new Config();
String host = TEST_REDIS_HOST;
int port = TEST_REDIS_PORT;
if (args.length > 2) {
host = args[0];
port = Integer.parseInt(args[1]);
}
JedisPoolConfig poo... | public static void main(String[] args) throws Exception {
Config config = new Config();
String host = TEST_REDIS_HOST;
int port = TEST_REDIS_PORT;
if (args.length >= 2) {
host = args[0];
port = Integer.parseInt(args[1]);
}
JedisPoolConfig po... |
public void addStep(final ModelNode response, final ModelNode operation, final NewStepHandler step, final Stage stage) throws IllegalArgumentException {
assert Thread.currentThread() == initiatingThread;
if (response == null) {
throw new IllegalArgumentException("response is null");
... | public void addStep(final ModelNode response, final ModelNode operation, final NewStepHandler step, final Stage stage) throws IllegalArgumentException {
assert Thread.currentThread() == initiatingThread;
if (response == null) {
throw new IllegalArgumentException("response is null");
... |
private ServiceName getDriverDependency(final String driver) {
String[] strings = Strings.split(driver, "#");
if (strings.length != 2) {
throw new IllegalArgumentException(
"module should define jdbc driver with this format: <driver-name>#<major-version>.<minor-versio... | private ServiceName getDriverDependency(final String driver) {
String[] strings = Strings.split(driver, "#");
if (strings.length != 2) {
throw new IllegalArgumentException(
"module should define jdbc driver with this format: <driver-name>#<major-version>.<minor-versio... |
public void testIntersection2() {
Vector3D p1 = new Vector3D (1.2, 3.4, -5.8);
Vector3D p2 = new Vector3D (3.4, -5.8, 1.2);
Plane pA = new Plane(p1, p2, new Vector3D (-2.0, 4.3, 0.7));
Plane pB = new Plane(p1, new Vector3D (11.4, -3.8, 5.1), p2);
Line l = (Lin... | public void testIntersection2() {
Vector3D p1 = new Vector3D (1.2, 3.4, -5.8);
Vector3D p2 = new Vector3D (3.4, -5.8, 1.2);
Plane pA = new Plane(p1, p2, new Vector3D (-2.0, 4.3, 0.7));
Plane pB = new Plane(p1, new Vector3D (11.4, -3.8, 5.1), p2);
Line l = pA.i... |
private int value(AVLTree<Integer>.Node node) {
return ((Integer) node.getElement()).intValue();
}
| private int value(AVLTree<Integer>.Node node) {
return node.getElement().intValue();
}
|
static final String RECOVERLUGIN_CLASSNAME = "recovery-plugin-class-name";
/*
* 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.
... | static final String RECOVERLUGIN_CLASSNAME = "recovery-plugin-class-name";
/*
* 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.
... |
private long writeEntryHeader( final ArArchiveEntry pEntry ) throws IOException {
long offset = 0;
boolean mustAppendName = false;
final String n = pEntry.getName();
if (LONGFILE_ERROR == longFileMode && n.length() > 16) {
throw new IOException("filename too long, > 16 ... | private long writeEntryHeader( final ArArchiveEntry pEntry ) throws IOException {
long offset = 0;
boolean mustAppendName = false;
final String n = pEntry.getName();
if (LONGFILE_ERROR == longFileMode && n.length() > 16) {
throw new IOException("filename too long, > 16 ... |
public void handle(CommandContext ctx) {
boolean printCommands;
try {
printCommands = commands.isPresent(ctx.getParsedCommandLine());
} catch (CommandFormatException e) {
ctx.printLine(e.getLocalizedMessage());
return;
}
if(printCommands) ... | public void handle(CommandContext ctx) {
boolean printCommands;
try {
printCommands = commands.isPresent(ctx.getParsedCommandLine());
} catch (CommandFormatException e) {
ctx.error(e.getLocalizedMessage());
return;
}
if(printCommands) {
... |
protected void doHandle(CommandContext ctx) throws CommandFormatException {
ParsedCommandLine args = ctx.getParsedCommandLine();
if(!args.hasProperties()) {
printHistory(ctx);
return;
}
if(clear.isPresent(args)) {
ctx.getHistory().clear();
... | protected void doHandle(CommandContext ctx) throws CommandFormatException {
ParsedCommandLine args = ctx.getParsedCommandLine();
if(!args.hasProperties()) {
printHistory(ctx);
return;
}
if(clear.isPresent(args)) {
ctx.getHistory().clear();
... |
protected void doHandle(CommandContext ctx) {
final String nodePath = this.nodePath.getValue(ctx.getParsedCommandLine());
OperationRequestAddress prefix = ctx.getPrefix();
if(nodePath == null) {
ctx.printLine(ctx.getPrefixFormatter().format(prefix));
return;
... | protected void doHandle(CommandContext ctx) {
final String nodePath = this.nodePath.getValue(ctx.getParsedCommandLine());
OperationRequestAddress prefix = ctx.getPrefix();
if(nodePath == null) {
ctx.printLine(ctx.getPrefixFormatter().format(prefix));
return;
... |
public void handle(CommandContext ctx) {
final StringBuilder buf = new StringBuilder();
buf.append("JBoss Admin Command-line Interface\n");
buf.append("JBOSS_HOME: ").append(SecurityActions.getEnvironmentVariable("JBOSS_HOME")).append('\n');
buf.append("JBoss AS release: ");
... | public void handle(CommandContext ctx) {
final StringBuilder buf = new StringBuilder();
buf.append("JBoss Admin Command-line Interface\n");
buf.append("JBOSS_HOME: ").append(SecurityActions.getEnvironmentVariable("JBOSS_HOME")).append('\n');
buf.append("JBoss AS release: ");
... |
protected void doHandle(CommandContext ctx) {
Batch batch = ctx.getBatchManager().getActiveBatch();
if(batch == null) {
ctx.printLine("No active batch.");
return;
}
batch.clear();
}
| protected void doHandle(CommandContext ctx) {
Batch batch = ctx.getBatchManager().getActiveBatch();
if(batch == null) {
ctx.error("No active batch.");
return;
}
batch.clear();
}
|
protected void doHandle(CommandContext ctx) {
boolean result = ctx.getBatchManager().discardActiveBatch();
if(!result) {
ctx.printLine("There is no active batch to discard.");
}
}
| protected void doHandle(CommandContext ctx) {
boolean result = ctx.getBatchManager().discardActiveBatch();
if(!result) {
ctx.error("There is no active batch to discard.");
}
}
|
protected void doHandle(CommandContext ctx) {
BatchManager batchManager = ctx.getBatchManager();
if(!batchManager.isBatchActive()) {
ctx.printLine("No active batch.");
return;
}
Batch activeBatch = batchManager.getActiveBatch();
List<BatchedCommand> co... | protected void doHandle(CommandContext ctx) {
BatchManager batchManager = ctx.getBatchManager();
if(!batchManager.isBatchActive()) {
ctx.error("No active batch.");
return;
}
Batch activeBatch = batchManager.getActiveBatch();
List<BatchedCommand> comman... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.