nus-yam/ex-repair huggingface dataset:
Program: 112895
Project: 112895
Buggy source:
@Override public boolean hasNext(){
  double bestIndexBitsUsed=-1;
  int bestIndexDimensionCount=-1;
  PrimaryIndex bestIdx=null;
  while (!done && (i < indices.length)) {
    nextIdx=indices[i++];
    if (nextIdx.getIndexStrategy().getOrderedDimensionDefinitions().length == 0) {
      continue;
    }
    final List<MultiDimensionalNumericData> queryRanges=query.getIndexConstraints(nextIdx);
    if (IndexUtils.isFullTableScan(queryRanges)) {
      if (bestIdx == null) {
        bestIdx=nextIdx;
      }
    }
 else {
      double currentBitsUsed=0;
      final int currentDimensionCount=nextIdx.getIndexStrategy().getOrderedDimensionDefinitions().length;
      if (currentDimensionCount >= bestIndexDimensionCount) {
        for (        final MultiDimensionalNumericData qr : queryRanges) {
          final double[] dataRangePerDimension=new double[qr.getDimensionCount()];
          for (int d=0; d < dataRangePerDimension.length; d++) {
            dataRangePerDimension[d]=qr.getMaxValuesPerDimension()[d] - qr.getMinValuesPerDimension()[d];
          }
          currentBitsUsed+=IndexUtils.getDimensionalBitsUsed(nextIdx.getIndexStrategy(),dataRangePerDimension);
        }
        if ((currentDimensionCount > bestIndexDimensionCount) || (currentBitsUsed > bestIndexBitsUsed)) {
          bestIndexBitsUsed=currentBitsUsed;
          bestIndexDimensionCount=currentDimensionCount;
          bestIdx=nextIdx;
        }
      }
    }
  }
  nextIdx=bestIdx;
  done=true;
  return nextIdx != null;
}

Fixed version (ground truth):
@Override public boolean hasNext(){
  double bestIndexBitsUsed=-1;
  int bestIndexDimensionCount=-1;
  PrimaryIndex bestIdx=null;
  while (!done && (i < indices.length)) {
    nextIdx=indices[i++];
    if (nextIdx.getIndexStrategy().getOrderedDimensionDefinitions().length == 0) {
      continue;
    }
    final List<MultiDimensionalNumericData> queryRanges=query.getIndexConstraints(nextIdx);
    final int currentDimensionCount=nextIdx.getIndexStrategy().getOrderedDimensionDefinitions().length;
    if (IndexUtils.isFullTableScan(queryRanges) || !queryRangeDimensionsMatch(currentDimensionCount,queryRanges)) {
      if (bestIdx == null) {
        bestIdx=nextIdx;
      }
    }
 else {
      double currentBitsUsed=0;
      if (currentDimensionCount >= bestIndexDimensionCount) {
        for (        final MultiDimensionalNumericData qr : queryRanges) {
          final double[] dataRangePerDimension=new double[qr.getDimensionCount()];
          for (int d=0; d < dataRangePerDimension.length; d++) {
            dataRangePerDimension[d]=qr.getMaxValuesPerDimension()[d] - qr.getMinValuesPerDimension()[d];
          }
          currentBitsUsed+=IndexUtils.getDimensionalBitsUsed(nextIdx.getIndexStrategy(),dataRangePerDimension);
        }
        if ((currentDimensionCount > bestIndexDimensionCount) || (currentBitsUsed > bestIndexBitsUsed)) {
          bestIndexBitsUsed=currentBitsUsed;
          bestIndexDimensionCount=currentDimensionCount;
          bestIdx=nextIdx;
        }
      }
    }
  }
  nextIdx=bestIdx;
  done=true;
  return nextIdx != null;
}
Program: 112896
Project: 112896
Buggy source:
@Test public void testMax() throws IllegalArgumentException, NoSuchElementException, IOException {
  final FeatureReader<SimpleFeatureType,SimpleFeature> reader=dataStore.getFeatureReader(query,Transaction.AUTO_COMMIT);
  final MaxVisitor visitor=new MaxVisitor("String_Node_Str",type);
  unwrapDelegatingFeatureReader(reader).getFeatureCollection().accepts(visitor,null);
  assertTrue(visitor.getMax().equals(etime));
}

Fixed version (ground truth):
@Test public void testMax() throws IllegalArgumentException, NoSuchElementException, IOException {
  final FeatureReader<SimpleFeatureType,SimpleFeature> reader=dataStore.getFeatureReader(query,Transaction.AUTO_COMMIT);
  final MaxVisitor visitor=new MaxVisitor("String_Node_Str",type);
  unwrapDelegatingFeatureReader(reader).getFeatureCollection().accepts(visitor,null);
  assertTrue(visitor.getMax().equals(mtime));
}
Program: 112898
Project: 112898
Buggy source:
@Override public NumericDimensionField<?>[] getDimensions(){
  return dimensions;
}

Fixed version (ground truth):
@Override public NumericDimensionField<? extends CommonIndexValue>[] getDimensions(){
  return dimensions;
}
Program: 112899
Project: 112899
Buggy source:
@Override public Void computeResults(final OperationParams params) throws Exception {
  final File propFile=getGeoWaveConfigFile(params);
  final Properties existingProps=ConfigOptions.loadProperties(propFile,null);
  if (url != null) {
    existingProps.setProperty(GEOSERVER_URL,url);
  }
  if (getName() != null) {
    existingProps.setProperty(GEOSERVER_USER,getName());
  }
  if (getPass() != null) {
    existingProps.setProperty(GEOSERVER_PASS,getPass());
  }
  if (getWorkspace() != null) {
    existingProps.setProperty(GEOSERVER_WORKSPACE,getWorkspace());
  }
  ConfigOptions.writeProperties(propFile,existingProps);
  GeoServerRestClient.invalidateInstance();
  return null;
}

