nus-yam/ex-repair huggingface dataset:
Program: 112947
Project: 112947
Buggy source:
private static List<String> getMissingRequiredOptions(final StoreFactoryFamilySpi factory,final Map<String,String> configOptions){
  final ConfigOption[] options=ConfigUtils.createConfigOptionsFromJCommander(factory.getDataStoreFactory().createOptionsInstance());
  final List<String> missing=new ArrayList<String>();
  for (  final ConfigOption option : options) {
    if (!option.isOptional() && !configOptions.containsKey(option.getName())) {
      missing.add(option.getName());
    }
  }
  return missing;
}

Fixed version (ground truth):
private static List<String> getMissingRequiredOptions(final StoreFactoryFamilySpi factory,final Map<String,String> configOptions){
  final ConfigOption[] options=ConfigUtils.createConfigOptionsFromJCommander(factory.getDataStoreFactory().createOptionsInstance(),false);
  final List<String> missing=new ArrayList<String>();
  for (  final ConfigOption option : options) {
    if (!option.isOptional() && !configOptions.containsKey(option.getName())) {
      missing.add(option.getName());
    }
  }
  return missing;
}
Program: 112948
Project: 112948
Buggy source:
public static synchronized ConfigOption[] getRequiredOptions(final StoreFactoryFamilySpi storeFactoryFamily){
  final List<ConfigOption> requiredOptions=new ArrayList<ConfigOption>();
  for (  final ConfigOption option : getAllOptions(storeFactoryFamily)) {
    if (!option.isOptional()) {
      requiredOptions.add(option);
    }
  }
  return requiredOptions.toArray(new ConfigOption[]{});
}

Fixed version (ground truth):
public static synchronized ConfigOption[] getRequiredOptions(final StoreFactoryFamilySpi storeFactoryFamily){
  final List<ConfigOption> requiredOptions=new ArrayList<ConfigOption>();
  for (  final ConfigOption option : getAllOptions(storeFactoryFamily,false)) {
    if (!option.isOptional()) {
      requiredOptions.add(option);
    }
  }
  return requiredOptions.toArray(new ConfigOption[]{});
}
Program: 112949
Project: 112949
Buggy source:
/** 
 * This method will use the parameter descriptions from JCommander to create/populate an AbstractConfigOptions map.
 */
public static ConfigOption[] createConfigOptionsFromJCommander(final Object createOptionsInstance){
  ConfigOption[] opts=null;
  if (createOptionsInstance != null) {
    final JCommanderPrefixTranslator translator=new JCommanderPrefixTranslator();
    translator.addObject(createOptionsInstance);
    final JCommanderTranslationMap map=translator.translate();
    final Collection<TranslationEntry> entries=map.getEntries().values();
    final List<ConfigOption> options=new ArrayList<ConfigOption>();
    for (    final TranslationEntry entry : entries) {
      if (!entry.isHidden()) {
        final ConfigOption opt=new ConfigOption(entry.getAsPropertyName(),entry.getDescription(),!entry.isRequired(),entry.getParam().getType());
        opt.setPassword(entry.isPassword());
        options.add(opt);
      }
    }
    opts=options.toArray(new ConfigOption[options.size()]);
  }
 else {
    opts=new ConfigOption[0];
  }
  return opts;
}

Fixed version (ground truth):
/** 
 * This method will use the parameter descriptions from JCommander to create/populate an AbstractConfigOptions map.
 */
public static ConfigOption[] createConfigOptionsFromJCommander(final Object createOptionsInstance,boolean includeHidden){
  ConfigOption[] opts=null;
  if (createOptionsInstance != null) {
    final JCommanderPrefixTranslator translator=new JCommanderPrefixTranslator();
    translator.addObject(createOptionsInstance);
    final JCommanderTranslationMap map=translator.translate();
    final Collection<TranslationEntry> entries=map.getEntries().values();
    final List<ConfigOption> options=new ArrayList<ConfigOption>();
    for (    final TranslationEntry entry : entries) {
      if (includeHidden || !entry.isHidden()) {
        final ConfigOption opt=new ConfigOption(entry.getAsPropertyName(),entry.getDescription(),!entry.isRequired(),entry.getParam().getType());
        opt.setPassword(entry.isPassword());
        options.add(opt);
      }
    }
    opts=options.toArray(new ConfigOption[options.size()]);
  }
 else {
    opts=new ConfigOption[0];
  }
  return opts;
}
Program: 112950
Project: 112950
Buggy source:
public synchronized static List<Param> getPluginParams(final StoreFactoryFamilySpi storeFactoryFamily){
  List<Param> params=paramMap.get(storeFactoryFamily.getType());
  if (params == null) {
    final ConfigOption[] configOptions=GeoWaveStoreFinder.getAllOptions(storeFactoryFamily);
    params=new ArrayList<Param>(Lists.transform(Lists.newArrayList(configOptions),new GeoWaveConfigOptionToGeoToolsConfigOption()));
    params.addAll(BASE_GEOWAVE_PLUGIN_PARAMS);
    paramMap.put(storeFactoryFamily.getType(),params);
  }
  return params;
}

Fixed version (ground truth):
public synchronized static List<Param> getPluginParams(final StoreFactoryFamilySpi storeFactoryFamily){
  List<Param> params=paramMap.get(storeFactoryFamily.getType());
  if (params == null) {
    final ConfigOption[] configOptions=GeoWaveStoreFinder.getAllOptions(storeFactoryFamily,false);
    params=new ArrayList<Param>(Lists.transform(Lists.newArrayList(configOptions),new GeoWaveConfigOptionToGeoToolsConfigOption()));
    params.addAll(BASE_GEOWAVE_PLUGIN_PARAMS);
    paramMap.put(storeFactoryFamily.getType(),params);
  }
  return params;
}
Program: 112952
Project: 112952
Buggy source:
protected static boolean isAuthorized(final byte[] visibility,final String[] authorizations){
  if ((visibility == null) || (visibility.length == 0)) {
    return true;
  }
  VisibilityExpression expr;
  try {
    expr=new VisibilityExpressionParser().parse(visibility);
  }
 catch (  final IOException e) {
    LOGGER.error("String_Node_Str" + Arrays.toString(visibility),e);
    return false;
  }
  return expr.ok(authorizations);
}

Fixed version (ground truth):
protected static boolean isAuthorized(final byte[] visibility,final String[] authorizations){
  if ((visibility == null) || (visibility.length == 0)) {
    return true;
  }
  VisibilityExpression expr;
  try {
    expr=new VisibilityExpressionParser().parse(visibility);
  }
 catch (  final IOException e) {
    LOGGER.error("String_Node_Str",e);
    return false;
  }
  return expr.ok(authorizations);
}
Program: 112954
Project: 112954
Buggy source:
private static String setupPathingJarClassPath(final File dir,final Class context) throws IOException {
  final String classpath=getClasspath(context);
  final File jarDir=new File(dir.getParentFile().getAbsolutePath() + File.separator + "String_Node_Str");
  if (!jarDir.exists()) {
    try {
      jarDir.mkdirs();
    }
 catch (    final Exception e) {
      LOGGER.error("String_Node_Str" + e);
      return null;
    }
  }
  final File jarFile=new File(jarDir,"String_Node_Str");
  if (jarFile.exists()) {
    try {
      jarFile.delete();
    }
 catch (    final Exception e) {
      LOGGER.error("String_Node_Str" + e);
      return null;
    }
  }
  final Manifest manifest=new Manifest();
  manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION,"String_Node_Str");
  manifest.getMainAttributes().put(Attributes.Name.CLASS_PATH,classpath);
  final JarOutputStream target=new JarOutputStream(new FileOutputStream(jarFile),manifest);
  target.close();
  return jarFile.getAbsolutePath();
}

Fixed version (ground truth):
private static String setupPathingJarClassPath(final File dir,final Class context) throws IOException {
  final String classpath=getClasspath(context);
  final File jarDir=new File(dir.getParentFile().getAbsolutePath() + File.separator + "String_Node_Str");
  if (!jarDir.exists()) {
    try {
      jarDir.mkdirs();
    }
 catch (    final Exception e) {
      LOGGER.error("String_Node_Str" + e);
      return null;
    }
  }
  final File jarFile=new File(jarDir,"String_Node_Str");
  if (jarFile.exists()) {
    try {
      jarFile.delete();
    }
 catch (    final Exception e) {
      LOGGER.error("String_Node_Str" + e);
      return null;
    }
  }
  final Manifest manifest=new Manifest();
  manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION,"String_Node_Str");
  manifest.getMainAttributes().put(Attributes.Name.CLASS_PATH,classpath);
  try (final JarOutputStream target=new JarOutputStream(new FileOutputStream(jarFile),manifest)){
    target.close();
  }
   return jarFile.getAbsolutePath();
}
Program: 112955
Project: 112955
Buggy source:
private synchronized DataStore getSingletonInstance(){
  if (dataStore != null) {
    return dataStore;
  }
  String confPropFilename=context.getInitParameter("String_Node_Str");
  LOGGER.info("String_Node_Str" + confPropFilename);
  InputStream is=context.getResourceAsStream(confPropFilename);
  final Properties props=ServiceUtils.loadProperties(is);
  LOGGER.info("String_Node_Str" + props.size() + "String_Node_Str");
  final Map<String,String> strMap=new HashMap<String,String>();
  final Set<Object> keySet=props.keySet();
  final Iterator<Object> it=keySet.iterator();
  while (it.hasNext()) {
    final String key=it.next().toString();
    final String value=ServiceUtils.getProperty(props,key);
    strMap.put(key,value);
    LOGGER.info("String_Node_Str" + key + "String_Node_Str"+ value);
  }
  GeoWaveStoreFinder.getRegisteredStoreFactoryFamilies();
  dataStore=GeoWaveStoreFinder.createDataStore(strMap);
  if (dataStore == null) {
    LOGGER.error("String_Node_Str");
  }
  return dataStore;
}

Fixed version (ground truth):
private synchronized DataStore getSingletonInstance(){
  if (dataStore != null) {
    return dataStore;
  }
  String confPropFilename=context.getInitParameter("String_Node_Str");
  LOGGER.info("String_Node_Str" + confPropFilename);
  Properties props=null;
  try (InputStream is=context.getResourceAsStream(confPropFilename)){
    props=ServiceUtils.loadProperties(is);
  }
 catch (  IOException e) {
    LOGGER.error(e);
  }
  LOGGER.info("String_Node_Str" + props.size() + "String_Node_Str");
  final Map<String,String> strMap=new HashMap<String,String>();
  final Set<Object> keySet=props.keySet();
  final Iterator<Object> it=keySet.iterator();
  while (it.hasNext()) {
    final String key=it.next().toString();
    final String value=ServiceUtils.getProperty(props,key);
    strMap.put(key,value);
    LOGGER.info("String_Node_Str" + key + "String_Node_Str"+ value);
  }
  GeoWaveStoreFinder.getRegisteredStoreFactoryFamilies();
  dataStore=GeoWaveStoreFinder.createDataStore(strMap);
  if (dataStore == null) {
    LOGGER.error("String_Node_Str");
  }
  return dataStore;
}
Program: 112956
Project: 112956
Buggy source:
private static StrippedGeometry stripGeometry(final MultiDimensionalNumericData query,final NumericDimensionField<?>[] dimensionDefinitions){
  final Set<ByteArrayId> geometryFieldIds=new HashSet<ByteArrayId>();
  final List<NumericData> numericDataPerDimension=new ArrayList<NumericData>();
  final List<NumericDimensionField<?>> fields=new ArrayList<NumericDimensionField<?>>();
  final NumericData[] data=query.getDataPerDimension();
  for (int d=0; d < dimensionDefinitions.length; d++) {
    if (isSpatial(dimensionDefinitions[d])) {
      geometryFieldIds.add(dimensionDefinitions[d].getFieldId());
    }
 else {
      numericDataPerDimension.add(data[d]);
      fields.add(dimensionDefinitions[d]);
    }
  }
  return new StrippedGeometry(new BasicNumericDataset(numericDataPerDimension.toArray(new NumericData[numericDataPerDimension.size()])),fields.toArray(new NumericDimensionField<?>[fields.size()]),geometryFieldIds);
}

Fixed version (ground truth):
private static StrippedGeometry stripGeometry(final MultiDimensionalNumericData query,final NumericDimensionField<?>[] orderedConstrainedDimensionDefinitions,final NumericDimensionField<?>[] unconstrainedDimensionDefinitions){
  final Set<ByteArrayId> geometryFieldIds=new HashSet<ByteArrayId>();
  final List<NumericData> numericDataPerDimension=new ArrayList<NumericData>();
  final List<NumericDimensionField<?>> fields=new ArrayList<NumericDimensionField<?>>();
  final NumericData[] data=query.getDataPerDimension();
  for (int d=0; d < orderedConstrainedDimensionDefinitions.length; d++) {
    if (isSpatial(orderedConstrainedDimensionDefinitions[d])) {
      geometryFieldIds.add(orderedConstrainedDimensionDefinitions[d].getFieldId());
    }
 else {
      numericDataPerDimension.add(data[d]);
      fields.add(orderedConstrainedDimensionDefinitions[d]);
    }
  }
  for (int d=0; d < unconstrainedDimensionDefinitions.length; d++) {
    if (isSpatial(unconstrainedDimensionDefinitions[d])) {
      geometryFieldIds.add(unconstrainedDimensionDefinitions[d].getFieldId());
    }
  }
  return new StrippedGeometry(new BasicNumericDataset(numericDataPerDimension.toArray(new NumericData[numericDataPerDimension.size()])),fields.toArray(new NumericDimensionField<?>[fields.size()]),geometryFieldIds);
}
Program: 112957
Project: 112957
Buggy source:
@Override protected DistributableQueryFilter createQueryFilter(final MultiDimensionalNumericData constraints,final NumericDimensionField<?>[] dimensionFields){
  return new SpatialQueryFilter(constraints,dimensionFields,queryGeometry,compareOp);
}

