Program: 112959
Project: 112959
Buggy source:
protected boolean overlaps(final NumericData[] insertTileRange,final PrimaryIndex index){
  @SuppressWarnings("String_Node_Str") final NumericDimensionDefinition[] dimensions=index.getIndexStrategy().getOrderedDimensionDefinitions();
  final NumericDimensionField[] fields=index.getIndexModel().getDimensions();
  Map<Class,NumericDimensionField> dimensionTypeToFieldMap=new HashMap<>();
  for (  NumericDimensionField field : fields) {
    dimensionTypeToFieldMap.put(field.getBaseDefinition().getClass(),field);
  }
  final Map<ByteArrayId,DimensionRangePair> fieldsRangeData=new HashMap<ByteArrayId,DimensionRangePair>(dimensions.length);
  for (int d=0; d < dimensions.length; d++) {
    NumericDimensionField field=dimensionTypeToFieldMap.get(dimensions[d].getClass());
    if (field != null) {
      final ByteArrayId fieldId=field.getFieldId();
      final DimensionRangePair fieldData=fieldsRangeData.get(fieldId);
      if (fieldData == null) {
        fieldsRangeData.put(fieldId,new DimensionRangePair(field,insertTileRange[d]));
      }
 else {
        fieldData.add(field,insertTileRange[d]);
      }
    }
  }
  for (  final Entry<ByteArrayId,DimensionRangePair> entry : fieldsRangeData.entrySet()) {
    PersistentDataset<CommonIndexValue> commonData=getCommonData();
    if (commonData != null) {
      CommonIndexValue value=commonData.getValue(entry.getKey());
      if (value != null && !value.overlaps(entry.getValue().dimensions,entry.getValue().dataPerDimension)) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
protected boolean overlaps(final NumericData[] insertTileRange,final PrimaryIndex index){
  @SuppressWarnings("String_Node_Str") final NumericDimensionDefinition[] dimensions=index.getIndexStrategy().getOrderedDimensionDefinitions();
  final NumericDimensionField[] fields=index.getIndexModel().getDimensions();
  Map<Class,NumericDimensionField> dimensionTypeToFieldMap=new HashMap<>();
  for (  NumericDimensionField field : fields) {
    dimensionTypeToFieldMap.put(field.getBaseDefinition().getClass(),field);
  }
  final Map<ByteArrayId,DimensionRangePair> fieldsRangeData=new HashMap<ByteArrayId,DimensionRangePair>(dimensions.length);
  for (int d=0; d < dimensions.length; d++) {
    Class baseDefinitionCls;
    if (dimensions[d] instanceof SFCDimensionDefinition) {
      baseDefinitionCls=((SFCDimensionDefinition)dimensions[d]).getDimensionDefinition().getClass();
    }
 else {
      baseDefinitionCls=dimensions[d].getClass();
    }
    NumericDimensionField field=dimensionTypeToFieldMap.get(baseDefinitionCls);
    if (field != null) {
      final ByteArrayId fieldId=field.getFieldId();
      final DimensionRangePair fieldData=fieldsRangeData.get(fieldId);
      if (fieldData == null) {
        fieldsRangeData.put(fieldId,new DimensionRangePair(field,insertTileRange[d]));
      }
 else {
        fieldData.add(field,insertTileRange[d]);
      }
    }
  }
  for (  final Entry<ByteArrayId,DimensionRangePair> entry : fieldsRangeData.entrySet()) {
    PersistentDataset<CommonIndexValue> commonData=getCommonData();
    if (commonData != null) {
      CommonIndexValue value=commonData.getValue(entry.getKey());
      if (value != null && !value.overlaps(entry.getValue().dimensions,entry.getValue().dataPerDimension)) {
        return false;
      }
    }
  }
  return true;
}