Fixed version (ground truth):
@Override public String computeResults(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  url=parameters.get(0);
  final Properties existingProps=getGeoWaveConfigProperties(params);
  if (url != null) {
    existingProps.setProperty(GEOSERVER_URL,url);
  }
  if (getName() != null) {
    existingProps.setProperty(GEOSERVER_USER,getName());
  }
  if (getPass() != null) {
    existingProps.setProperty(GEOSERVER_PASS,getPass());
  }
  if (getWorkspace() != null) {
    existingProps.setProperty(GEOSERVER_WORKSPACE,getWorkspace());
  }
  sslConfigOptions.saveProperties(existingProps);
  ConfigOptions.writeProperties(getGeoWaveConfigFile(params),existingProps,this.getClass(),GEOSERVER_NAMESPACE_PREFIX);
  GeoServerRestClient.invalidateInstance();
  StringBuilder builder=new StringBuilder();
  for (  Object key : existingProps.keySet()) {
    if (key.toString().startsWith("String_Node_Str")) {
      builder.append(key.toString() + "String_Node_Str" + existingProps.getProperty(key.toString())+ "String_Node_Str");
    }
  }
  return builder.toString();
}
Program: 112900
Project: 112900
Buggy source:
@Override public void execute(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  url=parameters.get(0);
  final Properties existingProps=getGeoWaveConfigProperties(params);
  if (url != null) {
    existingProps.setProperty(GEOSERVER_URL,url);
  }
  if (getName() != null) {
    existingProps.setProperty(GEOSERVER_USER,getName());
  }
  if (getPass() != null) {
    existingProps.setProperty(GEOSERVER_PASS,getPass());
  }
  if (getWorkspace() != null) {
    existingProps.setProperty(GEOSERVER_WORKSPACE,getWorkspace());
  }
  sslConfigOptions.saveProperties(existingProps);
  ConfigOptions.writeProperties(getGeoWaveConfigFile(params),existingProps,this.getClass(),GEOSERVER_NAMESPACE_PREFIX);
}

Fixed version (ground truth):
@Override public void execute(final OperationParams params) throws Exception {
  JCommander.getConsole().println(computeResults(params));
}
Program: 112901
Project: 112901
Buggy source:
@Override public String computeResults(final OperationParams params) throws Exception {
  layerName=parameters.get(0);
  final Response getLayerResponse=geoserverClient.getFeatureLayer(layerName);
  if (getLayerResponse.getStatus() == Status.OK.getStatusCode()) {
    final JSONObject jsonResponse=JSONObject.fromObject(getLayerResponse.getEntity());
    return "String_Node_Str" + layerName + "String_Node_Str"+ jsonResponse.toString(2);
  }
  return "String_Node_Str" + layerName + "String_Node_Str"+ getLayerResponse.getStatus();
}

Fixed version (ground truth):
@Override public String computeResults(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  layerName=parameters.get(0);
  final Response getLayerResponse=geoserverClient.getFeatureLayer(layerName);
  if (getLayerResponse.getStatus() == Status.OK.getStatusCode()) {
    final JSONObject jsonResponse=JSONObject.fromObject(getLayerResponse.getEntity());
    return "String_Node_Str" + layerName + "String_Node_Str"+ jsonResponse.toString(2);
  }
  return "String_Node_Str" + layerName + "String_Node_Str"+ getLayerResponse.getStatus();
}
Program: 112902
Project: 112902
Buggy source:
@Override public void execute(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  JCommander.getConsole().println(computeResults(params));
}

Fixed version (ground truth):
@Override public void execute(final OperationParams params) throws Exception {
  JCommander.getConsole().println(computeResults(params));
}
Program: 112903
Project: 112903
Buggy source:
@Override public List<String> computeResults(final OperationParams params) throws Exception {
  storeName=parameters.get(0);
  final ArrayList<String> adapterList=geoserverClient.getStoreAdapters(storeName,null);
  return adapterList;
}

Fixed version (ground truth):
@Override public List<String> computeResults(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  storeName=parameters.get(0);
  final List<String> adapterList=geoserverClient.getStoreAdapters(storeName,null);
  return adapterList;
}
Program: 112904
Project: 112904
Buggy source:
@Override public void execute(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  JCommander.getConsole().println("String_Node_Str" + storeName + "String_Node_Str");
  for (  final String adapterId : computeResults(params)) {
    JCommander.getConsole().println(adapterId);
  }
}

Fixed version (ground truth):
@Override public void execute(final OperationParams params) throws Exception {
  List<String> adapterList=computeResults(params);
  JCommander.getConsole().println("String_Node_Str" + storeName + "String_Node_Str");
  for (  final String adapterId : adapterList) {
    JCommander.getConsole().println(adapterId);
  }
}
Program: 112905
Project: 112905
Buggy source:
@Override public String computeResults(final OperationParams params) throws Exception {
  style=parameters.get(0);
  final Response getStyleResponse=geoserverClient.getStyle(style);
  if (getStyleResponse.getStatus() == Status.OK.getStatusCode()) {
    final String style=IOUtils.toString((InputStream)getStyleResponse.getEntity());
    return "String_Node_Str" + style + "String_Node_Str"+ style;
  }
  return "String_Node_Str" + style + "String_Node_Str"+ getStyleResponse.getStatus();
}

Fixed version (ground truth):
@Override public String computeResults(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  style=parameters.get(0);
  final Response getStyleResponse=geoserverClient.getStyle(style);
  if (getStyleResponse.getStatus() == Status.OK.getStatusCode()) {
    final String style=IOUtils.toString((InputStream)getStyleResponse.getEntity());
    return "String_Node_Str" + style + "String_Node_Str"+ style;
  }
  return "String_Node_Str" + style + "String_Node_Str"+ getStyleResponse.getStatus();
}
Program: 112906
Project: 112906
Buggy source:
@Override public void execute(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  JCommander.getConsole().println(computeResults(params));
}

Fixed version (ground truth):
@Override public void execute(final OperationParams params) throws Exception {
  JCommander.getConsole().println(computeResults(params));
}
Program: 112907
Project: 112907
Buggy source:
@Override public void execute(final OperationParams params) throws Exception {
}

