id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
16,401
import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; <BUG>import javax.ws.rs.QueryParam; import java.io.File;</BUG> import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList;
import javax.ws.rs.WebApplicationException; import java.io.File;
16,402
return findNamed(getResourceList(namespace, Template.class), name); } @PUT @Path("templates/{name}") @Consumes({"application/json", "application/yaml"}) <BUG>public String updateTemplate(@PathParam("namespace") String namespace, @PathParam("name") @NotNull String name, Template entity) throws IOException { return updateNamed(namespace, name, entity); }</BUG> @DELETE
[DELETED]
16,403
return findNamed(getResourceList(namespace, BuildConfig.class), name); } @PUT @Path("buildconfigs/{name}") @Consumes({"application/json", "application/yaml"}) <BUG>public String updateBuildConfig(@PathParam("namespace") String namespace, @PathParam("name") @NotNull String name, BuildConfig entity) throws IOException { return updateNamed(namespace, name, entity); }</BUG> @DELETE
[DELETED]
16,404
File entityFile = getResourceFile(namespace, name, entity.getClass()); ObjectMeta metadata = KubernetesHelper.getOrCreateMetadata(entity); metadata.setNamespace(namespace); metadata.setName(name); if (entityFile != null) { <BUG>KubernetesHelper.saveJson(entityFile, entity); } return "No metadata.name supplied!";</BUG> } private File getResourceCollectionFolder(String namespace, Class<? extends HasMetadata> clazz) {
} else { throw new WebApplicationException("No metadata.name supplied!");
16,405
+ assembly.getId() + ":\n" ); @SuppressWarnings( "unchecked" ) final List<ObjectInterpolationWarning> warnings = objectInterpolator.getWarnings(); for ( final Iterator<ObjectInterpolationWarning> it = warnings.iterator(); it.hasNext(); ) { <BUG>final ObjectInterpolationWarning warning = it.next(); sb.append( '\n' ) .append( warning );</BUG> } sb.append( "\n\nThese values were SKIPPED, but the assembly process will continue.\n" );
sb.append( '\n' ).append( warning );
16,406
interpolator.addValueSource( new PrefixedObjectValueSource( InterpolationConstants.PROJECT_PREFIXES, project, true ) ); final Properties settingsProperties = new Properties(); if ( configSource.getLocalRepository() != null ) { <BUG>settingsProperties.setProperty( "localRepository", configSource.getLocalRepository() .getBasedir() ); settingsProperties.setProperty( "settings.localRepository", configSource.getLocalRepository() .getBasedir() );</BUG> }
settingsProperties.setProperty( "localRepository", configSource.getLocalRepository().getBasedir() ); settingsProperties.setProperty( "settings.localRepository", configSource.getLocalRepository().getBasedir() );
16,407
.getBasedir() );</BUG> } else if ( session != null && session.getSettings() != null ) { <BUG>settingsProperties.setProperty( "localRepository", session.getSettings() .getLocalRepository() ); settingsProperties.setProperty( "settings.localRepository", configSource.getLocalRepository() .getBasedir() );</BUG> }
interpolator.addValueSource( new PrefixedObjectValueSource( InterpolationConstants.PROJECT_PREFIXES, project, true ) ); final Properties settingsProperties = new Properties(); if ( configSource.getLocalRepository() != null ) settingsProperties.setProperty( "localRepository", configSource.getLocalRepository().getBasedir() ); settingsProperties.setProperty( "settings.localRepository", configSource.getLocalRepository().getBasedir() ); settingsProperties.setProperty( "localRepository", session.getSettings().getLocalRepository() ); settingsProperties.setProperty( "settings.localRepository", configSource.getLocalRepository().getBasedir() );
16,408
public static Address createRandomAddress(final int seed) { final Address address = new Address(); address.setAddress1(randomAlphaNumericString(10, seed)); address.setAddress2(randomAlphaNumericString(10, seed)); address.setCity(randomAlphaNumericString(10, seed)); <BUG>address.setState(randomAlphaString(2, seed)); </BUG> address.setZip(49302); address.setCountry(randomAlphaString(2, seed).toUpperCase()); address.setPhone(randomNumericString(10, seed));
address.setState(randomAlphaString(2, seed).toUpperCase());
16,409
public static ShippingAddress createRandomShippingAddress(final int seed) { final ShippingAddress address = new ShippingAddress(); address.setAddress1(randomAlphaNumericString(10, seed)); address.setAddress2(randomAlphaNumericString(10, seed)); address.setCity(randomAlphaNumericString(10, seed)); <BUG>address.setState(randomAlphaString(2, seed)); address.setZip(49302);</BUG> address.setCountry(randomAlphaString(2, seed).toUpperCase()); address.setPhone(randomNumericString(10, seed));
address.setState(randomAlphaString(2, seed).toUpperCase()); address.setState(randomAlphaString(2, seed).toUpperCase()); address.setZip(49302);
16,410
import java.util.Iterator; import java.util.List; import java.util.Map; import com.aliyun.fs.oss.common.OssException; import com.aliyun.fs.oss.common.PartialListing; <BUG>import com.aliyun.fs.oss.utils.OSSCopyTask; import com.aliyun.fs.oss.utils.Result; import com.aliyun.fs.oss.utils.Task; import com.aliyun.fs.oss.utils.TaskEngine;</BUG> import com.aliyun.oss.OSSClient;
import com.aliyun.fs.oss.utils.*;
16,411
private static final String FILE_SYSTEM_TYPE_NAME = "fs-type"; private static final String FILE_SYSTEM_TYPE_VALUE = "block"; private static final String FILE_SYSTEM_VERSION_NAME = "fs-version"; private static final String FILE_SYSTEM_VERSION_VALUE = "1"; private static final Map<String, String> METADATA = <BUG>new HashMap<String, String>(); static {</BUG> METADATA.put(FILE_SYSTEM_NAME, FILE_SYSTEM_VALUE); METADATA.put(FILE_SYSTEM_TYPE_NAME, FILE_SYSTEM_TYPE_VALUE); METADATA.put(FILE_SYSTEM_VERSION_NAME, FILE_SYSTEM_VERSION_VALUE);
private String endpoint = null; private String accessKeyId = null; private String accessKeySecret = null; private String securityToken = null; static {
16,412
import org.apache.sling.jcr.resource.JcrResourceConstants; import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl; import org.apache.sling.jcr.resource.internal.helper.MapEntries; import org.apache.sling.jcr.resource.internal.helper.Mapping; import org.apache.sling.performance.annotation.PerformanceTestSuite; <BUG>import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest; import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest; import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;</BUG> import org.junit.runner.RunWith;
import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
16,413
@PerformanceTestSuite public ParameterizedTestList testPerformance() throws Exception { Helper helper = new Helper(); ParameterizedTestList testCenter = new ParameterizedTestList(); testCenter.setTestSuiteTitle("jcr.resource-2.0.10"); <BUG>testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith5000VanityPathTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith10000VanityPathTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith1000AliasTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith5000AliasTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith10000AliasTest(helper)); </BUG> return testCenter;
testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith1000VanityPathTest",helper, 100, 10)); testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith5000VanityPathTest",helper, 100, 50)); testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith10000VanityPathTest",helper, 100, 100)); testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWithManyAliasTest",helper, 1000)); testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith5000AliasTest",helper, 5000)); testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith10000AliasTest",helper, 10000));
16,414
package org.apache.sling.performance; <BUG>import static org.mockito.Mockito.*; import javax.jcr.NamespaceRegistry;</BUG> import javax.jcr.Session; import junitx.util.PrivateAccessor;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.mock; import javax.jcr.NamespaceRegistry;
16,415
import org.apache.sling.jcr.resource.JcrResourceConstants; import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl; import org.apache.sling.jcr.resource.internal.helper.MapEntries; import org.apache.sling.jcr.resource.internal.helper.Mapping; import org.apache.sling.performance.annotation.PerformanceTestSuite; <BUG>import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest; import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest; import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;</BUG> import org.junit.runner.RunWith;
import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
16,416
import org.apache.sling.api.resource.ResourceResolver; import org.apache.sling.jcr.api.SlingRepository; import org.apache.sling.jcr.resource.JcrResourceConstants; import org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory; import org.apache.sling.performance.annotation.PerformanceTestSuite; <BUG>import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest; import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest; import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;</BUG> import org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator;
import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
16,417
@PerformanceTestSuite public ParameterizedTestList testPerformance() throws Exception { Helper helper = new Helper(); ParameterizedTestList testCenter = new ParameterizedTestList(); testCenter.setTestSuiteTitle("jcr.resource-2.2.0"); <BUG>testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith5000VanityPathTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith10000VanityPathTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith1000AliasTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith5000AliasTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith10000AliasTest(helper)); </BUG> return testCenter;
testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith1000VanityPathTest",helper, 100, 10)); testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith5000VanityPathTest",helper, 100, 50)); testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith10000VanityPathTest",helper, 100, 100)); testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith1000AliasTest",helper, 1000)); testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith5000AliasTest",helper, 5000)); testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith10000AliasTest",helper, 10000));
16,418
Class<? extends TokenFilterFactory> type = tokenFilterSettings.getAsClass("type", null, "org.elasticsearch.index.analysis.", "TokenFilterFactory"); if (type == null) { throw new IllegalArgumentException("Token Filter [" + tokenFilterName + "] must have a type associated with it"); } tokenFilterBinder.addBinding(tokenFilterName).toProvider(FactoryProvider.newFactory(TokenFilterFactoryFactory.class, type)).in(Scopes.SINGLETON); <BUG>} for (AnalysisBinderProcessor processor : processors) { processor.processTokenFilters(tokenFilterBinder, tokenFiltersSettings); </BUG> }
AnalysisBinderProcessor.TokenFiltersBindings tokenFiltersBindings = new AnalysisBinderProcessor.TokenFiltersBindings(tokenFilterBinder, tokenFiltersSettings); processor.processTokenFilters(tokenFiltersBindings);
16,419
Class<? extends TokenizerFactory> type = tokenizerSettings.getAsClass("type", null, "org.elasticsearch.index.analysis.", "TokenizerFactory"); if (type == null) { throw new IllegalArgumentException("Tokenizer [" + tokenizerName + "] must have a type associated with it"); } tokenizerBinder.addBinding(tokenizerName).toProvider(FactoryProvider.newFactory(TokenizerFactoryFactory.class, type)).in(Scopes.SINGLETON); <BUG>} for (AnalysisBinderProcessor processor : processors) { processor.processTokenizers(tokenizerBinder, tokenizersSettings); </BUG> }
AnalysisBinderProcessor.TokenizersBindings tokenizersBindings = new AnalysisBinderProcessor.TokenizersBindings(tokenizerBinder, tokenizersSettings); processor.processTokenizers(tokenizersBindings);
16,420
} else { throw new IllegalArgumentException("Analyzer [" + analyzerName + "] must have a type associated with it or a tokenizer"); } } analyzerBinder.addBinding(analyzerName).toProvider(FactoryProvider.newFactory(AnalyzerProviderFactory.class, type)).in(Scopes.SINGLETON); <BUG>} for (AnalysisBinderProcessor processor : processors) { processor.processAnalyzers(analyzerBinder, analyzersSettings); </BUG> }
AnalysisBinderProcessor.AnalyzersBindings analyzersBindings = new AnalysisBinderProcessor.AnalyzersBindings(analyzerBinder, analyzersSettings, indicesAnalysisService); processor.processAnalyzers(analyzersBindings);
16,421
import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.util.Progressable; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AFileSystem extends FileSystem {</BUG> private URI uri; private Path workingDir; private AmazonS3Client s3;
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AFileSystem extends FileSystem {
16,422
public void initialize(URI name, Configuration conf) throws IOException { super.initialize(name, conf); uri = URI.create(name.getScheme() + "://" + name.getAuthority()); workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri, this.getWorkingDirectory()); <BUG>String accessKey = conf.get(ACCESS_KEY, null); String secretKey = conf.get(SECRET_KEY, null); </BUG> String userInfo = name.getUserInfo();
String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null)); String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
16,423
} else { accessKey = userInfo; } } AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain( <BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey), new InstanceProfileCredentialsProvider(), new S3AAnonymousAWSCredentialsProvider() );</BUG> bucket = name.getHost();
new BasicAWSCredentialsProvider(accessKey, secretKey), new AnonymousAWSCredentialsProvider()
16,424
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT)); </BUG> s3 = new AmazonS3Client(credentials, awsConf); <BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS); partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (partSize < 5 * 1024 * 1024) {
new InstanceProfileCredentialsProvider(), new AnonymousAWSCredentialsProvider() bucket = name.getHost(); ClientConfiguration awsConf = new ClientConfiguration(); awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS))); awsConf.setProtocol(conf.getBoolean(NEW_SECURE_CONNECTIONS, conf.getBoolean(OLD_SECURE_CONNECTIONS, DEFAULT_SECURE_CONNECTIONS)) ? Protocol.HTTPS : Protocol.HTTP); awsConf.setMaxErrorRetry(conf.getInt(NEW_MAX_ERROR_RETRIES, conf.getInt(OLD_MAX_ERROR_RETRIES, DEFAULT_MAX_ERROR_RETRIES))); awsConf.setSocketTimeout(conf.getInt(NEW_SOCKET_TIMEOUT, conf.getInt(OLD_SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT))); maxKeys = conf.getInt(NEW_MAX_PAGING_KEYS, conf.getInt(OLD_MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS)); partSize = conf.getLong(NEW_MULTIPART_SIZE, conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE)); partSizeThreshold = conf.getInt(NEW_MIN_MULTIPART_THRESHOLD, conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD));
16,425
cannedACL = null; } if (!s3.doesBucketExist(bucket)) { throw new IOException("Bucket " + bucket + " does not exist"); } <BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART); long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE); </BUG> if (purgeExistingMultipart) {
boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART)); long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE));
16,426
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AOutputStream extends OutputStream {</BUG> private OutputStream backupStream; private File backupFile; private boolean closed;
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AOutputStream extends OutputStream {
16,427
this.client = client; this.progress = progress; this.fs = fs; this.cannedACL = cannedACL; this.statistics = statistics; <BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (conf.get(BUFFER_DIR, null) != null) {
partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
16,428
private List<SimpleModule> customModules = new ArrayList<>(); private boolean loadCustomModules = false; private boolean normalize = false; private boolean embedTypes = false; private List<IoRegistry> registries = new ArrayList<>(); <BUG>private GraphSONVersion version = GraphSONVersion.V1_0; </BUG> private TypeInfo typeInfo = TypeInfo.PARTIAL_TYPES; private Builder() { }
private GraphSONVersion version = GraphSONVersion.V2_0;
16,429
try (final InputStream in = new FileInputStream(file)) { reader().create().readGraph(in, graph); } } public static Io.Builder<GraphSONIo> build() { <BUG>return build(GraphSONVersion.V1_0); </BUG> } public static Io.Builder<GraphSONIo> build(final GraphSONVersion version) { return new Builder(version);
return build(GraphSONVersion.V2_0);
16,430
import org.livespark.formmodeler.service.impl.fieldProviders.MultipleSubFormFieldProvider; @Portable @Bindable public class MultipleSubFormFieldDefinition extends FieldDefinition implements EmbeddedFormField, MultipleField { public static final String CODE = "MultipleSubForm"; <BUG>@FieldDef( label = "Create Form" ) </BUG> @ListBox( provider = @SelectorDataProvider( type = SelectorDataProvider.ProviderType.REMOTE, className = "org.livespark.formmodeler.editor.backend.dataProviders.VFSSelectorFormProvider"))
@FieldDef( label = "Create Form", position = 4 )
16,431
@ListBox( provider = @SelectorDataProvider( type = SelectorDataProvider.ProviderType.REMOTE, className = "org.livespark.formmodeler.editor.backend.dataProviders.VFSSelectorFormProvider")) @NotEmpty protected String creationForm = ""; <BUG>@FieldDef( label = "Edit Form") </BUG> @ListBox( provider = @SelectorDataProvider( type = SelectorDataProvider.ProviderType.REMOTE, className = "org.livespark.formmodeler.editor.backend.dataProviders.VFSSelectorFormProvider"))
[DELETED]
16,432
package org.livespark.formmodeler.metaModel; <BUG>import java.lang.annotation.ElementType; import java.lang.annotation.RetentionPolicy; @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )</BUG> @java.lang.annotation.Target({ ElementType.PARAMETER }) public @interface SelectorDataProvider {
import java.lang.annotation.Inherited; @Inherited @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )
16,433
package org.livespark.formmodeler.metaModel; <BUG>import java.lang.annotation.ElementType; import java.lang.annotation.RetentionPolicy; @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )</BUG> @java.lang.annotation.Target({ ElementType.TYPE, ElementType.FIELD }) public @interface RadioGroup {
import java.lang.annotation.Inherited; @Inherited @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )
16,434
package org.livespark.formmodeler.metaModel; <BUG>import java.lang.annotation.ElementType; import java.lang.annotation.RetentionPolicy; @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )</BUG> @java.lang.annotation.Target({ ElementType.TYPE, ElementType.FIELD }) public @interface FieldDef {
import java.lang.annotation.Inherited; @Inherited @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )
16,435
public class DefaultSelectorOption<T> implements SelectorOption<T> { @FieldDef( label = "Value") private T value; @FieldDef( label = "Text") private String text; <BUG>@FieldDef( label = "Is default value") private boolean defaultValue = false; </BUG> public DefaultSelectorOption() {
@FieldDef( label = "Is default value", position = 2 ) private Boolean defaultValue = false;
16,436
package org.livespark.formmodeler.metaModel; <BUG>import java.lang.annotation.ElementType; import java.lang.annotation.RetentionPolicy; @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )</BUG> @java.lang.annotation.Target({ ElementType.PARAMETER }) public @interface Option {
import java.lang.annotation.Inherited; @Inherited @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )
16,437
public class StringSelectorOption implements SelectorOption<String> { @FieldDef( label = "Value") private String value; @FieldDef( label = "Text") private String text; <BUG>@FieldDef( label = "Is default value") private boolean defaultValue = false; </BUG> public StringSelectorOption() {
@FieldDef( label = "Is default value", position = 2 ) private Boolean defaultValue = false;
16,438
package org.livespark.formmodeler.metaModel; <BUG>import java.lang.annotation.ElementType; import java.lang.annotation.RetentionPolicy; @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )</BUG> @java.lang.annotation.Target({ ElementType.TYPE, ElementType.FIELD }) public @interface TextArea {
import java.lang.annotation.Inherited; @Inherited @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )
16,439
package org.livespark.formmodeler.metaModel; <BUG>import java.lang.annotation.ElementType; import java.lang.annotation.RetentionPolicy; @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )</BUG> @java.lang.annotation.Target({ ElementType.TYPE, ElementType.FIELD }) public @interface ListBox {
import java.lang.annotation.Inherited; @Inherited @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )
16,440
package org.livespark.formmodeler.metaModel; <BUG>import java.lang.annotation.ElementType; import java.lang.annotation.RetentionPolicy; @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )</BUG> @java.lang.annotation.Target({ ElementType.TYPE, ElementType.FIELD }) public @interface Slider {
import java.lang.annotation.Inherited; @Inherited @java.lang.annotation.Retention( RetentionPolicy.RUNTIME )
16,441
<BUG>package org.livespark.formmodeler.metaModel; public @interface TextBox {</BUG> String label(); String placeHolder() default ""; int maxLength() default 100;
import java.lang.annotation.Inherited; @Inherited public @interface TextBox {
16,442
import org.spongepowered.api.world.Locatable; import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World; import javax.annotation.Nullable; import java.util.List; <BUG>import java.util.Optional; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG> public class CommandDelete extends FCCommandBase { private static final FlagMapper MAPPER = map -> key -> value -> { map.put(key, value);
import java.util.stream.Stream; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
16,443
.append(Text.of(TextColors.GREEN, "Usage: ")) .append(getUsage(source)) .build()); return CommandResult.empty(); } else if (isIn(REGIONS_ALIASES, parse.args[0])) { <BUG>if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!")); IRegion region = FGManager.getInstance().getRegion(parse.args[1]); </BUG> boolean isWorldRegion = false; if (region == null) {
String regionName = parse.args[1]; IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
16,444
</BUG> isWorldRegion = true; } if (region == null) <BUG>throw new CommandException(Text.of("No region exists with the name \"" + parse.args[1] + "\"!")); if (region instanceof GlobalWorldRegion) { </BUG> throw new CommandException(Text.of("You may not delete the global region!")); }
if (world == null) throw new CommandException(Text.of("No world exists with name \"" + worldName + "\"!")); if (world == null) throw new CommandException(Text.of("Must specify a world!")); region = FGManager.getInstance().getWorldRegion(world, regionName).orElse(null); throw new CommandException(Text.of("No region exists with the name \"" + regionName + "\"!")); if (region instanceof IGlobal) {
16,445
source.getName() + " deleted " + (isWorldRegion ? "world" : "") + "region" ); return CommandResult.success(); } else if (isIn(HANDLERS_ALIASES, parse.args[0])) { if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!")); <BUG>IHandler handler = FGManager.getInstance().gethandler(parse.args[1]); if (handler == null) throw new ArgumentParseException(Text.of("No handler exists with that name!"), parse.args[1], 1); if (handler instanceof GlobalHandler)</BUG> throw new CommandException(Text.of("You may not delete the global handler!"));
Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(parse.args[1]); if (!handlerOpt.isPresent()) IHandler handler = handlerOpt.get(); if (handler instanceof GlobalHandler)
16,446
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix + args) .collect(GuavaCollectors.toImmutableList()); else if (parse.current.index == 1) {
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
16,447
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix + args) .collect(GuavaCollectors.toImmutableList()); else if (parse.current.index == 1) {
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
16,448
@Dependency(id = "foxcore") }, description = "A world protection plugin built for SpongeAPI. Requires FoxCore.", authors = {"gravityfox"}, url = "https://github.com/FoxDenStudio/FoxGuard") <BUG>public final class FoxGuardMain { public final Cause pluginCause = Cause.builder().named("plugin", this).build(); private static FoxGuardMain instanceField;</BUG> @Inject private Logger logger;
private static FoxGuardMain instanceField;
16,449
private UserStorageService userStorage; private EconomyService economyService = null; private boolean loaded = false; private FCCommandDispatcher fgDispatcher; public static FoxGuardMain instance() { <BUG>return instanceField; }</BUG> @Listener public void construct(GameConstructionEvent event) { instanceField = this;
} public static Cause getCause() { return instance().pluginCause; }
16,450
return configDirectory; } public boolean isLoaded() { return loaded; } <BUG>public static Cause getCause() { return instance().pluginCause; }</BUG> public EconomyService getEconomyService() { return economyService;
[DELETED]
16,451
import org.spongepowered.api.world.Locatable; import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World; import javax.annotation.Nullable; import java.util.*; <BUG>import java.util.stream.Collectors; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG> public class CommandHere extends FCCommandBase { private static final String[] PRIORITY_ALIASES = {"priority", "prio", "p"}; private static final FlagMapper MAPPER = map -> key -> value -> {
import java.util.stream.Stream; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
16,452
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix + args) .collect(GuavaCollectors.toImmutableList()); else if (parse.current.index > 0) {
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
16,453
private static FGStorageManager instance; private final Logger logger = FoxGuardMain.instance().getLogger();</BUG> private final Set<LoadEntry> loaded = new HashSet<>(); private final Path directory = getDirectory(); private final Map<String, Path> worldDirectories; <BUG>private FGStorageManager() { defaultModifiedMap = new CacheMap<>((k, m) -> {</BUG> if (k instanceof IFGObject) { m.put((IFGObject) k, true); return true;
public final HashMap<IFGObject, Boolean> defaultModifiedMap; private final UserStorageService userStorageService; private final Logger logger = FoxGuardMain.instance().getLogger(); userStorageService = FoxGuardMain.instance().getUserStorage(); defaultModifiedMap = new CacheMap<>((k, m) -> {
16,454
String name = fgObject.getName(); Path singleDir = dir.resolve(name.toLowerCase()); </BUG> boolean shouldSave = fgObject.shouldSave(); if (force || shouldSave) { <BUG>logger.info((shouldSave ? "S" : "Force s") + "aving handler \"" + name + "\" in directory: " + singleDir); </BUG> constructDirectory(singleDir); try { fgObject.save(singleDir);
UUID owner = fgObject.getOwner(); boolean isOwned = !owner.equals(SERVER_UUID); Optional<User> userOwner = userStorageService.get(owner); String logName = (userOwner.isPresent() ? userOwner.get().getName() + ":" : "") + (isOwned ? owner + ":" : "") + name; if (fgObject.autoSave()) { Path singleDir = serverDir.resolve(name.toLowerCase()); logger.info((shouldSave ? "S" : "Force s") + "aving handler " + logName + " in directory: " + singleDir);
16,455
if (fgObject.autoSave()) { Path singleDir = dir.resolve(name.toLowerCase()); </BUG> boolean shouldSave = fgObject.shouldSave(); if (force || shouldSave) { <BUG>logger.info((shouldSave ? "S" : "Force s") + "aving world region \"" + name + "\" in directory: " + singleDir); </BUG> constructDirectory(singleDir); try { fgObject.save(singleDir);
Path singleDir = serverDir.resolve(name.toLowerCase()); logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir);
16,456
public synchronized void loadRegionLinks() { logger.info("Loading region links"); try (DB mainDB = DBMaker.fileDB(directory.resolve("regions.foxdb").normalize().toString()).make()) { Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen(); linksMap.entrySet().forEach(entry -> { <BUG>IRegion region = FGManager.getInstance().getRegion(entry.getKey()); if (region != null) { logger.info("Loading links for region \"" + region.getName() + "\"");</BUG> String handlersString = entry.getValue();
Optional<IRegion> regionOpt = FGManager.getInstance().getRegion(entry.getKey()); if (regionOpt.isPresent()) { IRegion region = regionOpt.get(); logger.info("Loading links for region \"" + region.getName() + "\"");
16,457
public synchronized void loadWorldRegionLinks(World world) { logger.info("Loading world region links for world \"" + world.getName() + "\""); try (DB mainDB = DBMaker.fileDB(worldDirectories.get(world.getName()).resolve("wregions.foxdb").normalize().toString()).make()) { Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen(); linksMap.entrySet().forEach(entry -> { <BUG>IRegion region = FGManager.getInstance().getWorldRegion(world, entry.getKey()); if (region != null) { logger.info("Loading links for world region \"" + region.getName() + "\"");</BUG> String handlersString = entry.getValue();
Optional<IWorldRegion> regionOpt = FGManager.getInstance().getWorldRegion(world, entry.getKey()); if (regionOpt.isPresent()) { IWorldRegion region = regionOpt.get(); logger.info("Loading links for world region \"" + region.getName() + "\"");
16,458
StringBuilder builder = new StringBuilder(); for (Iterator<IHandler> it = handlers.iterator(); it.hasNext(); ) { builder.append(it.next().getName()); if (it.hasNext()) builder.append(","); } <BUG>return builder.toString(); }</BUG> private final class LoadEntry { public final String name; public final Type type;
public enum Type { REGION, WREGION, HANDLER
16,459
.autoCloseQuotes(true) .leaveFinalAsIs(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "worldregion", "handler", "controller").stream() </BUG> .filter(new StartsWithPredicate(parse.current.token)) .collect(GuavaCollectors.toImmutableList()); else if (parse.current.index == 1) {
return Stream.of("region", "worldregion", "handler", "controller")
16,460
HashMap<String, SLelement<Tweet>> adjacencyList = new HashMap<>(); adjacencyList.put("test", test); adjacencyList.put("test2", test2); adjacencyList.put("test4", test4); Bridges<Tweet> bridge = new Bridges<Tweet>(13, "300587042698", "mmehedin@uncc.edu"); <BUG>bridge.setDataStructure("graph", adjacencyList); //set the structure holding the nodes and links i.e. hashmap System.out.println(bridge.getJSON()); bridge.visualize();</BUG> }
bridge.setDataStructure("graphl", adjacencyList); //set the structure holding the nodes and links i.e. Singly linked list bridge.toggleJSONdisplay(); bridge.visualize();
16,461
protected EClass eStaticClass() { return IndicatorsPackage.Literals.QUARTER_LOW_FREQUENCY_INDICATOR; } @Override public IndicatorParameters getParameters() { <BUG>parameters = super.getParameters(); </BUG> if (parameters == null) { parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters(); }
IndicatorParameters parameters = super.getParameters();
16,462
DateParameters dateParameters = parameters.getDateParameters(); if (dateParameters == null) { dateParameters = IndicatorsFactory.eINSTANCE.createDateParameters(); } dateParameters.setDateAggregationType(DateGrain.QUARTER); <BUG>parameters.setDateParameters(dateParameters); return parameters;</BUG> } @Override public boolean handle(Object data) {
this.setParameters(parameters); return parameters;
16,463
protected EClass eStaticClass() { return IndicatorsPackage.Literals.QUARTER_FREQUENCY_INDICATOR; } @Override public IndicatorParameters getParameters() { <BUG>parameters = super.getParameters(); </BUG> if (parameters == null) { parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters(); }
IndicatorParameters parameters = super.getParameters();
16,464
DateParameters dateParameters = parameters.getDateParameters(); if (dateParameters == null) { dateParameters = IndicatorsFactory.eINSTANCE.createDateParameters(); } dateParameters.setDateAggregationType(DateGrain.QUARTER); <BUG>parameters.setDateParameters(dateParameters); return parameters;</BUG> } @Override public boolean handle(Object data) {
this.setParameters(parameters); return parameters;
16,465
protected EClass eStaticClass() { return IndicatorsPackage.Literals.DATE_FREQUENCY_INDICATOR; } @Override public IndicatorParameters getParameters() { <BUG>parameters = super.getParameters(); </BUG> if (parameters == null) { parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters(); }
IndicatorParameters parameters = super.getParameters();
16,466
DateParameters dateParameters = parameters.getDateParameters(); if (dateParameters == null) { dateParameters = IndicatorsFactory.eINSTANCE.createDateParameters(); } dateParameters.setDateAggregationType(DateGrain.DAY); <BUG>parameters.setDateParameters(dateParameters); return parameters;</BUG> } @Override public boolean handle(Object data) {
this.setParameters(parameters); return parameters;
16,467
protected EClass eStaticClass() { return IndicatorsPackage.Literals.DATE_LOW_FREQUENCY_INDICATOR; } @Override public IndicatorParameters getParameters() { <BUG>parameters = super.getParameters(); </BUG> if (parameters == null) { parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters(); }
IndicatorParameters parameters = super.getParameters();
16,468
DateParameters dateParameters = parameters.getDateParameters(); if (dateParameters == null) { dateParameters = IndicatorsFactory.eINSTANCE.createDateParameters(); } dateParameters.setDateAggregationType(DateGrain.DAY); <BUG>parameters.setDateParameters(dateParameters); return parameters;</BUG> } @Override public boolean handle(Object data) {
this.setParameters(parameters); return parameters;
16,469
protected EClass eStaticClass() { return IndicatorsPackage.Literals.YEAR_FREQUENCY_INDICATOR; } @Override public IndicatorParameters getParameters() { <BUG>parameters = super.getParameters(); </BUG> if (parameters == null) { parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters(); }
IndicatorParameters parameters = super.getParameters();
16,470
DateParameters dateParameters = parameters.getDateParameters(); if (dateParameters == null) { dateParameters = IndicatorsFactory.eINSTANCE.createDateParameters(); } dateParameters.setDateAggregationType(DateGrain.YEAR); <BUG>parameters.setDateParameters(dateParameters); return parameters;</BUG> } @Override public boolean handle(Object data) {
this.setParameters(parameters); return parameters;
16,471
protected EClass eStaticClass() { return IndicatorsPackage.Literals.MONTH_FREQUENCY_INDICATOR; } @Override public IndicatorParameters getParameters() { <BUG>parameters = super.getParameters(); </BUG> if (parameters == null) { parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters(); }
IndicatorParameters parameters = super.getParameters();
16,472
DateParameters dateParameters = parameters.getDateParameters(); if (dateParameters == null) { dateParameters = IndicatorsFactory.eINSTANCE.createDateParameters(); } dateParameters.setDateAggregationType(DateGrain.MONTH); <BUG>parameters.setDateParameters(dateParameters); return parameters;</BUG> } @Override public boolean handle(Object data) {
this.setParameters(parameters); return parameters;
16,473
protected EClass eStaticClass() { return IndicatorsPackage.Literals.WEEK_FREQUENCY_INDICATOR; } @Override public IndicatorParameters getParameters() { <BUG>parameters = super.getParameters(); </BUG> if (parameters == null) { parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters(); }
IndicatorParameters parameters = super.getParameters();
16,474
DateParameters dateParameters = parameters.getDateParameters(); if (dateParameters == null) { dateParameters = IndicatorsFactory.eINSTANCE.createDateParameters(); } dateParameters.setDateAggregationType(DateGrain.WEEK); <BUG>parameters.setDateParameters(dateParameters); return parameters;</BUG> } @Override public boolean handle(Object data) {
this.setParameters(parameters); return parameters;
16,475
protected EClass eStaticClass() { return IndicatorsPackage.Literals.MONTH_LOW_FREQUENCY_INDICATOR; } @Override public IndicatorParameters getParameters() { <BUG>parameters = super.getParameters(); </BUG> if (parameters == null) { parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters(); }
IndicatorParameters parameters = super.getParameters();
16,476
DateParameters dateParameters = parameters.getDateParameters(); if (dateParameters == null) { dateParameters = IndicatorsFactory.eINSTANCE.createDateParameters(); } dateParameters.setDateAggregationType(DateGrain.MONTH); <BUG>parameters.setDateParameters(dateParameters); return parameters;</BUG> } @Override public boolean handle(Object data) {
this.setParameters(parameters); return parameters;
16,477
protected EClass eStaticClass() { return IndicatorsPackage.Literals.WEEK_LOW_FREQUENCY_INDICATOR; } @Override public IndicatorParameters getParameters() { <BUG>parameters = super.getParameters(); </BUG> if (parameters == null) { parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters(); }
IndicatorParameters parameters = super.getParameters();
16,478
DateParameters dateParameters = parameters.getDateParameters(); if (dateParameters == null) { dateParameters = IndicatorsFactory.eINSTANCE.createDateParameters(); } dateParameters.setDateAggregationType(DateGrain.WEEK); <BUG>parameters.setDateParameters(dateParameters); return parameters;</BUG> } @Override public boolean handle(Object data) {
this.setParameters(parameters); return parameters;
16,479
package org.teachingextensions.WindowUtils; <BUG>import java.awt.BasicStroke; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; </BUG> import java.awt.geom.AffineTransform;
import org.teachingextensions.approvals.lite.util.ObjectUtils; import org.teachingextensions.logo.Turtle; import org.teachingextensions.logo.Turtle.Animals; import org.teachingextensions.logo.utils.ColorUtils.PenColors; import org.teachingextensions.logo.utils.LineAndShapeUtils.LineSegment; import java.awt.*;
16,480
</BUG> import java.awt.geom.AffineTransform; import java.awt.geom.Line2D; import java.util.ArrayList; import java.util.List; <BUG>import org.teachingextensions.approvals.lite.util.ObjectUtils; import org.teachingextensions.logo.Turtle; import org.teachingextensions.logo.Turtle.Animals; import org.teachingextensions.logo.utils.ColorUtils.PenColors; import org.teachingextensions.logo.utils.InterfaceUtils.TkpPanel; import org.teachingextensions.logo.utils.LineAndShapeUtils.LineSegment;</BUG> public class MultiTurtleWindow extends TurtlePanel
package org.teachingextensions.WindowUtils; import org.teachingextensions.logo.utils.LineAndShapeUtils.LineSegment; import java.awt.*;
16,481
import java.util.Locale; import java.util.Map; import java.util.TreeMap; public class DependencyConvergenceReport extends AbstractProjectInfoReport <BUG>{ private List reactorProjects; private static final int PERCENTAGE = 100;</BUG> public String getOutputName() {
private static final int PERCENTAGE = 100; private static final List SUPPORTED_FONT_FAMILY_NAMES = Arrays.asList( GraphicsEnvironment .getLocalGraphicsEnvironment().getAvailableFontFamilyNames() );
16,482
sink.section1(); sink.sectionTitle1(); sink.text( getI18nString( locale, "title" ) ); sink.sectionTitle1_(); Map dependencyMap = getDependencyMap(); <BUG>generateLegend( locale, sink ); generateStats( locale, sink, dependencyMap ); generateConvergence( locale, sink, dependencyMap ); sink.section1_();</BUG> sink.body_();
sink.lineBreak(); sink.section1_();
16,483
Iterator it = artifactMap.keySet().iterator(); while ( it.hasNext() ) { String version = (String) it.next(); sink.tableRow(); <BUG>sink.tableCell(); sink.text( version );</BUG> sink.tableCell_(); sink.tableCell(); generateVersionDetails( sink, artifactMap, version );
sink.tableCell( String.valueOf( cellWidth ) + "px" ); sink.text( version );
16,484
sink.tableCell(); sink.text( getI18nString( locale, "legend.shared" ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableCell(); iconError( sink );</BUG> sink.tableCell_(); sink.tableCell(); sink.text( getI18nString( locale, "legend.different" ) );
sink.tableCell( "15px" ); // according /images/icon_error_sml.gif iconError( sink );
16,485
sink.tableCaption(); sink.text( getI18nString( locale, "stats.caption" ) ); sink.tableCaption_();</BUG> sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.subprojects" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); sink.tableCell_();
sink.bold(); sink.bold_(); sink.tableCaption_(); sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.subprojects" ) ); sink.tableHeaderCell_();
16,486
sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.dependencies" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( depCount ) );
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.dependencies" ) ); sink.tableHeaderCell_();
16,487
sink.text( String.valueOf( convergence ) + "%" ); sink.bold_(); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); if ( convergence >= PERCENTAGE && snapshotCount <= 0 )
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.readyrelease" ) ); sink.tableHeaderCell_();
16,488
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
16,489
public static boolean debugMode = false; @ModConfigProperty(category = "Debug", name = "debugModeGOTG", comment = "Enable/Disable Debug Mode for the Gift Of The Gods") public static boolean debugModeGOTG = false; @ModConfigProperty(category = "Debug", name = "debugModeEnchantments", comment = "Enable/Disable Debug Mode for the Enchantments") public static boolean debugModeEnchantments = false; <BUG>@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable The ArmorPlus Sword's Recipes") public static boolean enableSwordsRecipes = true; @ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable The ArmorPlus Battle Axes's Recipes") public static boolean enableBattleAxesRecipes = true; @ModConfigProperty(category = "Weapons", name = "enableBowsRecipes", comment = "Enable/Disable The ArmorPlus Bows's Recipes") public static boolean enableBowsRecipes = true; @ModConfigProperty(category = "Armors.SuperStarArmor.Effects", name = "enableSuperStarHRegen", comment = "Enable/Disable The Super Star Helmet Regeneration") </BUG> public static boolean enableSuperStarHRegen = true;
@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable ArmorPlus Sword's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable ArmorPlus Battle Axes's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBowsRecipes", comment = "Enable/Disable ArmorPlus Bows's Recipes")
16,490
return resolveMenuAndItem(menuItemName, subMenu != null ? subMenu.getName() : null, subMenu, mapNames); } public MenuAndItemLookup resolveMenuAndItem(String menuItemName, String subMenuName, ModelSubMenu subMenu, boolean mapNames) { if (subMenu == null) { // top menu String mappedMenuItemName = mapNames ? this.getMappedMenuItemName(menuItemName) : menuItemName; <BUG>ModelMenuItem menuItem = getMenuItemByName(mappedMenuItemName); // NOTE: DEFAULT and NONE should return null here if (menuItem == null && !ModelMenuItem.NONE_MENU_ITEM_NAME.equals(mappedMenuItemName) && UtilValidate.isNotEmpty(getDefaultMenuItemName())) { mappedMenuItemName = getDefaultMenuItemName();</BUG> menuItem = getMenuItemByName(mappedMenuItemName); }
ModelMenuItem menuItem = getMenuItemByName(mappedMenuItemName); if (menuItem == null && UtilValidate.isNotEmpty(getDefaultMenuItemName())) { mappedMenuItemName = getDefaultMenuItemName();
16,491
return new MenuAndItemLookup(subMenu.getParentMenuItem().getParentSubMenu(), subMenu.getParentMenuItem(), subMenuName, mappedMenuItemName); } else { return new MenuAndItemLookup(subMenu, subMenu.getParentMenuItem(), subMenuName, mappedMenuItemName); } } else { <BUG>ModelMenuItem menuItem = subMenu.getMenuItemByName(mappedMenuItemName); // NOTE: DEFAULT and NONE should return null here if (menuItem == null && !ModelMenuItem.NONE_MENU_ITEM_NAME.equals(mappedMenuItemName) && UtilValidate.isNotEmpty(subMenu.getDefaultMenuItemName())) { mappedMenuItemName = subMenu.getDefaultMenuItemName();</BUG> if (ModelMenuItem.parentMenuItemNames.contains(mappedMenuItemName)) { if (ModelMenuItem.PARENT_NOSUB_MENU_ITEM_NAME.equals(mappedMenuItemName)) {
ModelMenuItem menuItem = subMenu.getMenuItemByName(mappedMenuItemName); if (menuItem == null && UtilValidate.isNotEmpty(subMenu.getDefaultMenuItemName())) { mappedMenuItemName = subMenu.getDefaultMenuItemName();
16,492
return namesList; } public static Set<String> readMenuItemNamesSet(String namesStr) { return new HashSet<>(readMenuItemNamesList(namesStr)); } <BUG>public String getMappedMenuItemName(String origMenuItemName) { String menuItemName = ModelMenuItem.getNoneMenuItemNameAsConstant(origMenuItemName); </BUG> String res = this.menuItemNameAliasMap.get(menuItemName);
public String getMappedMenuItemName(String menuItemName) { menuItemName = ModelMenuItem.getNoneMenuItemNameAsConstant(menuItemName);
16,493
String menuItemName = ModelMenuItem.getNoneMenuItemNameAsConstant(origMenuItemName); </BUG> String res = this.menuItemNameAliasMap.get(menuItemName); if (UtilValidate.isNotEmpty(res)) { if (ModelMenuItem.parentMenuItemNames.contains(res)) { // don't support PARENT-XXX in top menu <BUG>return origMenuItemName; </BUG> } else { return res; }
return namesList; public static Set<String> readMenuItemNamesSet(String namesStr) { return new HashSet<>(readMenuItemNamesList(namesStr)); public String getMappedMenuItemName(String menuItemName) { menuItemName = ModelMenuItem.getNoneMenuItemNameAsConstant(menuItemName); return menuItemName;
16,494
static final String PROJECT_FILE_STORAGE = "$" + PROJECT_FILE_MACRO + "$"; static final String WS_FILE_STORAGE = "$" + WS_FILE_MACRO + "$"; static final String DEFAULT_STATE_STORAGE = PROJECT_FILE_STORAGE; static final Storage DEFAULT_STORAGE_ANNOTATION = new MyStorage(); private static int originalVersion = -1; <BUG>private StorageScheme myScheme = StorageScheme.DEFAULT; ProjectStoreImpl(final ProjectEx project) {</BUG> super(project); myProject = project; }
private String myCachedLocation; ProjectStoreImpl(final ProjectEx project) {
16,495
if (file == null) return null; return LocalFileSystem.getInstance() .findFileByIoFile(myScheme == StorageScheme.DEFAULT ? file.getParentFile() : file.getParentFile().getParentFile()); } @Nullable <BUG>public String getLocation() { if (myScheme == StorageScheme.DEFAULT) { return getProjectFilePath(); }</BUG> else {
if (myCachedLocation == null) { myCachedLocation = getProjectFilePath();
16,496
if (myScheme == StorageScheme.DEFAULT) { return getProjectFilePath(); }</BUG> else { final VirtualFile baseDir = getProjectBaseDir(); <BUG>return baseDir == null ? null : baseDir.getPath(); } }</BUG> @NotNull
myCachedLocation = getProjectFilePath(); myCachedLocation = baseDir == null ? null : baseDir.getPath(); return myCachedLocation;
16,497
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
16,498
final int lineStride = dst.getScanlineStride(); final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final byte[][] data = dst.getByteDataArrays(); final float[] warpData = new float[2 * dstWidth]; <BUG>int lineOffset = 0; if (ctable == null) { // source does not have IndexColorModel if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset;
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
16,499
pixelOffset += pixelStride; } // COLS LOOP } // ROWS LOOP } } else {// source has IndexColorModel <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
} else if (caseB) { for (int h = 0; h < dstHeight; h++) {
16,500
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding