nus-yam/ex-repair huggingface dataset:
Program: 5727
Project: 5727
Buggy source:
@Test public void testIsInRange(){
  ArtifactRange range=new ArtifactRange(Id.Namespace.DEFAULT,"String_Node_Str",new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str"));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
}

Fixed version (ground truth):
@Test public void testIsInRange(){
  ArtifactRange range=new ArtifactRange(NamespaceId.DEFAULT,"String_Node_Str",new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str"));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertTrue(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
  Assert.assertFalse(range.versionIsInRange(new ArtifactVersion("String_Node_Str")));
}
Program: 5728
Project: 5728
Buggy source:
@Test public void testWhitespace() throws InvalidArtifactRangeException {
  ArtifactRange range=ArtifactRange.parse(Id.Namespace.DEFAULT,"String_Node_Str");
  Assert.assertEquals(new ArtifactRange(Id.Namespace.DEFAULT,"String_Node_Str",new ArtifactVersion("String_Node_Str"),true,new ArtifactVersion("String_Node_Str"),false),range);
}

Fixed version (ground truth):
@Test public void testWhitespace() throws InvalidArtifactRangeException {
  ArtifactRange range=ArtifactRange.parse(NamespaceId.DEFAULT,"String_Node_Str");
  Assert.assertEquals(new ArtifactRange(NamespaceId.DEFAULT,"String_Node_Str",new ArtifactVersion("String_Node_Str"),true,new ArtifactVersion("String_Node_Str"),false),range);
}
Program: 5729
Project: 5729
Buggy source:
@Test(expected=InvalidArtifactException.class) public void testSelfExtendingArtifact() throws InvalidArtifactException {
  Id.Artifact child=Id.Artifact.from(Id.Namespace.SYSTEM,"String_Node_Str","String_Node_Str");
  ArtifactRepository.validateParentSet(child,ImmutableSet.of(new ArtifactRange(Id.Namespace.SYSTEM,"String_Node_Str",new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str"))));
}

Fixed version (ground truth):
@Test(expected=InvalidArtifactException.class) public void testSelfExtendingArtifact() throws InvalidArtifactException {
  Id.Artifact child=Id.Artifact.from(Id.Namespace.SYSTEM,"String_Node_Str","String_Node_Str");
  ArtifactRepository.validateParentSet(child,ImmutableSet.of(new ArtifactRange(NamespaceId.SYSTEM,"String_Node_Str",new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str"))));
}
Program: 5731
Project: 5731
Buggy source:
@Test(expected=InvalidArtifactException.class) public void testGrandparentsAreInvalid() throws Exception {
  Id.Artifact childId=Id.Artifact.from(Id.Namespace.DEFAULT,"String_Node_Str","String_Node_Str");
  Manifest manifest=createManifest(ManifestFields.EXPORT_PACKAGE,Plugin1.class.getPackage().getName());
  File jarFile=createPluginJar(Plugin1.class,new File(tmpDir,"String_Node_Str"),manifest);
  Set<ArtifactRange> parents=ImmutableSet.of(new ArtifactRange(APP_ARTIFACT_ID.getNamespace(),APP_ARTIFACT_ID.getName(),new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str")));
  artifactRepository.addArtifact(childId,jarFile,parents);
  Id.Artifact grandchildId=Id.Artifact.from(Id.Namespace.DEFAULT,"String_Node_Str","String_Node_Str");
  manifest=createManifest(ManifestFields.EXPORT_PACKAGE,Plugin2.class.getPackage().getName());
  jarFile=createPluginJar(Plugin2.class,new File(tmpDir,"String_Node_Str"),manifest);
  parents=ImmutableSet.of(new ArtifactRange(childId.getNamespace(),childId.getName(),new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str")));
  artifactRepository.addArtifact(grandchildId,jarFile,parents);
}

Fixed version (ground truth):
@Test(expected=InvalidArtifactException.class) public void testGrandparentsAreInvalid() throws Exception {
  Id.Artifact childId=Id.Artifact.from(Id.Namespace.DEFAULT,"String_Node_Str","String_Node_Str");
  Manifest manifest=createManifest(ManifestFields.EXPORT_PACKAGE,Plugin1.class.getPackage().getName());
  File jarFile=createPluginJar(Plugin1.class,new File(tmpDir,"String_Node_Str"),manifest);
  Set<ArtifactRange> parents=ImmutableSet.of(new ArtifactRange(APP_ARTIFACT_ID.getNamespace().toEntityId(),APP_ARTIFACT_ID.getName(),new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str")));
  artifactRepository.addArtifact(childId,jarFile,parents);
  Id.Artifact grandchildId=Id.Artifact.from(Id.Namespace.DEFAULT,"String_Node_Str","String_Node_Str");
  manifest=createManifest(ManifestFields.EXPORT_PACKAGE,Plugin2.class.getPackage().getName());
  jarFile=createPluginJar(Plugin2.class,new File(tmpDir,"String_Node_Str"),manifest);
  parents=ImmutableSet.of(new ArtifactRange(childId.getNamespace().toEntityId(),childId.getName(),new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str")));
  artifactRepository.addArtifact(grandchildId,jarFile,parents);
}
Program: 5732
Project: 5732
Buggy source:
private static File getFile() throws Exception {
  File pluginDir=DirUtils.createTempDir(tmpDir);
  Manifest manifest=createManifest(ManifestFields.EXPORT_PACKAGE,TestPlugin.class.getPackage().getName());
  File jarFile=createPluginJar(TestPlugin.class,new File(tmpDir,"String_Node_Str"),manifest);
  Set<ArtifactRange> parents=ImmutableSet.of(new ArtifactRange(APP_ARTIFACT_ID.getNamespace(),APP_ARTIFACT_ID.getName(),new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str")));
  Id.Artifact artifactId=Id.Artifact.from(Id.Namespace.DEFAULT,"String_Node_Str","String_Node_Str");
  artifactRepository.addArtifact(artifactId,jarFile,parents);
  return pluginDir;
}

Fixed version (ground truth):
private static File getFile() throws Exception {
  File pluginDir=DirUtils.createTempDir(tmpDir);
  Manifest manifest=createManifest(ManifestFields.EXPORT_PACKAGE,TestPlugin.class.getPackage().getName());
  File jarFile=createPluginJar(TestPlugin.class,new File(tmpDir,"String_Node_Str"),manifest);
  Set<ArtifactRange> parents=ImmutableSet.of(new ArtifactRange(APP_ARTIFACT_ID.getNamespace().toEntityId(),APP_ARTIFACT_ID.getName(),new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str")));
  Id.Artifact artifactId=Id.Artifact.from(Id.Namespace.DEFAULT,"String_Node_Str","String_Node_Str");
  artifactRepository.addArtifact(artifactId,jarFile,parents);
  return pluginDir;
}
Program: 5733
Project: 5733
Buggy source:
@Test(expected=InvalidArtifactException.class) public void testMultipleParentVersions() throws InvalidArtifactException {
  Id.Artifact child=Id.Artifact.from(Id.Namespace.SYSTEM,"String_Node_Str","String_Node_Str");
  ArtifactRepository.validateParentSet(child,ImmutableSet.of(new ArtifactRange(Id.Namespace.SYSTEM,"String_Node_Str",new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str")),new ArtifactRange(Id.Namespace.SYSTEM,"String_Node_Str",new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str"))));
}

Fixed version (ground truth):
@Test(expected=InvalidArtifactException.class) public void testMultipleParentVersions() throws InvalidArtifactException {
  Id.Artifact child=Id.Artifact.from(Id.Namespace.SYSTEM,"String_Node_Str","String_Node_Str");
  ArtifactRepository.validateParentSet(child,ImmutableSet.of(new ArtifactRange(NamespaceId.SYSTEM,"String_Node_Str",new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str")),new ArtifactRange(NamespaceId.SYSTEM,"String_Node_Str",new ArtifactVersion("String_Node_Str"),new ArtifactVersion("String_Node_Str"))));
}
Program: 5736
Project: 5736
Buggy source:
public static Comparable convertFieldValue(String where,String kind,String fieldName,FieldType fieldType,String stringValue,boolean acceptNull){
  if (null == stringValue) {
    if (acceptNull) {
      return null;
    }
 else {
      throw new IllegalArgumentException(String.format("String_Node_Str",where,kind,fieldName));
    }
  }
  try {
    return fieldType.parse(stringValue);
  }
 catch (  Exception e) {
    throw new IllegalArgumentException(String.format("String_Node_Str",where,kind,stringValue,fieldName,fieldType.name()),e);
  }
}

Fixed version (ground truth):
private static Comparable convertFieldValue(String where,String kind,String fieldName,FieldType fieldType,String stringValue,boolean acceptNull){
  if (null == stringValue) {
    if (acceptNull) {
      return null;
    }
 else {
      throw new IllegalArgumentException(String.format("String_Node_Str",where,kind,fieldName));
    }
  }
  try {
    return fieldType.parse(stringValue);
  }
 catch (  Exception e) {
    throw new IllegalArgumentException(String.format("String_Node_Str",where,kind,stringValue,fieldName,fieldType.name()),e);
  }
}
Program: 5737
Project: 5737
Buggy source:
/** 
 * Sets a partition as input for a PartitionedFileSet. If both a PartitionFilter and Partition(s) are specified, the PartitionFilter takes precedence and the specified Partition(s) will be ignored.
 * @param arguments the runtime arguments for a partitioned dataset
 * @param partition the partition to add as input
 */
public static void addInputPartition(Map<String,String> arguments,Partition partition){
  FileSetArguments.addInputPath(arguments,partition.getRelativePath());
}

Fixed version (ground truth):
/** 
 * Sets a partition as input for a PartitionedFileSet. If both a PartitionFilter and Partition(s) are specified, the PartitionFilter takes precedence and the specified Partition(s) will be ignored.
 * @param arguments the runtime arguments for a partitioned dataset
 * @param partition the partition to add as input
 */
public static void addInputPartition(Map<String,String> arguments,Partition partition){
  addInputPartitions(arguments,Collections.singletonList(partition));
}
Program: 5738
Project: 5738
Buggy source:
/** 
 * Returns the name of the input configured for this task. Returns null, if this task is a Reducer or no inputs were configured through CDAP APIs.
 */
@Nullable String getInputName();

Fixed version (ground truth):
/** 
 * Returns the name of the input configured for this task. Returns null, if this task is a Reducer or no inputs were configured through CDAP APIs.
 * @deprecated Instead, use {@link #getInputContext()}.
 */
@Deprecated @Nullable String getInputName();
Program: 5739
Project: 5739
Buggy source:
@Nullable @Override public String getInputName(){
  return inputName;
}

Fixed version (ground truth):
@Nullable @Override public String getInputName(){
  if (inputContext == null) {
    return null;
  }
  return inputContext.getInputName();
}
Program: 5740
Project: 5740
Buggy source:
private WrappedMapper.Context createAutoFlushingContext(final Context context,final BasicMapReduceTaskContext basicMapReduceContext){
  final int flushFreq=context.getConfiguration().getInt("String_Node_Str",10000);
  @SuppressWarnings("String_Node_Str") WrappedMapper.Context flushingContext=new WrappedMapper().new Context(context){
    private int processedRecords=0;
    @Override public boolean nextKeyValue() throws IOException, InterruptedException {
      boolean result=super.nextKeyValue();
      if (++processedRecords > flushFreq) {
        try {
          LOG.trace("String_Node_Str");
          basicMapReduceContext.flushOperations();
        }
 catch (        Exception e) {
          LOG.error("String_Node_Str",e);
          throw Throwables.propagate(e);
        }
        processedRecords=0;
      }
      return result;
    }
    @Override public InputSplit getInputSplit(){
      InputSplit inputSplit=super.getInputSplit();
      if (inputSplit instanceof TaggedInputSplit) {
        inputSplit=((TaggedInputSplit)inputSplit).getInputSplit();
      }
      return inputSplit;
    }
    @Override public Class<? extends InputFormat<?,?>> getInputFormatClass() throws ClassNotFoundException {
      InputSplit inputSplit=super.getInputSplit();
      if (inputSplit instanceof TaggedInputSplit) {
        return ((TaggedInputSplit)inputSplit).getInputFormatClass();
      }
      return super.getInputFormatClass();
    }
  }
;
  return flushingContext;
}

Fixed version (ground truth):
private WrappedMapper.Context createAutoFlushingContext(final Context context,final BasicMapReduceTaskContext basicMapReduceContext){
  final int flushFreq=context.getConfiguration().getInt("String_Node_Str",10000);
  @SuppressWarnings("String_Node_Str") WrappedMapper.Context flushingContext=new WrappedMapper().new Context(context){
    private int processedRecords=0;
    @Override public boolean nextKeyValue() throws IOException, InterruptedException {
      boolean result=super.nextKeyValue();
      if (++processedRecords > flushFreq) {
        try {
          LOG.trace("String_Node_Str");
          basicMapReduceContext.flushOperations();
        }
 catch (        Exception e) {
          LOG.error("String_Node_Str",e);
          throw Throwables.propagate(e);
        }
        processedRecords=0;
      }
      return result;
    }
    @Override public InputSplit getInputSplit(){
      InputSplit inputSplit=super.getInputSplit();
      if (inputSplit instanceof TaggedInputSplit) {
        inputSplit=((TaggedInputSplit)inputSplit).getInputSplit();
      }
      return inputSplit;
    }
    @Override public Class<? extends InputFormat<?,?>> getInputFormatClass() throws ClassNotFoundException {
      InputSplit inputSplit=super.getInputSplit();
      if (inputSplit instanceof MultiInputTaggedSplit) {
        return ((MultiInputTaggedSplit)inputSplit).getInputFormatClass();
      }
      return super.getInputFormatClass();
    }
  }
;
  return flushingContext;
}
Program: 5741
Project: 5741
Buggy source:
@Override public Class<? extends InputFormat<?,?>> getInputFormatClass() throws ClassNotFoundException {
  InputSplit inputSplit=super.getInputSplit();
  if (inputSplit instanceof TaggedInputSplit) {
    return ((TaggedInputSplit)inputSplit).getInputFormatClass();
  }
  return super.getInputFormatClass();
}

Fixed version (ground truth):
@Override public Class<? extends InputFormat<?,?>> getInputFormatClass() throws ClassNotFoundException {
  InputSplit inputSplit=super.getInputSplit();
  if (inputSplit instanceof MultiInputTaggedSplit) {
    return ((MultiInputTaggedSplit)inputSplit).getInputFormatClass();
  }
  return super.getInputFormatClass();
}
Program: 5743
Project: 5743
Buggy source:
private Mapper createMapperInstance(ClassLoader classLoader,String userMapper,Context context){
  if (context.getInputSplit() instanceof TaggedInputSplit) {
    userMapper=((TaggedInputSplit)context.getInputSplit()).getMapperClassName();
  }
  try {
    return (Mapper)classLoader.loadClass(userMapper).newInstance();
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + userMapper);
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
private Mapper createMapperInstance(ClassLoader classLoader,String userMapper,Context context){
  if (context.getInputSplit() instanceof MultiInputTaggedSplit) {
    userMapper=((MultiInputTaggedSplit)context.getInputSplit()).getMapperClassName();
  }
  try {
    return (Mapper)classLoader.loadClass(userMapper).newInstance();
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + userMapper);
    throw Throwables.propagate(e);
  }
}
Program: 5745
Project: 5745
Buggy source:
/** 
 * Returns the path to a keytab file, after copying it to the local file system, if necessary
 * @param keytabLocation the keytabLocation of the keytab file
 * @return local keytab file
 */
private File localizeKeytab(Location keytabLocation) throws IOException {
  if (!DirUtils.mkdirs(tempDir)) {
    throw new IOException(String.format("String_Node_Str",tempDir));
  }
  Path localKeytabFile=Files.createTempFile(tempDir.toPath(),null,"String_Node_Str",OWNER_ONLY_ATTRS);
  LOG.debug("String_Node_Str",keytabLocation,localKeytabFile);
  try (InputStream is=keytabLocation.getInputStream()){
    Files.copy(is,localKeytabFile,StandardCopyOption.REPLACE_EXISTING);
  }
   return localKeytabFile.toFile();
}

Fixed version (ground truth):
/** 
 * Returns the path to a keytab file, after copying it to the local file system, if necessary
 * @param keytabLocation the keytabLocation of the keytab file
 * @return local keytab file
 */
private File localizeKeytab(Location keytabLocation) throws IOException {
  if (!DirUtils.mkdirs(tempDir)) {
    throw new IOException(String.format("String_Node_Str",tempDir));
  }
  Path localKeytabFile=Files.createTempFile(tempDir.toPath(),null,"String_Node_Str",FileUtils.OWNER_ONLY_RW);
  LOG.debug("String_Node_Str",keytabLocation,localKeytabFile);
  try (InputStream is=keytabLocation.getInputStream()){
    Files.copy(is,localKeytabFile,StandardCopyOption.REPLACE_EXISTING);
  }
   return localKeytabFile.toFile();
}
Program: 5746
Project: 5746
Buggy source:
@Override public TableInfo getTableInfo(@Nullable String database,String table) throws ExploreException, TableNotFoundException {
  HttpResponse response=doGet(String.format("String_Node_Str",database,table));
  if (response.getResponseCode() == HttpURLConnection.HTTP_OK) {
    return parseJson(response,TableInfo.class);
  }
 else   if (response.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
    throw new TableNotFoundException("String_Node_Str" + database + table+ "String_Node_Str");
  }
  throw new ExploreException("String_Node_Str" + database + table+ "String_Node_Str"+ response);
}

Fixed version (ground truth):
@Override public TableInfo getTableInfo(String namespace,String table) throws ExploreException, TableNotFoundException {
  HttpResponse response=doGet(String.format("String_Node_Str",namespace,table));
  if (response.getResponseCode() == HttpURLConnection.HTTP_OK) {
    return parseJson(response,TableInfo.class);
  }
 else   if (response.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
    throw new TableNotFoundException(String.format("String_Node_Str",namespace,table));
  }
  throw new ExploreException(String.format("String_Node_Str",namespace,table,response));
}
Program: 5747
Project: 5747
Buggy source:
@Override public List<TableNameInfo> getTables(@Nullable String database) throws ExploreException {
  HttpResponse response=doGet(String.format("String_Node_Str",database));
  if (response.getResponseCode() == HttpURLConnection.HTTP_OK) {
    return parseJson(response,TABLES_TYPE);
  }
  throw new ExploreException("String_Node_Str" + response);
}

Fixed version (ground truth):
@Override public List<TableNameInfo> getTables(String namespace) throws ExploreException {
  HttpResponse response=doGet(String.format("String_Node_Str",namespace));
  if (response.getResponseCode() == HttpURLConnection.HTTP_OK) {
    return parseJson(response,TABLES_TYPE);
  }
  throw new ExploreException("String_Node_Str" + response);
}
Program: 5748
Project: 5748
Buggy source:
@Override public QueryHandle getFunctions(String catalog,String schemaPattern,String functionNamePattern) throws ExploreException, SQLException {
  String body=GSON.toJson(new FunctionsArgs(catalog,schemaPattern,functionNamePattern));
  String resource=String.format("String_Node_Str",schemaPattern);
  HttpResponse response=doPost(resource,body,null);
  if (response.getResponseCode() == HttpURLConnection.HTTP_OK) {
    return QueryHandle.fromId(parseResponseAsMap(response,"String_Node_Str"));
  }
  throw new ExploreException("String_Node_Str" + response);
}

Fixed version (ground truth):
@Override public QueryHandle getFunctions(@Nullable String catalog,@Nullable String schemaPattern,String functionNamePattern) throws ExploreException, SQLException {
  String body=GSON.toJson(new FunctionsArgs(catalog,schemaPattern,functionNamePattern));
  String resource=String.format("String_Node_Str",schemaPattern);
  HttpResponse response=doPost(resource,body,null);
  if (response.getResponseCode() == HttpURLConnection.HTTP_OK) {
    return QueryHandle.fromId(parseResponseAsMap(response,"String_Node_Str"));
  }
  throw new ExploreException("String_Node_Str" + response);
}
Program: 5749
Project: 5749
Buggy source:
@Override public QueryHandle getSchemas(String catalog,String schemaPattern) throws ExploreException, SQLException {
  String body=GSON.toJson(new SchemasArgs(catalog,schemaPattern));
  String resource=String.format("String_Node_Str",schemaPattern);
  HttpResponse response=doPost(resource,body,null);
  if (response.getResponseCode() == HttpURLConnection.HTTP_OK) {
    return QueryHandle.fromId(parseResponseAsMap(response,"String_Node_Str"));
  }
  throw new ExploreException("String_Node_Str" + response);
}

Fixed version (ground truth):
@Override public QueryHandle getSchemas(@Nullable String catalog,@Nullable String schemaPattern) throws ExploreException, SQLException {
  String body=GSON.toJson(new SchemasArgs(catalog,schemaPattern));
  String resource=String.format("String_Node_Str",schemaPattern);
  HttpResponse response=doPost(resource,body,null);
  if (response.getResponseCode() == HttpURLConnection.HTTP_OK) {
    return QueryHandle.fromId(parseResponseAsMap(response,"String_Node_Str"));
  }
  throw new ExploreException("String_Node_Str" + response);
}
Program: 5750
Project: 5750
Buggy source:
/** 
 * Get information about a Hive table.
 * @param database name of the database the table belongs to.
 * @param table table name for which to get the schema.
 * @return information about a table.
 * @throws ExploreException on any error getting the tables.
 */
TableInfo getTableInfo(@Nullable String database,String table) throws ExploreException, TableNotFoundException ;

Fixed version (ground truth):
/** 
 * Get information about a Hive table.
 * @param namespace name of the namespace the table belongs to.
 * @param table table name for which to get the schema.
 * @return information about a table.
 * @throws ExploreException on any error getting the tables.
 */
TableInfo getTableInfo(String namespace,String table) throws ExploreException, TableNotFoundException ;
Program: 5751
Project: 5751
Buggy source:
/** 
 * Retrieve a list of all the tables present in Hive Metastore that match the given database name.
 * @param database database name from which to list the tables. The database has to be accessible by the currentuser. If it is null, all the databases the user has access to will be inspected.
 * @return list of table names present in the database.
 * @throws ExploreException on any error getting the tables.
 */
List<TableNameInfo> getTables(@Nullable String database) throws ExploreException ;

Fixed version (ground truth):
/** 
 * Retrieve a list of all the tables present in Hive Metastore that match the given database name.
 * @param namespace namespace name from which to list the tables. The database has to be accessible by the currentuser.
 * @return list of table names present in the database.
 * @throws ExploreException on any error getting the tables.
 */
List<TableNameInfo> getTables(String namespace) throws ExploreException ;
Program: 5752
Project: 5752
Buggy source:
@Override public Service get(){
  return new AbstractService(){
    @Override protected void doStart(){
      try {
        namespaceAdmin.create(NamespaceMeta.DEFAULT);
        LOG.info("String_Node_Str");
        notifyStarted();
      }
 catch (      AlreadyExistsException e) {
        LOG.info("String_Node_Str");
        notifyStarted();
      }
catch (      Exception e) {
        notifyFailed(e);
      }
    }
    @Override protected void doStop(){
      notifyStopped();
    }
  }
;
}

Fixed version (ground truth):
@Override public Service get(){
  return new AbstractService(){
    @Override protected void doStart(){
      try {
        namespaceAdmin.create(NamespaceMeta.DEFAULT);
        LOG.info("String_Node_Str",NamespaceMeta.DEFAULT);
        notifyStarted();
      }
 catch (      AlreadyExistsException e) {
        LOG.info("String_Node_Str");
        notifyStarted();
      }
catch (      Exception e) {
        notifyFailed(e);
      }
    }
    @Override protected void doStop(){
      notifyStopped();
    }
  }
;
}
Program: 5753
Project: 5753
Buggy source:
@Inject public DefaultNamespaceEnsurer(final NamespaceAdmin namespaceAdmin){
  this.serviceDelegate=new RetryOnStartFailureService(new Supplier<Service>(){
    @Override public Service get(){
      return new AbstractService(){
        @Override protected void doStart(){
          try {
            namespaceAdmin.create(NamespaceMeta.DEFAULT);
            LOG.info("String_Node_Str");
            notifyStarted();
          }
 catch (          AlreadyExistsException e) {
            LOG.info("String_Node_Str");
            notifyStarted();
          }
catch (          Exception e) {
            notifyFailed(e);
          }
        }
        @Override protected void doStop(){
          notifyStopped();
        }
      }
;
    }
  }
,RetryStrategies.exponentialDelay(200,5000,TimeUnit.MILLISECONDS));
}

Fixed version (ground truth):
@Inject public DefaultNamespaceEnsurer(final NamespaceAdmin namespaceAdmin){
  this.serviceDelegate=new RetryOnStartFailureService(new Supplier<Service>(){
    @Override public Service get(){
      return new AbstractService(){
        @Override protected void doStart(){
          try {
            namespaceAdmin.create(NamespaceMeta.DEFAULT);
            LOG.info("String_Node_Str",NamespaceMeta.DEFAULT);
            notifyStarted();
          }
 catch (          AlreadyExistsException e) {
            LOG.info("String_Node_Str");
            notifyStarted();
          }
catch (          Exception e) {
            notifyFailed(e);
          }
        }
        @Override protected void doStop(){
          notifyStopped();
        }
      }
;
    }
  }
,RetryStrategies.exponentialDelay(200,5000,TimeUnit.MILLISECONDS));
}
Program: 5755
Project: 5755
Buggy source:
/** 
 * Construct the Standalone AppFabricServer with service factory and configuration coming from guice injection.
 */
@Inject public StandaloneAppFabricServer(CConfiguration configuration,DiscoveryService discoveryService,SchedulerService schedulerService,NotificationService notificationService,@Named(Constants.Service.MASTER_SERVICES_BIND_ADDRESS) InetAddress hostname,@Named(Constants.AppFabric.HANDLERS_BINDING) Set<HttpHandler> handlers,@Nullable MetricsCollectionService metricsCollectionService,ProgramRuntimeService programRuntimeService,ApplicationLifecycleService applicationLifecycleService,ProgramLifecycleService programLifecycleService,StreamCoordinatorClient streamCoordinatorClient,@Named("String_Node_Str") Set<String> servicesNames,@Named("String_Node_Str") Set<String> handlerHookNames,DefaultNamespaceEnsurer defaultNamespaceEnsurer,MetricStore metricStore,SystemArtifactLoader systemArtifactLoader,PluginService pluginService,PrivilegesFetcherProxyService privilegesFetcherProxyService){
  super(configuration,discoveryService,schedulerService,notificationService,hostname,handlers,metricsCollectionService,programRuntimeService,applicationLifecycleService,programLifecycleService,streamCoordinatorClient,servicesNames,handlerHookNames,defaultNamespaceEnsurer,systemArtifactLoader,pluginService,privilegesFetcherProxyService);
  this.metricStore=metricStore;
}

Fixed version (ground truth):
/** 
 * Construct the Standalone AppFabricServer with service factory and configuration coming from guice injection.
 */
@Inject public StandaloneAppFabricServer(CConfiguration configuration,DiscoveryService discoveryService,SchedulerService schedulerService,NotificationService notificationService,@Named(Constants.Service.MASTER_SERVICES_BIND_ADDRESS) InetAddress hostname,@Named(Constants.AppFabric.HANDLERS_BINDING) Set<HttpHandler> handlers,@Nullable MetricsCollectionService metricsCollectionService,ProgramRuntimeService programRuntimeService,ApplicationLifecycleService applicationLifecycleService,ProgramLifecycleService programLifecycleService,StreamCoordinatorClient streamCoordinatorClient,@Named("String_Node_Str") Set<String> servicesNames,@Named("String_Node_Str") Set<String> handlerHookNames,NamespaceAdmin namespaceAdmin,MetricStore metricStore,SystemArtifactLoader systemArtifactLoader,PluginService pluginService,PrivilegesFetcherProxyService privilegesFetcherProxyService){
  super(configuration,discoveryService,schedulerService,notificationService,hostname,handlers,metricsCollectionService,programRuntimeService,applicationLifecycleService,programLifecycleService,streamCoordinatorClient,servicesNames,handlerHookNames,namespaceAdmin,systemArtifactLoader,pluginService,privilegesFetcherProxyService);
  this.metricStore=metricStore;
}
Program: 5758
Project: 5758
Buggy source:
@Override public void run(){
  int failures=0;
  long startTime=System.currentTimeMillis();
  long delay=0L;
  Service delegateService=service;
  while (delay >= 0 && !isInterrupted()) {
    try {
      delegateService.startAndWait();
      currentDelegate=delegateService;
      break;
    }
 catch (    Throwable t) {
      LOG.debug("String_Node_Str",delegateServiceName,t);
      delay=retryStrategy.nextRetry(++failures,startTime);
      if (delay < 0) {
        LOG.error("String_Node_Str",delegateServiceName,failures,System.currentTimeMillis() - startTime);
        notifyFailed(t);
        break;
      }
      try {
        TimeUnit.MILLISECONDS.sleep(delay);
        LOG.debug("String_Node_Str",delegateServiceName);
        delegateService=delegate.get();
      }
 catch (      InterruptedException e) {
        interrupt();
      }
    }
  }
  if (isInterrupted()) {
    LOG.warn("String_Node_Str",delegateServiceName);
  }
}

Fixed version (ground truth):
@Override public void run(){
  int failures=0;
  long startTime=System.currentTimeMillis();
  long delay=0L;
  Service delegateService=service;
  while (delay >= 0 && !isInterrupted()) {
    try {
      currentDelegate=delegateService;
      delegateService.start().get();
      break;
    }
 catch (    InterruptedException e) {
      interrupt();
      break;
    }
catch (    Throwable t) {
      LOG.debug("String_Node_Str",delegateServiceName,t);
      delay=retryStrategy.nextRetry(++failures,startTime);
      if (delay < 0) {
        LOG.error("String_Node_Str",delegateServiceName,failures,System.currentTimeMillis() - startTime);
        notifyFailed(t);
        break;
      }
      try {
        TimeUnit.MILLISECONDS.sleep(delay);
        LOG.debug("String_Node_Str",delegateServiceName);
        delegateService=delegate.get();
      }
 catch (      InterruptedException e) {
        interrupt();
      }
    }
  }
  if (isInterrupted()) {
    LOG.warn("String_Node_Str",delegateServiceName);
  }
}
Program: 5759
Project: 5759
Buggy source:
@Test(timeout=5000) public void testFailureStop() throws InterruptedException {
  CountDownLatch failureLatch=new CountDownLatch(1);
  Service service=new RetryOnStartFailureService(createServiceSupplier(1000,new CountDownLatch(1),failureLatch),RetryStrategies.fixDelay(10,TimeUnit.MILLISECONDS));
  service.startAndWait();
  Assert.assertTrue(failureLatch.await(1,TimeUnit.SECONDS));
  service.stopAndWait();
}

Fixed version (ground truth):
@Test(timeout=5000) public void testFailureStop() throws InterruptedException {
  CountDownLatch failureLatch=new CountDownLatch(1);
  Service service=new RetryOnStartFailureService(createServiceSupplier(1000,new CountDownLatch(1),failureLatch),RetryStrategies.fixDelay(10,TimeUnit.MILLISECONDS));
  service.startAndWait();
  Assert.assertTrue(failureLatch.await(1,TimeUnit.SECONDS));
  try {
    service.stopAndWait();
    Assert.fail();
  }
 catch (  UncheckedExecutionException e) {
    Throwable rootCause=Throwables.getRootCause(e);
    Assert.assertEquals(RuntimeException.class,rootCause.getClass());
    Assert.assertEquals("String_Node_Str",rootCause.getMessage());
  }
}
Program: 5760
Project: 5760
Buggy source:
/** 
 * Create a composite record writer that can write key/value data to different output files.
 * @return a composite record writer
 * @throws IOException
 */
@Override public RecordWriter<K,V> getRecordWriter(final TaskAttemptContext job) throws IOException {
  final String outputName=FileOutputFormat.getOutputName(job);
  Configuration configuration=job.getConfiguration();
  Class<? extends DynamicPartitioner> partitionerClass=configuration.getClass(PartitionedFileSetArguments.DYNAMIC_PARTITIONER_CLASS_NAME,null,DynamicPartitioner.class);
  @SuppressWarnings("String_Node_Str") final DynamicPartitioner<K,V> dynamicPartitioner=new InstantiatorFactory(false).get(TypeToken.of(partitionerClass)).create();
  MapReduceClassLoader classLoader=MapReduceClassLoader.getFromConfiguration(configuration);
  final BasicMapReduceTaskContext<K,V> taskContext=classLoader.getTaskContextProvider().get(job);
  String outputDatasetName=configuration.get(Constants.Dataset.Partitioned.HCONF_ATTR_OUTPUT_DATASET);
  PartitionedFileSet outputDataset=taskContext.getDataset(outputDatasetName);
  final Partitioning partitioning=outputDataset.getPartitioning();
  dynamicPartitioner.initialize(taskContext);
  return new RecordWriter<K,V>(){
    Map<PartitionKey,RecordWriter<K,V>> recordWriters=new HashMap<>();
    Map<PartitionKey,TaskAttemptContext> contexts=new HashMap<>();
    public void write(    K key,    V value) throws IOException, InterruptedException {
      PartitionKey partitionKey=dynamicPartitioner.getPartitionKey(key,value);
      RecordWriter<K,V> rw=this.recordWriters.get(partitionKey);
      if (rw == null) {
        String relativePath=PartitionedFileSetDataset.getOutputPath(partitionKey,partitioning);
        String finalPath=relativePath + "String_Node_Str" + outputName;
        TaskAttemptContext taskAttemptContext=getTaskAttemptContext(job,finalPath);
        rw=getBaseRecordWriter(taskAttemptContext);
        this.recordWriters.put(partitionKey,rw);
        this.contexts.put(partitionKey,taskAttemptContext);
      }
      rw.write(key,value);
    }
    @Override public void close(    TaskAttemptContext context) throws IOException, InterruptedException {
      try {
        Map<PartitionKey,RecordWriter<?,?>> recordWriters=new HashMap<>();
        recordWriters.putAll(this.recordWriters);
        MultipleOutputs.closeRecordWriters(recordWriters,contexts);
        taskContext.flushOperations();
      }
 catch (      Exception e) {
        throw new IOException(e);
      }
 finally {
        dynamicPartitioner.destroy();
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Create a composite record writer that can write key/value data to different output files.
 * @return a composite record writer
 * @throws IOException
 */
@Override public RecordWriter<K,V> getRecordWriter(final TaskAttemptContext job) throws IOException {
  boolean concurrencyAllowed=job.getConfiguration().getBoolean(PartitionedFileSetArguments.DYNAMIC_PARTITIONER_ALLOW_CONCURRENCY,true);
  if (concurrencyAllowed) {
    return new MultiWriter<>(job);
  }
 else {
    return new SingleWriter<>(job);
  }
}
Program: 5761
Project: 5761
Buggy source:
private static Path createJobSpecificPath(Path path,JobContext jobContext){
  String outputPathSuffix="String_Node_Str" + jobContext.getJobID().getId();
  return new Path(path,outputPathSuffix);
}

Fixed version (ground truth):
static Path createJobSpecificPath(Path path,JobContext jobContext){
  String outputPathSuffix="String_Node_Str" + jobContext.getJobID().getId();
  return new Path(path,outputPathSuffix);
}
Program: 5762
Project: 5762
Buggy source:
@Override protected void setup(Reducer.Context context) throws IOException, InterruptedException {
  metrics.gauge("String_Node_Str",1);
  LOG.info("String_Node_Str");
  long reducersCount=counters.incrementAndGet(new Increment("String_Node_Str","String_Node_Str",1L)).getLong("String_Node_Str",0);
  Assert.assertEquals(reducersCount,countersFromContext.incrementAndGet(new Increment("String_Node_Str","String_Node_Str",1L)).getLong("String_Node_Str",0));
  LOG.info("String_Node_Str" + reducersCount);
  metrics.gauge("String_Node_Str",1);
}

Fixed version (ground truth):
@Override protected void setup(Reducer.Context context) throws IOException, InterruptedException {
  metrics.gauge("String_Node_Str",1);
  LOG.info("String_Node_Str");
  long reducersCount=counters.incrementAndGet(new Increment("String_Node_Str","String_Node_Str",1L)).getLong("String_Node_Str",0);
  LOG.info("String_Node_Str" + reducersCount);
  metrics.gauge("String_Node_Str",1);
}
Program: 5763
Project: 5763
Buggy source:
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  String[] appAndServiceId=arguments.get(ArgumentName.SERVICE.toString()).split("String_Node_Str");
  if (appAndServiceId.length < 2) {
    throw new CommandInputError(this);
  }
  String appId=appAndServiceId[0];
  String serviceName=appAndServiceId[1];
  Id.Service serviceId=Id.Service.from(cliConfig.getCurrentNamespace(),appId,serviceName);
  output.println(serviceClient.getAvailability(serviceId));
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  String[] appAndServiceId=arguments.get(ArgumentName.SERVICE.toString()).split("String_Node_Str");
  if (appAndServiceId.length < 2) {
    throw new CommandInputError(this);
  }
  String appId=appAndServiceId[0];
  String serviceName=appAndServiceId[1];
  Id.Service serviceId=Id.Service.from(cliConfig.getCurrentNamespace(),appId,serviceName);
  serviceClient.checkAvailability(serviceId);
  output.println("String_Node_Str");
}
Program: 5764
Project: 5764
Buggy source:
@Before public void setUp() throws Throwable {
  super.setUp();
  appClient=new ApplicationClient(clientConfig);
  serviceClient=new ServiceClient(clientConfig);
  programClient=new ProgramClient(clientConfig);
  try {
    serviceClient.getAvailability(service);
    Assert.fail();
  }
 catch (  NotFoundException ex) {
  }
  appClient.deploy(namespace,createAppJarFile(FakeApp.class));
  try {
    serviceClient.getAvailability(service);
    Assert.fail();
  }
 catch (  ServiceUnavailableException ex) {
  }
  programClient.start(service);
  assertProgramRunning(programClient,service);
}

Fixed version (ground truth):
@Before public void setUp() throws Throwable {
  super.setUp();
  appClient=new ApplicationClient(clientConfig);
  serviceClient=new ServiceClient(clientConfig);
  programClient=new ProgramClient(clientConfig);
  try {
    serviceClient.checkAvailability(service);
    Assert.fail();
  }
 catch (  NotFoundException ex) {
  }
  appClient.deploy(namespace,createAppJarFile(FakeApp.class));
  try {
    serviceClient.checkAvailability(service);
    Assert.fail();
  }
 catch (  ServiceUnavailableException ex) {
  }
  programClient.start(service);
  assertProgramRunning(programClient,service);
}
Program: 5765
Project: 5765
Buggy source:
@Test public void testActiveStatus() throws Exception {
  String responseBody=serviceClient.getAvailability(service);
  Assert.assertTrue(responseBody.contains("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testActiveStatus() throws Exception {
  serviceClient.checkAvailability(service);
}
Program: 5766
Project: 5766
Buggy source:
@Override public URL getServiceURL(long timeout,TimeUnit timeoutUnit){
  return getServiceURL();
}

Fixed version (ground truth):
@Override public URL getServiceURL(long timeout,TimeUnit timeoutUnit){
  try {
    Tasks.waitFor(true,new Callable<Boolean>(){
      @Override public Boolean call() throws Exception {
        try {
          serviceClient.checkAvailability(serviceId);
          return true;
        }
 catch (        ServiceUnavailableException e) {
          return false;
        }
      }
    }
,timeout,timeoutUnit);
    return serviceClient.getServiceURL(serviceId);
  }
 catch (  Exception e) {
    throw Throwables.propagate(e);
  }
}
Program: 5767
Project: 5767
Buggy source:
@Override public Connection connect(String url,Properties info) throws SQLException {
  if (!acceptsURL(url)) {
    return null;
  }
  ExploreConnectionParams params=ExploreConnectionParams.parseConnectionUrl(url);
  String authToken=getString(params,ExploreConnectionParams.Info.EXPLORE_AUTH_TOKEN,null);
  String namespace=getString(params,ExploreConnectionParams.Info.NAMESPACE,Id.Namespace.DEFAULT.getId());
  boolean sslEnabled=getBoolean(params,ExploreConnectionParams.Info.SSL_ENABLED,false);
  boolean verifySSLCert=getBoolean(params,ExploreConnectionParams.Info.VERIFY_SSL_CERT,true);
  ExploreClient exploreClient=new FixedAddressExploreClient(params.getHost(),params.getPort(),authToken,sslEnabled,verifySSLCert);
  if (!exploreClient.isServiceAvailable()) {
    throw new SQLException("String_Node_Str" + url + "String_Node_Str");
  }
  return new ExploreConnection(exploreClient,namespace,params);
}

Fixed version (ground truth):
@Override public Connection connect(String url,Properties info) throws SQLException {
  if (!acceptsURL(url)) {
    return null;
  }
  ExploreConnectionParams params=ExploreConnectionParams.parseConnectionUrl(url);
  String authToken=getString(params,ExploreConnectionParams.Info.EXPLORE_AUTH_TOKEN,null);
  String namespace=getString(params,ExploreConnectionParams.Info.NAMESPACE,Id.Namespace.DEFAULT.getId());
  boolean sslEnabled=getBoolean(params,ExploreConnectionParams.Info.SSL_ENABLED,false);
  boolean verifySSLCert=getBoolean(params,ExploreConnectionParams.Info.VERIFY_SSL_CERT,true);
  ExploreClient exploreClient=new FixedAddressExploreClient(params.getHost(),params.getPort(),authToken,sslEnabled,verifySSLCert);
  try {
    exploreClient.ping();
  }
 catch (  UnauthenticatedException e) {
    throw new SQLException("String_Node_Str" + url + "String_Node_Str");
  }
catch (  ServiceUnavailableException|ExploreException e) {
    throw new SQLException("String_Node_Str" + url + "String_Node_Str");
  }
  return new ExploreConnection(exploreClient,namespace,params);
}
Program: 5769
Project: 5769
Buggy source:
@BeforeClass public static void start() throws Exception {
  Injector injector=Guice.createInjector(createInMemoryModules(CConfiguration.create(),new Configuration()));
  transactionManager=injector.getInstance(TransactionManager.class);
  transactionManager.startAndWait();
  dsOpExecutor=injector.getInstance(DatasetOpExecutor.class);
  dsOpExecutor.startAndWait();
  datasetService=injector.getInstance(DatasetService.class);
  datasetService.startAndWait();
  exploreClient=injector.getInstance(DiscoveryExploreClient.class);
  Assert.assertFalse(exploreClient.isServiceAvailable());
  datasetFramework=injector.getInstance(DatasetFramework.class);
  namespaceAdmin=injector.getInstance(NamespaceAdmin.class);
  NamespacedLocationFactory namespacedLocationFactory=injector.getInstance(NamespacedLocationFactory.class);
  NamespaceMeta namespaceMeta=new NamespaceMeta.Builder().setName(namespaceId).build();
  namespaceAdmin.create(namespaceMeta);
  namespacedLocationFactory.get(namespaceId).mkdirs();
  exploreClient.addNamespace(namespaceMeta);
}

Fixed version (ground truth):
@BeforeClass public static void start() throws Exception {
  Injector injector=Guice.createInjector(createInMemoryModules(CConfiguration.create(),new Configuration()));
  transactionManager=injector.getInstance(TransactionManager.class);
  transactionManager.startAndWait();
  dsOpExecutor=injector.getInstance(DatasetOpExecutor.class);
  dsOpExecutor.startAndWait();
  datasetService=injector.getInstance(DatasetService.class);
  datasetService.startAndWait();
  exploreClient=injector.getInstance(DiscoveryExploreClient.class);
  try {
    exploreClient.ping();
    Assert.fail("String_Node_Str");
  }
 catch (  Exception e) {
    Assert.assertTrue(e.getMessage().contains("String_Node_Str" + Constants.Service.EXPLORE_HTTP_USER_SERVICE));
  }
  datasetFramework=injector.getInstance(DatasetFramework.class);
  namespaceAdmin=injector.getInstance(NamespaceAdmin.class);
  NamespacedLocationFactory namespacedLocationFactory=injector.getInstance(NamespacedLocationFactory.class);
  NamespaceMeta namespaceMeta=new NamespaceMeta.Builder().setName(namespaceId).build();
  namespaceAdmin.create(namespaceMeta);
  namespacedLocationFactory.get(namespaceId).mkdirs();
  exploreClient.addNamespace(namespaceMeta);
}
Program: 5770
Project: 5770
Buggy source:
@Override public Connection getQueryClient(Id.Namespace namespace) throws Exception {
  ConnectionConfig connConfig=clientConfig.getConnectionConfig();
  String url=String.format("String_Node_Str",Constants.Explore.Jdbc.URL_PREFIX,connConfig.getHostname(),connConfig.getPort(),namespace.getId());
  return new ExploreDriver().connect(url,new Properties());
}

Fixed version (ground truth):
@Override public Connection getQueryClient(Id.Namespace namespace) throws Exception {
  Map<String,String> connParams=new HashMap<>();
  connParams.put(ExploreConnectionParams.Info.NAMESPACE.getName(),namespace.getId());
  AccessToken accessToken=clientConfig.getAccessToken();
  if (accessToken != null) {
    connParams.put(ExploreConnectionParams.Info.EXPLORE_AUTH_TOKEN.getName(),accessToken.getValue());
  }
  connParams.put(ExploreConnectionParams.Info.SSL_ENABLED.getName(),Boolean.toString(clientConfig.getConnectionConfig().isSSLEnabled()));
  connParams.put(ExploreConnectionParams.Info.VERIFY_SSL_CERT.getName(),Boolean.toString(clientConfig.isVerifySSLCert()));
  ConnectionConfig connConfig=clientConfig.getConnectionConfig();
  String url=String.format("String_Node_Str",Constants.Explore.Jdbc.URL_PREFIX,connConfig.getHostname(),connConfig.getPort(),Joiner.on("String_Node_Str").withKeyValueSeparator("String_Node_Str").join(connParams));
  return new ExploreDriver().connect(url,new Properties());
}