Fixed version (ground truth):
@Override protected DistributableQueryFilter createQueryFilter(final MultiDimensionalNumericData constraints,final NumericDimensionField<?>[] orderedConstrainedDimensionFields,final NumericDimensionField<?>[] unconstrainedDimensionDefinitions){
  return new SpatialQueryFilter(constraints,orderedConstrainedDimensionFields,unconstrainedDimensionDefinitions,queryGeometry,compareOp);
}
Program: 112960
Project: 112960
Buggy source:
protected DistributableQueryFilter createQueryFilter(final MultiDimensionalNumericData constraints,final NumericDimensionField<?>[] dimensionFields){
  return new BasicQueryFilter(constraints,dimensionFields);
}

Fixed version (ground truth):
protected DistributableQueryFilter createQueryFilter(final MultiDimensionalNumericData constraints,final NumericDimensionField<?>[] orderedConstrainedDimensionFields,final NumericDimensionField<?>[] unconstrainedDimensionFields){
  return new BasicQueryFilter(constraints,orderedConstrainedDimensionFields);
}
Program: 112962
Project: 112962
Buggy source:
private boolean subsetRequested(){
  if (query == null)   return false;
  return !(query.getPropertyNames() == Query.ALL_NAMES);
}

Fixed version (ground truth):
private boolean subsetRequested(){
  if (query == null) {
    return false;
  }
  return !(query.getPropertyNames() == Query.ALL_NAMES);
}
Program: 112963
Project: 112963
Buggy source:
private List<String> getSubset(){
  if (query == null)   return Collections.emptyList();
  return Arrays.asList(query.getPropertyNames());
}

Fixed version (ground truth):
private List<String> getSubset(){
  if (query == null) {
    return Collections.emptyList();
  }
  return Arrays.asList(query.getPropertyNames());
}
Program: 112965
Project: 112965
Buggy source:
/** 
 * Recursively decompose geometry into a set of envelopes to create a single set.
 * @param geometry
 * @param destinationListOfSets
 */
private static void constructListOfConstraintSetsFromGeometry(final Geometry geometry,final List<ConstraintSet> destinationListOfSets){
  int n=geometry.getNumGeometries();
  if (n > 1) {
    for (int gi=0; gi < n; gi++) {
      constructListOfConstraintSetsFromGeometry(geometry.getGeometryN(gi),destinationListOfSets);
    }
  }
 else {
    final Envelope env=geometry.getEnvelopeInternal();
    destinationListOfSets.add(basicConstraintSetFromEnvelope(env));
  }
}

Fixed version (ground truth):
/** 
 * Recursively decompose geometry into a set of envelopes to create a single set.
 * @param geometry
 * @param destinationListOfSets
 * @param checkTopoEquality
 */
private static boolean constructListOfConstraintSetsFromGeometry(final Geometry geometry,final List<ConstraintSet> destinationListOfSets,final boolean checkTopoEquality){
  final int n=geometry.getNumGeometries();
  boolean retVal=true;
  if (n > 1) {
    retVal=false;
    for (int gi=0; gi < n; gi++) {
      constructListOfConstraintSetsFromGeometry(geometry.getGeometryN(gi),destinationListOfSets,checkTopoEquality);
    }
  }
 else {
    final Envelope env=geometry.getEnvelopeInternal();
    destinationListOfSets.add(basicConstraintSetFromEnvelope(env));
    if (checkTopoEquality) {
      retVal=new GeometryFactory().toGeometry(env).equalsTopo(geometry);
    }
  }
  return retVal;
}
Program: 112966
Project: 112966
Buggy source:
/** 
 * This utility method will convert a JTS geometry to contraints that can be used in a GeoWave query.
 * @return Constraints as a mapping of NumericData objects representingranges for a latitude dimension and a longitude dimension
 */
public static Constraints basicConstraintsFromGeometry(final Geometry geometry){
  List<ConstraintSet> set=new LinkedList<ConstraintSet>();
  constructListOfConstraintSetsFromGeometry(geometry,set);
  return new Constraints(set);
}

Fixed version (ground truth):
public static Constraints basicConstraintsFromGeometry(final Geometry geometry){
  final List<ConstraintSet> set=new LinkedList<ConstraintSet>();
  constructListOfConstraintSetsFromGeometry(geometry,set,false);
  return new Constraints(set);
}
Program: 112967
Project: 112967
Buggy source:
public Date getMinOr(final Date min){
  return (constraints.isEmpty()) ? min : constraints.getFirst().getStartTime();
}

Fixed version (ground truth):
public Date getMinOr(final Date min,int exclusivityIncrement){
  return (constraints.isEmpty()) ? min : exclusivityIncrement == 0 ? constraints.getFirst().getStartTime() : new Date(constraints.getFirst().getStartTime().getTime() + exclusivityIncrement);
}
Program: 112968
Project: 112968
Buggy source:
public Date getMaxOr(final Date max){
  return (constraints.isEmpty()) ? max : constraints.getLast().getEndTime();
}

Fixed version (ground truth):
public Date getMaxOr(final Date max,int exclusivityIncrement){
  return (constraints.isEmpty()) ? max : exclusivityIncrement == 0 ? constraints.getLast().getEndTime() : new Date(constraints.getLast().getEndTime().getTime() + exclusivityIncrement);
}
Program: 112969
Project: 112969
Buggy source:
/** 
 * @param binId a unique ID associated with the BinnedQuery object
 * @param indexRanges multi-dimensional range data
 */
public BinnedNumericDataset(final byte[] binId,final MultiDimensionalNumericData indexRanges){
  this.binId=binId;
  this.indexRanges=indexRanges;
}

Fixed version (ground truth):
/** 
 * @param binId a unique ID associated with the BinnedQuery object
 * @param indexRanges multi-dimensional range data
 */