Fixed version (ground truth):
@Override public void execute(final OperationParams params) throws Exception {
  JCommander.getConsole().println(computeResults(params));
}
Program: 112908
Project: 112908
Buggy source:
@Override public String computeResults(final OperationParams params) throws Exception {
  if ((workspace == null) || workspace.isEmpty()) {
    workspace=geoserverClient.getConfig().getWorkspace();
  }
  csName=parameters.get(0);
  final Response getCvgStoreResponse=geoserverClient.getCoverages(workspace,csName);
  if (getCvgStoreResponse.getStatus() == Status.OK.getStatusCode()) {
    final JSONObject jsonResponse=JSONObject.fromObject(getCvgStoreResponse.getEntity());
    final JSONArray cvgArray=jsonResponse.getJSONArray("String_Node_Str");
    return "String_Node_Str" + csName + "String_Node_Str"+ cvgArray.toString(2);
  }
  return "String_Node_Str" + csName + "String_Node_Str"+ getCvgStoreResponse.getStatus();
}

Fixed version (ground truth):
@Override public String computeResults(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  if ((workspace == null) || workspace.isEmpty()) {
    workspace=geoserverClient.getConfig().getWorkspace();
  }
  csName=parameters.get(0);
  final Response getCvgStoreResponse=geoserverClient.getCoverages(workspace,csName);
  if (getCvgStoreResponse.getStatus() == Status.OK.getStatusCode()) {
    final JSONObject jsonResponse=JSONObject.fromObject(getCvgStoreResponse.getEntity());
    final JSONArray cvgArray=jsonResponse.getJSONArray("String_Node_Str");
    return "String_Node_Str" + csName + "String_Node_Str"+ cvgArray.toString(2);
  }
  return "String_Node_Str" + csName + "String_Node_Str"+ getCvgStoreResponse.getStatus();
}
Program: 112909
Project: 112909
Buggy source:
@Override public void execute(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  JCommander.getConsole().println(computeResults(params));
}

Fixed version (ground truth):
@Override public void execute(final OperationParams params) throws Exception {
  JCommander.getConsole().println(computeResults(params));
}
Program: 112910
Project: 112910
Buggy source:
@Override public String computeResults(final OperationParams params) throws Exception {
  if ((workspace == null) || workspace.isEmpty()) {
    workspace=geoserverClient.getConfig().getWorkspace();
  }
  cvgName=parameters.get(0);
  final Response getCvgResponse=geoserverClient.deleteCoverage(workspace,cvgstore,cvgName);
  if (getCvgResponse.getStatus() == Status.OK.getStatusCode()) {
    return "String_Node_Str" + cvgName + "String_Node_Str";
  }
  return "String_Node_Str" + cvgName + "String_Node_Str"+ getCvgResponse.getStatus();
}

Fixed version (ground truth):
@Override public String computeResults(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  if ((workspace == null) || workspace.isEmpty()) {
    workspace=geoserverClient.getConfig().getWorkspace();
  }
  cvgName=parameters.get(0);
  final Response getCvgResponse=geoserverClient.deleteCoverage(workspace,cvgstore,cvgName);
  if (getCvgResponse.getStatus() == Status.OK.getStatusCode()) {
    return "String_Node_Str" + cvgName + "String_Node_Str";
  }
  return "String_Node_Str" + cvgName + "String_Node_Str"+ getCvgResponse.getStatus();
}
Program: 112911
Project: 112911
Buggy source:
@Override public void execute(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  JCommander.getConsole().println(computeResults(params));
}

Fixed version (ground truth):
@Override public void execute(final OperationParams params) throws Exception {
  JCommander.getConsole().println(computeResults(params));
}
Program: 112912
Project: 112912
Buggy source:
@Override public String computeResults(final OperationParams params) throws Exception {
  if ((workspace == null) || workspace.isEmpty()) {
    workspace=geoserverClient.getConfig().getWorkspace();
  }
  cvgstoreName=parameters.get(0);
  final Response deleteCvgStoreResponse=geoserverClient.deleteCoverageStore(workspace,cvgstoreName);
  if (deleteCvgStoreResponse.getStatus() == Status.OK.getStatusCode()) {
    return "String_Node_Str" + cvgstoreName + "String_Node_Str"+ workspace+ "String_Node_Str";
  }
  return "String_Node_Str" + cvgstoreName + "String_Node_Str"+ workspace+ "String_Node_Str"+ deleteCvgStoreResponse.getStatus();
}

Fixed version (ground truth):
@Override public String computeResults(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  if ((workspace == null) || workspace.isEmpty()) {
    workspace=geoserverClient.getConfig().getWorkspace();
  }
  cvgstoreName=parameters.get(0);
  final Response deleteCvgStoreResponse=geoserverClient.deleteCoverageStore(workspace,cvgstoreName);
  if (deleteCvgStoreResponse.getStatus() == Status.OK.getStatusCode()) {
    return "String_Node_Str" + cvgstoreName + "String_Node_Str"+ workspace+ "String_Node_Str";
  }
  return "String_Node_Str" + cvgstoreName + "String_Node_Str"+ workspace+ "String_Node_Str"+ deleteCvgStoreResponse.getStatus();
}
Program: 112913
Project: 112913
Buggy source:
@Override public void execute(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  JCommander.getConsole().println(computeResults(params));
}

Fixed version (ground truth):
@Override public void execute(final OperationParams params) throws Exception {
  JCommander.getConsole().println(computeResults(params));
}
Program: 112914
Project: 112914
Buggy source:
@Override public String computeResults(final OperationParams params) throws Exception {
  if ((workspace == null) || workspace.isEmpty()) {
    workspace=geoserverClient.getConfig().getWorkspace();
  }
  datastoreName=parameters.get(0);
  final Response deleteStoreResponse=geoserverClient.deleteDatastore(workspace,datastoreName);
  if (deleteStoreResponse.getStatus() == Status.OK.getStatusCode()) {
    return "String_Node_Str" + datastoreName + "String_Node_Str"+ workspace+ "String_Node_Str";
  }
  return "String_Node_Str" + datastoreName + "String_Node_Str"+ workspace+ "String_Node_Str"+ deleteStoreResponse.getStatus();
}

Fixed version (ground truth):
@Override public String computeResults(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  if ((workspace == null) || workspace.isEmpty()) {
    workspace=geoserverClient.getConfig().getWorkspace();
  }
  datastoreName=parameters.get(0);
  final Response deleteStoreResponse=geoserverClient.deleteDatastore(workspace,datastoreName);
  if (deleteStoreResponse.getStatus() == Status.OK.getStatusCode()) {
    return "String_Node_Str" + datastoreName + "String_Node_Str"+ workspace+ "String_Node_Str";
  }
  return "String_Node_Str" + datastoreName + "String_Node_Str"+ workspace+ "String_Node_Str"+ deleteStoreResponse.getStatus();
}
Program: 112915
Project: 112915
Buggy source:
@Override public void execute(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  JCommander.getConsole().println(computeResults(params));
}

