Program: 168777
Project: 168777
Buggy source:
@SuppressWarnings("String_Node_Str") public AbstractAttribute(ManagedViewTypeImplementor<X> declaringType,AttributeMapping mapping,MetamodelBuildingContext context){
  if (mapping.getJavaType(context) == null) {
    context.addError("String_Node_Str" + mapping.getErrorLocation());
  }
  Integer defaultbatchSize=mapping.getDefaultBatchSize();
  int batchSize;
  if (defaultbatchSize == null || defaultbatchSize == -1) {
    batchSize=-1;
  }
 else   if (defaultbatchSize < 1) {
    context.addError("String_Node_Str" + mapping.getErrorLocation() + "String_Node_Str");
    batchSize=Integer.MIN_VALUE;
  }
 else {
    batchSize=defaultbatchSize;
  }
  this.declaringType=declaringType;
  this.javaType=(Class<Y>)mapping.getJavaType(context);
  Annotation mappingAnnotation=mapping.getMapping();
  if (mappingAnnotation instanceof IdMapping) {
    this.mapping=((IdMapping)mappingAnnotation).value();
    this.fetches=EMPTY;
    this.fetchStrategy=FetchStrategy.JOIN;
    this.batchSize=-1;
    this.subqueryProvider=null;
    this.id=true;
    this.updateMappable=checkUpdatableMapping(this.mapping,context);
    this.mappingType=MappingType.BASIC;
    this.subqueryExpression=null;
    this.subqueryAlias=null;
    this.correlationBasis=null;
    this.correlationResult=null;
    this.correlationProvider=null;
    this.correlated=null;
    this.correlationKeyAlias=null;
    this.correlationExpression=null;
  }
 else   if (mappingAnnotation instanceof Mapping) {
    Mapping m=(Mapping)mappingAnnotation;
    this.mapping=m.value();
    this.fetches=m.fetches();
    this.fetchStrategy=m.fetch();
    this.batchSize=batchSize;
    this.subqueryProvider=null;
    this.id=false;
    this.updateMappable=checkUpdatableMapping(this.mapping,context);
    this.mappingType=MappingType.BASIC;
    this.subqueryExpression=null;
    this.subqueryAlias=null;
    this.correlationBasis=null;
    this.correlationResult=null;
    this.correlationProvider=null;
    this.correlated=null;
    this.correlationKeyAlias=null;
    this.correlationExpression=null;
  }
 else   if (mappingAnnotation instanceof MappingParameter) {
    this.mapping=((MappingParameter)mappingAnnotation).value();
    this.fetches=EMPTY;
    this.fetchStrategy=FetchStrategy.JOIN;
    this.batchSize=-1;
    this.subqueryProvider=null;
    this.id=false;
    this.updateMappable=false;
    this.mappingType=MappingType.PARAMETER;
    this.subqueryExpression=null;
    this.subqueryAlias=null;
    this.correlationBasis=null;
    this.correlationResult=null;
    this.correlationProvider=null;
    this.correlated=null;
    this.correlationKeyAlias=null;
    this.correlationExpression=null;
  }
 else   if (mappingAnnotation instanceof MappingSubquery) {
    MappingSubquery mappingSubquery=(MappingSubquery)mappingAnnotation;
    this.mapping=null;
    this.fetches=EMPTY;
    this.subqueryProvider=mappingSubquery.value();
    this.fetchStrategy=FetchStrategy.JOIN;
    this.batchSize=-1;
    this.id=false;
    this.updateMappable=false;
    this.mappingType=MappingType.SUBQUERY;
    this.subqueryExpression=mappingSubquery.expression();
    this.subqueryAlias=mappingSubquery.subqueryAlias();
    this.correlationBasis=null;
    this.correlationResult=null;
    this.correlationProvider=null;
    this.correlated=null;
    this.correlationKeyAlias=null;
    this.correlationExpression=null;
    if (!subqueryExpression.isEmpty() && subqueryAlias.isEmpty()) {
      context.addError("String_Node_Str" + mapping.getErrorLocation());
    }
    if (subqueryProvider.getEnclosingClass() != null && !Modifier.isStatic(subqueryProvider.getModifiers())) {
      context.addError("String_Node_Str" + mapping.getErrorLocation());
    }
  }
 else   if (mappingAnnotation instanceof MappingCorrelated) {
    MappingCorrelated mappingCorrelated=(MappingCorrelated)mappingAnnotation;
    this.mapping=null;
    this.fetches=mappingCorrelated.fetches();
    this.fetchStrategy=mappingCorrelated.fetch();
    if (fetchStrategy == FetchStrategy.SELECT) {
      this.batchSize=batchSize;
    }
 else {
      this.batchSize=-1;
    }
    this.subqueryProvider=null;
    this.id=false;
    this.updateMappable=false;
    this.mappingType=MappingType.CORRELATED;
    this.subqueryExpression=null;
    this.subqueryAlias=null;
    this.correlationBasis=mappingCorrelated.correlationBasis();
    this.correlationResult=mappingCorrelated.correlationResult();
    this.correlationProvider=mappingCorrelated.correlator();
    this.correlated=null;
    this.correlationKeyAlias=null;
    this.correlationExpression=null;
    if (correlationProvider.getEnclosingClass() != null && !Modifier.isStatic(correlationProvider.getModifiers())) {
      context.addError("String_Node_Str" + mapping.getErrorLocation());
    }
  }
 else   if (mappingAnnotation instanceof MappingCorrelatedSimple) {
    MappingCorrelatedSimple mappingCorrelated=(MappingCorrelatedSimple)mappingAnnotation;
    this.mapping=null;
    this.fetches=mappingCorrelated.fetches();
    this.fetchStrategy=mappingCorrelated.fetch();
    if (fetchStrategy == FetchStrategy.SELECT) {
      this.batchSize=batchSize;
    }
 else {
      this.batchSize=-1;
    }
    this.subqueryProvider=null;
    this.id=false;
    this.updateMappable=false;
    this.mappingType=MappingType.CORRELATED;
    this.subqueryExpression=null;
    this.subqueryAlias=null;
    this.correlationProvider=CorrelationProviderHelper.createCorrelationProvider(mappingCorrelated.correlated(),mappingCorrelated.correlationKeyAlias(),mappingCorrelated.correlationExpression(),context);
    this.correlationBasis=mappingCorrelated.correlationBasis();
    this.correlationResult=mappingCorrelated.correlationResult();
    this.correlated=mappingCorrelated.correlated();
    this.correlationKeyAlias=mappingCorrelated.correlationKeyAlias();
    this.correlationExpression=mappingCorrelated.correlationExpression();
    if (mappingCorrelated.correlationBasis().isEmpty()) {
      context.addError("String_Node_Str" + getLocation());
    }
  }
 else {
    context.addError("String_Node_Str" + mapping.getErrorLocation());
    this.mapping=null;
    this.fetches=EMPTY;
    this.fetchStrategy=null;
    this.batchSize=Integer.MIN_VALUE;
    this.subqueryProvider=null;
    this.id=false;
    this.updateMappable=false;
    this.mappingType=null;
    this.subqueryExpression=null;
    this.subqueryAlias=null;
    this.correlationBasis=null;
    this.correlationResult=null;
    this.correlationProvider=null;
    this.correlated=null;
    this.correlationKeyAlias=null;
    this.correlationExpression=null;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public AbstractAttribute(ManagedViewTypeImplementor<X> declaringType,AttributeMapping mapping,MetamodelBuildingContext context){
  if (mapping.getJavaType(context) == null) {
    context.addError("String_Node_Str" + mapping.getErrorLocation());
  }
  this.possibleTargetTypes=mapping.getPossibleTargetTypes(context);
  Integer defaultbatchSize=mapping.getDefaultBatchSize();
  int batchSize;
  if (defaultbatchSize == null || defaultbatchSize == -1) {
    batchSize=-1;
  }
 else   if (defaultbatchSize < 1) {
    context.addError("String_Node_Str" + mapping.getErrorLocation() + "String_Node_Str");
    batchSize=Integer.MIN_VALUE;
  }
 else {
    batchSize=defaultbatchSize;
  }
  this.declaringType=declaringType;
  this.javaType=(Class<Y>)mapping.getJavaType(context);
  Annotation mappingAnnotation=mapping.getMapping();
  if (mappingAnnotation instanceof IdMapping) {
    this.mapping=((IdMapping)mappingAnnotation).value();
    this.fetches=EMPTY;
    this.fetchStrategy=FetchStrategy.JOIN;
    this.batchSize=-1;
    this.subqueryProvider=null;
    this.id=true;
    this.updateMappable=checkUpdatableMapping(this.mapping,context);
    this.mappingType=MappingType.BASIC;
    this.subqueryExpression=null;
    this.subqueryAlias=null;
    this.correlationBasis=null;
    this.correlationResult=null;
    this.correlationProvider=null;
    this.correlated=null;
    this.correlationKeyAlias=null;
    this.correlationExpression=null;
  }
 else   if (mappingAnnotation instanceof Mapping) {
    Mapping m=(Mapping)mappingAnnotation;
    this.mapping=m.value();
    this.fetches=m.fetches();
    this.fetchStrategy=m.fetch();
    this.batchSize=batchSize;
    this.subqueryProvider=null;
    this.id=false;
    this.updateMappable=checkUpdatableMapping(this.mapping,context);
    this.mappingType=MappingType.BASIC;
    this.subqueryExpression=null;
    this.subqueryAlias=null;
    this.correlationBasis=null;
    this.correlationResult=null;
    this.correlationProvider=null;
    this.correlated=null;
    this.correlationKeyAlias=null;
    this.correlationExpression=null;
  }
 else   if (mappingAnnotation instanceof MappingParameter) {
    this.mapping=((MappingParameter)mappingAnnotation).value();
    this.fetches=EMPTY;
    this.fetchStrategy=FetchStrategy.JOIN;
    this.batchSize=-1;
    this.subqueryProvider=null;
    this.id=false;
    this.updateMappable=false;
    this.mappingType=MappingType.PARAMETER;
    this.subqueryExpression=null;
    this.subqueryAlias=null;
    this.correlationBasis=null;
    this.correlationResult=null;
    this.correlationProvider=null;
    this.correlated=null;
    this.correlationKeyAlias=null;
    this.correlationExpression=null;
  }
 else   if (mappingAnnotation instanceof MappingSubquery) {
    MappingSubquery mappingSubquery=(MappingSubquery)mappingAnnotation;
    this.mapping=null;
    this.fetches=EMPTY;
    this.subqueryProvider=mappingSubquery.value();
    this.fetchStrategy=FetchStrategy.JOIN;
    this.batchSize=-1;
    this.id=false;
    this.updateMappable=false;
    this.mappingType=MappingType.SUBQUERY;
    this.subqueryExpression=mappingSubquery.expression();
    this.subqueryAlias=mappingSubquery.subqueryAlias();
    this.correlationBasis=null;
    this.correlationResult=null;
    this.correlationProvider=null;
    this.correlated=null;
    this.correlationKeyAlias=null;
    this.correlationExpression=null;
    if (!subqueryExpression.isEmpty() && subqueryAlias.isEmpty()) {
      context.addError("String_Node_Str" + mapping.getErrorLocation());
    }
    if (subqueryProvider.getEnclosingClass() != null && !Modifier.isStatic(subqueryProvider.getModifiers())) {
      context.addError("String_Node_Str" + mapping.getErrorLocation());
    }
  }
 else   if (mappingAnnotation instanceof MappingCorrelated) {
    MappingCorrelated mappingCorrelated=(MappingCorrelated)mappingAnnotation;
    this.mapping=null;
    this.fetches=mappingCorrelated.fetches();
    this.fetchStrategy=mappingCorrelated.fetch();
    if (fetchStrategy == FetchStrategy.SELECT) {
      this.batchSize=batchSize;
    }
 else {
      this.batchSize=-1;
    }
    this.subqueryProvider=null;
    this.id=false;
    this.updateMappable=false;
    this.mappingType=MappingType.CORRELATED;
    this.subqueryExpression=null;
    this.subqueryAlias=null;
    this.correlationBasis=mappingCorrelated.correlationBasis();
    this.correlationResult=mappingCorrelated.correlationResult();
    this.correlationProvider=mappingCorrelated.correlator();
    this.correlated=null;
    this.correlationKeyAlias=null;
    this.correlationExpression=null;
    if (correlationProvider.getEnclosingClass() != null && !Modifier.isStatic(correlationProvider.getModifiers())) {
      context.addError("String_Node_Str" + mapping.getErrorLocation());
    }
  }
 else   if (mappingAnnotation instanceof MappingCorrelatedSimple) {
    MappingCorrelatedSimple mappingCorrelated=(MappingCorrelatedSimple)mappingAnnotation;
    this.mapping=null;
    this.fetches=mappingCorrelated.fetches();
    this.fetchStrategy=mappingCorrelated.fetch();
    if (fetchStrategy == FetchStrategy.SELECT) {
      this.batchSize=batchSize;
    }
 else {
      this.batchSize=-1;
    }
    this.subqueryProvider=null;
    this.id=false;
    this.updateMappable=false;
    this.mappingType=MappingType.CORRELATED;
    this.subqueryExpression=null;
    this.subqueryAlias=null;
    this.correlationProvider=CorrelationProviderHelper.createCorrelationProvider(mappingCorrelated.correlated(),mappingCorrelated.correlationKeyAlias(),mappingCorrelated.correlationExpression(),context);
    this.correlationBasis=mappingCorrelated.correlationBasis();
    this.correlationResult=mappingCorrelated.correlationResult();
    this.correlated=mappingCorrelated.correlated();
    this.correlationKeyAlias=mappingCorrelated.correlationKeyAlias();
    this.correlationExpression=mappingCorrelated.correlationExpression();
    if (mappingCorrelated.correlationBasis().isEmpty()) {
      context.addError("String_Node_Str" + getLocation());
    }
  }
 else {
    context.addError("String_Node_Str" + mapping.getErrorLocation());
    this.mapping=null;
    this.fetches=EMPTY;
    this.fetchStrategy=null;
    this.batchSize=Integer.MIN_VALUE;
    this.subqueryProvider=null;
    this.id=false;
    this.updateMappable=false;
    this.mappingType=null;
    this.subqueryExpression=null;
    this.subqueryAlias=null;
    this.correlationBasis=null;
    this.correlationResult=null;
    this.correlationProvider=null;
    this.correlated=null;
    this.correlationKeyAlias=null;
    this.correlationExpression=null;
  }
}