id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
41,801
private final Map<String, Fare> fares; public Loader(GTFSFeed feed, Map<String, Fare> fares) { super(feed, "fare_rules"); this.fares = fares; } <BUG>@Override public void loadOneRow() throws IOException {</BUG> String fareId = getStringField("fare_id", true); if (!fares.containsKey(fareId)) { this.feed.errors.add(new R...
protected boolean isRequired() { return false; public void loadOneRow() throws IOException {
41,802
t.shape_id = getStringField("shape_id", false); t.bikes_allowed = getIntField("bikes_allowed", false, 0, 2); t.wheelchair_accessible = getIntField("wheelchair_accessible", false, 0, 2); t.feed = feed; t.feed_id = feed.feedId; <BUG>feed.trips.put(t.trip_id, t); }</BUG> } public static class Writer extends Entit...
getRefField("service_id", true, feed.services); getRefField("route_id", true, feed.routes);
41,803
public String service_id; public static class Loader extends Entity.Loader<Calendar> { private final Map<String, Service> services; public Loader(GTFSFeed feed, Map<String, Service> services) { super(feed, "calendar"); <BUG>this.services = services; }</BUG> @Override public void loadOneRow() throws IOException { String...
} protected boolean isRequired() { return true; }
41,804
import com.conveyal.gtfs.error.EmptyFieldError; import com.conveyal.gtfs.error.MissingColumnError; import com.conveyal.gtfs.error.MissingTableError; import com.conveyal.gtfs.error.NumberParseError; import com.conveyal.gtfs.error.RangeError; <BUG>import com.conveyal.gtfs.error.ReferentialIntegrityError; import com.conve...
import com.conveyal.gtfs.error.TableInSubdirectoryError; import com.conveyal.gtfs.error.TimeParseError;
41,805
import java.io.Serializable; import java.net.MalformedURLException; import java.net.URL; import java.nio.charset.Charset; import java.time.LocalDate; <BUG>import java.time.format.DateTimeFormatter; import java.util.Iterator;</BUG> import java.util.Locale; import java.util.Map; import java.util.Set;
import java.util.Enumeration; import java.util.Iterator;
41,806
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceFo...
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
41,807
package com.cronutils.model.time.generator; import java.util.Collections; <BUG>import java.util.List; import org.apache.commons.lang3.Validate;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.expression.FieldExpression; public abstract class FieldValueGenerator {
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
41,808
import java.util.ResourceBundle; import java.util.function.Function;</BUG> class DescriptionStrategyFactory { private DescriptionStrategyFactory() {} public static DescriptionStrategy daysOfWeekInstance(final ResourceBundle bundle, final FieldExpression expression) { <BUG>final Function<Integer, String> nominal = integ...
import java.util.function.Function; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On; final Function<Integer, String> nominal = integer -> DayOfWeek.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale());
41,809
return dom; } public static DescriptionStrategy monthsInstance(final ResourceBundle bundle, final FieldExpression expression) { return new NominalDescriptionStrategy( bundle, <BUG>integer -> new DateTime().withMonthOfYear(integer).monthOfYear().getAsText(bundle.getLocale()), expression</BUG> ); } public static Descript...
integer -> Month.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale()), expression
41,810
<BUG>package com.cronutils.model.time.generator; import com.cronutils.mapper.WeekDay;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.constraint.FieldConstraintsBuilder;
import java.time.LocalDate; import java.util.Collections; import java.util.List; import java.util.Set; import org.apache.commons.lang3.Validate; import com.cronutils.mapper.WeekDay;
41,811
import com.cronutils.model.field.expression.Between; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.parser.CronParserField; import com.google.common.collect.Lists; import com.google.common.collect.Sets; <BUG>import org.apache.commons.lang3.Validate; import org.joda.time.DateTime; impo...
[DELETED]
41,812
<BUG>package com.cronutils.model.time.generator; import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On;
import java.time.DayOfWeek; import java.time.LocalDate; import java.util.List; import org.apache.commons.lang3.Validate; import com.cronutils.model.field.CronField;
41,813
import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On; import com.google.common.collect.Lists; <BUG>import org.apache.commons.lang3.Validate; import org.joda.time.DateT...
package com.cronutils.model.time.generator; import java.time.DayOfWeek; import java.time.LocalDate; import java.util.List; import com.cronutils.model.field.CronField;
41,814
class OnDayOfMonthValueGenerator extends FieldValueGenerator { private int year; private int month; public OnDayOfMonthValueGenerator(CronField cronField, int year, int month) { super(cronField); <BUG>Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of month"); ...
Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of" + " month"); this.year = year;
41,815
package com.cronutils.mapper; public class ConstantsMapper { private ConstantsMapper() {} public static final WeekDay QUARTZ_WEEK_DAY = new WeekDay(2, false); <BUG>public static final WeekDay JODATIME_WEEK_DAY = new WeekDay(1, false); </BUG> public static final WeekDay CRONTAB_WEEK_DAY = new WeekDay(1, true); public st...
public static final WeekDay JAVA8 = new WeekDay(1, false);
41,816
return nextMatch; } catch (NoSuchValueException e) { throw new IllegalArgumentException(e); } } <BUG>DateTime nextClosestMatch(DateTime date) throws NoSuchValueException { </BUG> List<Integer> year = yearsValueGenerator.generateCandidates(date.getYear(), date.getYear()); TimeNode days = null; int lowestMonth = months.g...
ZonedDateTime nextClosestMatch(ZonedDateTime date) throws NoSuchValueException {
41,817
boolean questionMarkSupported = cronDefinition.getFieldDefinition(DAY_OF_WEEK).getConstraints().getSpecialChars().contains(QUESTION_MARK); if(questionMarkSupported){ return new TimeNode( generateDayCandidatesQuestionMarkSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefini...
date.getYear(), date.getMonthValue(),
41,818
) ); }else{ return new TimeNode( generateDayCandidatesQuestionMarkNotSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefinition.getFieldDefinition(DAY_OF_WEEK) ).getMondayDoWValue()
date.getYear(), date.getMonthValue(),
41,819
} public DateTime lastExecution(DateTime date){ </BUG> Validate.notNull(date); try { <BUG>DateTime previousMatch = previousClosestMatch(date); </BUG> if(previousMatch.equals(date)){ previousMatch = previousClosestMatch(date.minusSeconds(1)); }
public java.time.Duration timeToNextExecution(ZonedDateTime date){ return java.time.Duration.between(date, nextExecution(date)); public ZonedDateTime lastExecution(ZonedDateTime date){ ZonedDateTime previousMatch = previousClosestMatch(date);
41,820
return previousMatch; } catch (NoSuchValueException e) { throw new IllegalArgumentException(e); } } <BUG>public Duration timeFromLastExecution(DateTime date){ return new Interval(lastExecution(date), date).toDuration(); } public boolean isMatch(DateTime date){ </BUG> return nextExecution(lastExecution(date)).equals(da...
[DELETED]
41,821
<BUG>package com.cronutils.model.time.generator; import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.expression.Every; import com.cronutils.model.field.expression.FieldExpression; import com.google.common.annotations.VisibleForTesting;
import java.time.ZonedDateTime; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.cronutils.model.field.CronField;
41,822
import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.expression.Every; import com.cronutils.model.field.expression.FieldExpression; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Lists; <BUG>import org.joda.time.DateTime; import org.slf4j.Logger; i...
package com.cronutils.model.time.generator; import java.time.ZonedDateTime; import java.util.List; import com.cronutils.model.field.CronField;
41,823
private static final Logger log = LoggerFactory.getLogger(EveryFieldValueGenerator.class); public EveryFieldValueGenerator(CronField cronField) { super(cronField); log.trace(String.format( "processing \"%s\" at %s", <BUG>cronField.getExpression().asString(), DateTime.now() </BUG> )); } @Override
cronField.getExpression().asString(), ZonedDateTime.now()
41,824
import java.util.Iterator; import java.util.List; import org.sonatype.nexus.maven.staging.deploy.strategy.DeployPerModuleRequest; import org.sonatype.nexus.maven.staging.deploy.strategy.DeployStrategy; import org.sonatype.nexus.maven.staging.deploy.strategy.FinalizeDeployRequest; <BUG>import org.sonatype.nexus.maven.st...
import org.sonatype.nexus.maven.staging.remote.Parameters;
41,825
if (!isPomArtifact) { artifact.addMetadata(new ProjectArtifactMetadata(artifact, pomFile)); } if (updateReleaseInfo) { artifact.setRelease(true); <BUG>} try {</BUG> if (isPomArtifact) { deployables.add(new DeployableArtifact(pomFile, artifact)); }
final DeployStrategy deployStrategy; try {
41,826
"Artifacts locally gathered under directory " + getWorkDirectoryRoot().getAbsolutePath() + ", skipping remote staging at user's demand."); return; } try { <BUG>final FinalizeDeployRequest request = new FinalizeDeployRequest(getMavenSession(), parameters); deployStrategy.finalizeDeploy(request);</BUG> } catch (ArtifactD...
final FinalizeDeployRequest request = new FinalizeDeployRequest(); deployStrategy.finalizeDeploy(request);
41,827
package org.sonatype.nexus.maven.staging.deploy; import org.sonatype.nexus.maven.staging.deploy.strategy.DeployStrategy; import org.sonatype.nexus.maven.staging.deploy.strategy.FinalizeDeployRequest; <BUG>import org.sonatype.nexus.maven.staging.deploy.strategy.Parameters; </BUG> import org.sonatype.nexus.maven.staging....
import org.sonatype.nexus.maven.staging.remote.Parameters;
41,828
package org.sonatype.nexus.maven.staging.deploy; import java.util.Map; import org.sonatype.nexus.maven.staging.AbstractStagingMojo; import org.sonatype.nexus.maven.staging.deploy.strategy.DeployStrategy; <BUG>import org.sonatype.nexus.maven.staging.deploy.strategy.Parameters; import org.sonatype.nexus.maven.staging.de...
import org.sonatype.nexus.maven.staging.remote.Parameters;
41,829
private boolean keepStagingRepositoryOnFailure; @Parameter(property = "skipStagingRepositoryClose") private boolean skipStagingRepositoryClose; @Parameter(property = "skipStaging") private boolean skipStaging; <BUG>protected DeployStrategy getDeployStrategy(final String key) </BUG> throws MojoExecutionException { final...
protected DeployStrategy getDeployStrategy(final String key, final Parameters parameters)
41,830
import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; <BUG>import com.google.common.base.Preconditions; import com.google.common.base.Strings;</BUG> import com.google.common.io.Closeables; import org.apache.maven.artif...
import org.sonatype.nexus.maven.staging.remote.Parameters; import com.google.common.base.Strings;
41,831
import org.apache.maven.artifact.versioning.VersionRange; import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.artifact.ProjectArtifactMetadata; import org.codehaus.plexus.component.annotations.Requirement; <BUG>import org.codehaus.plexus...
import static com.google.common.base.Preconditions.checkNotNull; public abstract class AbstractDeployStrategy
41,832
catch (IOException e) { throw new ArtifactInstallationException("Cannot locally stage and maintain the index file!", e); } } private final Pattern indexProps = Pattern.compile("(.*):(.*):(.*):(.*):(.*):(.*):(.*):(.*)"); <BUG>protected void deployUp(final MavenSession mavenSession, final File sourceDirectory, final Arti...
protected void deployUp(final File sourceDirectory, final ArtifactRepository remoteRepository)
41,833
public static class FakeArtifactHandler extends DefaultArtifactHandler { private final String extension; public FakeArtifactHandler(final String type, final String extension) { <BUG>super(Preconditions.checkNotNull(type)); this.extension = Preconditions.checkNotNull(extension); }</BUG> @Override public String getExtens...
super(checkNotNull(type)); this.extension = checkNotNull(extension); }
41,834
@Override public String getExtension() { return extension; } } <BUG>protected ArtifactRepository getDeploymentRepository(final MavenSession mavenSession) throws MojoExecutionException</BUG> { final ArtifactRepository repo = mavenSession.getCurrentProject().getDistributionManagementArtifactRepository(); if (repo == null...
protected ArtifactRepository getDeploymentRepository() throws MojoExecutionException
41,835
final TypeSpec deleteEndClass = buildDeleteEndClass(signature, lastSignature, hasCounter); partitionKeysWhereClasses.addAll(clusteringColsWhereClasses); partitionKeysWhereClasses.add(deleteEndClass); return partitionKeysWhereClasses; } <BUG>default List<TypeSpec> buildWhereClassesForStatic(EntityMetaSignature signature...
public List<TypeSpec> buildWhereClassesForStatic(EntityMetaSignature signature) {
41,836
final List<TypeSpec> partitionKeysWhereClasses = buildWhereClassesForPartitionKeys(partitionKeys, classesSignature, false); final TypeSpec deleteEndClass = buildDeleteEndClass(signature, lastSignature, hasCounter); partitionKeysWhereClasses.add(deleteEndClass); return partitionKeysWhereClasses; } <BUG>default TypeSpec ...
public TypeSpec buildDeleteEndClass(EntityMetaSignature signature,
41,837
classesSignature, hasClusterings); typeSpecs.add(0, typeSpec); return typeSpecs; } } <BUG>default TypeSpec buildDeleteWhereForPartitionKey(FieldSignatureInfo partitionInfo, </BUG> ClassSignatureInfo classSignature, ClassSignatureInfo nextSignature, boolean hasClusterings) {
public TypeSpec buildDeleteWhereForPartitionKey(FieldSignatureInfo partitionInfo,
41,838
final List<TypeSpec> typeSpecs = buildWhereClassesForClusteringColumns(clusteringCols, classesSignature); typeSpecs.add(0, currentType); return typeSpecs; } } <BUG>default TypeSpec buildDeleteWhereForClusteringColumn(FieldSignatureInfo clusteringColumnInfo, </BUG> ClassSignatureInfo classSignature, ClassSignatureInfo n...
public TypeSpec buildDeleteWhereForClusteringColumn(FieldSignatureInfo clusteringColumnInfo,
41,839
builder.addMethod(buildAllColumns(deleteFromTypeName, DELETE_WHERE, "delete")); builder.addMethod(buildAllColumnsWithSchemaProvider(deleteFromTypeName, DELETE_WHERE, "delete")); deleteWhereDSLCodeGen.buildWhereClasses(signature).forEach(builder::addType); return builder.build(); } <BUG>default TypeSpec buildDeleteStati...
public TypeSpec buildDeleteStaticClass(EntityMetaSignature signature, DeleteWhereDSLCodeGen deleteWhereDSLCodeGen) {
41,840
.addParameter(metaClassType, "meta") .addStatement("super(rte)") .addStatement("this.meta = meta") .build(); } <BUG>default TypeSpec buildDeleteColumns(EntityMetaSignature signature, </BUG> String deleteColumnClass, TypeName deleteColumnsTypeName, TypeName deleteFromTypeName,
public TypeSpec buildDeleteColumns(EntityMetaSignature signature,
41,841
.forEach(x -> builder.addMethod(buildDeleteColumnMethod(deleteColumnsTypeName, x, ReturnType.THIS))); builder.addMethod(buildFrom(deleteFromTypeName, DELETE_WHERE, "deleteColumns")); builder.addMethod(buildFromWithSchemaProvider(deleteFromTypeName, DELETE_WHERE, "deleteColumns")); return builder.build(); } <BUG>default...
public TypeSpec buildDeleteFrom(EntityMetaSignature signature,
41,842
.addStatement("return new $T(where)", deleteWhereTypeName) .returns(deleteWhereTypeName) .build()) .build(); } <BUG>default MethodSpec buildDeleteColumnMethod(TypeName deleteTypeName, FieldMetaSignature parsingResult, ReturnType returnType) { </BUG> final MethodSpec.Builder builder = MethodSpec.methodBuilder(parsingRes...
public MethodSpec buildDeleteColumnMethod(TypeName deleteTypeName, FieldMetaSignature parsingResult, ReturnType returnType) {
41,843
final ClassName abstractEndType = classSignatureParams.abstractEndType.orElse(classSignatureParams.abstractWhereType); signatures.add(ClassSignatureInfo.of(endTypeName, endReturnTypeName, genericType(abstractEndType, endReturnTypeName, signature.entityRawClass), endClassName)); return signatures; } <BUG>default MethodS...
public MethodSpec buildWhereConstructor(TypeName whereType) {
41,844
.addModifiers(Modifier.PUBLIC) .addParameter(whereType, "where") .addStatement("super(where)") .build(); } <BUG>default MethodSpec buildColumnRelation(String relation, TypeName nextType, FieldSignatureInfo fieldInfo) { final String methodName = fieldInfo.fieldName + "_" + upperCaseFirst(relation); final MethodSpec.Bu...
public MethodSpec buildColumnRelation(String relation, TypeName nextType, FieldSignatureInfo fieldInfo, FieldNamePrefix fieldNamePrefix) { final String methodName = fieldNamePrefix == FieldNamePrefix.YES ? fieldInfo.fieldName + "_" + upperCaseFirst(relation) : upperCaseFirst(relation); final MethodSpec.Builder builder ...
41,845
.addStatement("boundValues.add($N)", fieldInfo.fieldName) .addStatement("encodedValues.add(meta.$L.encodeFromJava($N))", fieldInfo.fieldName, fieldInfo.fieldName) .returns(nextType); return builder.addStatement("return new $T(where)", nextType).build(); } <BUG>default MethodSpec buildColumnInVarargs(TypeName nextType, ...
public MethodSpec buildColumnInVarargs(TypeName nextType, FieldSignatureInfo fieldInfo, FieldNamePrefix fieldNamePrefix) { final String methodName = fieldNamePrefix == FieldNamePrefix.YES ? fieldInfo.fieldName + "_IN" : "IN"; final String param = fieldInfo.fieldName;
41,846
.addStatement("boundValues.add(varargs)") .addStatement("encodedValues.add(encodedVarargs)") .returns(nextType); return builder.addStatement("return new $T(where)", nextType).build(); } <BUG>static MethodSpec buildGetThis(TypeName currentType) { </BUG> return MethodSpec .methodBuilder("getThis") .addAnnotation(Override...
public MethodSpec buildGetThis(TypeName currentType) {
41,847
.addModifiers(Modifier.FINAL, Modifier.PROTECTED) .returns(currentType) .addStatement("return this") .build(); } <BUG>default MethodSpec buildGetMetaInternal(TypeName currentType) { </BUG> return MethodSpec .methodBuilder("getMetaInternal") .addAnnotation(Override.class)
public MethodSpec buildGetMetaInternal(TypeName currentType) {
41,848
.fieldMetaSignatures .stream() .filter(x -> x.context.columnType == ColumnType.COUNTER || x.context.columnType == ColumnType.STATIC_COUNTER) .count() > 0; } <BUG>default FieldSpec buildExactEntityMetaField(EntityMetaSignature signature) { </BUG> String entityMetaClassName = signature.className + META_SUFFIX; TypeName e...
public FieldSpec buildExactEntityMetaField(EntityMetaSignature signature) {
41,849
</BUG> String entityMetaClassName = signature.className + META_SUFFIX; TypeName entityMetaExactType = ClassName.get(ENTITY_META_PACKAGE, entityMetaClassName); return FieldSpec.builder(entityMetaExactType, "meta", Modifier.FINAL, Modifier.PROTECTED).build(); } <BUG>default FieldSpec buildEntityClassField(EntityMetaSigna...
.fieldMetaSignatures .stream() .filter(x -> x.context.columnType == ColumnType.COUNTER || x.context.columnType == ColumnType.STATIC_COUNTER) .count() > 0; public FieldSpec buildExactEntityMetaField(EntityMetaSignature signature) { public FieldSpec buildEntityClassField(EntityMetaSignature signature) {
41,850
whereTypeName, privateFieldName, "unknown_keyspace_for_") .addStatement("return new $T(where)", newTypeName) .returns(newTypeName) .build(); } <BUG>static MethodSpec buildAllColumnsWithSchemaProvider(TypeName newTypeName, TypeName whereTypeName, String privateFieldName) { </BUG> return MethodSpec.methodBuilder("allColu...
public MethodSpec buildAllColumnsWithSchemaProvider(TypeName newTypeName, TypeName whereTypeName, String privateFieldName) {
41,851
.addStatement("final $T where = $L.all().from(currentKeyspace, currentTable).where()", whereTypeName, privateFieldName) .addStatement("return new $T(where)", newTypeName) .returns(newTypeName) .build(); } <BUG>static MethodSpec buildFrom(TypeName newTypeName, TypeName whereTypeName, String privateFieldName) { </BUG> re...
public MethodSpec buildFrom(TypeName newTypeName, TypeName whereTypeName, String privateFieldName) {
41,852
"meta.getTableOrViewName()).where()", whereTypeName, privateFieldName, "unknown_keyspace_for_") .addStatement("return new $T(where)", newTypeName) .returns(newTypeName) .build(); } <BUG>static MethodSpec buildFromWithSchemaProvider(TypeName newTypeName, TypeName whereTypeName, String privateFieldName) { </BUG> return M...
public MethodSpec buildFromWithSchemaProvider(TypeName newTypeName, TypeName whereTypeName, String privateFieldName) {
41,853
.addStatement("final $T where = $L.from(currentKeyspace, currentTable).where()", whereTypeName, privateFieldName) .addStatement("return new $T(where)", newTypeName) .returns(newTypeName) .build(); } <BUG>default List<FieldSignatureInfo> getPartitionKeysSignatureInfo(List<FieldMetaSignature> parsingResults) { </BUG> ret...
public List<FieldSignatureInfo> getPartitionKeysSignatureInfo(List<FieldMetaSignature> parsingResults) {
41,854
.map(x -> Tuple4.of(x.context.fieldName, x.context.cqlColumn, x.sourceType, (PartitionKeyInfo) x.context.columnInfo)) .sorted(TUPLE4_PARTITION_KEY_SORTER) .map(x -> FieldSignatureInfo.of(x._1(), x._2(), x._3())) .collect(toList())); } <BUG>default List<FieldSignatureInfo> getClusteringColsSignatureInfo(List<FieldMetaSi...
public List<FieldSignatureInfo> getClusteringColsSignatureInfo(List<FieldMetaSignature> parsingResults) {
41,855
.map(x -> Tuple4.of(x.context.fieldName, x.context.cqlColumn, x.sourceType, (ClusteringColumnInfo) x.context.columnInfo)) .sorted(TUPLE4_CLUSTERING_COLUMN_SORTER) .map(x -> FieldSignatureInfo.of(x._1(), x._2(), x._3())) .collect(toList())); } <BUG>default void buildLWtConditionMethods(EntityMetaSignature signature, Cla...
public void buildLWtConditionMethods(EntityMetaSignature signature, String parentFQCN, ClassSignatureInfo currentSignature, boolean hasCounter, TypeSpec.Builder parentBuilder) {
41,856
</BUG> .returns(currentType) .build(); } <BUG>default MethodSpec buildLWTNotEqual(FieldSignatureInfo fieldSignatureInfo, TypeName currentType) { String methodName = "if" + upperCaseFirst(fieldSignatureInfo.fieldName) + "_NotEq"; return MethodSpec.methodBuilder(methodName)</BUG> .addJavadoc("Generate an ... <strong>IF...
.addParameter(fieldSignatureInfo.typeName, fieldSignatureInfo.fieldName, Modifier.FINAL) .addStatement("boundValues.add($N)", fieldSignatureInfo.fieldName) .addStatement("encodedValues.add(meta.$L.encodeFromJava($N))", fieldSignatureInfo.fieldName, fieldSignatureInfo.fieldName) .addStatement("where.onlyIf($T.$L($S, $T....
41,857
loadBalancerDatastore.clearBasePath(loadBalancerGroup, path); } } } if (maybeOriginalService.isPresent() && request.getReplaceServiceId().isPresent() && maybeOriginalService.get().getServiceId().equals(request.getReplaceServiceId().get())) { <BUG>lockBasePaths(request.getLoadBalancerService().getLoadBalancerGroups(), r...
lockBasePaths(request.getLoadBalancerService().getLoadBalancerGroups(), request.getLoadBalancerService().getAllPaths(), maybeOriginalService.get().getServiceId());
41,858
private void updateStateDatastore(BaragonRequest request) throws Exception { stateDatastore.updateService(request); try { stateDatastore.incrementStateVersion(); } catch (Exception e) { <BUG>LOG.error(String.format("Error updating state datastore %s", e)); }</BUG> } private void removeOldService(BaragonRequest request,...
LOG.error("Error updating state datastore", e);
41,859
} private void clearBasePathsWithNoUpstreams(BaragonRequest request) { try { if (stateDatastore.getUpstreams(request.getLoadBalancerService().getServiceId()).isEmpty()) { for (String loadBalancerGroup : request.getLoadBalancerService().getLoadBalancerGroups()) { <BUG>if (loadBalancerDatastore.getBasePathServiceId(loadB...
private void deleteRemovedServices(BaragonRequest request) { stateDatastore.removeService(request.getLoadBalancerService().getServiceId()); if (request.getReplaceServiceId().isPresent() && stateDatastore.getService(request.getReplaceServiceId().get()).isPresent()) { stateDatastore.removeService(request.getReplaceServic...
41,860
} } } } } catch (Exception e) { <BUG>LOG.info(String.format("Error clearing base path %s", e)); </BUG> } } private void clearChangedBasePaths(BaragonRequest request, Optional<BaragonService> maybeOriginalService) {
private Optional<BaragonService> getOriginalService(BaragonRequest request) { Optional<BaragonService> maybeOriginalService = Optional.absent(); if (request.getReplaceServiceId().isPresent()) { maybeOriginalService = stateDatastore.getService(request.getReplaceServiceId().get());
41,861
} } private void clearChangedBasePaths(BaragonRequest request, Optional<BaragonService> maybeOriginalService) { <BUG>if (maybeOriginalService.isPresent() && !maybeOriginalService.get().getServiceBasePath().equals(request.getLoadBalancerService().getServiceBasePath())) { for (String loadBalancerGroup : maybeOriginalServ...
updateLastRequestForGroups(request);
41,862
Set<String> removedLbGroups = maybeOriginalService.get().getLoadBalancerGroups(); removedLbGroups.removeAll(request.getLoadBalancerService().getLoadBalancerGroups()); if (!removedLbGroups.isEmpty()) { try { for (String loadBalancerGroup : removedLbGroups) { <BUG>if (loadBalancerDatastore.getBasePathServiceId(loadBalanc...
for (String path : maybeOriginalService.get().getAllPaths()) { if (loadBalancerDatastore.getBasePathServiceId(loadBalancerGroup, path).or("").equals(maybeOriginalService.get().getServiceId())) { loadBalancerDatastore.clearBasePath(loadBalancerGroup, path);
41,863
loadBalancerDatastore.clearBasePath(loadBalancerGroup, path);</BUG> } } } } catch (Exception e) { <BUG>LOG.info(String.format("Error clearing base path %s", e)); </BUG> } } }
Set<String> removedLbGroups = maybeOriginalService.get().getLoadBalancerGroups(); removedLbGroups.removeAll(request.getLoadBalancerService().getLoadBalancerGroups()); if (!removedLbGroups.isEmpty()) { try { for (String loadBalancerGroup : removedLbGroups) { for (String path : maybeOriginalService.get().getAllPaths()) {...
41,864
import java.util.List; import java.util.Map; import java.util.Set; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; <BUG>import javax.validation.constraints.Size; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;</BUG> import com.fasterxml.jackson.annotation.JsonProp...
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
41,865
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...
@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 = "enableBowsR...
41,866
import org.jetbrains.plugins.groovy.lang.psi.GrControlFlowOwner; import org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElement; import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrIfStatement; import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrWhileStatement; import org.jetbrains.plugins.groovy.lan...
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrExpression; import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrUnaryExpression;
41,867
private static boolean isCheckForNull(PsiElement parent, PsiElement element) { if (!(parent instanceof GrBinaryExpression)) return false; final IElementType tokenType = ((GrBinaryExpression)parent).getOperationTokenType(); if (!(tokenType == GroovyTokenTypes.mEQUAL || tokenType == GroovyTokenTypes.mNOT_EQUAL)) return f...
final GrExpression rightOperand = ((GrBinaryExpression)parent).getRightOperand(); return rightOperand != null && GrInspectionUtil.isNull(rightOperand);
41,868
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceFo...
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
41,869
import com.fincatto.nfe310.FabricaDeObjetosFake; import org.junit.Assert; import org.junit.Test; import java.math.BigDecimal; import java.util.ArrayList; <BUG>import java.util.Arrays; import java.util.List;</BUG> public class NFEnviaEventoCancelamentoTest { @Test public void deveObterEventosComoFoiSetado() {
import java.util.Collections; import java.util.List;
41,870
import com.fincatto.nfe310.FabricaDeObjetosFake; import com.fincatto.nfe310.classes.nota.NFNota; import org.junit.Assert; import org.junit.Test; import java.util.ArrayList; <BUG>import java.util.Arrays; import java.util.List;</BUG> public class NFLoteEnvioTest { @Test public void devePermitirNotasComTamanho50() {
import java.util.Collections; import java.util.List;
41,871
public void deveGerarXMLDeAcordoComOPadraoEstabelecido() { final NFLoteEnvio loteEnvio = new NFLoteEnvio(); loteEnvio.setIdLote("333972757970401"); loteEnvio.setVersao("3.10"); loteEnvio.setIndicadorProcessamento(NFLoteIndicadorProcessamento.PROCESSAMENTO_ASSINCRONO); <BUG>loteEnvio.setNotas(Arrays.asList(FabricaDeObje...
loteEnvio.setNotas(Collections.singletonList(FabricaDeObjetosFake.getNFNota()));
41,872
import org.joda.time.DateTime; import org.joda.time.LocalDate; import java.math.BigDecimal; import java.math.BigInteger; import java.util.ArrayList; <BUG>import java.util.Arrays; public class FabricaDeObjetosFake {</BUG> public static NFInformacaoImpostoDevolvido getNFInformacaoImpostoDevolvido() { final NFInformacaoIm...
import java.util.Collections; public class FabricaDeObjetosFake {
41,873
info.setEmitente(FabricaDeObjetosFake.getNFNotaInfoEmitente()); info.setEntrega(FabricaDeObjetosFake.getNFNotaInfoLocal()); info.setExportacao(FabricaDeObjetosFake.getNFNotaInfoExportacao()); info.setIdentificador("89172658591754401086218048846976493475937081"); info.setInformacoesAdicionais(FabricaDeObjetosFake.getNFN...
info.setPessoasAutorizadasDownloadNFe(Collections.singletonList(FabricaDeObjetosFake.getPessoaAutorizadaDownloadNFe()));
41,874
imposto.setValorTotalTributos(new BigDecimal("999999999999.99")); item.setImposto(imposto); item.setNumeroItem(990); item.setProduto(FabricaDeObjetosFake.getProdutoMedicamento()); item.setImpostoDevolvido(FabricaDeObjetosFake.getNFImpostoDevolvido()); <BUG>info.setItens(Arrays.asList(item)); info.setRetirada(FabricaDeO...
info.setItens(Collections.singletonList(item)); info.setRetirada(FabricaDeObjetosFake.getNFNotaInfoLocal());
41,875
identificacao.setFormaPagamento(NFFormaPagamentoPrazo.A_PRAZO); identificacao.setModelo(NFModelo.NFE); identificacao.setNaturezaOperacao("qGYcW8I1iak14NF7vnfc8XpPYkrHWB5J7Vm3eOAe57azf1fVP7vEOY7TrRVQ"); identificacao.setNumeroNota("999999999"); identificacao.setProgramaEmissor(NFProcessoEmissor.CONTRIBUINTE); <BUG>ident...
identificacao.setReferenciadas(Collections.singletonList(referenciada));
41,876
produtoMedicamento.setCfop("1302"); produtoMedicamento.setCodigo("ohVRInAS7jw8LNDP4WWjssSjBHK8nJRERnAeRMcsUokF3YItT93fBto3zZcq"); produtoMedicamento.setCodigoDeBarras("36811963532505"); produtoMedicamento.setCodigoDeBarrasTributavel("36811963532505"); produtoMedicamento.setCampoeValorNota(NFProdutoCompoeValorNota.SIM);...
produtoMedicamento.setDeclaracoesImportacao(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacao()));
41,877
produtoMedicamento.setValorSeguro(new BigDecimal("999999999999.99")); produtoMedicamento.setValorTotalBruto(new BigDecimal("999999999999.99")); produtoMedicamento.setValorUnitario(new BigDecimal("9999999999.9999999999")); produtoMedicamento.setValorUnitarioTributavel(new BigDecimal("9999999999.9999999999")); produtoMed...
produtoMedicamento.setNomeclaturaValorAduaneiroEstatistica(Collections.singletonList("AZ0123"));
41,878
info.setRetirada(FabricaDeObjetosFake.getNFNotaInfoLocal()); info.setTotal(FabricaDeObjetosFake.getNFNotaInfoTotal()); info.setTransporte(FabricaDeObjetosFake.getNFNotaInfoTransporte()); info.setVersao(new BigDecimal("3.10")); <BUG>info.setPessoasAutorizadasDownloadNFe(Arrays.asList(FabricaDeObjetosFake.getPessoaAutori...
info.setPessoasAutorizadasDownloadNFe(Collections.singletonList(FabricaDeObjetosFake.getPessoaAutorizadaDownloadNFe()));
41,879
identificacao.setFormaPagamento(NFFormaPagamentoPrazo.A_PRAZO); identificacao.setModelo(NFModelo.NFE); identificacao.setNaturezaOperacao("qGYcW8I1iak14NF7vnfc8XpPYkrHWB5J7Vm3eOAe57azf1fVP7vEOY7TrRVQ"); identificacao.setNumeroNota("999999999"); identificacao.setProgramaEmissor(NFProcessoEmissor.CONTRIBUINTE); <BUG>ident...
identificacao.setReferenciadas(Collections.singletonList(FabricaDeObjetosFake.getNFInfoReferenciada()));
41,880
return compra; } public static NFNotaInfoCobranca getNFNotaInfoCobranca() { final NFNotaInfoCobranca cobranca = new NFNotaInfoCobranca(); cobranca.setFatura(FabricaDeObjetosFake.getNFNotaInfoFatura()); <BUG>cobranca.setDuplicatas(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoDuplicata())); </BUG> return cobranca; } p...
cobranca.setDuplicatas(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoDuplicata()));
41,881
</BUG> produto.setDescricao("OBS0ztekCoG0DSSVcQwPKRV2fV842Pye7mED13P4zoDczcXi4AMNvQ7BKBLnHtLc2Z9fuIY1pcKmXSK1IJQSLEs5QWvVGyC74DyJuIM0X7L0cqWPZQii5JtP"); produto.setExtipi("999"); produto.setCodigoEspecificadorSituacaoTributaria("9999999"); <BUG>produto.setMedicamentos(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoIte...
produto.setCfop("1302"); produto.setCodigo("ohVRInAS7jw8LNDP4WWjssSjBHK8nJRERnAeRMcsUokF3YItT93fBto3zZcq"); produto.setCodigoDeBarras("36811963532505"); produto.setCodigoDeBarrasTributavel("36811963532505"); produto.setCampoeValorNota(NFProdutoCompoeValorNota.SIM); produto.setDeclaracoesImportacao(Collections.singleton...
41,882
produto.setValorFrete(new BigDecimal("999999999999.99")); produto.setValorOutrasDespesasAcessorias(new BigDecimal("999999999999.99")); produto.setValorSeguro(new BigDecimal("999999999999.99")); produto.setValorTotalBruto(new BigDecimal("999999999999.99")); produto.setValorUnitario(new BigDecimal("9999999999.9999999999"...
produto.setNomeclaturaValorAduaneiroEstatistica(Collections.singletonList("AZ0123"));
41,883
medicamento.setQuantidade(new BigDecimal("9999999.999")); return medicamento; } public static NFNotaInfoItemProdutoDeclaracaoImportacao getNFNotaInfoItemProdutoDeclaracaoImportacao() { final NFNotaInfoItemProdutoDeclaracaoImportacao declaraoImportacao = new NFNotaInfoItemProdutoDeclaracaoImportacao(); <BUG>declaraoImpo...
declaraoImportacao.setAdicoes(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacaoAdicao()));
41,884
public static NFNotaInfoVolume getNFNotaInfoVolume() { final NFNotaInfoVolume volume = new NFNotaInfoVolume(); volume.setEspecieVolumesTransportados("3Qf46HFs7FcWlhuQqLJ96vsrgJHu6B5ZXmmwMZ1RtvQVOV4Yp6M9VNqn5Ecb"); final NFNotaInfoLacre notaInfoLacre = new NFNotaInfoLacre(); notaInfoLacre.setNumeroLacre("gvmjb9BB2cmwsLb...
volume.setLacres(Collections.singletonList(notaInfoLacre));
41,885
public void deveGerarXMLDeAcordoComOPadraoEstabelecido() { final NFLoteConsultaRetorno retorno = new NFLoteConsultaRetorno(); retorno.setAmbiente(NFAmbiente.HOMOLOGACAO); retorno.setMotivo("8CwtnC5gWwUncMBYAZl9p4fvVx8RkCH2EKx2mtUNVA5tLoJsjNWL5CJ6DXNUHTWKpPl6fMKKxA0aXBu6IfmJLIHlPxtF0oZkKrNsGyGpwKqWxvDZ9HQGqscmhtTrp5NbNz...
retorno.setProtocolos(Collections.singletonList(FabricaDeObjetosFake.getNFProtocolo()));
41,886
import java.util.Set; public class AddressSettingsElement extends AbstractModelElement<AddressSettingsElement> implements ServiceActivator { private static final long serialVersionUID = 1L; private static final Logger log = Logger.getLogger("org.jboss.as.messaging"); public AddressSettingsElement(final XMLExtendedStrea...
boolean trace = log.isTraceEnabled(); if(trace) log.trace("Begin " + reader.getLocation() + reader.getLocalName()); // Handle elements int tag = reader.getEventType();
41,887
String match = reader.getAttributeValue(0); Pair<String, AddressSettings> settings = parseAddressSettings(reader, match); config.getAddressesSettings().put(settings.a, settings.b); break; } <BUG>} while (reader.hasNext() && localName.equals(Element.ADDRESS_SETTING.getLocalName())); }</BUG> @Override public long element...
if(trace) log.trace("End " + reader.getLocation() + reader.getLocalName());
41,888
public long elementHash() { return 0; //To change body of implemented methods use File | Settings | File Templates. } @Override protected Class<AddressSettingsElement> getElementClass() { <BUG>return null; //To change body of implemented methods use File | Settings | File Templates. </BUG> } @Override public void wri...
return AddressSettingsElement.class; //To change body of implemented methods use File | Settings | File Templates.
41,889
import java.util.List; import java.util.Set; public class AcceptorsElement extends AbstractModelElement<AcceptorsElement> implements ServiceActivator { private static final long serialVersionUID = 1L; private static final Logger log = Logger.getLogger("org.jboss.as.messaging"); <BUG>public AcceptorsElement(final XMLExt...
boolean trace = log.isTraceEnabled(); if(trace) log.trace("Begin " + reader.getLocation() + reader.getLocalName());
41,890
String name = reader.getAttributeValue(0); TransportConfiguration acceptorConfig = ElementUtils.parseTransportConfiguration(reader, name, Element.ACCEPTOR); config.getAcceptorConfigurations().add(acceptorConfig); break; } <BUG>} while (reader.hasNext() && localName.equals(Element.ACCEPTOR.getLocalName())); }</BUG> @Ove...
if(trace) log.trace("End " + reader.getLocation() + reader.getLocalName());
41,891
public long elementHash() { return 0; //To change body of implemented methods use File | Settings | File Templates. } @Override protected Class<AcceptorsElement> getElementClass() { <BUG>return null; //To change body of implemented methods use File | Settings | File Templates. }</BUG> @Override public void writeConte...
return AcceptorsElement.class;
41,892
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() );
41,893
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_();
41,894
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 );
41,895
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 );
41,896
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() ) ); s...
sink.bold(); sink.bold_(); sink.tableCaption_(); sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.subprojects" ) ); sink.tableHeaderCell_();
41,897
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_();
41,898
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_();
41,899
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
41,900
private String ref; private String priority; private String name; private String message; private List<PmdProperty> properties = new ArrayList<PmdProperty>(); <BUG>private String clazz;// NOSONAR unused private field public PmdRule(String ref) {</BUG> this(ref, null); } public PmdRule(String ref, String priority) {
private String clazz; public PmdRule(String ref) {