Fixed version (ground truth):
@Override public void execute(final OperationParams params) throws Exception {
  JCommander.getConsole().println(computeResults(params));
}
Program: 112916
Project: 112916
Buggy source:
@Override public String computeResults(final OperationParams params) throws Exception {
  layerName=parameters.get(0);
  final Response deleteLayerResponse=geoserverClient.deleteFeatureLayer(layerName);
  if (deleteLayerResponse.getStatus() == Status.OK.getStatusCode()) {
    final JSONObject listObj=JSONObject.fromObject(deleteLayerResponse.getEntity());
    return "String_Node_Str" + layerName + "String_Node_Str"+ listObj.toString(2);
  }
  return "String_Node_Str" + layerName + "String_Node_Str"+ deleteLayerResponse.getStatus();
}

Fixed version (ground truth):
@Override public String computeResults(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  layerName=parameters.get(0);
  final Response deleteLayerResponse=geoserverClient.deleteFeatureLayer(layerName);
  if (deleteLayerResponse.getStatus() == Status.OK.getStatusCode()) {
    final JSONObject listObj=JSONObject.fromObject(deleteLayerResponse.getEntity());
    return "String_Node_Str" + layerName + "String_Node_Str"+ listObj.toString(2);
  }
  return "String_Node_Str" + layerName + "String_Node_Str"+ deleteLayerResponse.getStatus();
}
Program: 112917
Project: 112917
Buggy source:
@Override public void execute(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  JCommander.getConsole().println(computeResults(params));
}

Fixed version (ground truth):
@Override public void execute(final OperationParams params) throws Exception {
  JCommander.getConsole().println(computeResults(params));
}
Program: 112918
Project: 112918
Buggy source:
@Override public String computeResults(final OperationParams params) throws Exception {
  styleName=parameters.get(0);
  final Response deleteStyleResponse=geoserverClient.deleteStyle(styleName);
  if (deleteStyleResponse.getStatus() == Status.OK.getStatusCode()) {
    return "String_Node_Str" + styleName + "String_Node_Str";
  }
  return "String_Node_Str" + styleName + "String_Node_Str"+ deleteStyleResponse.getStatus();
}

Fixed version (ground truth):
@Override public String computeResults(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  styleName=parameters.get(0);
  final Response deleteStyleResponse=geoserverClient.deleteStyle(styleName);
  if (deleteStyleResponse.getStatus() == Status.OK.getStatusCode()) {
    return "String_Node_Str" + styleName + "String_Node_Str";
  }
  return "String_Node_Str" + styleName + "String_Node_Str"+ deleteStyleResponse.getStatus();
}
Program: 112919
Project: 112919
Buggy source:
@Override public void execute(final OperationParams params) throws Exception {
  if (parameters.size() != 1) {
    throw new ParameterException("String_Node_Str");
  }
  JCommander.getConsole().println(computeResults(params));
}

Fixed version (ground truth):
@Override public void execute(final OperationParams params) throws Exception {
  JCommander.getConsole().println(computeResults(params));
}
Program: 112920
Project: 112920
Buggy source:
/** 
 * This helper function will load the properties file, or return null if it can't. It's designed to be used by other commands.
 * @param delimiter
 */
public static Properties loadProperties(final File configFile,final String pattern){
  Pattern p=null;
  if (pattern != null) {
    p=Pattern.compile(pattern);
  }
  final Properties properties=new Properties();
  InputStream is=null;
  try {
    if (p != null) {
      try (FileInputStream input=new FileInputStream(configFile);Scanner s=new Scanner(input,CHARSET)){
        final ByteArrayOutputStream out=new ByteArrayOutputStream();
        final PrintWriter writer=new PrintWriter(new OutputStreamWriter(out,CHARSET));
        while (s.hasNext()) {
          final String line=s.nextLine();
          if (p.matcher(line).find()) {
            writer.println(line);
          }
        }
        writer.flush();
        is=new ByteArrayInputStream(out.toByteArray());
      }
     }
 else {
      is=new FileInputStream(configFile);
    }
    properties.load(is);
  }
 catch (  final IOException e) {
    LOGGER.error("String_Node_Str" + configFile,e);
    return null;
  }
 finally {
    if (is != null) {
      try {
        is.close();
      }
 catch (      IOException e) {
        LOGGER.error(e.getMessage(),e);
      }
    }
  }
  return properties;
}

Fixed version (ground truth):
/** 
 * This helper function will load the properties file, or return null if it can't. It's designed to be used by other commands.
 * @param delimiter
 */
public static Properties loadProperties(final File configFile,final String pattern){
  final Properties properties=new Properties();
  if (configFile.exists()) {
    Pattern p=null;
    if (pattern != null) {
      p=Pattern.compile(pattern);
    }
    InputStream is=null;
    try {
      if (p != null) {
        try (FileInputStream input=new FileInputStream(configFile);Scanner s=new Scanner(input,CHARSET)){
          final ByteArrayOutputStream out=new ByteArrayOutputStream();
          final PrintWriter writer=new PrintWriter(new OutputStreamWriter(out,CHARSET));
          while (s.hasNext()) {
            final String line=s.nextLine();
            if (p.matcher(line).find()) {
              writer.println(line);
            }
          }
          writer.flush();
          is=new ByteArrayInputStream(out.toByteArray());
        }
       }
 else {
        is=new FileInputStream(configFile);
      }
      properties.load(is);
    }
 catch (    final IOException e) {
      LOGGER.error("String_Node_Str" + configFile,e);
      return null;
    }
 finally {
      if (is != null) {
        try {
          is.close();
        }
 catch (        IOException e) {
          LOGGER.error(e.getMessage(),e);
        }
      }
    }
  }
  return properties;
}
Program: 112921
Project: 112921
Buggy source:
/** 
 * processes uploaded file, storing in a temporary directory
 * @param entity
 * @return the directory storing the uploaded file
 * @throws Exception
 */