public BinnedNumericDataset(final byte[] binId,final MultiDimensionalNumericData indexRanges,final boolean fullExtent){
  this.binId=binId;
  this.indexRanges=indexRanges;
  this.fullExtent=fullExtent;
}
Program: 112971
Project: 112971
Buggy source:
@Override public byte[] toBinary(){
  final byte[] indexRangesBinary=PersistenceUtils.toBinary(indexRanges);
  final ByteBuffer buf=ByteBuffer.allocate(4 + indexRangesBinary.length + binId.length);
  buf.putInt(binId.length);
  buf.put(binId);
  buf.put(indexRangesBinary);
  return null;
}

Fixed version (ground truth):
@Override public byte[] toBinary(){
  final byte[] indexRangesBinary=PersistenceUtils.toBinary(indexRanges);
  final ByteBuffer buf=ByteBuffer.allocate(5 + indexRangesBinary.length + binId.length);
  buf.put((byte)(fullExtent ? 1 : 0));
  buf.putInt(binId.length);
  buf.put(binId);
  buf.put(indexRangesBinary);
  return null;
}
Program: 112972
Project: 112972
Buggy source:
@Override public void fromBinary(final byte[] bytes){
  final ByteBuffer buf=ByteBuffer.wrap(bytes);
  binId=new byte[buf.getInt()];
  buf.get(binId);
  final byte[] indexRangesBinary=new byte[bytes.length - 4 - binId.length];
  buf.get(indexRangesBinary);
  indexRanges=PersistenceUtils.fromBinary(indexRangesBinary,MultiDimensionalNumericData.class);
}

