buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
protected void boot(BootContext context) throws ConfigurationPersistenceException {
try {
super.boot(context);
} finally {
bootThreadDone();
}
}
| protected void boot(BootContext context) throws ConfigurationPersistenceException {
try {
super.boot(context);
} finally {
countdownDoneLatch();
}
}
|
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
// get hold of the deployment unit
DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
final ModuleSpeci... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
// get hold of the deployment unit
DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
final ModuleSpeci... |
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!JdkORBDeploymentMarker.isJacORBDeployment(deploymentUnit)) {
return;
}
final EEModuleDe... | public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!JdkORBDeploymentMarker.isJdkORBDeployment(deploymentUnit)) {
return;
}
final EEModuleDe... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
final Modu... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
final Modu... |
public static boolean isJacORBDeployment(final DeploymentUnit deploymentUnit) {
final Boolean val = deploymentUnit.getAttachment(ATTACHMENT_KEY);
return val != null && val;
}
} | public static boolean isJdkORBDeployment(final DeploymentUnit deploymentUnit) {
final Boolean val = deploymentUnit.getAttachment(ATTACHMENT_KEY);
return val != null && val;
}
} |
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... |
public synchronized ComponentInstance createInstance() {
if (this.singletonComponentInstance != null) {
throw new IllegalStateException("A singleton component instance has already been created for bean: " + this.getComponentName());
}
return super.createInstance();
}
| public synchronized ComponentInstance createInstance() {
if (this.singletonComponentInstance != null) {
throw new IllegalStateException("A singleton component instance has already been created for bean: " + this.getComponentName());
}
return new SingletonComponentInstance(this);
... |
private void createService(ServiceTarget serviceTarget, ServiceContainer container) throws Exception {
InputStream is = null;
InputStream isIj = null;
List<ConfigProperty16> properties = new ArrayList<ConfigProperty16>();
try {
StringBuilder connectorClassname = new Strin... | private void createService(ServiceTarget serviceTarget, ServiceContainer container) throws Exception {
InputStream is = null;
InputStream isIj = null;
List<ConfigProperty16> properties = new ArrayList<ConfigProperty16>();
try {
StringBuilder connectorClassname = new Strin... |
public void start(StartContext context) throws StartException {
log.infof("Starting JCA Subsystem (%s)", Version.FULL_VERSION);
log.infof("config=%s", value);
}
| public void start(StartContext context) throws StartException {
log.infof("Starting JCA Subsystem (%s)", Version.FULL_VERSION);
log.tracef("config=%s", value);
}
|
private void doTest(MultivariateFunction func,
double[] optimum,
double[] init,
GoalType goal,
double fTol,
double fLineTol,
double pointTol) {
final MultivariateOp... | private void doTest(MultivariateFunction func,
double[] optimum,
double[] init,
GoalType goal,
double fTol,
double fLineTol,
double pointTol) {
final MultivariateOp... |
public void processMessage(ChannelAssociation channelAssociation, MessageInputStream messageInputStream) throws IOException {
if (messageInputStream == null) {
throw EjbMessages.MESSAGES.messageInputStreamCannotBeNull();
}
final DataInputStream dataInputStream = new DataInputStre... | public void processMessage(ChannelAssociation channelAssociation, MessageInputStream messageInputStream) throws IOException {
if (messageInputStream == null) {
throw EjbMessages.MESSAGES.messageInputStreamCannotBeNull();
}
final DataInputStream dataInputStream = new DataInputStre... |
private TimerImpl getPersistedTimer(TimerHandleImpl timerHandle) {
String id = timerHandle.getId();
String timedObjectId = timerHandle.getTimedObjectId();
if (timerPersistence == null) {
return null;
}
final TimerEntity timerEntity = timerPersistence.getValue().l... | private TimerImpl getPersistedTimer(TimerHandleImpl timerHandle) {
String id = timerHandle.getId();
String timedObjectId = timerHandle.getTimedObjectId();
if (timerPersistence == null) {
return null;
}
final TimerEntity timerEntity = timerPersistence.getValue().l... |
protected final String createTargetUrl(Map<String, Object> model, HttpServletRequest request)
throws UnsupportedEncodingException {
// Prepare target URL.
StringBuilder targetUrl = new StringBuilder();
if (this.contextRelative && getUrl().startsWith("/")) {
// Do not apply context path to relative URLs.... | protected final String createTargetUrl(Map<String, Object> model, HttpServletRequest request)
throws UnsupportedEncodingException {
// Prepare target URL.
StringBuilder targetUrl = new StringBuilder();
if (this.contextRelative && getUrl().startsWith("/")) {
// Do not apply context path to relative URLs.... |
public static void main(String[] args) throws Exception {
int exitCode = 0;
CommandContextImpl cmdCtx = null;
boolean gui = false;
try {
String argError = null;
String[] commands = null;
File file = null;
boolean connect = false;
... | public static void main(String[] args) throws Exception {
int exitCode = 0;
CommandContextImpl cmdCtx = null;
boolean gui = false;
try {
String argError = null;
String[] commands = null;
File file = null;
boolean connect = false;
... |
package org.jboss.as.test.manualmode.ejb.client.reconnect;
/*
* JBoss, Home of Professional Open Source.
* Copyright (c) 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... | package org.jboss.as.test.manualmode.ejb.client.reconnect;
/*
* JBoss, Home of Professional Open Source.
* Copyright (c) 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... |
private Archive readHeaders(byte[] password) throws IOException {
final byte[] signature = new byte[6];
file.readFully(signature);
if (!Arrays.equals(signature, sevenZSignature)) {
throw new IOException("Bad 7z signature");
}
// 7zFormat.txt has it wrong - it's fi... | private Archive readHeaders(byte[] password) throws IOException {
final byte[] signature = new byte[6];
file.readFully(signature);
if (!Arrays.equals(signature, sevenZSignature)) {
throw new IOException("Bad 7z signature");
}
// 7zFormat.txt has it wrong - it's fi... |
protected int decompressNextSymbol() throws IOException {
//
// table entry table entry
// _____________ _____
// table entry / \ / \
// ____________/ \ \
// / / \ ... | protected int decompressNextSymbol() throws IOException {
//
// table entry table entry
// _____________ _____
// table entry / \ / \
// ____________/ \ \
// / / \ ... |
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final Module module = deploymentUnit.getAttachment(Attachments.MODULE);
if (!JaxrsDeploymentMarker.isJaxrsDeployme... | public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final Module module = deploymentUnit.getAttachment(Attachments.MODULE);
if (!JaxrsDeploymentMarker.isJaxrsDeployme... |
public boolean canRead(ArchiveEntry ae) {
return true;
}
} | public boolean canReadEntryData(ArchiveEntry ae) {
return true;
}
} |
public boolean canWrite(ArchiveEntry ae) {
return true;
}
} | public boolean canWriteEntryData(ArchiveEntry ae) {
return true;
}
} |
private static final String[] USERS = { MONITOR_USER, OPERATOR_USER, MAINTAINER_USER, DEPLOYER_USER,
ADMINISTRATOR_USER, AUDITOR_USER, SUPERUSER_USER };
| public static final String SUPERUSER_USER = "HostMasterSuperUser";
static final String[] USERS = { MONITOR_USER, OPERATOR_USER, MAINTAINER_USER, DEPLOYER_USER,
ADMINISTRATOR_USER, AUDITOR_USER, SUPERUSER_USER };
|
private static final String[] USERS = { MONITOR_USER, OPERATOR_USER, MAINTAINER_USER, DEPLOYER_USER,
ADMINISTRATOR_USER, AUDITOR_USER, SUPERUSER_USER };
| public static final String SUPERUSER_USER = "MainGroupSuperUser";
static final String[] USERS = { MONITOR_USER, OPERATOR_USER, MAINTAINER_USER, DEPLOYER_USER,
ADMINISTRATOR_USER, AUDITOR_USER, SUPERUSER_USER };
|
public void activate(final ServiceActivatorContext context) {
final String deploymentName = key.getName().replace('.', '_');
log.info("Activating server group deployment: " + deploymentName);
final VirtualFile deploymentRoot = VFS.getChild(getFullyQualifiedDeploymentPath(key.getName()));
... | public void activate(final ServiceActivatorContext context) {
final String deploymentName = key.getName().replace('.', '_');
log.info("Activating deployment: " + key.getName());
final VirtualFile deploymentRoot = VFS.getChild(getFullyQualifiedDeploymentPath(key.getName()));
if (!dep... |
public static PackableObject identifyByHeader(File file, List packables)
throws PackableObjectException {
/* FileInputStream for the archive */
FileInputStream fis = null;
try {
/* Archive result */
PackableObject packable = null;
// identify archive by header
fis = new FileInputStream(fil... | public static PackableObject identifyByHeader(File file, List packables)
throws PackableObjectException {
/* FileInputStream for the archive */
FileInputStream fis = null;
try {
/* Archive result */
//PackableObject packable = null;
// identify archive by header
fis = new FileInputStream(fi... |
public void setUp()
{
m_field = new AsiExtraField();
m_field.setMode( 0755 );
m_field.setDirectory( true );
m_dummy = new UnrecognizedExtraField();
m_dummy.setHeaderId( new ZipShort( 1 ) );
m_dummy.setLocalFileDataData( new byte[ 0 ] );
m_dummy.setCentralD... | public void setUp()
{
m_field = new AsiExtraField();
m_field.setMode( 0755 );
m_field.setDirectory( true );
m_dummy = new UnrecognizedExtraField();
m_dummy.setHeaderID( new ZipShort( 1 ) );
m_dummy.setLocalFileDataData( new byte[ 0 ] );
m_dummy.setCentralD... |
protected double filterStep(final double h, final boolean forward, final boolean acceptSmall)
throws NumberIsTooSmallException {
double filteredH = h;
if (FastMath.abs(h) < minStep) {
if (acceptSmall) {
filteredH = forward ? minStep : -minStep;
} else {
... | protected double filterStep(final double h, final boolean forward, final boolean acceptSmall)
throws NumberIsTooSmallException {
double filteredH = h;
if (FastMath.abs(h) < minStep) {
if (acceptSmall) {
filteredH = forward ? minStep : -minStep;
} else {
... |
private void handleIdentityManager(final DeploymentInfo deploymentInfo) {
SecurityDomainContext sdc = securityDomainContextValue.getValue();
deploymentInfo.setIdentityManager(new JAASIdentityManagerImpl(sdc, mergedMetaData.getPrincipalVersusRolesMap()));
AuditManager auditManager = sdc.getA... | private void handleIdentityManager(final DeploymentInfo deploymentInfo) {
SecurityDomainContext sdc = securityDomainContextValue.getValue();
deploymentInfo.setIdentityManager(new JAASIdentityManagerImpl(sdc, mergedMetaData.getPrincipalVersusRolesMap()));
AuditManager auditManager = sdc.getA... |
public void transformResource(final ResourceTransformationContext context, final PathAddress address, final Resource resource) {
// Transform the model recursively
final ModelNode recursive = Resource.Tools.readModel(resource);
final ModelNode result = transformModel(context, recursive);
... | public void transformResource(final ResourceTransformationContext context, final PathAddress address, final Resource resource) {
// Transform the model recursively
final ModelNode recursive = Resource.Tools.readModel(resource);
final ModelNode result = transformModel(context, recursive);
... |
public static Resource modelToResource(final ImmutableManagementResourceRegistration reg, final ModelNode model, boolean includeUndefined) {
return TransformationUtils.modelToResource(reg, model, includeUndefined);
}
| public static Resource modelToResource(final ImmutableManagementResourceRegistration reg, final ModelNode model, boolean includeUndefined) {
return TransformationUtils.modelToResource(PathAddress.EMPTY_ADDRESS, reg, model, includeUndefined);
}
|
private double F;
/**
* Constructor
* @param dfbg degrees of freedom in numerator (between groups)
* @param dfwg degrees of freedom in denominator (within groups)
* @param F statistic
*/
AnovaStats(int dfbg, int dfwg, double F) {
this.dfb... | public AnovaStats(int dfbg, int dfwg, double F) {
this.dfbg = dfbg;
this.dfwg = dfwg;
this.F = F;
}
}
} |
private BeanDefinitionHolder decorateIfRequired(
Node node, BeanDefinitionHolder originalDef, BeanDefinition containingBd) {
String namespaceUri = node.getNamespaceURI();
if (!isDefaultNamespace(namespaceUri)) {
NamespaceHandler handler = this.readerContext.getNamespaceHandlerResolver().resolve(namespaceUri... | private BeanDefinitionHolder decorateIfRequired(
Node node, BeanDefinitionHolder originalDef, BeanDefinition containingBd) {
String namespaceUri = node.getNamespaceURI();
if (!isDefaultNamespace(namespaceUri)) {
NamespaceHandler handler = this.readerContext.getNamespaceHandlerResolver().resolve(namespaceUri... |
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
if (source == null) {
return this.conversionService.convertNullSource(sourceType, targetType);
}
Collection<?> sourceCollection = (Collection<?>) source;
TypeDescriptor sourceElementType = sourceType.getElementTyp... | public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
if (source == null) {
return this.conversionService.convertNullSource(sourceType, targetType);
}
Collection<?> sourceCollection = (Collection<?>) source;
TypeDescriptor sourceElementType = sourceType.getElementTyp... |
public void testIsAssignable() throws SecurityException, NoSuchMethodException,
NoSuchFieldException {
List list0 = null;
List<Object> list1 = null;
List<?> list2 = null;
List<? super Object> list3 = null;
List<String> list4 = null;
List<? extends String> ... | public void testIsAssignable() throws SecurityException, NoSuchMethodException,
NoSuchFieldException {
List list0 = null;
List<Object> list1 = null;
List<?> list2 = null;
List<? super Object> list3 = null;
List<String> list4 = null;
List<? extends String> ... |
public Object getObjectInstance(Object serviceValue, Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception {
final Component component = (Component)serviceValue;
return component.createProxy();
}
| public Object getObjectInstance(Object serviceValue, Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception {
final Component component = (Component)serviceValue;
return component.getInstance().createLocalClientProxy();
}
|
public static Reference createReference(final String contextIdentifier) {
return new Reference(Context.class.getName(), new StringRefAddr("nns", contextIdentifier), NamespaceObjectFactory.class.getName(), null);
}
| public static Reference createReference(final String contextIdentifier) {
return ModularReference.create(Context.class, new StringRefAddr("nns", contextIdentifier), NamespaceObjectFactory.class);
}
|
public T getValue() throws IllegalStateException {
final Context context = contextValue.getValue();
try {
return (T)context.lookup(contextName);
} catch (NamingException e) {
throw new IllegalStateException("Jndi entry '" + contextName + "' is not yet registered in co... | public T getValue() throws IllegalStateException {
final Context context = contextValue.getValue();
try {
return (T)context.lookup(contextName);
} catch (NamingException e) {
throw new IllegalStateException("Jndi entry '" + contextName + "' is not yet registered in co... |
private void assertArrayEquals(DurationFormatUtils.Token[] obj1, DurationFormatUtils.Token[] obj2) {
assertEquals("Arrays are unequal length. ", obj1.length, obj2.length);
for (int i = 0; i < obj1.length; i++) {
assertTrue("Index " + i + " not equal, " + obj1[i] + " vs " + obj2, obj1[i].... | private void assertArrayEquals(DurationFormatUtils.Token[] obj1, DurationFormatUtils.Token[] obj2) {
assertEquals("Arrays are unequal length. ", obj1.length, obj2.length);
for (int i = 0; i < obj1.length; i++) {
assertTrue("Index " + i + " not equal, " + obj1[i] + " vs " + obj2[i], obj1[... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final DeploymentUnit parent = Utils.getRootDeploymentUnit(deploymentUnit);
final ServiceTarget serviceTarget = phaseConte... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final DeploymentUnit parent = Utils.getRootDeploymentUnit(deploymentUnit);
final ServiceTarget serviceTarget = phaseConte... |
public void execute(PatchingTaskContext context) throws IOException {
// delete the file or directory recursively
boolean ok = IoUtils.recursiveDelete(target);
for(ContentModification mod : rollback) {
// Add the rollback (add actions)
context.recordRollbackAction(mod... | public void execute(PatchingTaskContext context) throws IOException {
// delete the file or directory recursively
boolean ok = IoUtils.recursiveDelete(target);
for(ContentModification mod : rollback) {
// Add the rollback (add actions)
context.recordRollbackAction(mod... |
public String awaitAppClientCall() {
try {
boolean b = latch.await(10, TimeUnit.SECONDS);
logger.info("Await returned: " + b + " : " + value);
if (!b) {
ThreadInfo[] threadInfos = ManagementFactory.getThreadMXBean().dumpAllThreads(true, true);
... | public String awaitAppClientCall() {
try {
boolean b = latch.await(30, TimeUnit.SECONDS);
logger.info("Await returned: " + b + " : " + value);
if (!b) {
ThreadInfo[] threadInfos = ManagementFactory.getThreadMXBean().dumpAllThreads(true, true);
... |
public BooleanTypedValue getValueInternal(ExpressionState state) throws EvaluationException {
boolean leftValue;
boolean rightValue;
try {
TypedValue typedValue = getLeftOperand().getValueInternal(state);
this.assertTypedValueNotNull(typedValue);
leftValue = (Boolean)state.convertValue(typedValue, BOOLE... | public BooleanTypedValue getValueInternal(ExpressionState state) throws EvaluationException {
boolean leftValue;
boolean rightValue;
try {
TypedValue typedValue = getLeftOperand().getValueInternal(state);
this.assertTypedValueNotNull(typedValue);
leftValue = (Boolean)state.convertValue(typedValue, BOOLE... |
public BooleanTypedValue getValueInternal(ExpressionState state) throws EvaluationException {
TypedValue left = getLeftOperand().getValueInternal(state);
TypedValue right = getRightOperand().getValueInternal(state);
Object leftValue = left.getValue();
Object rightValue = right.getValue();
if (leftValue == nu... | public BooleanTypedValue getValueInternal(ExpressionState state) throws EvaluationException {
TypedValue left = getLeftOperand().getValueInternal(state);
TypedValue right = getRightOperand().getValueInternal(state);
Object leftValue = left.getValue();
Object rightValue = right.getValue();
if (leftValue == nu... |
private void ensurePropertyAccessorsInitialized() {
if (this.propertyAccessors == null) {
this.propertyAccessors = new ArrayList<PropertyAccessor>();
this.propertyAccessors.add(new ReflectivePropertyResolver());
}
}
| private void ensurePropertyAccessorsInitialized() {
if (this.propertyAccessors == null) {
this.propertyAccessors = new ArrayList<PropertyAccessor>();
this.propertyAccessors.add(new ReflectivePropertyAccessor());
}
}
|
public void testCallingIllegalFunctions() throws Exception {
SpelExpressionParser parser = new SpelExpressionParser();
StandardEvaluationContext ctx = new StandardEvaluationContext();
ctx.setVariable("notStatic", this.getClass().getMethod("nonStatic"));
try {
@SuppressWarnings("unused")
Object v = parser... | public void testCallingIllegalFunctions() throws Exception {
SpelExpressionParser parser = new SpelExpressionParser();
StandardEvaluationContext ctx = new StandardEvaluationContext();
ctx.setVariable("notStatic", this.getClass().getMethod("nonStatic"));
try {
@SuppressWarnings("unused")
Object v = parser... |
public String buildAsString() {
ModelNode plan = build();
String planString = plan.toString();
planString = planString.replace(System.getProperty("line.separator"), " ");
return planString;
| public String buildAsString() {
ModelNode plan = build();
String planString = plan.toString();
planString = planString.replace("\n", " ");
return planString;
|
package org.jboss.as.test.integration.osgi.api;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software;... | package org.jboss.as.test.integration.osgi.api;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software;... |
package org.jboss.as.test.integration.osgi.api;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software;... | package org.jboss.as.test.integration.osgi.api;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software;... |
public SevenZMethodConfiguration(SevenZMethod method, Object options) {
this.method = method;
this.options = options;
if (options != null && !method.canAcceptOptions(options)) {
throw new IllegalArgumentException("The " + method + " method doesn't support options of type "
... | public SevenZMethodConfiguration(SevenZMethod method, Object options) {
this.method = method;
this.options = options;
if (options != null && !Coders.findByMethod(method).canAcceptOptions(options)) {
throw new IllegalArgumentException("The " + method + " method doesn't support opt... |
private static final String[][] HTML40_EXTENDED_ESCAPE = {
// <!-- Latin Extended-B -->
{"\u0192", "ƒ"}, // latin small f with hook = function= florin, U+0192 ISOtech -->
// <!-- Greek -->
{"\u0391", "Α"}, // greek capital letter alpha, U+0391 -->
{"\u0392", "&Beta... | private static final String[][] HTML40_EXTENDED_ESCAPE = {
// <!-- Latin Extended-B -->
{"\u0192", "ƒ"}, // latin small f with hook = function= florin, U+0192 ISOtech -->
// <!-- Greek -->
{"\u0391", "Α"}, // greek capital letter alpha, U+0391 -->
{"\u0392", "&Beta... |
public void bindToListSingleString() {
binder.addBinding("addresses");
binder.registerFormatter(new GenericCollectionPropertyType(List.class, Address.class), new AddressListFormatter());
Map<String, String> values = new LinkedHashMap<String, String>();
values.put("addresses", "4655 Macy Lane:Melbourne:FL:35452... | public void bindToListSingleString() {
binder.addBinding("addresses");
binder.registerFormatter(new GenericCollectionPropertyType(List.class, Address.class), new AddressListFormatter());
Map<String, String> values = new LinkedHashMap<String, String>();
values.put("addresses", "4655 Macy Lane:Melbourne:FL:35452... |
public String toString() {
return "MultiKey" + Arrays.asList(keys).toString();
}
| public String toString() {
return "MultiKey" + Arrays.toString(keys);
}
|
package org.springframework.websocket.server;
/*
* 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/licens... | package org.springframework.websocket.server;
/*
* 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/licens... |
public void getMimeTypeWithCustomConfiguredType() {
FileTypeMap defaultFileTypeMap = MimetypesFileTypeMap.getDefaultFileTypeMap();
assertThat(defaultFileTypeMap, instanceOf(MimetypesFileTypeMap.class));
MimetypesFileTypeMap mimetypesFileTypeMap = (MimetypesFileTypeMap) defaultFileTypeMap;
mimetypesFileTypeMap.... | public void getMimeTypeWithCustomConfiguredType() {
FileTypeMap defaultFileTypeMap = FileTypeMap.getDefaultFileTypeMap();
assertThat(defaultFileTypeMap, instanceOf(MimetypesFileTypeMap.class));
MimetypesFileTypeMap mimetypesFileTypeMap = (MimetypesFileTypeMap) defaultFileTypeMap;
mimetypesFileTypeMap.addMimeTy... |
protected String getSubsystemXml() throws IOException {
return "<subsystem xmlns=\"urn:jboss:domain:jaxr:1.0\">" +
"<connection-factory jndi-name=\"java:jboss/jaxr/ConnectionFactory\"/>" +
"<juddi-server publish-url=\"http://localhost:8080/juddi/publish\" query-url=\"http://localhost:8080/ju... | protected String getSubsystemXml() throws IOException {
return "<subsystem xmlns=\"urn:jboss:domain:jaxr:1.0\">" +
"<connection-factory jndi-name=\"java:jboss/jaxr/ConnectionFactory\"/>" +
"<properties/>" +
"</subsystem>";
}
|
package backtype.storm.codedistributor;
package backtype.storm.nimbus;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
/**
* Interface responsible to distribute code in the cluster.
*/
public interface ICodeDistributor {
/**
* Prepa... | package backtype.storm.codedistributor;
package backtype.storm.codedistributor;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
/**
* Interface responsible to distribute code in the cluster.
*/
public interface ICodeDistributor {
/**
... |
private void addContribution(final SubHyperplane<Euclidean3D> facet, final boolean reversed) {
final Region<Euclidean2D> polygon = ((SubPlane) facet).getRemainingRegion();
final double area = polygon.getSize();
if (Double.isInfinite(area)) {
setSize(Doubl... | private void addContribution(final SubHyperplane<Euclidean3D> facet, final boolean reversed) {
final Region<Euclidean2D> polygon = ((SubPlane) facet).getRemainingRegion();
final double area = polygon.getSize();
if (Double.isInfinite(area)) {
setSize(Doubl... |
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();
... |
public Object convertValue(TypedValue value, TypeDescriptor targetTypeDescriptor) throws EvaluationException {
return this.relatedContext.getTypeConverter().convertValue(value.getValue(), TypeDescriptor.forObject(value.getValue()), targetTypeDescriptor);
}
| public Object convertValue(TypedValue value, TypeDescriptor targetTypeDescriptor) throws EvaluationException {
return this.relatedContext.getTypeConverter().convertValue(value.getValue(), targetTypeDescriptor);
}
|
public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException {
if (target == null) {
throw new AccessException("Cannot write property on null target");
}
Class<?> type = (target instanceof Class ? (Class<?>) target : target.getClass());
Object possiblyCon... | public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException {
if (target == null) {
throw new AccessException("Cannot write property on null target");
}
Class<?> type = (target instanceof Class ? (Class<?>) target : target.getClass());
Object possiblyCon... |
public WebDeploymentController addWebDeployment(final WebDeploymentBuilder webDeploymentBuilder) throws Exception {
DeploymentInfo d = new DeploymentInfo();
d.setDeploymentName(webDeploymentBuilder.getContextRoot());
d.setContextPath(webDeploymentBuilder.getContextRoot());
d.setClas... | public WebDeploymentController addWebDeployment(final WebDeploymentBuilder webDeploymentBuilder) throws Exception {
DeploymentInfo d = new DeploymentInfo();
d.setDeploymentName(webDeploymentBuilder.getContextRoot());
d.setContextPath(webDeploymentBuilder.getContextRoot());
d.setClas... |
public ServletResourceManager(final VirtualFile resourcesRoot, final Collection<VirtualFile> overlays) throws IOException {
deploymentResourceManager = new FileResourceManager(resourcesRoot.getPhysicalFile());
this.overlays = overlays;
}
| public ServletResourceManager(final VirtualFile resourcesRoot, final Collection<VirtualFile> overlays) throws IOException {
deploymentResourceManager = new FileResourceManager(resourcesRoot.getPhysicalFile(), 1024 * 1024);
this.overlays = overlays;
}
|
public HttpHandler createHandler(final OperationContext context, ModelNode model) throws OperationFailedException {
String path = PATH.resolveModelAttribute(context, model).asString();
boolean directoryListing = DIRECTORY_LISTING.resolveModelAttribute(context, model).asBoolean();
UndertowLog... | public HttpHandler createHandler(final OperationContext context, ModelNode model) throws OperationFailedException {
String path = PATH.resolveModelAttribute(context, model).asString();
boolean directoryListing = DIRECTORY_LISTING.resolveModelAttribute(context, model).asBoolean();
UndertowLog... |
@Message(id = 11734, value = "'capacity' is either an expression, is not an integer value, or has a bigger value than Integer.MAX_VALUE: %s")
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in t... | @Message(id = 11734, value = "'capacity' is either an expression, is not an integer value, or has a bigger value than Integer.MAX_VALUE: %s")
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in t... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
final Mo... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
final Mo... |
public ManagedReference getReference() {
final ClassLoader tccl = SecurityActions.getContextClassLoader();
final Class<?> viewClass;
try {
viewClass = Class.forName(this.viewClass, false, tccl);
} catch (ClassNotFoundException e) {
throw new RuntimeException("... | public ManagedReference getReference() {
final ClassLoader tccl = SecurityActions.getContextClassLoader();
final Class<?> viewClass;
try {
viewClass = Class.forName(this.viewClass, false, tccl);
} catch (ClassNotFoundException e) {
throw new RuntimeException("... |
protected void parsePath(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list, final boolean requirePath, final Set<String> defined) throws XMLStreamException {
String name = null;
String path = null;
String relativeTo = null;
final int count = re... | protected void parsePath(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list, final boolean requirePath, final Set<String> defined) throws XMLStreamException {
String name = null;
String path = null;
String relativeTo = null;
final int count = re... |
public void writeContent(final XMLExtendedStreamWriter writer, final ModelMarshallingContext context) throws XMLStreamException {
ModelNode modelNode = context.getModelNode();
writer.writeStartDocument();
writer.writeStartElement(Element.DOMAIN.getLocalName());
writer.writeDefaultN... | public void writeContent(final XMLExtendedStreamWriter writer, final ModelMarshallingContext context) throws XMLStreamException {
ModelNode modelNode = context.getModelNode();
writer.writeStartDocument();
writer.writeStartElement(Element.DOMAIN.getLocalName());
writer.writeDefaultN... |
public ConvergenceException() {
super("Convergence failed", new Object[0]);
}
| public ConvergenceException() {
super("Convergence failed", null);
}
|
public CardanEulerSingularityException(boolean isCardan) {
super(isCardan ? "Cardan angles singularity" : "Euler angles singularity", new Object[0]);
}
| public CardanEulerSingularityException(boolean isCardan) {
super(isCardan ? "Cardan angles singularity" : "Euler angles singularity", null);
}
|
public RankDeficientMatrixException() {
super("matrix is rank-deficient", new Object[0]);
}
| public RankDeficientMatrixException() {
super("matrix is rank-deficient", null);
}
|
public SingularMatrixException() {
super("matrix is singular", new Object[0]);
}
| public SingularMatrixException() {
super("matrix is singular", null);
}
|
public NotPositiveDefiniteMatrixException() {
super("not positive definite matrix", new Object[0]);
}
| public NotPositiveDefiniteMatrixException() {
super("not positive definite matrix", null);
}
|
public void testConstructor(){
MathConfigurationException ex = new MathConfigurationException();
assertNull(ex.getCause());
assertNull(ex.getMessage());
assertNull(ex.getMessage(Locale.FRENCH));
}
| public void testConstructor(){
MathConfigurationException ex = new MathConfigurationException();
assertNull(ex.getCause());
assertNull(ex.getMessage());
assertEquals(0, ex.getMessage(Locale.FRENCH).length());
}
|
public void testConstructorMessage(){
String msg = "message";
InvalidMatrixException ex = new InvalidMatrixException(msg, new Object[0]);
assertEquals(msg, ex.getMessage());
}
| public void testConstructorMessage(){
String msg = "message";
InvalidMatrixException ex = new InvalidMatrixException(msg, null);
assertEquals(msg, ex.getMessage());
}
|
public void testConstructorMessage(){
String msg = "message";
MatrixIndexException ex = new MatrixIndexException(msg, new Object[0]);
assertEquals(msg, ex.getMessage());
}
| public void testConstructorMessage(){
String msg = "message";
MatrixIndexException ex = new MatrixIndexException(msg, null);
assertEquals(msg, ex.getMessage());
}
|
protected void splitLU(RealMatrix lu, double[][] lowerData, double[][] upperData) throws InvalidMatrixException {
if (!lu.isSquare() || lowerData.length != lowerData[0].length || upperData.length != upperData[0].length ||
lowerData.length != upperData.length
|| lowerData.l... | protected void splitLU(RealMatrix lu, double[][] lowerData, double[][] upperData) throws InvalidMatrixException {
if (!lu.isSquare() || lowerData.length != lowerData[0].length || upperData.length != upperData[0].length ||
lowerData.length != upperData.length
|| lowerData.l... |
protected static final SimpleAttributeDefinition SCAN_INTERVAL =
new SimpleAttributeDefinitionBuilder(CommonAttributes.SCAN_INTERVAL, ModelType.INT, true)
.setXmlName(Attribute.SCAN_INTERVAL.getLocalName())
.setAllowExpression(true)
.setDefault... | protected static final SimpleAttributeDefinition SCAN_INTERVAL =
new SimpleAttributeDefinitionBuilder(CommonAttributes.SCAN_INTERVAL, ModelType.INT, true)
.setXmlName(Attribute.SCAN_INTERVAL.getLocalName())
.setAllowExpression(true)
.setDefault... |
private static void handleProperty(final AttributeDefinition attribute, final OperationContext context, final ModelNode model,
final LoggerConfiguration configuration, final boolean resolveValue) throws OperationFailedException {
if (FILTER_SPEC.equals(attribute)) {
... | private static void handleProperty(final AttributeDefinition attribute, final OperationContext context, final ModelNode model,
final LoggerConfiguration configuration, final boolean resolveValue) throws OperationFailedException {
if (FILTER_SPEC.equals(attribute)) {
... |
public void initSession(javax.websocket.Session session) {
Assert.notNull(session, "session must not be null");
this.session = session;
}
| public void initSession(javax.websocket.Session session) {
Assert.notNull(session, "session is required");
this.session = session;
}
|
public PollingSockJsSession createSession(String sessionId, WebSocketHandler handler) {
Assert.state(getSockJsConfig() != null, "This transport requires SockJsConfiguration");
return new PollingSockJsSession(sessionId, getSockJsConfig(), handler);
}
| public PollingSockJsSession createSession(String sessionId, WebSocketHandler handler) {
Assert.notNull(getSockJsConfig(), "This transport requires SockJsConfiguration");
return new PollingSockJsSession(sessionId, getSockJsConfig(), handler);
}
|
public void onWebSocketConnect(Session session) {
try {
this.wsSession.afterSessionInitialized(session);
this.webSocketHandler.afterConnectionEstablished(this.wsSession);
}
catch (Throwable t) {
ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, t, logger);
}
}
| public void onWebSocketConnect(Session session) {
try {
this.wsSession.initializeNativeSession(session);
this.webSocketHandler.afterConnectionEstablished(this.wsSession);
}
catch (Throwable t) {
ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, t, logger);
}
}
|
public void afterConnectionEstablished(WebSocketSession wsSession) throws Exception {
Assert.isTrue(this.sessionCount.compareAndSet(0, 1), "Unexpected connection");
this.sockJsSession.afterSessionInitialized(wsSession);
}
| public void afterConnectionEstablished(WebSocketSession wsSession) throws Exception {
Assert.isTrue(this.sessionCount.compareAndSet(0, 1), "Unexpected connection");
this.sockJsSession.initializeDelegateSession(wsSession);
}
|
public void handleMessage(Channel channel, MessageInputStream messageInputStream) {
try {
// read the first byte to see what type of a message it is
final int header = messageInputStream.read();
if (EjbLogger.ROOT_LOGGER.isTraceEnabled()) {
EjbLogger.ROOT_... | public void handleMessage(Channel channel, MessageInputStream messageInputStream) {
try {
// read the first byte to see what type of a message it is
final int header = messageInputStream.read();
if (EjbLogger.ROOT_LOGGER.isTraceEnabled()) {
EjbLogger.ROOT_... |
public void inject(final Object target) {
final Object value = this.value.getValue().getInjectedValue();
if(primitiveTarget && value == null) {
return;
}
doInject(target, value);
}
| public void inject(final Object target) {
final Object value = this.value.getValue().getReference().getInstance();
if(primitiveTarget && value == null) {
return;
}
doInject(target, value);
}
|
public Object getConsole() {
return null;
}
| public Object getConsole() {
return this;
}
|
public Interceptor getEntityInterceptor() throws IllegalStateException, BeansException {
if (this.entityInterceptor instanceof Interceptor) {
return (Interceptor) entityInterceptor;
}
else if (this.entityInterceptor instanceof String) {
if (this.beanFactory == null) {
throw new IllegalStateException("C... | public Interceptor getEntityInterceptor() throws IllegalStateException, BeansException {
if (this.entityInterceptor instanceof Interceptor) {
return (Interceptor) entityInterceptor;
}
else if (this.entityInterceptor instanceof String) {
if (this.beanFactory == null) {
throw new IllegalStateException("C... |
Tuple deserialize(byte[] ser);
package backtype.storm.serialization;
import backtype.storm.tuple.Tuple;
import java.io.IOException;
public interface ITupleDeserializer {
Tuple deserialize(byte[] ser) throws IOException;
} | Tuple deserialize(byte[] ser);
package backtype.storm.serialization;
import backtype.storm.tuple.Tuple;
import java.io.IOException;
public interface ITupleDeserializer {
Tuple deserialize(byte[] ser);
} |
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit unit = phaseContext.getDeploymentUnit();
final ResourceRoot deploymentRoot = unit.getAttachment(Attachments.DEPLOYMENT_ROOT);
final URL webservicesDescriptorURL = get... | public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit unit = phaseContext.getDeploymentUnit();
final ResourceRoot deploymentRoot = unit.getAttachment(Attachments.DEPLOYMENT_ROOT);
final URL webservicesDescriptorURL = get... |
public ArrayUtils() {
; // empty constructor
}
| public ArrayUtils() {
super();
}
|
public BooleanUtils() {
; // empty constructor
}
| public BooleanUtils() {
super();
}
|
public CharSetUtils() {
; // empty constructor
}
| public CharSetUtils() {
super();
}
|
public CharUtils() {
; // empty constructor
}
| public CharUtils() {
super();
}
|
public ClassUtils() {
; // empty constructor
}
| public ClassUtils() {
super();
}
|
public BinaryEntityMap() {
; // empty constructor
}
| public BinaryEntityMap() {
super();
}
|
public NumberUtils() {
; // empty constructor
}
| public NumberUtils() {
super();
}
|
public ObjectUtils() {
; // empty constructor
}
| public ObjectUtils() {
super();
}
|
public RandomStringUtils() {
; // empty constructor
}
| public RandomStringUtils() {
super();
}
|
public StringEscapeUtils() {
; // empty constructor
}
| public StringEscapeUtils() {
super();
}
|
public Validate() {
; // empty constructor
}
| public Validate() {
super();
}
|
public WordUtils() {
; // empty constructor
}
| public WordUtils() {
super();
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.