@Post public UploadedFile accept(final Representation entity) throws Exception {
  UploadedFile result;
  if ((entity != null) && MediaType.MULTIPART_FORM_DATA.equals(entity.getMediaType(),true)) {
    final DiskFileItemFactory factory=new DiskFileItemFactory();
    factory.setSizeThreshold(1000240);
    final RestletFileUpload upload=new RestletFileUpload(factory);
    final String tempDir=System.getProperty("String_Node_Str");
    final File dir=new File(tempDir);
    final File filename=File.createTempFile("String_Node_Str","String_Node_Str",dir);
    result=new UploadedFile(filename.getAbsolutePath());
    final List<FileItem> fileList=upload.parseRepresentation(entity);
    if (fileList.size() != 1) {
      throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST);
    }
    FileUtils.copyInputStreamToFile(fileList.get(0).getInputStream(),filename);
  }
 else {
    throw new ResourceException(Status.CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * processes uploaded file, storing in a temporary directory
 * @param entity
 * @return the directory storing the uploaded file
 * @throws Exception
 */
@Post public UploadedFile accept(final Representation entity) throws Exception {
  UploadedFile result;
  if ((entity != null) && MediaType.MULTIPART_FORM_DATA.equals(entity.getMediaType(),true)) {
    final DiskFileItemFactory factory=new DiskFileItemFactory();
    factory.setSizeThreshold(1000240);
    final RestletFileUpload upload=new RestletFileUpload(factory);
    final List<FileItem> fileList=upload.parseRepresentation(entity);
    if (fileList.size() != 1) {
      throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST);
    }
    FileItem item=fileList.get(0);
    final String tempDir=System.getProperty("String_Node_Str");
    final File dir=new File(tempDir);
    final File filename=File.createTempFile("String_Node_Str","String_Node_Str" + item.getName(),dir);
    result=new UploadedFile(filename.getAbsolutePath());
    FileUtils.copyInputStreamToFile(item.getInputStream(),filename);
  }
 else {
    throw new ResourceException(Status.CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE);
  }
  return result;
}
Program: 112922
Project: 112922
Buggy source:
/** 
 * Prompt a user for a password and return the input
 * @param promptMessage
 * @return
 */
public static String promptAndReadPassword(String promptMessage){
  LOGGER.trace("String_Node_Str");
  PropertiesUtils propsUtils=new PropertiesUtils(getProperties());
  boolean defaultEchoEnabled=propsUtils.getBoolean(Constants.CONSOLE_DEFAULT_ECHO_ENABLED_KEY,false);
  boolean passwordEchoEnabled=propsUtils.getBoolean(Constants.CONSOLE_PASSWORD_ECHO_ENABLED_KEY,defaultEchoEnabled);
  LOGGER.debug("String_Node_Str",new Object[]{passwordEchoEnabled ? "String_Node_Str" : "String_Node_Str"});
  getConsole().print(promptMessage);
  char[] passwordChars=getConsole().readPassword(passwordEchoEnabled);
  return new String(passwordChars);
}

Fixed version (ground truth):
/** 
 * Prompt a user for a password and return the input
 * @param promptMessage
 * @return
 */
public static String promptAndReadPassword(String promptMessage){
  LOGGER.trace("String_Node_Str");
  PropertiesUtils propsUtils=new PropertiesUtils(getProperties());
  boolean defaultEchoEnabled=propsUtils.getBoolean(Constants.CONSOLE_DEFAULT_ECHO_ENABLED_KEY,false);
  boolean passwordEchoEnabled=propsUtils.getBoolean(Constants.CONSOLE_PASSWORD_ECHO_ENABLED_KEY,defaultEchoEnabled);
  LOGGER.debug("String_Node_Str",new Object[]{passwordEchoEnabled ? "String_Node_Str" : "String_Node_Str"});
  getConsole().print(promptMessage);
  char[] passwordChars=getConsole().readPassword(passwordEchoEnabled);
  String strPassword=new String(passwordChars);
  passwordChars=null;
  return strPassword;
}
Program: 112923
Project: 112923
Buggy source:
/** 
 * Prompt a user for a standard value and return the input
 * @param promptMessage
 * @return
 */
public static String promptAndReadValue(String promptMessage){
  LOGGER.trace("String_Node_Str");
  PropertiesUtils propsUtils=new PropertiesUtils(getProperties());
  boolean defaultEchoEnabled=propsUtils.getBoolean(Constants.CONSOLE_DEFAULT_ECHO_ENABLED_KEY,false);
  LOGGER.debug("String_Node_Str",new Object[]{defaultEchoEnabled ? "String_Node_Str" : "String_Node_Str"});
  getConsole().print(promptMessage);
  char[] passwordChars=getConsole().readPassword(defaultEchoEnabled);
  return new String(passwordChars);
}

Fixed version (ground truth):
/** 
 * Prompt a user for a standard value and return the input
 * @param promptMessage
 * @return
 */
public static String promptAndReadValue(String promptMessage){
  LOGGER.trace("String_Node_Str");
  PropertiesUtils propsUtils=new PropertiesUtils(getProperties());
  boolean defaultEchoEnabled=propsUtils.getBoolean(Constants.CONSOLE_DEFAULT_ECHO_ENABLED_KEY,false);
  LOGGER.debug("String_Node_Str",new Object[]{defaultEchoEnabled ? "String_Node_Str" : "String_Node_Str"});
  getConsole().print(promptMessage);
  char[] responseChars=getConsole().readPassword(defaultEchoEnabled);
  String response=new String(responseChars);
  responseChars=null;
  return response;
}
Program: 112924
Project: 112924
Buggy source:
public static String getUrl(String url) throws URISyntaxException, MalformedURLException {
  if (url != null) {
    if (isValidURL(url)) {
      return url;
    }
    boolean valid=false;
    for (    String scheme : getSchemes()) {
      if (scheme.toLowerCase().startsWith(scheme + "String_Node_Str")) {
        valid=true;
      }
    }
    if (!valid) {
      url=HTTP + "String_Node_Str" + url;
    }
    URI uri=new URI(url);
    if (uri.getScheme() == null) {
      uri=new URI(HTTP + "String_Node_Str" + url);
    }
    URL targetURL=uri.toURL();
    if (targetURL.getPort() == -1) {
      targetURL=new URL(targetURL.getProtocol(),targetURL.getHost(),targetURL.getDefaultPort(),targetURL.getFile());
    }
    if (String.valueOf(targetURL.getPort()).endsWith("String_Node_Str")) {
      targetURL=new URL(HTTPS,targetURL.getHost(),targetURL.getPort(),targetURL.getFile());
    }
    return targetURL.toString();
  }
  return url;
}

Fixed version (ground truth):
public static String getUrl(String url) throws URISyntaxException, MalformedURLException {
  if (url != null) {
    if (isValidURL(url)) {
      return url;
    }
    boolean valid=isValidScheme(url);
    if (!valid) {
      url=HTTP + "String_Node_Str" + url;
    }
    URI uri=new URI(url);
    if (uri.getScheme() == null) {
      uri=new URI(HTTP + "String_Node_Str" + url);
    }
    URL targetURL=uri.toURL();
    if (targetURL.getPort() == -1) {
      targetURL=new URL(targetURL.getProtocol(),targetURL.getHost(),targetURL.getDefaultPort(),targetURL.getFile());
    }
    if (String.valueOf(targetURL.getPort()).endsWith("String_Node_Str")) {
      targetURL=new URL(HTTPS,targetURL.getHost(),targetURL.getPort(),targetURL.getFile());
    }
    return targetURL.toString();
  }
  return url;
}
Program: 112925
Project: 112925
Buggy source:
public void setEntryName(String entryName){
  this.parameters=new ArrayList<String>();
  this.parameters.add(entryName);
}

Fixed version (ground truth):
public void setEntryName(final String entryName){
  parameters=new ArrayList<String>();
  parameters.add(entryName);
}
Program: 112926
Project: 112926
Buggy source:
public void execute(OperationParams params,String pattern){
  Properties existingProps=getGeoWaveConfigProperties(params);
  Set<String> keysToRemove=new HashSet<String>();
  for (  String key : existingProps.stringPropertyNames()) {
    if (key.startsWith(pattern)) {
      keysToRemove.add(key);
    }
  }
  for (  String key : keysToRemove) {
    existingProps.remove(key);
  }
  ConfigOptions.writeProperties(getGeoWaveConfigFile(params),existingProps);
}

Fixed version (ground truth):
public void execute(final OperationParams params,final String patternPrefix){
  final String pattern=patternPrefix + "String_Node_Str";
  final Properties existingProps=getGeoWaveConfigProperties(params);
  final Set<String> keysToRemove=new HashSet<String>();
  for (  final String key : existingProps.stringPropertyNames()) {
    if (key.startsWith(pattern)) {
      keysToRemove.add(key);
    }
  }
  for (  final String key : keysToRemove) {
    existingProps.remove(key);
  }
  ConfigOptions.writeProperties(getGeoWaveConfigFile(params),existingProps);
}
Program: 112933
Project: 112933
Buggy source:
@Override protected void processParameters(final OperationParams params) throws Exception {
  store=dataStoreOptions.createDataStore();
  indices=new PrimaryIndex[]{new SpatialIndexBuilder().createIndex()};
  coverageNameTemplate=new Template("String_Node_Str",new StringReader(ingestOptions.getCoverageName()),new Configuration());
}

Fixed version (ground truth):
@Override protected void processParameters(final OperationParams params) throws Exception {
  store=dataStoreOptions.createDataStore();
  dataStorePluginOptions=dataStoreOptions;
  indices=new PrimaryIndex[]{new SpatialIndexBuilder().createIndex()};
  coverageNameTemplate=new Template("String_Node_Str",new StringReader(ingestOptions.getCoverageName()),new Configuration());
}
Program: 112934
Project: 112934
Buggy source:
/** 
 * Prompt a user for a password and return the input
 * @param promptMessage
 * @return
 */
protected static String promptAndReadPassword(String promptMessage){
  LOGGER.trace("String_Node_Str");
  PropertiesUtils propsUtils=new PropertiesUtils(getProperties());
  boolean defaultEchoEnabled=propsUtils.getBoolean(Constants.CONSOLE_DEFAULT_ECHO_ENABLED_KEY,false);
  boolean passwordEchoEnabled=propsUtils.getBoolean(Constants.CONSOLE_PASSWORD_ECHO_ENABLED_KEY,defaultEchoEnabled);
  LOGGER.debug("String_Node_Str",new Object[]{passwordEchoEnabled ? "String_Node_Str" : "String_Node_Str"});
  getConsole().print(promptMessage);
  char[] passwordChars=getConsole().readPassword(passwordEchoEnabled);
  return new String(passwordChars);
}

Fixed version (ground truth):
/** 
 * Prompt a user for a password and return the input
 * @param promptMessage
 * @return
 */
public static String promptAndReadPassword(String promptMessage){
  LOGGER.trace("String_Node_Str");
  PropertiesUtils propsUtils=new PropertiesUtils(getProperties());
  boolean defaultEchoEnabled=propsUtils.getBoolean(Constants.CONSOLE_DEFAULT_ECHO_ENABLED_KEY,false);
  boolean passwordEchoEnabled=propsUtils.getBoolean(Constants.CONSOLE_PASSWORD_ECHO_ENABLED_KEY,defaultEchoEnabled);
  LOGGER.debug("String_Node_Str",new Object[]{passwordEchoEnabled ? "String_Node_Str" : "String_Node_Str"});
  getConsole().print(promptMessage);
  char[] passwordChars=getConsole().readPassword(passwordEchoEnabled);
  return new String(passwordChars);
}
Program: 112935
Project: 112935
Buggy source:
/** 
 * Prompt a user for a standard value and return the input
 * @param promptMessage
 * @return
 */
protected static String promptAndReadValue(String promptMessage){
  LOGGER.trace("String_Node_Str");
  PropertiesUtils propsUtils=new PropertiesUtils(getProperties());
  boolean defaultEchoEnabled=propsUtils.getBoolean(Constants.CONSOLE_DEFAULT_ECHO_ENABLED_KEY,false);
  LOGGER.debug("String_Node_Str",new Object[]{defaultEchoEnabled ? "String_Node_Str" : "String_Node_Str"});
  getConsole().print(promptMessage);
  char[] passwordChars=getConsole().readPassword(defaultEchoEnabled);
  return new String(passwordChars);
}

Fixed version (ground truth):
/** 
 * Prompt a user for a standard value and return the input
 * @param promptMessage
 * @return
 */
public static String promptAndReadValue(String promptMessage){
  LOGGER.trace("String_Node_Str");
  PropertiesUtils propsUtils=new PropertiesUtils(getProperties());
  boolean defaultEchoEnabled=propsUtils.getBoolean(Constants.CONSOLE_DEFAULT_ECHO_ENABLED_KEY,false);
  LOGGER.debug("String_Node_Str",new Object[]{defaultEchoEnabled ? "String_Node_Str" : "String_Node_Str"});
  getConsole().print(promptMessage);
  char[] passwordChars=getConsole().readPassword(defaultEchoEnabled);
  return new String(passwordChars);
}
Program: 112936
Project: 112936
Buggy source:
private List<QueryRequest> addQueryRanges(final String tableName,final ByteArrayRange r,final List<ByteArrayId> adapterIDs,final DynamoDBAdapterStore adapterStore){
  final List<QueryRequest> retVal=getPartitionRequests(tableName);
  for (  final QueryRequest queryRequest : retVal) {
    if (adapterIDs.isEmpty()) {
      CloseableIterator<DataAdapter<?>> adapters=adapterStore.getAdapters();
      List<ByteArrayId> adapterIDList=new ArrayList<ByteArrayId>();
      adapters.forEachRemaining(new Consumer<DataAdapter<?>>(){
        @Override public void accept(        DataAdapter<?> t){
          adapterIDList.add(t.getAdapterId());
        }
      }
);
      adapterIDs.addAll(adapterIDList);
    }
    for (    final ByteArrayId adapterID : adapterIDs) {
      addQueryRange(r,queryRequest,adapterID);
    }
  }
  return retVal;
}

Fixed version (ground truth):
private List<QueryRequest> addQueryRanges(final String tableName,final ByteArrayRange r,final List<ByteArrayId> adapterIds,final AdapterStore adapterStore){
  List<QueryRequest> retVal=null;
  if (adapterIds.isEmpty()) {
    final CloseableIterator<DataAdapter<?>> adapters=adapterStore.getAdapters();
    final List<ByteArrayId> adapterIDList=new ArrayList<ByteArrayId>();
    adapters.forEachRemaining(new Consumer<DataAdapter<?>>(){
      @Override public void accept(      final DataAdapter<?> t){
        adapterIDList.add(t.getAdapterId());
      }
    }
);
    adapterIds.addAll(adapterIDList);
  }
  for (  final ByteArrayId adapterId : adapterIds) {
    final List<QueryRequest> internalRequests=getPartitionRequests(tableName);
    for (    final QueryRequest queryRequest : internalRequests) {
      addQueryRange(r,queryRequest,adapterId);
    }
    if (retVal == null) {
      retVal=internalRequests;
    }
 else {
      retVal.addAll(internalRequests);
    }
  }
  if (retVal == null) {
    return Collections.EMPTY_LIST;
  }
  return retVal;
}
Program: 112938
Project: 112938
Buggy source:
private void addQueryRange(final ByteArrayRange r,final QueryRequest query,final ByteArrayId adapterID){
  byte[] start=ByteArrayUtils.combineArrays(adapterID.getBytes(),r.getStart().getBytes());
  byte[] end=ByteArrayUtils.combineArrays(adapterID.getBytes(),r.getEndAsNextPrefix().getBytes());
  query.addKeyConditionsEntry(DynamoDBRow.GW_RANGE_KEY,new Condition().withComparisonOperator(ComparisonOperator.BETWEEN).withAttributeValueList(new AttributeValue().withB(ByteBuffer.wrap(start)),new AttributeValue().withB(ByteBuffer.wrap(end))));
}

Fixed version (ground truth):
private void addQueryRange(final ByteArrayRange r,final QueryRequest query,final ByteArrayId adapterID){
  final byte[] start=ByteArrayUtils.combineArrays(adapterID.getBytes(),r.getStart().getBytes());
  final byte[] end=ByteArrayUtils.combineArrays(adapterID.getBytes(),r.getEndAsNextPrefix().getBytes());
  query.addKeyConditionsEntry(DynamoDBRow.GW_RANGE_KEY,new Condition().withComparisonOperator(ComparisonOperator.BETWEEN).withAttributeValueList(new AttributeValue().withB(ByteBuffer.wrap(start)),new AttributeValue().withB(ByteBuffer.wrap(end))));
}
Program: 112939
Project: 112939
Buggy source:
@Override public void accept(DataAdapter<?> t){
  adapterIDList.add(t.getAdapterId());
}

Fixed version (ground truth):
@Override public void accept(final DataAdapter<?> t){
  adapterIDList.add(t.getAdapterId());
}
Program: 112940
Project: 112940
Buggy source:
public InputFormatDynamoDBRangeQuery(final BaseDataStore dataStore,final AdapterStore adapterStore,final DynamoDBOperations dynamoDBOperations,final PrimaryIndex index,final ByteArrayRange range,final List<QueryFilter> queryFilters,final boolean isOutputWritable,final QueryOptions queryOptions){
  super(dataStore,dynamoDBOperations,getAdapterIds(index,adapterStore,queryOptions),index,null,queryFilters != null ? queryFilters : new ArrayList<QueryFilter>(),null,(ScanCallback<?,DynamoDBRow>)queryOptions.getScanCallback(),null,null,null,null,null,queryOptions.getAuthorizations());
  this.range=range;
  this.isOutputWritable=isOutputWritable;
}

Fixed version (ground truth):
public InputFormatDynamoDBRangeQuery(final BaseDataStore dataStore,final AdapterStore adapterStore,final DynamoDBOperations dynamoDBOperations,final PrimaryIndex index,final ByteArrayRange range,final List<QueryFilter> queryFilters,final boolean isOutputWritable,final QueryOptions queryOptions){
  super(dataStore,dynamoDBOperations,getAdapterIds(adapterStore,queryOptions),index,null,queryFilters != null ? queryFilters : new ArrayList<QueryFilter>(),null,(ScanCallback<?,DynamoDBRow>)queryOptions.getScanCallback(),null,null,null,null,null,queryOptions.getAuthorizations());
  this.range=range;
  this.isOutputWritable=isOutputWritable;
}
Program: 112941
Project: 112941
Buggy source:
private static List<ByteArrayId> getAdapterIds(final PrimaryIndex index,final AdapterStore adapterStore,final QueryOptions queryOptions){
  try {
    return queryOptions.getAdapterIds(adapterStore);
  }
 catch (  final IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
  return Collections.emptyList();
}

Fixed version (ground truth):
private static List<ByteArrayId> getAdapterIds(final AdapterStore adapterStore,final QueryOptions queryOptions){
  try {
    return queryOptions.getAdapterIds(adapterStore);
  }
 catch (  final IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
  return Collections.emptyList();
}
Program: 112942
Project: 112942
Buggy source:
private boolean inBounds(final Cell cell){
  final MultiDimensionalCoordinates coordinates=indexStrategy.getCoordinatesPerDimension(new ByteArrayId(new GeowaveRowId(cell.getRowArray(),cell.getRowLength()).getInsertionId()));
  return rangeCache.inBounds(coordinates);
}

Fixed version (ground truth):
private boolean inBounds(final Cell cell){
  final MultiDimensionalCoordinates coordinates=indexStrategy.getCoordinatesPerDimension(new ByteArrayId(new GeowaveRowId(cell.getRowArray(),cell.getRowOffset(),cell.getRowLength()).getInsertionId()));
  return rangeCache.inBounds(coordinates);
}
Program: 112943
Project: 112943
Buggy source:
public static synchronized ConfigOption[] getAllOptions(){
  final List<ConfigOption> allOptions=new ArrayList<ConfigOption>();
  for (  final StoreFactoryFamilySpi f : getRegisteredStoreFactoryFamilies().values()) {
    final ConfigOption[] factoryOptions=ConfigUtils.createConfigOptionsFromJCommander(f.getDataStoreFactory().createOptionsInstance());
    allOptions.addAll(Arrays.asList(factoryOptions));
  }
  return allOptions.toArray(new ConfigOption[]{});
}

Fixed version (ground truth):
public static synchronized ConfigOption[] getAllOptions(final StoreFactoryFamilySpi storeFactoryFamily,boolean includeHidden){
  final List<ConfigOption> allOptions=new ArrayList<ConfigOption>();
  allOptions.addAll(Arrays.asList(ConfigUtils.createConfigOptionsFromJCommander(storeFactoryFamily.getDataStoreFactory().createOptionsInstance(),includeHidden)));
  return allOptions.toArray(new ConfigOption[]{});
}
Program: 112944
Project: 112944
Buggy source:
private static List<String> getMatchingRequiredOptions(final StoreFactoryFamilySpi factory,final Map<String,String> configOptions){
  final ConfigOption[] options=ConfigUtils.createConfigOptionsFromJCommander(factory.getDataStoreFactory().createOptionsInstance());
  final List<String> matching=new ArrayList<String>();
  for (  final ConfigOption option : options) {
    if (!option.isOptional() && configOptions.containsKey(option.getName())) {
      matching.add(option.getName());
    }
  }
  return matching;
}

Fixed version (ground truth):
private static List<String> getMatchingRequiredOptions(final StoreFactoryFamilySpi factory,final Map<String,String> configOptions){
  final ConfigOption[] options=ConfigUtils.createConfigOptionsFromJCommander(factory.getDataStoreFactory().createOptionsInstance(),false);
  final List<String> matching=new ArrayList<String>();
  for (  final ConfigOption option : options) {
    if (!option.isOptional() && configOptions.containsKey(option.getName())) {
      matching.add(option.getName());
    }
  }
  return matching;
}
Program: 112945
Project: 112945
Buggy source:
public static boolean exactMatch(final StoreFactoryFamilySpi geowaveStoreFactoryFamily,final Map<String,String> params){
  final ConfigOption[] requiredOptions=GeoWaveStoreFinder.getRequiredOptions(geowaveStoreFactoryFamily);
  for (  final ConfigOption requiredOption : requiredOptions) {
    if (!params.containsKey(requiredOption.getName())) {
      return false;
    }
  }
  final Set<String> availableOptions=new HashSet<String>();
  for (  final ConfigOption option : GeoWaveStoreFinder.getAllOptions(geowaveStoreFactoryFamily)) {
    availableOptions.add(option.getName());
  }
  for (  final String optionName : params.keySet()) {
    if (!availableOptions.contains(optionName) && !STORE_HINT_KEY.equals(optionName)) {
      return false;
    }
  }
  try {
    final StoreFactoryOptions options=ConfigUtils.populateOptionsFromList(geowaveStoreFactoryFamily.getDataStoreFactory().createOptionsInstance(),params);
    geowaveStoreFactoryFamily.getIndexStoreFactory().createStore(options);
  }
 catch (  final Exception e) {
    LOGGER.info("String_Node_Str",e);
    return false;
  }
  return true;
}

Fixed version (ground truth):
public static boolean exactMatch(final StoreFactoryFamilySpi geowaveStoreFactoryFamily,final Map<String,String> params){
  final ConfigOption[] requiredOptions=GeoWaveStoreFinder.getRequiredOptions(geowaveStoreFactoryFamily);
  for (  final ConfigOption requiredOption : requiredOptions) {
    if (!params.containsKey(requiredOption.getName())) {
      return false;
    }
  }
  final Set<String> availableOptions=new HashSet<String>();
  for (  final ConfigOption option : GeoWaveStoreFinder.getAllOptions(geowaveStoreFactoryFamily,true)) {
    availableOptions.add(option.getName());
  }
  for (  final String optionName : params.keySet()) {
    if (!availableOptions.contains(optionName) && !STORE_HINT_KEY.equals(optionName)) {
      return false;
    }
  }
  try {
    final StoreFactoryOptions options=ConfigUtils.populateOptionsFromList(geowaveStoreFactoryFamily.getDataStoreFactory().createOptionsInstance(),params);
    geowaveStoreFactoryFamily.getIndexStoreFactory().createStore(options);
  }
 catch (  final Exception e) {
    LOGGER.info("String_Node_Str",e);
    return false;
  }
  return true;
}