id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
8,901
super("AccessDenied", "Access Denied", "Entity", entity, HttpResponseStatus.FORBIDDEN); } public AccessDeniedException(String entityType, String entity) { super("AccessDenied", "Access Denied", entityType, entity, HttpResponseStatus.FORBIDDEN); <BUG>} public AccessDeniedException(Throwable ex)</BUG> { super("Access Denied", ex); }
public AccessDeniedException(String entityType, String entity, BucketLogData logData) super("AccessDenied", "Access Denied", entityType, entity, HttpResponseStatus.FORBIDDEN, logData); public AccessDeniedException(Throwable ex)
8,902
public class WalrusException extends EucalyptusCloudException { String message; String code; HttpResponseStatus errStatus; String resourceType; <BUG>String resource; public WalrusException()</BUG> { super(); }
BucketLogData logData; public WalrusException()
8,903
super( "Bucket Not Empty" ); } public BucketNotEmptyException(String bucket) { super("BucketNotEmpty", "The bucket you tried to delete is not empty.", "Bucket", bucket, HttpResponseStatus.CONFLICT); <BUG>} public BucketNotEmptyException(Throwable ex)</BUG> { super("Bucket Not Empty", ex); }
public BucketNotEmptyException(String bucket, BucketLogData logData) super("BucketNotEmpty", "The bucket you tried to delete is not empty.", "Bucket", bucket, HttpResponseStatus.CONFLICT, logData); public BucketNotEmptyException(Throwable ex)
8,904
super( "No Such Entity" ); } public NoSuchEntityException(String entityName) { super("NoSuchEntity", "The specified entity was not found", "Entity", entityName, HttpResponseStatus.NOT_FOUND); <BUG>} public NoSuchEntityException(Throwable ex)</BUG> { super("No Such Entity", ex); }
public NoSuchEntityException(String entityName, BucketLogData logData) super("NoSuchEntity", "The specified entity was not found", "Entity", entityName, HttpResponseStatus.NOT_FOUND, logData); public NoSuchEntityException(Throwable ex)
8,905
super("EntityTooLarge", "Your proposed upload exceeds the maximum allowed object size.", "Entity", entity, HttpResponseStatus.BAD_REQUEST); } public EntityTooLargeException(String entityType, String entity) { super("EntityTooLarge", "Your proposed upload exceeds the maximum allowed object size.", entityType, entity, HttpResponseStatus.BAD_REQUEST); <BUG>} public EntityTooLargeException(Throwable ex)</BUG> { super("EntityTooLarge", ex); }
public EntityTooLargeException(String entityType, String entity, BucketLogData logData) super("EntityTooLarge", "Your proposed upload exceeds the maximum allowed object size.", entityType, entity, HttpResponseStatus.BAD_REQUEST, logData); public EntityTooLargeException(Throwable ex)
8,906
return this.factory.register(super.build(target)); } @Override public JGroupsTransportBuilder configure(OperationContext context, ModelNode model) throws OperationFailedException { this.lockTimeout = LOCK_TIMEOUT.resolveModelAttribute(context, model).asLong(); <BUG>this.channel = ModelNodes.asString(CHANNEL.resolveModelAttribute(context, model)); </BUG> this.factory = new InjectedValueDependency<>(JGroupsRequirement.CHANNEL_FACTORY.getServiceName(context, this.channel), ChannelFactory.class); return this; }
this.channel = ModelNodes.optionalString(CHANNEL.resolveModelAttribute(context, model)).orElse(null);
8,907
import org.jboss.dmr.ModelNode; import org.jboss.msc.service.ServiceBuilder; import org.jboss.msc.service.ServiceTarget; import org.jboss.msc.value.InjectedValue; public class FileStoreBuilder extends StoreBuilder { <BUG>private final InjectedValue<PathManager> pathManager = new InjectedValue<>(); private volatile SingleFileStoreConfigurationBuilder builder;</BUG> private volatile String relativePath; private volatile String relativeTo; FileStoreBuilder(PathAddress cacheAddress) {
private final String containerName; private volatile SingleFileStoreConfigurationBuilder builder;
8,908
public PersistenceConfiguration getValue() { this.builder.location(this.pathManager.getValue().resolveRelativePathEntry(this.relativePath, this.relativeTo)); return super.getValue(); } @Override <BUG>StoreConfigurationBuilder<?, ?> createStore(OperationContext context, ModelNode model) throws OperationFailedException { String relativePath = ModelNodes.asString(RELATIVE_PATH.resolveModelAttribute(context, model)); if (relativePath != null) { this.relativePath = relativePath; }</BUG> this.relativeTo = RELATIVE_TO.resolveModelAttribute(context, model).asString();
this.relativePath = ModelNodes.optionalString(RELATIVE_PATH.resolveModelAttribute(context, model)).orElse(InfinispanExtension.SUBSYSTEM_NAME + File.separatorChar + this.containerName);
8,909
package org.jboss.as.clustering.infinispan.subsystem; import static org.jboss.as.clustering.infinispan.subsystem.BackupForResourceDefinition.Attribute.CACHE; <BUG>import static org.jboss.as.clustering.infinispan.subsystem.BackupForResourceDefinition.Attribute.SITE; import org.infinispan.configuration.cache.BackupForConfiguration;</BUG> import org.infinispan.configuration.cache.ConfigurationBuilder; import org.jboss.as.clustering.controller.ResourceServiceBuilder; import org.jboss.as.clustering.dmr.ModelNodes;
import java.util.Optional; import org.infinispan.configuration.cache.BackupForConfiguration;
8,910
BackupForBuilder(PathAddress cacheAddress) { super(CacheComponent.BACKUP_FOR, cacheAddress); } @Override public Builder<BackupForConfiguration> configure(OperationContext context, ModelNode model) throws OperationFailedException { <BUG>String site = ModelNodes.asString(SITE.resolveModelAttribute(context, model)); if (site != null) { this.builder.remoteSite(site).remoteCache(CACHE.resolveModelAttribute(context, model).asString()); </BUG> }
Optional<String> site = ModelNodes.optionalString(SITE.resolveModelAttribute(context, model)); if (site.isPresent()) { this.builder.remoteSite(site.get()).remoteCache(CACHE.resolveModelAttribute(context, model).asString());
8,911
super(address); this.mode = mode; } @Override public Builder<Configuration> configure(OperationContext context, ModelNode model) throws OperationFailedException { <BUG>Mode mode = ModelNodes.asEnum(ClusteredCacheResourceDefinition.Attribute.MODE.resolveModelAttribute(context, model), Mode.class); ClusteringConfigurationBuilder builder = new ConfigurationBuilder().clustering().cacheMode(mode.apply(this.mode));</BUG> if (mode.isSynchronous()) { builder.sync().replTimeout(REMOTE_TIMEOUT.resolveModelAttribute(context, model).asLong()); } else {
Mode mode = ModelNodes.asEnum(MODE.resolveModelAttribute(context, model), Mode.class); ClusteringConfigurationBuilder builder = new ConfigurationBuilder().clustering().cacheMode(mode.apply(this.mode));
8,912
public class JGroupsTransportServiceHandler implements ResourceServiceHandler { @Override public void installServices(OperationContext context, ModelNode model) throws OperationFailedException { PathAddress containerAddress = context.getCurrentAddress().getParent(); String name = containerAddress.getLastElement().getValue(); <BUG>String channel = ModelNodes.asString(CHANNEL.resolveModelAttribute(context, model)); </BUG> ServiceTarget target = context.getServiceTarget(); new JGroupsTransportBuilder(containerAddress).configure(context, model).build(target).setInitialMode(ServiceController.Mode.PASSIVE).install(); new SiteBuilder(containerAddress).configure(context, model).build(target).setInitialMode(ServiceController.Mode.PASSIVE).install();
String channel = ModelNodes.optionalString(CHANNEL.resolveModelAttribute(context, model)).orElse(null);
8,913
} @Override public void removeServices(OperationContext context, ModelNode model) throws OperationFailedException { PathAddress containerAddress = context.getCurrentAddress().getParent(); String name = containerAddress.getLastElement().getValue(); <BUG>String channel = ModelNodes.asString(CHANNEL.resolveModelAttribute(context, model)); </BUG> for (GroupAliasBuilderProvider provider : ServiceLoader.load(GroupAliasBuilderProvider.class, GroupAliasBuilderProvider.class.getClassLoader())) { for (Builder<?> builder : provider.getBuilders(context.getCapabilityServiceSupport(), name, channel)) { context.removeService(builder.getServiceName());
String channel = ModelNodes.optionalString(CHANNEL.resolveModelAttribute(context, model)).orElse(null);
8,914
import static org.jboss.as.clustering.infinispan.subsystem.StoreResourceDefinition.Attribute.PASSIVATION; import static org.jboss.as.clustering.infinispan.subsystem.StoreResourceDefinition.Attribute.PRELOAD; import static org.jboss.as.clustering.infinispan.subsystem.StoreResourceDefinition.Attribute.PROPERTIES; import static org.jboss.as.clustering.infinispan.subsystem.StoreResourceDefinition.Attribute.PURGE; import static org.jboss.as.clustering.infinispan.subsystem.StoreResourceDefinition.Attribute.SHARED; <BUG>import static org.jboss.as.clustering.infinispan.subsystem.StoreResourceDefinition.Attribute.SINGLETON; import org.infinispan.configuration.cache.AsyncStoreConfiguration;</BUG> import org.infinispan.configuration.cache.PersistenceConfiguration; import org.infinispan.configuration.cache.StoreConfigurationBuilder; import org.jboss.as.clustering.controller.ResourceServiceBuilder;
import java.util.Properties; import org.infinispan.configuration.cache.AsyncStoreConfiguration;
8,915
; } @Override public Builder<PersistenceConfiguration> configure(OperationContext context, ModelNode model) throws OperationFailedException { this.storeBuilder = this.createStore(context, model); <BUG>this.storeBuilder.persistence().passivation(PASSIVATION.resolveModelAttribute(context, model).asBoolean()); this.storeBuilder.fetchPersistentState(FETCH_STATE.resolveModelAttribute(context, model).asBoolean())</BUG> .preload(PRELOAD.resolveModelAttribute(context, model).asBoolean()) .purgeOnStartup(PURGE.resolveModelAttribute(context, model).asBoolean()) .shared(SHARED.resolveModelAttribute(context, model).asBoolean())
Properties properties = new Properties(); ModelNodes.optionalPropertyList(PROPERTIES.resolveModelAttribute(context, model)).ifPresent(list -> list.forEach(property -> properties.setProperty(property.getName(), property.getValue().asString()))); this.storeBuilder.fetchPersistentState(FETCH_STATE.resolveModelAttribute(context, model).asBoolean())
8,916
import java.util.stream.Collectors;</BUG> import org.jboss.dmr.ModelNode; import org.jboss.dmr.Property; import org.jboss.modules.ModuleIdentifier; public class ModelNodes { <BUG>@Deprecated public static String asString(ModelNode value) { return optionalString(value).orElse(null); } @Deprecated public static String asString(ModelNode value, String defaultValue) { return optionalString(value).orElse(defaultValue); }</BUG> public static float asFloat(ModelNode value) {
package org.jboss.as.clustering.dmr; import java.util.List; import java.util.Optional; import java.util.OptionalDouble; import java.util.OptionalInt; import java.util.OptionalLong;
8,917
ServiceBuilder<SiteConfiguration> builder = super.build(target); return (this.factory != null) ? this.factory.register(builder) : builder; } @Override public Builder<SiteConfiguration> configure(OperationContext context, ModelNode model) throws OperationFailedException { <BUG>String channel = ModelNodes.asString(CHANNEL.resolveModelAttribute(context, model)); </BUG> this.factory = new InjectedValueDependency<>(JGroupsRequirement.CHANNEL_SOURCE.getServiceName(context, channel), ChannelFactory.class); return this; }
String channel = ModelNodes.optionalString(CHANNEL.resolveModelAttribute(context, model)).orElse(null);
8,918
new ModuleBuilder(CacheContainerComponent.MODULE.getServiceName(address), MODULE).configure(context, model).build(target).install(); new GlobalConfigurationBuilder(address).configure(context, model).build(target).install(); CacheContainerBuilder containerBuilder = new CacheContainerBuilder(address).configure(context, model); containerBuilder.build(target).install(); new KeyAffinityServiceFactoryBuilder(address).build(target).install(); <BUG>String jndiName = ModelNodes.asString(CacheContainerResourceDefinition.Attribute.JNDI_NAME.resolveModelAttribute(context, model)); BinderServiceBuilder<?> bindingBuilder = new BinderServiceBuilder<>(InfinispanBindingFactory.createCacheContainerBinding(name), containerBuilder.getServiceName(), CacheContainer.class); if (jndiName != null) { bindingBuilder.alias(ContextNames.bindInfoFor(JndiNameFactory.parse(jndiName).getAbsoluteName())); }</BUG> bindingBuilder.build(target).install();
ModelNodes.optionalString(JNDI_NAME.resolveModelAttribute(context, model)).map(jndiName -> ContextNames.bindInfoFor(JndiNameFactory.parse(jndiName).getAbsoluteName())).ifPresent(aliasBinding -> bindingBuilder.alias(aliasBinding));
8,919
public static final String DELETE_ACTION_HISTORY_RESULT; public static final String DELETE_ACTION_PLUGIN; public static final String DELETE_ALERT; public static final String DELETE_ALERT_CTIME; public static final String DELETE_ALERT_LIFECYCLE; <BUG>public static final String DELETE_ALERT_SEVERITY; public static final String DELETE_ALERT_STATUS;</BUG> public static final String DELETE_ALERT_TRIGGER; public static final String DELETE_CONDITIONS; public static final String DELETE_CONDITIONS_MODE;
[DELETED]
8,920
public static final String INSERT_ACTION_PLUGIN; public static final String INSERT_ACTION_PLUGIN_DEFAULT_PROPERTIES; public static final String INSERT_ALERT; public static final String INSERT_ALERT_CTIME; public static final String INSERT_ALERT_LIFECYCLE; <BUG>public static final String INSERT_ALERT_SEVERITY; public static final String INSERT_ALERT_STATUS;</BUG> public static final String INSERT_ALERT_TRIGGER; public static final String INSERT_CONDITION_AVAILABILITY; public static final String INSERT_CONDITION_COMPARE;
[DELETED]
8,921
public static final String SELECT_ALERT_CTIME_START; public static final String SELECT_ALERT_CTIME_START_END; public static final String SELECT_ALERT_LIFECYCLE_END; public static final String SELECT_ALERT_LIFECYCLE_START; public static final String SELECT_ALERT_LIFECYCLE_START_END; <BUG>public static final String SELECT_ALERT_STATUS; public static final String SELECT_ALERT_SEVERITY;</BUG> public static final String SELECT_ALERT_TRIGGER; public static final String SELECT_ALERTS_BY_TENANT; public static final String SELECT_CONDITION_ID;
[DELETED]
8,922
DELETE_ALERT = "DELETE FROM " + keyspace + ".alerts " + "WHERE tenantId = ? AND alertId = ? "; DELETE_ALERT_CTIME = "DELETE FROM " + keyspace + ".alerts_ctimes " + "WHERE tenantId = ? AND ctime = ? AND alertId = ? "; DELETE_ALERT_LIFECYCLE = "DELETE FROM " + keyspace + ".alerts_lifecycle " + "WHERE tenantId = ? AND status = ? AND stime = ? AND alertId = ? "; <BUG>DELETE_ALERT_SEVERITY = "DELETE FROM " + keyspace + ".alerts_severities " + "WHERE tenantId = ? AND severity = ? AND alertId = ? "; DELETE_ALERT_STATUS = "DELETE FROM " + keyspace + ".alerts_statuses " + "WHERE tenantId = ? AND status = ? AND alertId = ? ";</BUG> DELETE_ALERT_TRIGGER = "DELETE FROM " + keyspace + ".alerts_triggers "
[DELETED]
8,923
INSERT_ALERT = "INSERT INTO " + keyspace + ".alerts " + "(tenantId, alertId, payload) VALUES (?, ?, ?) "; INSERT_ALERT_CTIME = "INSERT INTO " + keyspace + ".alerts_ctimes " + "(tenantId, alertId, ctime) VALUES (?, ?, ?) "; INSERT_ALERT_LIFECYCLE = "INSERT INTO " + keyspace + ".alerts_lifecycle " + "(tenantId, alertId, status, stime) VALUES (?, ?, ?, ?) "; <BUG>INSERT_ALERT_SEVERITY = "INSERT INTO " + keyspace + ".alerts_severities " + "(tenantId, alertId, severity) VALUES (?, ?, ?) "; INSERT_ALERT_STATUS = "INSERT INTO " + keyspace + ".alerts_statuses " + "(tenantId, alertId, status) VALUES (?, ?, ?) ";</BUG> INSERT_ALERT_TRIGGER = "INSERT INTO " + keyspace + ".alerts_triggers "
[DELETED]
8,924
+ "WHERE tenantId = ? AND status = ? AND stime <= ? "; SELECT_ALERT_LIFECYCLE_START = "SELECT alertId FROM " + keyspace + ".alerts_lifecycle " + "WHERE tenantId = ? AND status = ? AND stime >= ? "; SELECT_ALERT_LIFECYCLE_START_END = "SELECT alertId FROM " + keyspace + ".alerts_lifecycle " + "WHERE tenantId = ? AND status = ? AND stime >= ? AND stime <= ? "; <BUG>SELECT_ALERT_SEVERITY = "SELECT alertId FROM " + keyspace + ".alerts_severities " + "WHERE tenantId = ? AND severity = ? "; SELECT_ALERT_STATUS = "SELECT alertId FROM " + keyspace + ".alerts_statuses " + "WHERE tenantId = ? AND status = ? ";</BUG> SELECT_ALERTS_BY_TENANT = "SELECT payload FROM " + keyspace + ".alerts " + "WHERE tenantId = ? ";
[DELETED]
8,925
import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; <BUG>import java.util.stream.Collectors; import javax.ejb.EJB;</BUG> import javax.ejb.Local; import javax.ejb.Stateless; import javax.ejb.TransactionAttribute;
import javax.annotation.PostConstruct; import javax.ejb.EJB;
8,926
import org.hawkular.alerts.api.model.trigger.Trigger; import org.hawkular.alerts.api.services.ActionsService; import org.hawkular.alerts.api.services.AlertsCriteria; import org.hawkular.alerts.api.services.AlertsService; import org.hawkular.alerts.api.services.DefinitionsService; <BUG>import org.hawkular.alerts.api.services.EventsCriteria; import org.hawkular.alerts.engine.impl.IncomingDataManagerImpl.IncomingData;</BUG> import org.hawkular.alerts.engine.impl.IncomingDataManagerImpl.IncomingEvents; import org.hawkular.alerts.engine.log.MsgLogger; import org.hawkular.alerts.engine.service.AlertsEngine;
import org.hawkular.alerts.api.services.PropertiesService; import org.hawkular.alerts.engine.impl.IncomingDataManagerImpl.IncomingData;
8,927
import com.datastax.driver.core.Session; import com.google.common.util.concurrent.Futures; @Local(AlertsService.class) @Stateless @TransactionAttribute(value = TransactionAttributeType.NOT_SUPPORTED) <BUG>public class CassAlertsServiceImpl implements AlertsService { private final MsgLogger msgLog = MsgLogger.LOGGER; private final Logger log = Logger.getLogger(CassAlertsServiceImpl.class); @EJB</BUG> AlertsEngine alertsEngine;
private static final String CRITERIA_NO_QUERY_SIZE = "hawkular-alerts.criteria-no-query-size"; private static final String CRITERIA_NO_QUERY_SIZE_ENV = "CRITERIA_NO_QUERY_SIZE"; private static final String CRITERIA_NO_QUERY_SIZE_DEFAULT = "200"; private int criteriaNoQuerySize;
8,928
log.debug("Adding " + alerts.size() + " alerts"); } PreparedStatement insertAlert = CassStatement.get(session, CassStatement.INSERT_ALERT); PreparedStatement insertAlertTrigger = CassStatement.get(session, CassStatement.INSERT_ALERT_TRIGGER); PreparedStatement insertAlertCtime = CassStatement.get(session, CassStatement.INSERT_ALERT_CTIME); <BUG>PreparedStatement insertAlertStatus = CassStatement.get(session, CassStatement.INSERT_ALERT_STATUS); PreparedStatement insertAlertSeverity = CassStatement.get(session, CassStatement.INSERT_ALERT_SEVERITY);</BUG> PreparedStatement insertTag = CassStatement.get(session, CassStatement.INSERT_TAG); try { List<ResultSetFuture> futures = new ArrayList<>();
[DELETED]
8,929
futures.add(session.executeAsync(insertAlertTrigger.bind(a.getTenantId(), a.getAlertId(), a.getTriggerId()))); futures.add(session.executeAsync(insertAlertCtime.bind(a.getTenantId(), a.getAlertId(), a.getCtime()))); <BUG>futures.add(session.executeAsync(insertAlertStatus.bind(a.getTenantId(), a.getAlertId(), a.getStatus().name()))); futures.add(session.executeAsync(insertAlertSeverity.bind(a.getTenantId(), a.getAlertId(), a.getSeverity().name())));</BUG> a.getTags().entrySet().stream().forEach(tag -> {
[DELETED]
8,930
for (Row row : rsAlerts) { String payload = row.getString("payload"); Alert alert = JsonUtil.fromJson(payload, Alert.class, thin); alerts.add(alert); } <BUG>} } catch (Exception e) { msgLog.errorDatabaseException(e.getMessage()); throw e; } return preparePage(alerts, pager);</BUG> }
[DELETED]
8,931
for (Alert a : alertsToDelete) { String id = a.getAlertId(); List<ResultSetFuture> futures = new ArrayList<>(); futures.add(session.executeAsync(deleteAlert.bind(tenantId, id))); futures.add(session.executeAsync(deleteAlertCtime.bind(tenantId, a.getCtime(), id))); <BUG>futures.add(session.executeAsync(deleteAlertSeverity.bind(tenantId, a.getSeverity().name(), id))); futures.add(session.executeAsync(deleteAlertStatus.bind(tenantId, a.getStatus().name(), id)));</BUG> futures.add(session.executeAsync(deleteAlertTrigger.bind(tenantId, a.getTriggerId(), id))); a.getLifecycle().stream().forEach(l -> { futures.add(
[DELETED]
8,932
private Alert updateAlertStatus(Alert alert) throws Exception { if (alert == null || alert.getAlertId() == null || alert.getAlertId().isEmpty()) { throw new IllegalArgumentException("AlertId must be not null"); } try { <BUG>PreparedStatement deleteAlertStatus = CassStatement.get(session, CassStatement.DELETE_ALERT_STATUS); PreparedStatement insertAlertStatus = CassStatement.get(session, CassStatement.INSERT_ALERT_STATUS);</BUG> PreparedStatement insertAlertLifecycle = CassStatement.get(session,
[DELETED]
8,933
PreparedStatement insertAlertLifecycle = CassStatement.get(session, CassStatement.INSERT_ALERT_LIFECYCLE); PreparedStatement updateAlert = CassStatement.get(session, CassStatement.UPDATE_ALERT); List<ResultSetFuture> futures = new ArrayList<>(); <BUG>for (Status statusToDelete : EnumSet.complementOf(EnumSet.of(alert.getStatus()))) { futures.add(session.executeAsync(deleteAlertStatus.bind(alert.getTenantId(), statusToDelete.name(), alert.getAlertId()))); } futures.add(session.executeAsync(insertAlertStatus.bind(alert.getTenantId(), alert.getAlertId(), alert .getStatus().name())));</BUG> Alert.LifeCycle lifecycle = alert.getCurrentLifecycle();
[DELETED]
8,934
String category = null; Collection<String> categories = null; String triggerId = null; Collection<String> triggerIds = null; Map<String, String> tags = null; <BUG>boolean thin = false; public EventsCriteria() {</BUG> super(); } public Long getStartTime() {
Integer criteriaNoQuerySize = null; public EventsCriteria() {
8,935
} @Override public String toString() { return "EventsCriteria [startTime=" + startTime + ", endTime=" + endTime + ", eventId=" + eventId + ", eventIds=" + eventIds + ", category=" + category + ", categories=" + categories + ", triggerId=" <BUG>+ triggerId + ", triggerIds=" + triggerIds + ", tags=" + tags + ", thin=" + thin + "]"; }</BUG> }
public void addTag(String name, String value) { if (null == tags) { tags = new HashMap<>();
8,936
import org.bedework.calsvci.RestoreIntf.FixAliasResult; import org.bedework.dumprestore.dump.Dump; import org.bedework.dumprestore.restore.Restore; import org.bedework.indexer.BwIndexCtlMBean; import org.bedework.util.jmx.ConfBase; <BUG>import org.bedework.util.jmx.MBeanUtil; import org.bedework.util.timezones.DateTimeUtil;</BUG> import org.bedework.util.xml.FromXml; import org.bedework.util.xml.XmlUtil; import org.w3c.dom.Document;
import org.bedework.util.misc.Util; import org.bedework.util.timezones.DateTimeUtil;
8,937
implements BwDumpRestoreMBean { private static final String confuriPname = "org.bedework.bwengine.confuri"; private List<AliasInfo> externalSubs; private Map<String, AliasEntry> aliasInfo = new HashMap<>(); private boolean allowRestore; <BUG>private boolean fixAliases; private String curSvciOwner;</BUG> private CalSvcI svci; private class RestoreThread extends Thread { InfoLines infoLines = new InfoLines();
private boolean newDumpFormat; private String curSvciOwner;
8,938
public void endTransaction() throws CalFacadeException { colCache.flush(); } @Override public void principalChanged() throws CalFacadeException { <BUG>colCache.flushAccess(this); }</BUG> @Override public CollectionSynchInfo getSynchInfo(final String path, final String token) throws CalFacadeException {
colCache.clear();
8,939
void setAllowRestore(boolean val); @MBeanInfo("Set true to enable restores") boolean getAllowRestore(); void setFixAliases(boolean val); @MBeanInfo("Set true to fix aliases - false to list only") <BUG>boolean getFixAliases(); @MBeanInfo("Restores the data from the DataIn path")</BUG> String restoreData(); @MBeanInfo("Show state of current restore") List<String> restoreStatus();
void setNewDumpFormat(boolean val); @MBeanInfo("Set true to dump in new format - not for production use yet") boolean getNewDumpFormat(); @MBeanInfo("Restores the data from the DataIn path")
8,940
package org.jetbrains.plugins.gradle.importing.wizard.adjust; <BUG>import com.intellij.ide.util.projectWizard.WizardContext; import com.intellij.openapi.util.Pair;</BUG> import com.intellij.ui.components.JBScrollPane; import com.intellij.ui.treeStructure.Tree; import com.intellij.util.containers.HashMap;
import com.intellij.openapi.options.ConfigurationException; import com.intellij.openapi.util.Pair;
8,941
import com.intellij.openapi.util.Pair;</BUG> import com.intellij.ui.components.JBScrollPane; import com.intellij.ui.treeStructure.Tree; import com.intellij.util.containers.HashMap; import org.jetbrains.annotations.NotNull; <BUG>import org.jetbrains.plugins.gradle.importing.model.GradleDependency; import org.jetbrains.plugins.gradle.importing.model.GradleEntity; import org.jetbrains.plugins.gradle.importing.model.GradleModule; import org.jetbrains.plugins.gradle.importing.model.GradleProject;</BUG> import org.jetbrains.plugins.gradle.importing.wizard.AbstractImportFromGradleWizardStep;
package org.jetbrains.plugins.gradle.importing.wizard.adjust; import com.intellij.ide.util.projectWizard.WizardContext; import com.intellij.openapi.options.ConfigurationException; import com.intellij.openapi.util.Pair; import org.jetbrains.plugins.gradle.importing.model.*;
8,942
)); } Map<GradleEntity, Pair<String, Collection<GradleProjectStructureNode>>> entity2nodes = new HashMap<GradleEntity, Pair<String, Collection<GradleProjectStructureNode>>>(); int counter = 0; <BUG>DefaultMutableTreeNode root = buildNode(project, entity2nodes, counter++); for (GradleModule module : project.getModules()) { </BUG> DefaultMutableTreeNode moduleNode = buildNode(module, entity2nodes, counter++); root.add(moduleNode);
List<GradleModule> modules = new ArrayList<GradleModule>(project.getModules()); Collections.sort(modules, Named.COMPARATOR); for (GradleModule module : modules) {
8,943
package org.jetbrains.plugins.gradle.importing.model; <BUG>import org.jetbrains.annotations.NotNull; public interface Named { @NotNull</BUG> String getName(); void setName(@NotNull String name);
import java.util.Comparator; Comparator<Named> COMPARATOR = new Comparator<Named>() { @Override public int compare(Named o1, Named o2) { return o1.getName().compareTo(o2.getName()); } }; @NotNull
8,944
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; <BUG>import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List;</BUG> public final class PatchUtils {
import java.text.DateFormat; import java.util.Date; import java.util.List;
8,945
package org.jboss.as.patching.runner; <BUG>import org.jboss.as.boot.DirectoryStructure; import org.jboss.as.patching.LocalPatchInfo;</BUG> import org.jboss.as.patching.PatchInfo; import org.jboss.as.patching.PatchLogger; import org.jboss.as.patching.PatchMessages;
import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp; import org.jboss.as.patching.CommonAttributes; import org.jboss.as.patching.LocalPatchInfo;
8,946
private static final String PATH_DELIMITER = "/"; public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT; enum Element { ADDED_BUNDLE("added-bundle"), ADDED_MISC_CONTENT("added-misc-content"), <BUG>ADDED_MODULE("added-module"), BUNDLES("bundles"),</BUG> CUMULATIVE("cumulative"), DESCRIPTION("description"), MISC_FILES("misc-files"),
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
8,947
final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { <BUG>case APPLIES_TO_VERSION: builder.addAppliesTo(value); break;</BUG> case RESULTING_VERSION: if(type == Patch.PatchType.CUMULATIVE) {
[DELETED]
8,948
final StringBuilder path = new StringBuilder(); for(final String p : item.getPath()) { path.append(p).append(PATH_DELIMITER); } path.append(item.getName()); <BUG>writer.writeAttribute(Attribute.PATH.name, path.toString()); if(type != ModificationType.REMOVE) {</BUG> writer.writeAttribute(Attribute.HASH.name, bytesToHexString(item.getContentHash())); } if(type != ModificationType.ADD) {
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
8,949
package org.jboss.as.patching; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.patching.runner.PatchingException; import org.jboss.logging.Messages; import org.jboss.logging.annotations.Message; <BUG>import org.jboss.logging.annotations.MessageBundle; import java.io.IOException;</BUG> import java.util.List; @MessageBundle(projectCode = "JBAS") public interface PatchMessages {
import org.jboss.logging.annotations.Cause; import java.io.IOException;
8,950
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; <BUG>import java.nio.file.Path; import java.util.Random; import org.junit.Before; </BUG> import org.junit.Test;
import java.nio.file.Paths; import org.junit.After;
8,951
package net.java.sip.communicator.plugin.otr; <BUG>import java.io.UnsupportedEncodingException; import java.net.URLEncoder;</BUG> import java.security.KeyFactory; import java.security.KeyPair; import java.security.KeyPairGenerator;
[DELETED]
8,952
{ e.printStackTrace(); return null; } } <BUG>private String getSessionNS(SessionID sessionID, String function) { try { return "net.java.sip.comunicator.plugin.otr." + URLEncoder.encode(sessionID.toString(), "UTF-8") + "." + function;</BUG> }
private List<ScOtrEngineListener> listeners = new Vector<ScOtrEngineListener>(); public void addListener(ScOtrEngineListener l)
8,953
OtrActivator.bundleContext.getService(ref); service.openURL(OtrActivator.resourceService .getI18NString("plugin.otr.authbuddydialog.HELP_URI")); } public OtrPolicy getContactPolicy(Contact contact) <BUG>{ String id = getSessionNS(getSessionID(contact), "policy"); if (id == null || id.length() < 1) return getGlobalPolicy(); int policy = OtrActivator.configService.getInt(id, -1);</BUG> if (policy < 0)
int policy = this.configurator.getPropertyInt(getSessionID(contact) + "policy", -1);
8,954
return null; } Object b64PubKey = OtrActivator.configService.getProperty(idPubKey);</BUG> if (b64PubKey == null) <BUG>return null; X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(Base64.decode((String) b64PubKey));</BUG> PublicKey publicKey; PrivateKey privateKey; KeyFactory keyFactory;
PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(b64PrivKey); byte[] b64PubKey = this.configurator.getPropertyBytes(accountID + ".publicKey"); X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(b64PubKey);
8,955
if (specificAnnotationSettings == null || selectedIonTypes.keySet().contains(Ion.IonType.PEPTIDE_FRAGMENT_ION) && specificAnnotationSettings.getFragmentIonTypes().contains(PeptideFragmentIon.A_ION)) { int subType = PeptideFragmentIon.A_ION; ArrayList<Ion> ions = ionsMap.get(subType); if (ions == null) { if (neutralLossesCombinations != null) { <BUG>ions = new ArrayList<Ion>(neutralLossesCombinations.size()); </BUG> } else { ions = new ArrayList<Ion>(1); }
ions = new ArrayList<Ion>(neutralLossesCombinations.length);
8,956
if (specificAnnotationSettings == null || selectedIonTypes.keySet().contains(Ion.IonType.PEPTIDE_FRAGMENT_ION) && specificAnnotationSettings.getFragmentIonTypes().contains(PeptideFragmentIon.B_ION)) { int subType = PeptideFragmentIon.B_ION; ArrayList<Ion> ions = ionsMap.get(subType); if (ions == null) { if (neutralLossesCombinations != null) { <BUG>ions = new ArrayList<Ion>(neutralLossesCombinations.size()); </BUG> } else { ions = new ArrayList<Ion>(1); }
ions = new ArrayList<Ion>(neutralLossesCombinations.length);
8,957
ions = new ArrayList<Ion>(1); } ionsMap.put(subType, ions); } if (neutralLossesCombinations != null) { <BUG>for (ArrayList<NeutralLoss> losses : neutralLossesCombinations) { ions.add(new PeptideFragmentIon(subType, faa, forwardMass - getLossesMass(losses), losses)); </BUG> }
for (NeutralLossCombination losses : neutralLossesCombinations) { ions.add(new PeptideFragmentIon(subType, faa, forwardMass - losses.getMass(), losses.getNeutralLossCombination()));
8,958
if (specificAnnotationSettings == null || selectedIonTypes.keySet().contains(Ion.IonType.PEPTIDE_FRAGMENT_ION) && specificAnnotationSettings.getFragmentIonTypes().contains(PeptideFragmentIon.C_ION)) { int subType = PeptideFragmentIon.C_ION; ArrayList<Ion> ions = ionsMap.get(subType); if (ions == null) { if (neutralLossesCombinations != null) { <BUG>ions = new ArrayList<Ion>(neutralLossesCombinations.size()); </BUG> } else { ions = new ArrayList<Ion>(1); }
ions = new ArrayList<Ion>(neutralLossesCombinations.length);
8,959
if (specificAnnotationSettings == null || selectedIonTypes.keySet().contains(Ion.IonType.PEPTIDE_FRAGMENT_ION) && specificAnnotationSettings.getFragmentIonTypes().contains(PeptideFragmentIon.X_ION)) { int subType = PeptideFragmentIon.X_ION; ArrayList<Ion> ions = ionsMap.get(subType); if (ions == null) { if (neutralLossesCombinations != null) { <BUG>ions = new ArrayList<Ion>(neutralLossesCombinations.size()); </BUG> } else { ions = new ArrayList<Ion>(1); }
ions = new ArrayList<Ion>(neutralLossesCombinations.length);
8,960
if (specificAnnotationSettings == null || selectedIonTypes.keySet().contains(Ion.IonType.PEPTIDE_FRAGMENT_ION) && specificAnnotationSettings.getFragmentIonTypes().contains(PeptideFragmentIon.Y_ION)) { int subType = PeptideFragmentIon.Y_ION; ArrayList<Ion> ions = ionsMap.get(subType); if (ions == null) { if (neutralLossesCombinations != null) { <BUG>ions = new ArrayList<Ion>(neutralLossesCombinations.size()); </BUG> } else { ions = new ArrayList<Ion>(1); }
ions = new ArrayList<Ion>(neutralLossesCombinations.length);
8,961
ions.add(new PeptideFragmentIon(subType, faa, rewindMass + 2 * Atom.H.getMonoisotopicMass() - getLossesMass(losses), losses)); }</BUG> } else { <BUG>ions.add(new PeptideFragmentIon(subType, faa, rewindMass + 2 * Atom.H.getMonoisotopicMass(), null)); </BUG> } } if (specificAnnotationSettings == null || selectedIonTypes.keySet().contains(Ion.IonType.PEPTIDE_FRAGMENT_ION) && specificAnnotationSettings.getFragmentIonTypes().contains(PeptideFragmentIon.Z_ION)) { int subType = PeptideFragmentIon.Z_ION;
ions = new ArrayList<Ion>(1); ionsMap.put(subType, ions); if (neutralLossesCombinations != null) { for (NeutralLossCombination losses : neutralLossesCombinations) { ions.add(new PeptideFragmentIon(subType, faa, rewindMass + h2 - losses.getMass(), losses.getNeutralLossCombination())); ions.add(new PeptideFragmentIon(subType, faa, rewindMass + h2, null));
8,962
if (specificAnnotationSettings == null || selectedIonTypes.keySet().contains(Ion.IonType.PEPTIDE_FRAGMENT_ION) && specificAnnotationSettings.getFragmentIonTypes().contains(PeptideFragmentIon.Z_ION)) { int subType = PeptideFragmentIon.Z_ION; ArrayList<Ion> ions = ionsMap.get(subType); if (ions == null) { if (neutralLossesCombinations != null) { <BUG>ions = new ArrayList<Ion>(neutralLossesCombinations.size()); </BUG> } else { ions = new ArrayList<Ion>(1); }
ions = new ArrayList<Ion>(neutralLossesCombinations.length);
8,963
ions = new ArrayList<Ion>(1); } ionsMap.put(subType, ions); } if (neutralLossesCombinations != null) { <BUG>for (ArrayList<NeutralLoss> losses : neutralLossesCombinations) { ions.add(new PeptideFragmentIon(subType, faa, rewindMass - Atom.N.getMonoisotopicMass() - getLossesMass(losses), losses)); </BUG> }
for (NeutralLossCombination losses : neutralLossesCombinations) { ions.add(new PeptideFragmentIon(subType, faa, rewindMass - Atom.N.getMonoisotopicMass() - losses.getMass(), losses.getNeutralLossCombination()));
8,964
ArrayList<Ion> ions = ionsMap.get(subType); if (ions == null) { ions = new ArrayList<Ion>(); ionsMap.put(subType, ions); } <BUG>for (ArrayList<NeutralLoss> losses : neutralLossesCombinations) { ions.add(new TagFragmentIon(subType, aa, subaa, forwardMass - Atom.C.getMonoisotopicMass() - Atom.O.getMonoisotopicMass() - getLossesMass(losses), losses, massOffset)); }</BUG> subType = TagFragmentIon.B_ION;
for (NeutralLossCombination losses : neutralLossesCombinations) { ions.add(new TagFragmentIon(subType, aa, subaa, forwardMass - co - losses.getMass(), losses.getNeutralLossCombination(), massOffset));
8,965
ions = ionsMap.get(subType); if (ions == null) { ions = new ArrayList<Ion>(); ionsMap.put(subType, ions); } <BUG>for (ArrayList<NeutralLoss> losses : neutralLossesCombinations) { ions.add(new TagFragmentIon(subType, aa, subaa, forwardMass + Atom.N.getMonoisotopicMass() + 3 * Atom.H.getMonoisotopicMass() - getLossesMass(losses), losses, massOffset)); }</BUG> }
[DELETED]
8,966
ArrayList<Ion> ions = ionsMap.get(subType); if (ions == null) { ions = new ArrayList<Ion>(); ionsMap.put(subType, ions); } <BUG>for (ArrayList<NeutralLoss> losses : neutralLossesCombinations) { ions.add(new TagFragmentIon(subType, aa, subaa, forwardMass - Atom.C.getMonoisotopicMass() - Atom.O.getMonoisotopicMass() - getLossesMass(losses), losses, massOffset)); }</BUG> subType = TagFragmentIon.B_ION;
for (NeutralLossCombination losses : neutralLossesCombinations) { ions.add(new TagFragmentIon(subType, aa, subaa, forwardMass - co - losses.getMass(), losses.getNeutralLossCombination(), massOffset));
8,967
ions = ionsMap.get(subType); if (ions == null) { ions = new ArrayList<Ion>(); ionsMap.put(subType, ions); } <BUG>for (ArrayList<NeutralLoss> losses : neutralLossesCombinations) { ions.add(new TagFragmentIon(subType, aa, subaa, forwardMass - getLossesMass(losses), losses, massOffset)); </BUG> }
for (NeutralLossCombination losses : neutralLossesCombinations) { ions.add(new TagFragmentIon(subType, aa, subaa, forwardMass - losses.getMass(), losses.getNeutralLossCombination(), massOffset));
8,968
ArrayList<Ion> ions = ionsMap.get(subType); if (ions == null) { ions = new ArrayList<Ion>(); ionsMap.put(subType, ions); } <BUG>for (ArrayList<NeutralLoss> losses : neutralLossesCombinations) { ions.add(new TagFragmentIon(subType, aa, subaa, rewindMass + Atom.C.getMonoisotopicMass() + 2 * Atom.O.getMonoisotopicMass() - getLossesMass(losses), losses, gap)); }</BUG> subType = TagFragmentIon.Y_ION;
ions.add(immoniumIon); ionsMap = result.get(Ion.IonType.RELATED_ION.index); if (ionsMap == null) { ionsMap = new HashMap<Integer, ArrayList<Ion>>(); result.put(Ion.IonType.RELATED_ION.index, ionsMap); ArrayList<RelatedIon> relatedIons = RelatedIon.getRelatedIons(aminoAcid); for (RelatedIon tempRelated : relatedIons) { subType = tempRelated.getSubType();
8,969
ArrayList<Ion> ions = ionsMap.get(subType); if (ions == null) { ions = new ArrayList<Ion>(); ionsMap.put(subType, ions); } <BUG>for (ArrayList<NeutralLoss> losses : neutralLossesCombinations) { ions.add(new TagFragmentIon(subType, aa, subaa, rewindMass + Atom.C.getMonoisotopicMass() + 2 * Atom.O.getMonoisotopicMass() - getLossesMass(losses), losses, gap)); }</BUG> subType = TagFragmentIon.Y_ION;
for (NeutralLossCombination losses : neutralLossesCombinations) { ions.add(new TagFragmentIon(subType, aa, subaa, forwardMass - co - losses.getMass(), losses.getNeutralLossCombination(), massOffset)); subType = TagFragmentIon.B_ION;
8,970
ions = ionsMap.get(subType); if (ions == null) { ions = new ArrayList<Ion>(); ionsMap.put(subType, ions); } <BUG>for (ArrayList<NeutralLoss> losses : neutralLossesCombinations) { ions.add(new TagFragmentIon(subType, aa, subaa, rewindMass - Atom.N.getMonoisotopicMass() + Atom.O.getMonoisotopicMass() - getLossesMass(losses), losses, gap)); }</BUG> }
[DELETED]
8,971
package com.compomics.util.experiment.biology.ions; import com.compomics.util.experiment.biology.NeutralLoss; import com.compomics.util.experiment.biology.Ion; import com.compomics.util.pride.CvTerm; <BUG>import java.util.ArrayList; public class PeptideFragmentIon extends Ion {</BUG> static final long serialVersionUID = 8283809283803740651L; public static final int A_ION = 0; public static final int B_ION = 1;
import java.util.Collections; public class PeptideFragmentIon extends Ion {
8,972
public static final int B_ION = 1; public static final int C_ION = 2; public static final int X_ION = 3; public static final int Y_ION = 4; public static final int Z_ION = 5; <BUG>private ArrayList<NeutralLoss> neutralLosses; </BUG> private int number = -1; private int subType; private CvTerm cvTerm = null;
private NeutralLoss[] neutralLosses;
8,973
public String getNameWithNumber() { return getSubTypeAsString() + getNumber() + getNeutralLossesAsString(); } @Override public CvTerm getPrideCvTerm() { <BUG>if (cvTerm != null) { return cvTerm; }</BUG> switch (subType) {
if (cvTerm == null) {
8,974
private Semaphore proteinsMutex; private ArrayList<ModificationMatch> modifications = null; private ArrayList<VariantMatch> variants = null; private HashMap<String, HashMap<Integer, ArrayList<Variant>>> variantsMap = null; public final static String MODIFICATION_LOCALIZATION_SEPARATOR = "-ATAA-"; <BUG>public final static String MODIFICATION_SEPARATOR = "_"; public Peptide() {</BUG> } public Peptide(String aSequence, ArrayList<ModificationMatch> modifications, boolean sanityCheck) { this.sequence = aSequence;
public final static char MODIFICATION_SEPARATOR_CHAR = '_'; public Peptide() {
8,975
ArrayList<Integer> possibleTypes = new ArrayList<Integer>(); possibleTypes.add(PROTON); return possibleTypes; } @Override <BUG>public ArrayList<NeutralLoss> getNeutralLosses() { switch (subType) { case PROTON: return new ArrayList<NeutralLoss>(); // If you see a neutral loss of a proton, call Gell-Mann and Zweig default: return new ArrayList<NeutralLoss>(); }</BUG> }
[DELETED]
8,976
return RelatedIon.getPossibleSubtypes(); default: throw new UnsupportedOperationException("Not supported yet."); } } <BUG>public abstract ArrayList<NeutralLoss> getNeutralLosses(); </BUG> public boolean hasNeutralLosses() { switch (type) { case PEPTIDE_FRAGMENT_ION:
public abstract NeutralLoss[] getNeutralLosses();
8,977
public boolean hasNeutralLosses() { switch (type) { case PEPTIDE_FRAGMENT_ION: case TAG_FRAGMENT_ION: case PRECURSOR_ION: <BUG>ArrayList<NeutralLoss> neutralLosses = getNeutralLosses(); return neutralLosses != null && !neutralLosses.isEmpty(); </BUG> default:
NeutralLoss[] neutralLosses = getNeutralLosses(); return neutralLosses != null && neutralLosses.length > 0;
8,978
return "Unknown ion type"; default: throw new UnsupportedOperationException("No name for ion type " + type + "."); } } <BUG>public static Ion getGenericIon(IonType ionType, int subType, ArrayList<NeutralLoss> neutralLosses) { </BUG> switch (ionType) { case ELEMENTARY_ION: return new ElementaryIon("new ElementaryIon", 0.0, subType);
public static Ion getGenericIon(IonType ionType, int subType, NeutralLoss[] neutralLosses) {
8,979
possibleTypes.add(TRYPTOPHAN); possibleTypes.add(TYROSINE); return possibleTypes; } @Override <BUG>public ArrayList<NeutralLoss> getNeutralLosses() { return new ArrayList<NeutralLoss>(0); </BUG> }
[DELETED]
8,980
import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.HdfsConstants; <BUG>import org.apache.hadoop.hdfs.protocol.NSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.QuotaExceededException;</BUG> import org.apache.hadoop.hdfs.server.namenode.FSImageTestUtil; import org.apache.hadoop.hdfs.tools.DFSAdmin; import org.apache.hadoop.hdfs.web.WebHdfsConstants;
import org.apache.hadoop.hdfs.protocol.QuotaByStorageTypeExceededException; import org.apache.hadoop.hdfs.protocol.QuotaExceededException;
8,981
timeWarp = new OwnLabel(getFormattedTimeWrap(), skin, "warp"); timeWarp.setName("time warp"); Container wrapWrapper = new Container(timeWarp); wrapWrapper.width(60f * GlobalConf.SCALE_FACTOR); wrapWrapper.align(Align.center); <BUG>VerticalGroup timeGroup = new VerticalGroup().align(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR); </BUG> HorizontalGroup dateGroup = new HorizontalGroup(); dateGroup.space(4 * GlobalConf.SCALE_FACTOR); dateGroup.addActor(date);
VerticalGroup timeGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
8,982
focusListScrollPane.setFadeScrollBars(false); focusListScrollPane.setScrollingDisabled(true, false); focusListScrollPane.setHeight(tree ? 200 * GlobalConf.SCALE_FACTOR : 100 * GlobalConf.SCALE_FACTOR); focusListScrollPane.setWidth(160); } <BUG>VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).space(3 * GlobalConf.SCALE_FACTOR); </BUG> objectsGroup.addActor(searchBox); if (focusListScrollPane != null) { objectsGroup.addActor(focusListScrollPane);
VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR);
8,983
headerGroup.addActor(expandIcon); headerGroup.addActor(detachIcon); addActor(headerGroup); expandIcon.setChecked(expanded); } <BUG>public void expand() { </BUG> if (!expandIcon.isChecked()) { expandIcon.setChecked(true); }
public void expandPane() {
8,984
</BUG> if (!expandIcon.isChecked()) { expandIcon.setChecked(true); } } <BUG>public void collapse() { </BUG> if (expandIcon.isChecked()) { expandIcon.setChecked(false); }
headerGroup.addActor(expandIcon); headerGroup.addActor(detachIcon); addActor(headerGroup); expandIcon.setChecked(expanded); public void expandPane() { public void collapsePane() {
8,985
}); playstop.addListener(new TextTooltip(txt("gui.tooltip.playstop"), skin)); TimeComponent timeComponent = new TimeComponent(skin, ui); timeComponent.initialize(); CollapsiblePane time = new CollapsiblePane(ui, txt("gui.time"), timeComponent.getActor(), skin, true, playstop); <BUG>time.align(Align.left); mainActors.add(time);</BUG> panes.put(timeComponent.getClass().getSimpleName(), time); if (Constants.desktop) { recCamera = new OwnImageButton(skin, "rec");
time.align(Align.left).columnAlign(Align.left); mainActors.add(time);
8,986
panes.put(visualEffectsComponent.getClass().getSimpleName(), visualEffects); ObjectsComponent objectsComponent = new ObjectsComponent(skin, ui); objectsComponent.setSceneGraph(sg); objectsComponent.initialize(); CollapsiblePane objects = new CollapsiblePane(ui, txt("gui.objects"), objectsComponent.getActor(), skin, false); <BUG>objects.align(Align.left); mainActors.add(objects);</BUG> panes.put(objectsComponent.getClass().getSimpleName(), objects); GaiaComponent gaiaComponent = new GaiaComponent(skin, ui); gaiaComponent.initialize();
objects.align(Align.left).columnAlign(Align.left); mainActors.add(objects);
8,987
if (Constants.desktop) { MusicComponent musicComponent = new MusicComponent(skin, ui); musicComponent.initialize(); Actor[] musicActors = MusicActorsManager.getMusicActors() != null ? MusicActorsManager.getMusicActors().getActors(skin) : null; CollapsiblePane music = new CollapsiblePane(ui, txt("gui.music"), musicComponent.getActor(), skin, true, musicActors); <BUG>music.align(Align.left); mainActors.add(music);</BUG> panes.put(musicComponent.getClass().getSimpleName(), music); } Button switchWebgl = new OwnTextButton(txt("gui.webgl.back"), skin, "link");
music.align(Align.left).columnAlign(Align.left); mainActors.add(music);
8,988
package com.intellij.ide.favoritesTreeView; import com.intellij.ide.SelectInManager; import com.intellij.ide.SelectInTarget; <BUG>import com.intellij.ide.impl.ContentManagerWatcher; import com.intellij.openapi.actionSystem.ActionManager;</BUG> import com.intellij.openapi.actionSystem.DefaultActionGroup; import com.intellij.openapi.actionSystem.IdeActions; import com.intellij.openapi.components.ProjectComponent;
import com.intellij.openapi.actionSystem.ActionGroup; import com.intellij.openapi.actionSystem.ActionManager;
8,989
ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(myCurrentProject); ToolWindow toolWindow = toolWindowManager.registerToolWindow(ToolWindowId.FAVORITES_VIEW, getComponent(), ToolWindowAnchor.RIGHT); toolWindow.setIcon(IconLoader.getIcon("/general/toolWindowFavorites.png")); new ContentManagerWatcher(toolWindow, FavoritesViewImpl.this); final ContentFactory contentFactory = PeerFactory.getInstance().getContentFactory(); <BUG>final DefaultActionGroup favoritesActionsGroup = ((DefaultActionGroup)ActionManager.getInstance().getAction(IdeActions.ADD_TO_FAVORITES)); favoritesActionsGroup.removeAll();</BUG> if (myName2FavoritesListSet.isEmpty()){ final FavoritesTreeViewPanel panel = new FavoritesTreeViewPanel(myCurrentProject, null, myCurrentProject.getName()); final Content favoritesContent = contentFactory.createContent(panel, myCurrentProject.getName(), false);
final ActionGroup favoritesActionsGroup = ((ActionGroup)ActionManager.getInstance().getAction(IdeActions.ADD_TO_FAVORITES));
8,990
if (key.equals(myCurrentFavoritesList)){ setSelectedContent(content); } } } <BUG>favoritesActionsGroup.addSeparator(); favoritesActionsGroup.add(new AddToNewFavoritesListAction());</BUG> } }); }
[DELETED]
8,991
import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.wm.ToolWindowId; import com.intellij.openapi.wm.ToolWindowManager; import com.intellij.psi.*; <BUG>import com.intellij.psi.search.GlobalSearchScope; import com.intellij.uiDesigner.compiler.Utils; import com.intellij.uiDesigner.lw.LwRootContainer;</BUG> import java.util.ArrayList; import java.util.HashSet;
import com.intellij.psi.util.PsiTreeUtil;
8,992
if (vFile != null) { final FileType fileType = FileTypeManager.getInstance().getFileTypeByFile(vFile); if (StdFileTypes.GUI_DESIGNER_FORM.equals(fileType)) { final PsiFile formFile = psiManager.findFile(vFile); String text = formFile.getText(); <BUG>LwRootContainer container; try { container = Utils.getRootContainer(text, null); }</BUG> catch (Exception e) {
String className; className = Utils.getBoundClassName(text); }
8,993
container = Utils.getRootContainer(text, null); }</BUG> catch (Exception e) { return null; } <BUG>final PsiClass classToBind = psiManager.findClass(container.getClassToBind(), GlobalSearchScope.allScope(project)); result.add(FormNode.constructFormNode(psiManager, classToBind, project, favoritesConfig)); }</BUG> return result.isEmpty() ? null : result.toArray(new AbstractTreeNode[result.size()]);
if (vFile != null) { final FileType fileType = FileTypeManager.getInstance().getFileTypeByFile(vFile); if (StdFileTypes.GUI_DESIGNER_FORM.equals(fileType)) { final PsiFile formFile = psiManager.findFile(vFile); String text = formFile.getText(); String className; try { className = Utils.getBoundClassName(text);
8,994
if(worldIn.getTileEntity(pos) != null){ TileEntity te = worldIn.getTileEntity(pos); if(te.hasCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null) && te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).getTemp() >= -273D + mult){ te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).addHeat(-mult); } <BUG>for(EnumFacing dir : EnumFacing.values()){ if(te.hasCapability(Capabilities.ROTARY_HANDLER_CAPABILITY, dir)){ te.getCapability(Capabilities.ROTARY_HANDLER_CAPABILITY, dir).addEnergy(-mult, false, false); break;</BUG> }
if(te.hasCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null)){ te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).addHeat(mult);
8,995
public static double betterRound(double numIn, int decPlac){ double opOn = Math.round(numIn * Math.pow(10, decPlac)) / Math.pow(10D, decPlac); return opOn; } public static double centerCeil(double numIn, int tiers){ <BUG>return ((numIn > 0) ? Math.ceil(numIn * tiers) : Math.floor(numIn * tiers)) / tiers; </BUG> } public static double findEfficiency(double speedIn, double lowerLimit, double upperLimit){ speedIn = Math.abs(speedIn);
return ((numIn > 0) ? Math.ceil(numIn * (double) tiers) : Math.floor(numIn * (double) tiers)) / (double) tiers;
8,996
package com.Da_Technomancer.crossroads.API; import com.Da_Technomancer.crossroads.API.DefaultStorageHelper.DefaultStorage; import com.Da_Technomancer.crossroads.API.heat.DefaultHeatHandler; import com.Da_Technomancer.crossroads.API.heat.IHeatHandler; import com.Da_Technomancer.crossroads.API.magic.DefaultMagicHandler; <BUG>import com.Da_Technomancer.crossroads.API.magic.IMagicHandler; import com.Da_Technomancer.crossroads.API.rotary.DefaultRotaryHandler; import com.Da_Technomancer.crossroads.API.rotary.IRotaryHandler; </BUG> import net.minecraftforge.common.capabilities.Capability;
import com.Da_Technomancer.crossroads.API.rotary.DefaultAxleHandler; import com.Da_Technomancer.crossroads.API.rotary.DefaultCogHandler; import com.Da_Technomancer.crossroads.API.rotary.IAxleHandler; import com.Da_Technomancer.crossroads.API.rotary.ICogHandler;
8,997
import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityInject; import net.minecraftforge.common.capabilities.CapabilityManager; public class Capabilities{ @CapabilityInject(IHeatHandler.class) <BUG>public static Capability<IHeatHandler> HEAT_HANDLER_CAPABILITY = null; @CapabilityInject(IRotaryHandler.class) public static Capability<IRotaryHandler> ROTARY_HANDLER_CAPABILITY = null; </BUG> @CapabilityInject(IMagicHandler.class)
@CapabilityInject(IAxleHandler.class) public static Capability<IAxleHandler> AXLE_HANDLER_CAPABILITY = null; @CapabilityInject(ICogHandler.class) public static Capability<ICogHandler> COG_HANDLER_CAPABILITY = null;
8,998
public IEffect getMixEffect(Color col){ if(col == null){ return effect; } int top = Math.max(col.getBlue(), Math.max(col.getRed(), col.getGreen())); <BUG>if(top < rand.nextInt(128) + 128){ return voidEffect;</BUG> } return effect; }
if(top != 255){ return voidEffect;
8,999
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; <BUG>import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List;</BUG> public final class PatchUtils {
import java.text.DateFormat; import java.util.Date; import java.util.List;
9,000
package org.jboss.as.patching.runner; <BUG>import org.jboss.as.boot.DirectoryStructure; import org.jboss.as.patching.LocalPatchInfo;</BUG> import org.jboss.as.patching.PatchInfo; import org.jboss.as.patching.PatchLogger; import org.jboss.as.patching.PatchMessages;
import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp; import org.jboss.as.patching.CommonAttributes; import org.jboss.as.patching.LocalPatchInfo;