Fixed version (ground truth):
@Override public void fromBinary(final byte[] bytes){
  final ByteBuffer buf=ByteBuffer.wrap(bytes);
  fullExtent=(buf.get() == 1);
  binId=new byte[buf.getInt()];
  buf.get(binId);
  final byte[] indexRangesBinary=new byte[bytes.length - 5 - binId.length];
  buf.get(indexRangesBinary);
  indexRanges=PersistenceUtils.fromBinary(indexRangesBinary,MultiDimensionalNumericData.class);
}
Program: 112977
Project: 112977
Buggy source:
@Override public boolean acceptRow(final SortedKeyValueIterator<Key,Value> rowIterator) throws IOException {
  if ((queryFilterIterator != null) && queryFilterIterator.isSet()) {
    final Key key=rowIterator.getTopKey();
    final Value value=rowIterator.getTopValue();
    final PersistentDataset<CommonIndexValue> commonData=new PersistentDataset<CommonIndexValue>();
    final List<AccumuloFieldInfo> unknownData=new ArrayList<AccumuloFieldInfo>();
    final Text currentRow=key.getRow();
    queryFilterIterator.aggregateFieldData(key,value,commonData,unknownData);
    final CommonIndexedPersistenceEncoding encoding=QueryFilterIterator.getEncoding(currentRow,commonData,unknownData);
    final boolean queryFilterResult=queryFilterIterator.applyRowFilter(encoding);
    if (queryFilterResult) {
      aggregateRow(currentRow,queryFilterIterator.model,encoding);
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean acceptRow(final SortedKeyValueIterator<Key,Value> rowIterator) throws IOException {
  if ((queryFilterIterator != null) && queryFilterIterator.isSet()) {
    final Key key=rowIterator.getTopKey();
    final Value value=rowIterator.getTopValue();
    final PersistentDataset<CommonIndexValue> commonData=new PersistentDataset<CommonIndexValue>();
    final List<AccumuloFieldInfo> unknownData=new ArrayList<AccumuloFieldInfo>();
    final Text currentRow=key.getRow();
    queryFilterIterator.aggregateFieldData(key,value,commonData,unknownData);
    final CommonIndexedPersistenceEncoding encoding=QueryFilterIterator.getEncoding(currentRow,commonData,unknownData);
    boolean queryFilterResult=true;
    if (queryFilterIterator.isSet()) {
      queryFilterResult=queryFilterIterator.applyRowFilter(encoding);
    }
    if (queryFilterResult) {
      aggregateRow(currentRow,queryFilterIterator.model,encoding);
    }
  }
  return false;
}
Program: 112978
Project: 112978
Buggy source:
public void deepCopyIterator(final SortedKeyValueIterator<Key,Value> iterator){
  if (iterator instanceof AggregationIterator) {
    ((AggregationIterator)iterator).startRowOfAggregation=startRowOfAggregation;
    ((AggregationIterator)iterator).adapter=adapter;
    ((AggregationIterator)iterator).aggregationFunction=aggregationFunction;
    ((AggregationIterator)iterator).aggregationReturned=aggregationReturned;
  }
}

Fixed version (ground truth):
public void deepCopyIterator(final SortedKeyValueIterator<Key,Value> iterator){
  if (iterator instanceof AggregationIterator) {
    ((AggregationIterator)iterator).startRowOfAggregation=startRowOfAggregation;
    ((AggregationIterator)iterator).adapter=adapter;
    ((AggregationIterator)iterator).queryFilterIterator=queryFilterIterator;
    ((AggregationIterator)iterator).parent=parent;
    ((AggregationIterator)iterator).aggregationFunction=aggregationFunction;
    ((AggregationIterator)iterator).aggregationReturned=aggregationReturned;
  }
}
Program: 112979
Project: 112979
Buggy source:
public void setOptions(final Map<String,String> options){
  if (options == null) {
    throw new IllegalArgumentException("String_Node_Str" + WholeRowQueryFilterIterator.class.getName());
  }
  try {
    final String filterStr=options.get(FILTER);
    final byte[] filterBytes=ByteArrayUtils.byteArrayFromString(filterStr);
    filter=PersistenceUtils.fromBinary(filterBytes,DistributableQueryFilter.class);
    final String modelStr=options.get(MODEL);
    final byte[] modelBytes=ByteArrayUtils.byteArrayFromString(modelStr);
    model=PersistenceUtils.fromBinary(modelBytes,CommonIndexModel.class);
    for (    final NumericDimensionField<? extends CommonIndexValue> numericDimension : model.getDimensions()) {
      commonIndexFieldIds.add(numericDimension.getFieldId());
    }
  }
 catch (  final Exception e) {
    throw new IllegalArgumentException(e);
  }
}

Fixed version (ground truth):
public void setOptions(final Map<String,String> options){
  if (options == null) {
    throw new IllegalArgumentException("String_Node_Str" + QueryFilterIterator.class.getName());
  }
  try {
    if (options.containsKey(FILTER)) {
      final String filterStr=options.get(FILTER);
      final byte[] filterBytes=ByteArrayUtils.byteArrayFromString(filterStr);
      filter=PersistenceUtils.fromBinary(filterBytes,DistributableQueryFilter.class);
    }
    if (options.containsKey(MODEL)) {
      final String modelStr=options.get(MODEL);
      final byte[] modelBytes=ByteArrayUtils.byteArrayFromString(modelStr);
      model=PersistenceUtils.fromBinary(modelBytes,CommonIndexModel.class);
      for (      final NumericDimensionField<? extends CommonIndexValue> numericDimension : model.getDimensions()) {
        commonIndexFieldIds.add(numericDimension.getFieldId());
      }
    }
  }
 catch (  final Exception e) {
    throw new IllegalArgumentException(e);
  }
}
Program: 112980
Project: 112980
Buggy source:
@Override protected boolean filter(final Text currentRow,final List<Key> keys,final List<Value> values){
  if ((aggregationIterator != null) && (aggregationIterator.queryFilterIterator != null) && aggregationIterator.queryFilterIterator.isSet()) {
    final PersistentDataset<CommonIndexValue> commonData=new PersistentDataset<CommonIndexValue>();
    final List<AccumuloFieldInfo> unknownData=new ArrayList<AccumuloFieldInfo>();
    for (int i=0; (i < keys.size()) && (i < values.size()); i++) {
      final Key key=keys.get(i);
      final Value value=values.get(i);
      queryFilterIterator.aggregateFieldData(key,value,commonData,unknownData);
    }
    final CommonIndexedPersistenceEncoding encoding=QueryFilterIterator.getEncoding(currentRow,commonData,unknownData);
    final boolean queryFilterResult=queryFilterIterator.applyRowFilter(encoding);
    if (queryFilterResult) {
      aggregationIterator.aggregateRow(currentRow,queryFilterIterator.model,encoding);
    }
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean filter(final Text currentRow,final List<Key> keys,final List<Value> values){
  if ((aggregationIterator != null) && (aggregationIterator.queryFilterIterator != null)) {
    final PersistentDataset<CommonIndexValue> commonData=new PersistentDataset<CommonIndexValue>();
    final List<AccumuloFieldInfo> unknownData=new ArrayList<AccumuloFieldInfo>();
    for (int i=0; (i < keys.size()) && (i < values.size()); i++) {
      final Key key=keys.get(i);
      final Value value=values.get(i);
      aggregationIterator.queryFilterIterator.aggregateFieldData(key,value,commonData,unknownData);
    }
    final CommonIndexedPersistenceEncoding encoding=QueryFilterIterator.getEncoding(currentRow,commonData,unknownData);
    boolean queryFilterResult=true;
    if (aggregationIterator.queryFilterIterator.isSet()) {
      queryFilterResult=aggregationIterator.queryFilterIterator.applyRowFilter(encoding);
    }
    if (queryFilterResult) {
      aggregationIterator.aggregateRow(currentRow,queryFilterIterator.model,encoding);
    }
  }
  return false;
}
Program: 112981
Project: 112981
Buggy source:
private static void testQuery(final DataStore store,final String[] auths,final boolean spatial,final int expectedResultCount,final int expectedNonNullFieldCount) throws IOException {
  final QueryOptions queryOpts=new QueryOptions();
  queryOpts.setAuthorizations(auths);
  try (CloseableIterator<SimpleFeature> it=(CloseableIterator)store.query(queryOpts,spatial ? new SpatialQuery(new GeometryFactory().toGeometry(new Envelope(-1,1,-1,1))) : null)){
    int resultCount=0;
    int nonNullFieldsCount=0;
    while (it.hasNext()) {
      final SimpleFeature feature=it.next();
      for (int a=0; a < feature.getAttributeCount(); a++) {
        if (feature.getAttribute(a) != null) {
          nonNullFieldsCount++;
        }
      }
      resultCount++;
    }
    Assert.assertEquals("String_Node_Str" + (spatial ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Arrays.toString(auths),expectedResultCount,resultCount);
    Assert.assertEquals("String_Node_Str" + (spatial ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Arrays.toString(auths),expectedNonNullFieldCount,nonNullFieldsCount);
  }
 }

Fixed version (ground truth):
private static void testQuery(final DataStore store,final String[] auths,final boolean spatial,final int expectedResultCount,final int expectedNonNullFieldCount) throws IOException {
  final QueryOptions queryOpts=new QueryOptions();
  queryOpts.setAuthorizations(auths);
  try (CloseableIterator<SimpleFeature> it=(CloseableIterator)store.query(queryOpts,spatial ? new SpatialQuery(new GeometryFactory().toGeometry(new Envelope(-1,1,-1,1))) : null)){
    int resultCount=0;
    int nonNullFieldsCount=0;
    while (it.hasNext()) {
      final SimpleFeature feature=it.next();
      for (int a=0; a < feature.getAttributeCount(); a++) {
        if (feature.getAttribute(a) != null) {
          nonNullFieldsCount++;
        }
      }
      resultCount++;
    }
    Assert.assertEquals("String_Node_Str" + (spatial ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Arrays.toString(auths),expectedResultCount,resultCount);
    Assert.assertEquals("String_Node_Str" + (spatial ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Arrays.toString(auths),expectedNonNullFieldCount,nonNullFieldsCount);
  }
   queryOpts.setAggregation(new CountAggregation<>(),new FeatureDataAdapter(getType()));
  try (CloseableIterator<CountResult> it=(CloseableIterator)store.query(queryOpts,spatial ? new SpatialQuery(new GeometryFactory().toGeometry(new Envelope(-1,1,-1,1))) : null)){
    CountResult result=it.next();
    long count=0;
    if (result != null) {
      count=result.getCount();
    }
    Assert.assertEquals("String_Node_Str" + (spatial ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Arrays.toString(auths),expectedResultCount,count);
  }
 }
Program: 112982
Project: 112982
Buggy source:
protected abstract List<ByteArrayId> getAltIndexRowIds(String altIdxTableName,List<ByteArrayId> dataIds,ByteArrayId adapterId);

Fixed version (ground truth):
protected abstract List<ByteArrayId> getAltIndexRowIds(final String altIdxTableName,final List<ByteArrayId> dataIds,final ByteArrayId adapterId,final String... authorizations);
Program: 112983
Project: 112983
Buggy source:
@Override public T next() throws NoSuchElementException {
  if (nextValue == null)   findNext();
  final T previousNext=nextValue;
  if (nextValue == null) {
    throw new NoSuchElementException();
  }
  nextValue=null;
  return previousNext;
}

Fixed version (ground truth):
@Override public T next() throws NoSuchElementException {
  if (nextValue == null) {
    findNext();
  }
  final T previousNext=nextValue;
  if (nextValue == null) {
    throw new NoSuchElementException();
  }
  nextValue=null;
  return previousNext;
}
Program: 112984
Project: 112984
Buggy source:
@Override public PersistableStore getValue(final PropertyManagement propertyManagement){
  try {
    return (PersistableStore)propertyManagement.getProperty(StoreParameters.StoreParam.INPUT_STORE);
  }
 catch (  final Exception e) {
    LOGGER.error("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
@Override public PersistableStore getValue(String stringValue){
  throw new NotImplementedException("String_Node_Str");
}
Program: 112985
Project: 112985
Buggy source:
@Override public PersistableStore getValue(final PropertyManagement propertyManagement){
  try {
    return (PersistableStore)propertyManagement.getProperty(StoreParameters.StoreParam.OUTPUT_STORE);
  }
 catch (  final Exception e) {
    LOGGER.error("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
@Override public PersistableStore getValue(String stringValue){
  throw new NotImplementedException("String_Node_Str");
}
Program: 112986
Project: 112986
Buggy source:
public T getValue(JobContext context,Class<?> scope,T defaultValue);

Fixed version (ground truth):
public T getValue(String stringValue);
Program: 112987
Project: 112987
Buggy source:
@Override public NonSerializableExample getValue(final PropertyManagement propertyManagement){
  return null;
}

Fixed version (ground truth):
@Override public NonSerializableExample getValue(String stringValue){
  throw new NotImplementedException("String_Node_Str");
}
Program: 112988
Project: 112988
Buggy source:
private PrimaryIndex wrapIndexWithOptions(final PrimaryIndex index){
  PrimaryIndex retVal=index;
  if ((numPartitions > 1) && partitionStrategy.equals(PartitionStrategy.HASH)) {
    retVal=new CustomIdIndex(new CompoundIndexStrategy(new HashKeyIndexStrategy(index.getIndexStrategy().getOrderedDimensionDefinitions(),numPartitions),index.getIndexStrategy()),index.getIndexModel(),new ByteArrayId(index.getId().getString() + "String_Node_Str" + PartitionStrategy.HASH.name()+ "String_Node_Str"+ numPartitions));
  }
 else   if (numPartitions > 1) {
    if (partitionStrategy.equals(PartitionStrategy.NONE)) {
      LOGGER.warn("String_Node_Str");
    }
    retVal=new CustomIdIndex(new CompoundIndexStrategy(new RoundRobinKeyIndexStrategy(numPartitions),index.getIndexStrategy()),index.getIndexModel(),new ByteArrayId(index.getId().getString() + "String_Node_Str" + PartitionStrategy.ROUND_ROBIN.name()+ "String_Node_Str"+ numPartitions));
  }
  if ((getType() != null) && (getType().length() > 0)) {
    retVal=new CustomIdIndex(retVal.getIndexStrategy(),retVal.getIndexModel(),new ByteArrayId(getType()));
  }
  return retVal;
}

Fixed version (ground truth):
private PrimaryIndex wrapIndexWithOptions(final PrimaryIndex index){
  PrimaryIndex retVal=index;
  if ((numPartitions > 1) && partitionStrategy.equals(PartitionStrategy.HASH)) {
    retVal=new CustomIdIndex(new CompoundIndexStrategy(new HashKeyIndexStrategy(index.getIndexStrategy().getOrderedDimensionDefinitions(),numPartitions),index.getIndexStrategy()),index.getIndexModel(),new ByteArrayId(index.getId().getString() + "String_Node_Str" + PartitionStrategy.HASH.name()+ "String_Node_Str"+ numPartitions));
  }
 else   if (numPartitions > 1) {
    if (partitionStrategy.equals(PartitionStrategy.NONE)) {
      LOGGER.warn("String_Node_Str");
    }
    retVal=new CustomIdIndex(new CompoundIndexStrategy(new RoundRobinKeyIndexStrategy(numPartitions),index.getIndexStrategy()),index.getIndexModel(),new ByteArrayId(index.getId().getString() + "String_Node_Str" + PartitionStrategy.ROUND_ROBIN.name()+ "String_Node_Str"+ numPartitions));
  }
  if ((getNameOverride() != null) && (getNameOverride().length() > 0)) {
    retVal=new CustomIdIndex(retVal.getIndexStrategy(),retVal.getIndexModel(),new ByteArrayId(getNameOverride()));
  }
  return retVal;
}
Program: 112991
Project: 112991
Buggy source:
public synchronized static List<Param> getPluginParams(final StoreFactoryFamilySpi storeFactoryFamily){
  List<Param> params=paramMap.get(storeFactoryFamily.getName());
  if (params == null) {
    final ConfigOption[] configOptions=GeoWaveStoreFinder.getAllOptions(storeFactoryFamily);
    params=new ArrayList<Param>(Lists.transform(Lists.newArrayList(configOptions),new GeoWaveConfigOptionToGeoToolsConfigOption()));
    params.add(GEOWAVE_NAMESPACE);
    params.add(LOCK_MGT);
    params.add(AUTH_MGT);
    params.add(AUTH_URL);
    params.add(TRANSACTION_BUFFER_SIZE_PARAM);
    params.add(QUERY_INDEX_STRATEGY);
    paramMap.put(storeFactoryFamily.getName(),params);
  }
  return params;
}

Fixed version (ground truth):
public synchronized static List<Param> getPluginParams(final StoreFactoryFamilySpi storeFactoryFamily){
  List<Param> params=paramMap.get(storeFactoryFamily.getName());
  if (params == null) {
    final ConfigOption[] configOptions=GeoWaveStoreFinder.getAllOptions(storeFactoryFamily);
    params=new ArrayList<Param>(Lists.transform(Lists.newArrayList(configOptions),new GeoWaveConfigOptionToGeoToolsConfigOption()));
    params.add(FEATURE_NAMESPACE);
    params.add(GEOWAVE_NAMESPACE);
    params.add(LOCK_MGT);
    params.add(AUTH_MGT);
    params.add(AUTH_URL);
    params.add(TRANSACTION_BUFFER_SIZE_PARAM);
    params.add(QUERY_INDEX_STRATEGY);
    paramMap.put(storeFactoryFamily.getName(),params);
  }
  return params;
}
Program: 112992
Project: 112992
Buggy source:
protected void tearDown() throws Exception {
synchronized (MUTEX) {
    if (!DEFER_CLEANUP.get()) {
      List<TestEnvironment> envs=Arrays.asList(testEnvs);
      ListIterator<TestEnvironment> it=envs.listIterator();
      while (it.hasPrevious()) {
        it.previous().tearDown();
      }
    }
  }
}

Fixed version (ground truth):
protected void tearDown() throws Exception {
synchronized (MUTEX) {
    if (!DEFER_CLEANUP.get()) {
      List<TestEnvironment> envs=Arrays.asList(testEnvs);
      ListIterator<TestEnvironment> it=envs.listIterator(envs.size());
      while (it.hasPrevious()) {
        it.previous().tearDown();
      }
    }
  }
}
Program: 112994
Project: 112994
Buggy source:
private void initializePositionMaps(){
  for (int i=0; i < reprojectedType.getAttributeCount(); i++) {
    final AttributeDescriptor ad=reprojectedType.getDescriptor(i);
    final ByteArrayId currFieldId=new ByteArrayId(ad.getLocalName());
    fieldToPositionMap.put(currFieldId,i);
  }
  positionToFieldMap=fieldToPositionMap.inverse();
}

Fixed version (ground truth):
private void initializePositionMaps(){
  for (int i=0; i < reprojectedType.getAttributeCount(); i++) {
    final AttributeDescriptor ad=reprojectedType.getDescriptor(i);
    final ByteArrayId currFieldId=new ByteArrayId(ad.getLocalName());
    fieldToPositionMap.forcePut(currFieldId,i);
  }
  positionToFieldMap=fieldToPositionMap.inverse();
}
Program: 112996
Project: 112996
Buggy source:
private void findEnd(final Iterator<Range> rangeIt,final Collection<Range> internalRanges,final Range seekRange){
  while (rangeIt.hasNext()) {
    final Range internalRange=rangeIt.next();
    if (internalRange.getEndKey().compareTo(seekRange.getEndKey()) > 0) {
      if (internalRange.getStartKey().compareTo(seekRange.getEndKey()) > 0) {
        return;
      }
 else {
        internalRanges.add(new Range(internalRange.getStartKey(),seekRange.getEndKey()));
        return;
      }
    }
 else {
      internalRanges.add(internalRange);
    }
  }
}

Fixed version (ground truth):
private void findEnd(final Iterator<Range> rangeIt,final Collection<Range> internalRanges,final Range seekRange){
  while (rangeIt.hasNext()) {
    final Range internalRange=rangeIt.next();
    if (internalRange.getEndKey() == null || internalRange.getEndKey().compareTo(seekRange.getEndKey()) > 0) {
      if (internalRange.getStartKey() != null && internalRange.getStartKey().compareTo(seekRange.getEndKey()) > 0) {
        return;
      }
 else {
        internalRanges.add(new Range(internalRange.getStartKey(),seekRange.getEndKey()));
        return;
      }
    }
 else {
      internalRanges.add(internalRange);
    }
  }
}
Program: 112997
Project: 112997
Buggy source:
private void findStart(final Iterator<Range> rangeIt,final Collection<Range> internalRanges,final Range seekRange){
  while (rangeIt.hasNext()) {
    final Range internalRange=rangeIt.next();
    if (internalRange.getEndKey().compareTo(seekRange.getStartKey()) > 0) {
      if (internalRange.getStartKey().compareTo(seekRange.getStartKey()) > 0) {
        internalRanges.add(internalRange);
        return;
      }
 else {
        internalRanges.add(new Range(seekRange.getStartKey(),internalRange.getEndKey()));
        return;
      }
    }
  }
}

Fixed version (ground truth):
private void findStart(final Iterator<Range> rangeIt,final Collection<Range> internalRanges,final Range seekRange){
  while (rangeIt.hasNext()) {
    final Range internalRange=rangeIt.next();
    if (internalRange.getEndKey() == null || internalRange.getEndKey().compareTo(seekRange.getStartKey()) > 0) {
      if (internalRange.getStartKey() != null && internalRange.getStartKey().compareTo(seekRange.getStartKey()) > 0) {
        internalRanges.add(internalRange);
        return;
      }
 else {
        internalRanges.add(new Range(seekRange.getStartKey(),internalRange.getEndKey()));
        return;
      }
    }
  }
}
Program: 112998
Project: 112998
Buggy source:
public MemoryAdapterStore(final DataAdapter<?>[] adapters){
  adapterMap=new HashMap<ByteArrayId,DataAdapter<?>>();
  for (  final DataAdapter<?> adapter : adapters) {
    adapterMap.put(adapter.getAdapterId(),adapter);
  }
}

Fixed version (ground truth):
public MemoryAdapterStore(final DataAdapter<?>[] adapters){
  adapterMap=Collections.synchronizedMap(new HashMap<ByteArrayId,DataAdapter<?>>());
  for (  final DataAdapter<?> adapter : adapters) {
    adapterMap.put(adapter.getAdapterId(),adapter);
  }
}
Program: 112999
Project: 112999
Buggy source:
private void readObject(final java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
  final int count=in.readInt();
  adapterMap=new HashMap<ByteArrayId,DataAdapter<?>>();
  for (int i=0; i < count; i++) {
    final ByteArrayId id=(ByteArrayId)in.readObject();
    final byte[] data=(byte[])in.readObject();
    adapterMap.put(id,PersistenceUtils.fromBinary(data,DataAdapter.class));
  }
}

Fixed version (ground truth):
private void readObject(final java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
  final int count=in.readInt();
  adapterMap=Collections.synchronizedMap(new HashMap<ByteArrayId,DataAdapter<?>>());
  for (int i=0; i < count; i++) {
    final ByteArrayId id=(ByteArrayId)in.readObject();
    final byte[] data=(byte[])in.readObject();
    adapterMap.put(id,PersistenceUtils.fromBinary(data,DataAdapter.class));
  }
}
Program: 113000
Project: 113000
Buggy source:
@Override public void setup(final PropertyManagement runTimeProperties,final Configuration configuration) throws Exception {
  final DataStorePluginOptions dataStoreOptions=((PersistableStore)runTimeProperties.getProperty(StoreParam.INPUT_STORE)).getDataStoreOptions();
  GeoWaveInputFormat.setDataStoreName(configuration,dataStoreOptions.getType());
  GeoWaveInputFormat.setStoreConfigOptions(configuration,dataStoreOptions.getFactoryOptionsAsMap());
}

Fixed version (ground truth):
@Override public void setup(final PropertyManagement runTimeProperties,final Configuration configuration) throws Exception {
  final DataStorePluginOptions dataStoreOptions=((PersistableStore)runTimeProperties.getProperty(StoreParam.INPUT_STORE)).getDataStoreOptions();
  GeoWaveOutputFormat.setDataStoreName(configuration,dataStoreOptions.getType());
  GeoWaveOutputFormat.setStoreConfigOptions(configuration,dataStoreOptions.getFactoryOptionsAsMap());
}
Program: 113001
Project: 113001
Buggy source:
private void runScan(final DistributableQuery query) throws Exception {
  final DBScanIterationsJobRunner jobRunner=new DBScanIterationsJobRunner();
  Configuration conf=MapReduceTestUtils.getConfiguration();
  GeoWaveOutputFormat.setDataStoreName(conf,dataStorePluginOptions.getFactoryFamily().getDataStoreFactory().getName());
  GeoWaveOutputFormat.setStoreConfigOptions(conf,ConfigUtils.populateListFromOptions(dataStorePluginOptions.getFactoryOptions()));
  final int res=jobRunner.run(conf,new PropertyManagement(new ParameterEnum[]{ExtractParameters.Extract.QUERY,ExtractParameters.Extract.QUERY_OPTIONS,ExtractParameters.Extract.MIN_INPUT_SPLIT,ExtractParameters.Extract.MAX_INPUT_SPLIT,PartitionParameters.Partition.MAX_DISTANCE,PartitionParameters.Partition.PARTITIONER_CLASS,ClusteringParameters.Clustering.MINIMUM_SIZE,StoreParam.INPUT_STORE,MapReduceParameters.MRConfig.HDFS_BASE_DIR,OutputParameters.Output.REDUCER_COUNT,InputParameters.Input.INPUT_FORMAT,GlobalParameters.Global.BATCH_ID,PartitionParameters.Partition.PARTITION_DECREASE_RATE,PartitionParameters.Partition.PARTITION_PRECISION},new Object[]{query,new QueryOptions(),Integer.toString(MapReduceTestUtils.MIN_INPUT_SPLITS),Integer.toString(MapReduceTestUtils.MAX_INPUT_SPLITS),10000.0,OrthodromicDistancePartitioner.class,10,new PersistableStore(dataStorePluginOptions),TestUtils.TEMP_DIR + File.separator + MapReduceTestEnvironment.HDFS_BASE_DIRECTORY+ "String_Node_Str",2,GeoWaveInputFormatConfiguration.class,"String_Node_Str",0.15,0.95}));
  Assert.assertEquals(0,res);
  Assert.assertTrue(readHulls() > 2);
  System.gc();
}

Fixed version (ground truth):
private void runScan(final DistributableQuery query) throws Exception {
  final DBScanIterationsJobRunner jobRunner=new DBScanIterationsJobRunner();
  Configuration conf=MapReduceTestUtils.getConfiguration();
  final int res=jobRunner.run(conf,new PropertyManagement(new ParameterEnum[]{ExtractParameters.Extract.QUERY,ExtractParameters.Extract.QUERY_OPTIONS,ExtractParameters.Extract.MIN_INPUT_SPLIT,ExtractParameters.Extract.MAX_INPUT_SPLIT,PartitionParameters.Partition.MAX_DISTANCE,PartitionParameters.Partition.PARTITIONER_CLASS,ClusteringParameters.Clustering.MINIMUM_SIZE,StoreParam.INPUT_STORE,MapReduceParameters.MRConfig.HDFS_BASE_DIR,OutputParameters.Output.REDUCER_COUNT,InputParameters.Input.INPUT_FORMAT,GlobalParameters.Global.BATCH_ID,PartitionParameters.Partition.PARTITION_DECREASE_RATE,PartitionParameters.Partition.PARTITION_PRECISION},new Object[]{query,new QueryOptions(),Integer.toString(MapReduceTestUtils.MIN_INPUT_SPLITS),Integer.toString(MapReduceTestUtils.MAX_INPUT_SPLITS),10000.0,OrthodromicDistancePartitioner.class,10,new PersistableStore(dataStorePluginOptions),TestUtils.TEMP_DIR + File.separator + MapReduceTestEnvironment.HDFS_BASE_DIRECTORY+ "String_Node_Str",2,GeoWaveInputFormatConfiguration.class,"String_Node_Str",0.15,0.95}));
  Assert.assertEquals(0,res);
  Assert.assertTrue(readHulls() > 2);
  System.gc();
}
Program: 113004
Project: 113004
Buggy source:
public synchronized void initProperties(){
  if (kafkaProperties == null) {
    final Properties properties=new Properties();
    if (kafkaPropertyFile != null) {
      if (!readAndVerifyProperties(kafkaPropertyFile,properties)) {
        throw new ParameterException("String_Node_Str");
      }
      applyOverrides(properties);
    }
    kafkaProperties=properties;
  }
}

Fixed version (ground truth):
public synchronized void initProperties(){
  if (kafkaProperties == null) {
    final Properties properties=new Properties();
    if (kafkaPropertyFile != null) {
      if (!readAndVerifyProperties(kafkaPropertyFile,properties)) {
        throw new ParameterException("String_Node_Str");
      }
    }
    applyOverrides(properties);
    kafkaProperties=properties;
  }
}
Program: 113006
Project: 113006
Buggy source:
public static void main(final String[] args){
  if ((args == null) || (args.length == 0)) {
    log.error("String_Node_Str");
    System.exit(1);
  }
  final SimpleIngestIndexWriter si=new SimpleIngestIndexWriter();
  DataStore geowaveDataStore=null;
  String namespace=null;
  String instance=null;
  if (args.length != 5) {
    log.error("String_Node_Str");
    System.exit(1);
  }
  namespace=args[5];
  instance=args[2];
  try {
    final BasicAccumuloOperations bao=si.getAccumuloOperationsInstance(args[1],args[2],args[3],args[4],args[5]);
    geowaveDataStore=si.getAccumuloGeowaveDataStore(bao);
  }
 catch (  final Exception e) {
    log.error("String_Node_Str",e);
    System.exit(1);
  }
  if (geowaveDataStore != null) {
    si.generateGrid(geowaveDataStore);
  }
 else {
    log.error("String_Node_Str");
  }
  System.out.println("String_Node_Str" + namespace + "String_Node_Str"+ instance);
}

Fixed version (ground truth):
public static void main(final String[] args){
  if ((args == null) || (args.length == 0)) {
    log.error("String_Node_Str");
    System.exit(1);
  }
  final SimpleIngestIndexWriter si=new SimpleIngestIndexWriter();
  DataStore geowaveDataStore=null;
  String namespace=null;
  String instance=null;
  if (args.length != 5) {
    log.error("String_Node_Str");
    System.exit(1);
  }
  namespace=args[5];
  instance=args[2];
  try {
    final BasicAccumuloOperations bao=si.getAccumuloOperationsInstance(args[1],args[2],args[3],args[4],args[5]);
    geowaveDataStore=si.getAccumuloGeowaveDataStore(bao);
  }
 catch (  final Exception e) {
    log.error("String_Node_Str",e);
    System.exit(1);
  }
  si.generateGrid(geowaveDataStore);
  System.out.println("String_Node_Str" + namespace + "String_Node_Str"+ instance);
}