nus-yam/ex-repair huggingface dataset:
Program: 135646
Project: 135646
Buggy source:
/** 
 * Tries to send messages to all of the members of the cluster in an indeterminate state.
 * @param state The state of the cluster.
 * @param answers The pending responses.
 * @param connections The connection already created.
 */
private void updateUnknown(final Cluster state,final Map<Server,Future<Reply>> answers,final Map<Server,Connection> connections){
  for (  final Server server : state.getServers()) {
switch (server.getState()) {
case UNKNOWN:
case UNAVAILABLE:
{
        answers.remove(server);
        sendIsPrimary(answers,connections,server,false);
      }
default :
{
    }
}
}
}

Fixed version (ground truth):
/** 
 * Tries to send messages to all of the members of the cluster in an indeterminate state.
 * @param state The state of the cluster.
 * @param answers The pending responses.
 * @param connections The connection already created.
 */
private void updateUnknown(final Cluster state,final Map<Server,Future<Reply>> answers,final Map<Server,Connection> connections){
  for (  final Server server : state.getServers()) {
switch (server.getState()) {
case UNKNOWN:
case UNAVAILABLE:
{
        answers.remove(server);
        sendIsPrimary(answers,connections,server,false);
        break;
      }
case READ_ONLY:
case WRITABLE:
default :
{
      break;
    }
}
}
}
Program: 135647
Project: 135647
Buggy source:
/** 
 * Creates a new   {@link ShardedConnection}.
 * @param proxiedConnection The connection being proxied.
 * @param config The MongoDB client configuration.
 */
public ShardedConnection(final Connection proxiedConnection,final MongoClientConfiguration config){
  super(proxiedConnection,config);
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link ShardedConnection}.
 * @param proxiedConnection The connection being proxied.
 * @param config The MongoDB client configuration.
 */
public ShardedConnection(final Connection proxiedConnection,final MongoClientConfiguration config){
  super(proxiedConnection);
}
Program: 135648
Project: 135648
Buggy source:
/** 
 * Creates a new TestProxiedConnection.
 * @param proxiedConnection The connection to forward to.
 * @param config The MongoDB client configuration.
 */
public TestProxiedConnection(final Connection proxiedConnection,final MongoClientConfiguration config){
  super(proxiedConnection,config);
}

Fixed version (ground truth):
/** 
 * Creates a new TestProxiedConnection.
 * @param proxiedConnection The connection to forward to.
 * @param config The MongoDB client configuration.
 */
public TestProxiedConnection(final Connection proxiedConnection,final MongoClientConfiguration config){
  super(proxiedConnection);
}
Program: 135649
Project: 135649
Buggy source:
/** 
 * Test method for   {@link SocketConnection#send} .
 * @throws IOException On a failure connecting to the Mock MongoDB server.
 */
@Test public void testCommandToNew() throws IOException {
  myTestConnection=new SocketConnection(myTestServer,new MongoClientConfiguration());
  myTestConnection.start();
  assertTrue("String_Node_Str",ourServer.waitForClient(TimeUnit.SECONDS.toMillis(10)));
  final DocumentBuilder builder=BuilderFactory.start();
  builder.add("String_Node_Str",1);
  final Document commandDoc=builder.build();
  final Message command=new Command("String_Node_Str",commandDoc,ReadPreference.PRIMARY,Version.parse("String_Node_Str"));
  builder.reset().pushArray("String_Node_Str").add(1).add(1).add(1);
  myTestServer.update(builder.build());
  try {
    myTestConnection.send(command,null);
    fail("String_Node_Str");
  }
 catch (  final ServerVersionException sve) {
    assertThat(sve.getActualVersion(),is(Version.parse("String_Node_Str")));
    assertThat(sve.getOperation(),is("String_Node_Str"));
    assertThat(sve.getOperationsMessage(),is(command));
    assertThat(sve.getRequiredVersion(),is(Version.parse("String_Node_Str")));
  }
}

Fixed version (ground truth):
/** 
 * Test method for   {@link SocketConnection#send} .
 * @throws IOException On a failure connecting to the Mock MongoDB server.
 */
@Test public void testCommandToNew() throws IOException {
  myTestConnection=new SocketConnection(myTestServer,new MongoClientConfiguration());
  myTestConnection.start();
  assertTrue("String_Node_Str",ourServer.waitForClient(TimeUnit.SECONDS.toMillis(10)));
  final DocumentBuilder builder=BuilderFactory.start();
  builder.add("String_Node_Str",1);
  final Document commandDoc=builder.build();
  final Message command=new Command("String_Node_Str",commandDoc,ReadPreference.PRIMARY,Version.parse("String_Node_Str"));
  builder.reset().pushArray("String_Node_Str").add(1).add(1).add(1);
  myTestServer.update(builder.build());
  try {
    myTestConnection.send(command,null);
    fail("String_Node_Str");
  }
 catch (  final ServerVersionException sve) {
    assertThat(sve.getActualVersion(),is(Version.parse("String_Node_Str")));
    assertThat(sve.getOperation(),is("String_Node_Str"));
    assertThat(sve.getSentMessage(),is(command));
    assertThat(sve.getRequiredVersion(),is(Version.parse("String_Node_Str")));
  }
}
Program: 135650
Project: 135650
Buggy source:
/** 
 * Test method for   {@link ServerVersionException#ServerVersionException}.
 */
@Test public void testServerVersionException(){
  final Version actual=Version.parse("String_Node_Str");
  final Version required=Version.parse("String_Node_Str");
  final Message message=new IsMaster();
  final ServerVersionException ex=new ServerVersionException("String_Node_Str",required,actual,message);
  assertThat(ex.getMessage(),is("String_Node_Str" + "String_Node_Str"));
  assertThat(ex.getActualVersion(),sameInstance(actual));
  assertThat(ex.getOperation(),is("String_Node_Str"));
  assertThat(ex.getRequiredVersion(),sameInstance(required));
  assertThat(ex.getOperationsMessage(),sameInstance(message));
}

Fixed version (ground truth):
/** 
 * Test method for   {@link ServerVersionException#ServerVersionException}.
 */
@Test public void testServerVersionException(){
  final Version actual=Version.parse("String_Node_Str");
  final Version required=Version.parse("String_Node_Str");
  final Message message=new IsMaster();
  final ServerVersionException ex=new ServerVersionException("String_Node_Str",required,actual,message);
  assertThat(ex.getMessage(),is("String_Node_Str" + "String_Node_Str"));
  assertThat(ex.getActualVersion(),sameInstance(actual));
  assertThat(ex.getOperation(),is("String_Node_Str"));
  assertThat(ex.getRequiredVersion(),sameInstance(required));
  assertThat(ex.getSentMessage(),sameInstance(message));
}
Program: 135652
Project: 135652
Buggy source:
protected boolean preprocess(@Nonnull AbstractQApiTypeDescriptor root){
  if (fields != null)   return false;
  innerTypes=new ArrayList<QApiTypeDescriptor>();
  fields=new ArrayList<Field>();
  if (data != null) {
    for (    Map.Entry<String,Object> e : data.entrySet()) {
      Field field=new Field();
      field.name=e.getKey();
      if (field.name.startsWith("String_Node_Str")) {
        field.optional=true;
        field.name=field.name.substring(1);
        field.annotations="String_Node_Str";
      }
 else       if (this instanceof QApiUnionDescriptor) {
        field.optional=true;
        field.annotations="String_Node_Str";
      }
 else {
        field.optional=false;
        field.annotations="String_Node_Str";
      }
      field.serializedName=field.name;
      field.name=toJavaName(field.name);
      if (e.getValue() instanceof Map) {
        QApiTypeDescriptor type=new QApiTypeDescriptor();
        type.name="String_Node_Str" + e.getKey();
        type.data=(Map<String,Object>)e.getValue();
        type.preprocess(root);
        root.innerTypes.add(type);
        field.typeName=type.name;
      }
 else {
        field.typeName=toNestedJavaType(e.getValue());
      }
      if (field.optional)       field.typeName=toWrappedJavaType(field.typeName);
      fields.add(field);
    }
  }
  return true;
}

Fixed version (ground truth):
protected boolean preprocess(@Nonnull AbstractQApiTypeDescriptor root){
  if (fields != null)   return false;
  innerTypes=new ArrayList<QApiTypeDescriptor>();
  fields=new ArrayList<Field>();
  if (data != null) {
    for (    Map.Entry<String,Object> e : data.entrySet()) {
      Field field=new Field();
      field.name=e.getKey();
      if (field.name.startsWith("String_Node_Str")) {
        field.optional=true;
        field.name=field.name.substring(1);
        field.annotations="String_Node_Str";
      }
 else       if (this instanceof AbstractQApiUnionDescriptor) {
        field.optional=true;
        field.annotations="String_Node_Str";
      }
 else {
        field.optional=false;
        field.annotations="String_Node_Str";
      }
      field.serializedName=field.name;
      field.name=toJavaName(field.name);
      if (e.getValue() instanceof Map) {
        QApiTypeDescriptor type=new QApiTypeDescriptor();
        type.name="String_Node_Str" + e.getKey();
        type.data=(Map<String,Object>)e.getValue();
        type.preprocess(root);
        root.innerTypes.add(type);
        field.typeName=type.name;
      }
 else {
        field.typeName=toNestedJavaType(e.getValue());
      }
      if (field.optional)       field.typeName=toWrappedJavaType(field.typeName);
      fields.add(field);
    }
  }
  return true;
}
Program: 135653
Project: 135653
Buggy source:
public AuthenticationException(String msg,Throwable cause){
  super(msg,cause);
}

Fixed version (ground truth):
public AuthenticationException(Throwable throwable){
  super(throwable);
}
Program: 135654
Project: 135654
Buggy source:
private KeyPair doDecodePrivateKey(Reader reader,String passphrase) throws IOException {
  PEMParser keyReader=new PEMParser(reader);
  JcaPEMKeyConverter converter=new JcaPEMKeyConverter();
  PEMDecryptorProvider decryptionProv=new JcePEMDecryptorProviderBuilder().build(passphrase.toCharArray());
  Object privateKey=keyReader.readObject();
  KeyPair keyPair;
  if (privateKey instanceof PEMEncryptedKeyPair) {
    PEMKeyPair decryptedKeyPair=((PEMEncryptedKeyPair)privateKey).decryptKeyPair(decryptionProv);
    keyPair=converter.getKeyPair(decryptedKeyPair);
  }
 else {
    keyPair=converter.getKeyPair((PEMKeyPair)privateKey);
  }
  keyReader.close();
  return keyPair;
}

Fixed version (ground truth):
private KeyPair doDecodePrivateKey(Reader reader,String passphrase) throws IOException {
  try (PEMParser keyReader=new PEMParser(reader)){
    JcaPEMKeyConverter converter=new JcaPEMKeyConverter();
    PEMDecryptorProvider decryptionProv=new JcePEMDecryptorProviderBuilder().build(passphrase.toCharArray());
    Object privateKey=keyReader.readObject();
    KeyPair keyPair;
    if (privateKey instanceof PEMEncryptedKeyPair) {
      PEMKeyPair decryptedKeyPair=((PEMEncryptedKeyPair)privateKey).decryptKeyPair(decryptionProv);
      keyPair=converter.getKeyPair(decryptedKeyPair);
    }
 else {
      keyPair=converter.getKeyPair((PEMKeyPair)privateKey);
    }
    return keyPair;
  }
 }
Program: 135655
Project: 135655
Buggy source:
private int decodeInt(){
  return ((bytes[pos++] & 0xFF) << 24) | ((bytes[pos++] & 0xFF) << 16) | ((bytes[pos++] & 0xFF) << 8)| (bytes[pos++] & 0xFF);
}

Fixed version (ground truth):
private int decodeInt(){
  return (bytes[pos++] & 0xFF) << 24 | (bytes[pos++] & 0xFF) << 16 | (bytes[pos++] & 0xFF) << 8 | bytes[pos++] & 0xFF;
}
Program: 135656
Project: 135656
Buggy source:
public KeyPair decodePrivateKey(String keyPath,String passphrase) throws IOException {
  FileReader fileReader=new FileReader(keyPath);
  return doDecodePrivateKey(fileReader,passphrase);
}

Fixed version (ground truth):
public KeyPair decodePrivateKey(String keyPath,String passphrase) throws IOException {
  try (Reader reader=new InputStreamReader(new FileInputStream(keyPath),StandardCharsets.UTF_8)){
    return doDecodePrivateKey(reader,passphrase);
  }
 }
Program: 135657
Project: 135657
Buggy source:
private String decodeType(){
  int len=decodeInt();
  String type=new String(bytes,pos,len);
  pos+=len;
  return type;
}

Fixed version (ground truth):
private String decodeType(){
  int len=decodeInt();
  String type=new String(bytes,pos,len,StandardCharsets.UTF_8);
  pos+=len;
  return type;
}
Program: 135658
Project: 135658
Buggy source:
public PublicKey decodePublicKey(String keyLine) throws GeneralSecurityException {
  bytes=Base64.getDecoder().decode(keyLine.getBytes());
  if (bytes.length == 0) {
    throw new IllegalArgumentException("String_Node_Str" + keyLine);
  }
  pos=0;
  String type=decodeType();
  if (type.equals(KEY_TYPE_RSA)) {
    return decodeAsRSA();
  }
  if (type.equals(KEY_TYPE_DSA)) {
    return decodeAsDSA();
  }
  if (type.equals(KEY_TYPE_ECDSA)) {
    return decodeAsECDSA();
  }
  throw new IllegalArgumentException("String_Node_Str" + type + "String_Node_Str"+ keyLine);
}

Fixed version (ground truth):
public PublicKey decodePublicKey(String keyLine) throws GeneralSecurityException {
  bytes=Base64.getDecoder().decode(keyLine.getBytes(StandardCharsets.UTF_8));
  if (bytes.length == 0) {
    throw new IllegalArgumentException("String_Node_Str" + keyLine);
  }
  pos=0;
  String type=decodeType();
  if (type.equals(KEY_TYPE_RSA)) {
    return decodeAsRSA();
  }
  if (type.equals(KEY_TYPE_DSA)) {
    return decodeAsDSA();
  }
  if (type.equals(KEY_TYPE_ECDSA)) {
    return decodeAsECDSA();
  }
  throw new IllegalArgumentException("String_Node_Str" + type + "String_Node_Str"+ keyLine);
}
Program: 135660
Project: 135660
Buggy source:
@Override public Enumeration<String> getInitParameterNames(){
  return new Enumeration<String>(){
    final Iterator<String> keySet=filterConfig.keySet().iterator();
    @Override public boolean hasMoreElements(){
      return (keySet != null ? keySet.hasNext() : false);
    }
    @Override public String nextElement(){
      return (keySet != null ? keySet.next() : null);
    }
  }
;
}

Fixed version (ground truth):
@Override public Enumeration<String> getInitParameterNames(){
  return new Enumeration<String>(){
    final Iterator<String> keySet=filterConfig.keySet().iterator();
    @Override public boolean hasMoreElements(){
      return keySet != null ? keySet.hasNext() : false;
    }
    @Override public String nextElement(){
      return keySet != null ? keySet.next() : null;
    }
  }
;
}
Program: 135661
Project: 135661
Buggy source:
@Override public boolean hasMoreElements(){
  return (keySet != null ? keySet.hasNext() : false);
}

Fixed version (ground truth):
@Override public boolean hasMoreElements(){
  return keySet != null ? keySet.hasNext() : false;
}
Program: 135662
Project: 135662
Buggy source:
/** 
 * Utility method to extract a <code>ServletContext</code> from a listener's <code>FilterConfig</code>.
 * @param listener An object which listens for filter chain configuration changes.
 * @return An extracted <code>ServletContext</code>, or null if either the<code>FilterConfig</code> of <code>ServletContext</code> is null
 */
private static ServletContext extractServletContext(final CustomFilterAdapterListener listener){
  final FilterConfig listenerFilterConfig=listener.getFilterConfig();
  final ServletContext listenerServletContext=(listenerFilterConfig != null ? listenerFilterConfig.getServletContext() : null);
  return listenerServletContext;
}

Fixed version (ground truth):
/** 
 * Utility method to extract a <code>ServletContext</code> from a listener's <code>FilterConfig</code>.
 * @param listener An object which listens for filter chain configuration changes.
 * @return An extracted <code>ServletContext</code>, or null if either the<code>FilterConfig</code> of <code>ServletContext</code> is null
 */
private static ServletContext extractServletContext(final CustomFilterAdapterListener listener){
  final FilterConfig listenerFilterConfig=listener.getFilterConfig();
  final ServletContext listenerServletContext=listenerFilterConfig != null ? listenerFilterConfig.getServletContext() : null;
  return listenerServletContext;
}
Program: 135663
Project: 135663
Buggy source:
@Override public String getInitParameter(final String paramName){
  return (filterConfig != null ? filterConfig.get(paramName) : null);
}

Fixed version (ground truth):
@Override public String getInitParameter(final String paramName){
  return filterConfig != null ? filterConfig.get(paramName) : null;
}
Program: 135664
Project: 135664
Buggy source:
/** 
 * Extract a subset of properties that apply to a particular Filter.
 * @param clazzName prefix used to specify key value pair (i.e., a.b.c.Filter.property)
 * @param fullConfiguration The entire configuration dictionary, which is traversed for applicable properties.
 * @return A Map of applicable properties for a filter.
 */
private static Map<String,String> extractPropertiesForFilter(final String clazzName,final Map<String,String> fullConfiguration){
  final Map<String,String> extractedConfig=new HashMap<>();
  final Set<String> fullConfigurationKeySet=fullConfiguration.keySet();
  for (  String key : fullConfigurationKeySet) {
    final int lastDotSeparator=key.lastIndexOf("String_Node_Str");
    if (lastDotSeparator >= 0) {
      final String comparisonClazzNameSubstring=key.substring(0,lastDotSeparator);
      if (comparisonClazzNameSubstring.equals(clazzName)) {
        final String value=fullConfiguration.get(key);
        final String filterInitParamKey=key.substring(lastDotSeparator + 1);
        extractedConfig.put(filterInitParamKey,value);
      }
    }
 else {
      if (!key.equals(CUSTOM_FILTER_LIST_KEY)) {
        LOG.error("String_Node_Str",key);
      }
    }
  }
  return extractedConfig;
}

Fixed version (ground truth):
/** 
 * Extract a subset of properties that apply to a particular Filter.
 * @param clazzName prefix used to specify key value pair (i.e., a.b.c.Filter.property)
 * @param fullConfiguration The entire configuration dictionary, which is traversed for applicable properties.
 * @return A Map of applicable properties for a filter.
 */
private static Map<String,String> extractPropertiesForFilter(final String clazzName,final Map<String,String> fullConfiguration){
  final Map<String,String> extractedConfig=new HashMap<>();
  for (  Entry<String,String> entry : fullConfiguration.entrySet()) {
    String key=entry.getKey();
    final int lastDotSeparator=key.lastIndexOf("String_Node_Str");
    if (lastDotSeparator >= 0) {
      final String comparisonClazzNameSubstring=key.substring(0,lastDotSeparator);
      if (comparisonClazzNameSubstring.equals(clazzName)) {
        final String filterInitParamKey=key.substring(lastDotSeparator + 1);
        extractedConfig.put(filterInitParamKey,entry.getValue());
      }
    }
 else {
      if (!key.equals(CUSTOM_FILTER_LIST_KEY)) {
        LOG.error("String_Node_Str",key);
      }
    }
  }
  return extractedConfig;
}
Program: 135665
Project: 135665
Buggy source:
public Dictionary<String,?> getDefaultProperties(){
  return DEFAULT_CONFIGURATION;
}

Fixed version (ground truth):
public Dictionary<String,?> getDefaultProperties(){
  return new Hashtable<>(DEFAULT_CONFIGURATION);
}
Program: 135666
Project: 135666
Buggy source:
@Override public String nextElement(){
  return (keySet != null ? keySet.next() : null);
}

Fixed version (ground truth):
@Override public String nextElement(){
  return keySet != null ? keySet.next() : null;
}
Program: 135667
Project: 135667
Buggy source:
/** 
 * Empties the store.
 * @throws StoreException if a connection error occurs.
 */
public void dbClean() throws StoreException {
  try (Connection c=dbConnect()){
    String sql="String_Node_Str" + tableName;
    c.createStatement().execute(sql);
  }
 catch (  SQLException e) {
    LOG.error("String_Node_Str",tableName,e);
    throw new StoreException("String_Node_Str" + tableName,e);
  }
}

Fixed version (ground truth):
/** 
 * Empties the store.
 * @throws StoreException if a connection error occurs.
 */
public void dbClean() throws StoreException {
  try (Connection c=dbConnect()){
    String sql="String_Node_Str" + tableName;
    try (Statement statement=c.createStatement()){
      statement.execute(sql);
    }
   }
 catch (  SQLException e) {
    LOG.error("String_Node_Str",tableName,e);
    throw new StoreException("String_Node_Str" + tableName,e);
  }
}
Program: 135668
Project: 135668
Buggy source:
protected Domain deleteDomain(String domainid) throws StoreException {
  domainid=StringEscapeUtils.escapeHtml4(domainid);
  Domain deletedDomain=this.getDomain(domainid);
  if (deletedDomain == null) {
    return null;
  }
  String query=String.format("String_Node_Str",domainid);
  try (Connection conn=dbConnect();Statement statement=conn.createStatement()){
    int deleteCount=statement.executeUpdate(query);
    LOG.debug("String_Node_Str",deleteCount);
    return deletedDomain;
  }
 catch (  SQLException e) {
    LOG.error("String_Node_Str",domainid,e);
    throw new StoreException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") protected Domain deleteDomain(String domainid) throws StoreException {
  domainid=StringEscapeUtils.escapeHtml4(domainid);
  Domain deletedDomain=this.getDomain(domainid);
  if (deletedDomain == null) {
    return null;
  }
  String query=String.format("String_Node_Str",domainid);
  try (Connection conn=dbConnect();Statement statement=conn.createStatement()){
    int deleteCount=statement.executeUpdate(query);
    LOG.debug("String_Node_Str",deleteCount);
    return deletedDomain;
  }
 catch (  SQLException e) {
    LOG.error("String_Node_Str",domainid,e);
    throw new StoreException("String_Node_Str",e);
  }
}
Program: 135669
Project: 135669
Buggy source:
protected Grant deleteGrant(String grantid) throws StoreException {
  grantid=StringEscapeUtils.escapeHtml4(grantid);
  Grant savedGrant=this.getGrant(grantid);
  if (savedGrant == null) {
    return null;
  }
  String query=String.format("String_Node_Str",grantid);
  try (Connection conn=dbConnect();Statement statement=conn.createStatement()){
    int deleteCount=statement.executeUpdate(query);
    LOG.debug("String_Node_Str",deleteCount);
    return savedGrant;
  }
 catch (  SQLException e) {
    throw new StoreException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") protected Grant deleteGrant(String grantid) throws StoreException {
  grantid=StringEscapeUtils.escapeHtml4(grantid);
  Grant savedGrant=this.getGrant(grantid);
  if (savedGrant == null) {
    return null;
  }
  String query=String.format("String_Node_Str",grantid);
  try (Connection conn=dbConnect();Statement statement=conn.createStatement()){
    int deleteCount=statement.executeUpdate(query);
    LOG.debug("String_Node_Str",deleteCount);
    return savedGrant;
  }
 catch (  SQLException e) {
    throw new StoreException("String_Node_Str",e);
  }
}
Program: 135670
Project: 135670
Buggy source:
protected Role deleteRole(String roleid) throws StoreException {
  roleid=StringEscapeUtils.escapeHtml4(roleid);
  Role savedRole=this.getRole(roleid);
  if (savedRole == null) {
    return null;
  }
  String query=String.format("String_Node_Str",roleid);
  try (Connection conn=dbConnect();Statement statement=conn.createStatement()){
    int deleteCount=statement.executeUpdate(query);
    LOG.debug("String_Node_Str",deleteCount);
    return savedRole;
  }
 catch (  SQLException s) {
    throw new StoreException("String_Node_Str" + s);
  }
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") protected Role deleteRole(String roleid) throws StoreException {
  roleid=StringEscapeUtils.escapeHtml4(roleid);
  Role savedRole=this.getRole(roleid);
  if (savedRole == null) {
    return null;
  }
  String query=String.format("String_Node_Str",roleid);
  try (Connection conn=dbConnect();Statement statement=conn.createStatement()){
    int deleteCount=statement.executeUpdate(query);
    LOG.debug("String_Node_Str",deleteCount);
    return savedRole;
  }
 catch (  SQLException s) {
    throw new StoreException("String_Node_Str" + s);
  }
}
Program: 135671
Project: 135671
Buggy source:
protected User deleteUser(String userid) throws StoreException {
  userid=StringEscapeUtils.escapeHtml4(userid);
  User savedUser=this.getUser(userid);
  if (savedUser == null) {
    return null;
  }
  String query=String.format("String_Node_Str",userid);
  try (Connection conn=dbConnect();Statement statement=conn.createStatement()){
    int deleteCount=statement.executeUpdate(query);
    LOG.debug("String_Node_Str",deleteCount);
    return savedUser;
  }
 catch (  SQLException s) {
    throw new StoreException("String_Node_Str" + s);
  }
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") protected User deleteUser(String userid) throws StoreException {
  userid=StringEscapeUtils.escapeHtml4(userid);
  User savedUser=this.getUser(userid);
  if (savedUser == null) {
    return null;
  }
  String query=String.format("String_Node_Str",userid);
  try (Connection conn=dbConnect();Statement statement=conn.createStatement()){
    int deleteCount=statement.executeUpdate(query);
    LOG.debug("String_Node_Str",deleteCount);
    return savedUser;
  }
 catch (  SQLException s) {
    throw new StoreException("String_Node_Str" + s);
  }
}
Program: 135672
Project: 135672
Buggy source:
public MdsalStore(DataBroker dataBroker){
  this.dataBroker=dataBroker;
}

Fixed version (ground truth):
public MdsalStore(DataBroker dataBroker){
}
Program: 135673
Project: 135673
Buggy source:
@Override public void writeTo(T type,Class<?> theClass,Type genericType,Annotation[] annotations,MediaType mediaType,MultivaluedMap<String,Object> httpHeaders,OutputStream entityStream) throws IOException, WebApplicationException {
  PrintWriter printWriter=new PrintWriter(entityStream);
  try {
    String json;
    if (ui.getQueryParameters().containsKey(PRETTY_PRINT)) {
      json=prettyGson.toJson(type);
    }
 else {
      json=gson.toJson(type);
    }
    printWriter.write(json);
    printWriter.flush();
  }
  finally {
    printWriter.close();
  }
}

Fixed version (ground truth):
@Override @SuppressFBWarnings("String_Node_Str") public void writeTo(T type,Class<?> theClass,Type genericType,Annotation[] annotations,MediaType mediaType,MultivaluedMap<String,Object> httpHeaders,OutputStream entityStream) throws IOException, WebApplicationException {
  PrintWriter printWriter=new PrintWriter(entityStream);
  try {
    String json;
    if (ui.getQueryParameters().containsKey(PRETTY_PRINT)) {
      json=prettyGson.toJson(type);
    }
 else {
      json=gson.toJson(type);
    }
    printWriter.write(json);
    printWriter.flush();
  }
  finally {
    printWriter.close();
  }
}
Program: 135674
Project: 135674
Buggy source:
@Override protected boolean onAccessDenied(final ServletRequest request,final ServletResponse response) throws Exception {
  final Subject currentUser=SecurityUtils.getSubject();
  return executeLogin(request,response);
}

Fixed version (ground truth):
@Override protected boolean onAccessDenied(final ServletRequest request,final ServletResponse response) throws Exception {
  SecurityUtils.getSubject();
  return executeLogin(request,response);
}
Program: 135675
Project: 135675
Buggy source:
@Override @SuppressWarnings("String_Node_Str") protected boolean executeLogin(final ServletRequest request,final ServletResponse response) throws Exception {
  final HttpServletRequest req;
  try {
    req=(HttpServletRequest)request;
  }
 catch (  final ClassCastException e) {
    LOG.debug("String_Node_Str",e);
    throw e;
  }
  final HttpServletResponse resp;
  try {
    resp=(HttpServletResponse)response;
  }
 catch (  final ClassCastException e) {
    LOG.debug("String_Node_Str",e);
    throw e;
  }
  try {
    if (req.getServletPath().equals(TOKEN_GRANT_ENDPOINT)) {
      final UsernamePasswordToken token=createToken(request,response);
      if (token == null) {
        final String msg="String_Node_Str" + "String_Node_Str";
        throw new IllegalStateException(msg);
      }
      try {
        final Subject subject=getSubject(request,response);
        subject.login(token);
        return onLoginSuccess(token,subject,request,response);
      }
 catch (      final AuthenticationException e) {
        return onLoginFailure(token,e,request,response);
      }
    }
 else     if (req.getServletPath().equals(TOKEN_REVOKE_ENDPOINT)) {
    }
 else     if (req.getServletPath().equals(TOKEN_VALIDATE_ENDPOINT)) {
    }
  }
 catch (  final AuthenticationException e) {
    error(resp,SC_UNAUTHORIZED,e.getMessage());
  }
catch (  final OAuthProblemException oe) {
    error(resp,oe);
  }
catch (  final RuntimeException e) {
    error(resp,e);
  }
  return false;
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") protected boolean executeLogin(final ServletRequest request,final ServletResponse response) throws Exception {
  final HttpServletRequest req;
  try {
    req=(HttpServletRequest)request;
  }
 catch (  final ClassCastException e) {
    LOG.debug("String_Node_Str",e);
    throw e;
  }
  final HttpServletResponse resp;
  try {
    resp=(HttpServletResponse)response;
  }
 catch (  final ClassCastException e) {
    LOG.debug("String_Node_Str",e);
    throw e;
  }
  try {
    if (req.getServletPath().equals(TOKEN_GRANT_ENDPOINT)) {
      final UsernamePasswordToken token=createToken(request,response);
      if (token == null) {
        final String msg="String_Node_Str" + "String_Node_Str";
        throw new IllegalStateException(msg);
      }
      try {
        final Subject subject=getSubject(request,response);
        subject.login(token);
        return onLoginSuccess(token,subject,request,response);
      }
 catch (      final AuthenticationException e) {
        return onLoginFailure(token,e,request,response);
      }
    }
  }
 catch (  final AuthenticationException e) {
    error(resp,SC_UNAUTHORIZED,e.getMessage());
  }
catch (  final OAuthProblemException oe) {
    error(resp,oe);
  }
catch (  final RuntimeException e) {
    error(resp,e);
  }
  return false;
}
Program: 135676
Project: 135676
Buggy source:
@Override protected boolean isLoginAttempt(String authzHeader){
  final String authzScheme=getAuthzScheme().toLowerCase();
  final String authzHeaderLowerCase=authzHeader.toLowerCase();
  return authzHeaderLowerCase.startsWith(authzScheme) || authzHeaderLowerCase.startsWith(BEARER_SCHEME);
}

Fixed version (ground truth):
@Override protected boolean isLoginAttempt(String authzHeader){
  final String authzScheme=getAuthzScheme().toLowerCase(Locale.ROOT);
  final String authzHeaderLowerCase=authzHeader.toLowerCase(Locale.ROOT);
  return authzHeaderLowerCase.startsWith(authzScheme) || authzHeaderLowerCase.startsWith(BEARER_SCHEME);
}
Program: 135678
Project: 135678
Buggy source:
@Override public Claim authenticate(PasswordCredentials creds){
  Preconditions.checkNotNull(creds);
  Preconditions.checkNotNull(creds.username());
  Preconditions.checkNotNull(creds.password());
  String domain=creds.domain() == null ? IIDMStore.DEFAULT_DOMAIN : creds.domain();
  Map<PasswordCredentials,Claim> cache=claimCache.get(domain);
  if (cache == null) {
    cache=new ConcurrentHashMap<>();
    claimCache.put(domain,cache);
  }
  Claim claim=cache.get(creds);
  if (claim == null) {
synchronized (claimCache) {
      claim=cache.get(creds);
      if (claim == null) {
        claim=dbAuthenticate(creds);
        if (claim != null) {
          cache.put(creds,claim);
        }
      }
    }
  }
  return claim;
}

Fixed version (ground truth):
@Override public Claim authenticate(PasswordCredentials creds){
  Preconditions.checkNotNull(creds);
  Preconditions.checkNotNull(creds.username());
  Preconditions.checkNotNull(creds.password());
  String domain=creds.domain() == null ? IIDMStore.DEFAULT_DOMAIN : creds.domain();
  Map<PasswordCredentials,Claim> cache=claimCache.get(domain);
  if (cache == null) {
    cache=new ConcurrentHashMap<>();
    claimCache.put(domain,cache);
  }
  Claim claim=cache.get(creds);
  if (claim == null) {
synchronized (claimCache) {
      claim=cache.get(creds);
      if (claim == null) {
        claim=dbAuthenticate(creds);
        cache.put(creds,claim);
      }
    }
  }
  return claim;
}
Program: 135681
Project: 135681
Buggy source:
private Identity(String username,String password,String domain){
  this.methods=new String[]{METHOD_PASSWORD};
  this.password=new Password(username,password,domain);
}

Fixed version (ground truth):
private Identity(String username,String password,String domain){
  this.password=new Password(username,password,domain);
}
Program: 135682
Project: 135682
Buggy source:
public String[] getMethods(){
  return methods;
}

Fixed version (ground truth):
public String[] getMethods(){
  return new String[]{METHOD_PASSWORD};
}
Program: 135683
Project: 135683
Buggy source:
public static String getSHA256(String password,String salt){
  return getSHA256(password.getBytes(),salt);
}

Fixed version (ground truth):
public static String getSHA256(String password,String salt){
  return getSHA256(password.getBytes(StandardCharsets.UTF_8),salt);
}
Program: 135684
Project: 135684
Buggy source:
private void createGrant(String domainID,String userID,String roleID) throws IDMStoreException {
  Grant grant=new Grant();
  grant.setDomainid(domainID);
  grant.setUserid(userID);
  grant.setRoleid(roleID);
  grant=store.writeGrant(grant);
  LOG.debug("String_Node_Str" + userID + "String_Node_Str"+ roleID+ "String_Node_Str"+ domainID+ "String_Node_Str");
}

Fixed version (ground truth):
private void createGrant(String domainID,String userID,String roleID) throws IDMStoreException {
  Grant grant=new Grant();
  grant.setDomainid(domainID);
  grant.setUserid(userID);
  grant.setRoleid(roleID);
  store.writeGrant(grant);
  LOG.debug("String_Node_Str" + userID + "String_Node_Str"+ roleID+ "String_Node_Str"+ domainID+ "String_Node_Str");
}
Program: 135685
Project: 135685
Buggy source:
/** 
 * Initialize IIDMStore with the default domain and the 'user' and 'admin' roles, if needed. This does not create any default user entries (because they are an inherent security risk).
 * @param domainID ID (same as name) of the "authentication domain"
 * @return ID of the just newly created Domain, or null if no new one had to be created
 * @throws IDMStoreException for issues coming from the IIDMStore
 */
public String initDomainAndRolesWithoutUsers(String domainID) throws IDMStoreException {
  LOG.info("String_Node_Str");
  Domain defaultDomain=store.readDomain(domainID);
  if (defaultDomain != null) {
    LOG.info("String_Node_Str");
    return null;
  }
  Domain domain=new Domain();
  domain.setEnabled(true);
  domain.setName(IIDMStore.DEFAULT_DOMAIN);
  domain.setDescription("String_Node_Str");
  domain=store.writeDomain(domain);
  LOG.info("String_Node_Str");
  String newDomainID=domain.getDomainid();
  Role adminRole=new Role();
  adminRole.setName("String_Node_Str");
  adminRole.setDomainid(newDomainID);
  adminRole.setDescription("String_Node_Str");
  adminRole=store.writeRole(adminRole);
  LOG.info("String_Node_Str");
  Role userRole=new Role();
  userRole.setName("String_Node_Str");
  userRole.setDomainid(newDomainID);
  userRole.setDescription("String_Node_Str");
  userRole=store.writeRole(userRole);
  LOG.info("String_Node_Str");
  return newDomainID;
}

Fixed version (ground truth):
/** 
 * Initialize IIDMStore with the default domain and the 'user' and 'admin' roles, if needed. This does not create any default user entries (because they are an inherent security risk).
 * @param domainID ID (same as name) of the "authentication domain"
 * @return ID of the just newly created Domain, or null if no new one had to be created
 * @throws IDMStoreException for issues coming from the IIDMStore
 */
public String initDomainAndRolesWithoutUsers(String domainID) throws IDMStoreException {
  LOG.info("String_Node_Str");
  Domain defaultDomain=store.readDomain(domainID);
  if (defaultDomain != null) {
    LOG.info("String_Node_Str");
    return null;
  }
  Domain domain=new Domain();
  domain.setEnabled(true);
  domain.setName(IIDMStore.DEFAULT_DOMAIN);
  domain.setDescription("String_Node_Str");
  domain=store.writeDomain(domain);
  LOG.info("String_Node_Str");
  String newDomainID=domain.getDomainid();
  Role adminRole=new Role();
  adminRole.setName("String_Node_Str");
  adminRole.setDomainid(newDomainID);
  adminRole.setDescription("String_Node_Str");
  store.writeRole(adminRole);
  LOG.info("String_Node_Str");
  Role userRole=new Role();
  userRole.setName("String_Node_Str");
  userRole.setDomainid(newDomainID);
  userRole.setDescription("String_Node_Str");
  store.writeRole(userRole);
  LOG.info("String_Node_Str");
  return newDomainID;
}
Program: 135686
Project: 135686
Buggy source:
@Override public int hashCode(){
  return this.name.hashCode();
}

Fixed version (ground truth):
@Override public int hashCode(){
  return name != null ? name.hashCode() : 0;
}
Program: 135687
Project: 135687
Buggy source:
@Override public boolean equals(Object obj){
  Domain other=(Domain)obj;
  if (other == null) {
    return false;
  }
  if (compareValues(getName(),other.getName()) && compareValues(getDomainid(),other.getDomainid()) && compareValues(getDescription(),other.getDescription())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  Domain other=(Domain)obj;
  if (Objects.equals(getName(),other.getName()) && Objects.equals(getDomainid(),other.getDomainid()) && Objects.equals(getDescription(),other.getDescription())) {
    return true;
  }
  return false;
}
Program: 135688
Project: 135688
Buggy source:
@Override public boolean equals(Object obj){
  Grant other=(Grant)obj;
  if (other == null) {
    return false;
  }
  if (compareValues(getDomainid(),other.getDomainid()) && compareValues(getRoleid(),other.getRoleid()) && compareValues(getUserid(),other.getUserid())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  Grant other=(Grant)obj;
  if (Objects.equals(getDomainid(),other.getDomainid()) && Objects.equals(getRoleid(),other.getRoleid()) && Objects.equals(getUserid(),other.getUserid())) {
    return true;
  }
  return false;
}
Program: 135689
Project: 135689
Buggy source:
@Override public int hashCode(){
  return this.name.hashCode();
}

Fixed version (ground truth):
@Override public int hashCode(){
  return name != null ? name.hashCode() : 0;
}
Program: 135690
Project: 135690
Buggy source:
@Override public boolean equals(Object obj){
  Role other=(Role)obj;
  if (other == null) {
    return false;
  }
  if (compareValues(getName(),other.getName()) && compareValues(getRoleid(),other.getRoleid()) && compareValues(getDescription(),other.getDescription())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  Role other=(Role)obj;
  if (Objects.equals(getName(),other.getName()) && Objects.equals(getRoleid(),other.getRoleid()) && Objects.equals(getDescription(),other.getDescription())) {
    return true;
  }
  return false;
}
Program: 135691
Project: 135691
Buggy source:
@Override public int hashCode(){
  return this.name.hashCode();
}

Fixed version (ground truth):
@Override public int hashCode(){
  return name != null ? name.hashCode() : 0;
}
Program: 135692
Project: 135692
Buggy source:
public Boolean isEnabled(){
  return (enabled == USER_ACCOUNT_ENABLED);
}

Fixed version (ground truth):
public Boolean isEnabled(){
  return enabled == USER_ACCOUNT_ENABLED;
}
Program: 135693
Project: 135693
Buggy source:
@Override public boolean equals(Object obj){
  User other=(User)obj;
  if (other == null) {
    return false;
  }
  if (compareValues(getName(),other.getName()) && compareValues(getEmail(),other.getEmail()) && isEnabled().equals(other.isEnabled())&& compareValues(getPassword(),other.getPassword())&& compareValues(getSalt(),other.getSalt())&& compareValues(getUserid(),other.getUserid())&& compareValues(getDescription(),other.getDescription())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  User other=(User)obj;
  if (Objects.equals(getName(),other.getName()) && Objects.equals(getEmail(),other.getEmail()) && isEnabled().equals(other.isEnabled())&& Objects.equals(getPassword(),other.getPassword())&& Objects.equals(getSalt(),other.getSalt())&& Objects.equals(getUserid(),other.getUserid())&& Objects.equals(getDescription(),other.getDescription())) {
    return true;
  }
  return false;
}
Program: 135694
Project: 135694
Buggy source:
public static SessionsManager getInstance(){
  if (sessionMgr == null) {
    sessionMgr=new SessionsManager();
  }
  return sessionMgr;
}

Fixed version (ground truth):
public static SessionsManager getInstance(){
  return sessionMgr;
}
Program: 135695
Project: 135695
Buggy source:
/** 
 * Retrieve the password from the user.
 * @param session command line session
 * @param pwdPrintStr label for enter password
 * @return the new written password
 * @throws Exception exception reading the password
 */
public static String readPassword(final CommandSession session,final String pwdPrintStr) throws Exception {
  session.getConsole().println(pwdPrintStr);
  final InputStreamReader iStreamReader=new InputStreamReader(session.getKeyboard());
  final BufferedReader bReader=new BufferedReader(iStreamReader);
  final String pwd=bReader.readLine();
  return pwd;
}

Fixed version (ground truth):
/** 
 * Retrieve the password from the user.
 * @param session command line session
 * @param pwdPrintStr label for enter password
 * @return the new written password
 * @throws Exception exception reading the password
 */
public static String readPassword(final CommandSession session,final String pwdPrintStr) throws Exception {
  session.getConsole().println(pwdPrintStr);
  try (BufferedReader bReader=new BufferedReader(new InputStreamReader(session.getKeyboard(),StandardCharsets.UTF_8))){
    return bReader.readLine();
  }
 }
Program: 135696
Project: 135696
Buggy source:
/** 
 * Get the ODL keystore certificate.
 * @param bundleName name of the bundle that will use the keystores
 * @param withTag  boolean to add cert tag to the return string
 * @return certificate as string
 */
String getODLStoreCertificate(@Nonnull String bundleName,boolean withTag);

Fixed version (ground truth):
/** 
 * Get the ODL keystore certificate.
 * @param bundleName name of the bundle that will use the keystores
 * @param withTag  boolean to add cert tag to the return string
 * @return certificate as string
 */
@Nullable String getODLStoreCertificate(@Nonnull String bundleName,boolean withTag);
Program: 135697
Project: 135697
Buggy source:
/** 
 * Get a Network node certificate from the Trust keystore.
 * @param bundleName name of the bundle that will use the keystores
 * @param alias of the certificate
 * @param withTag  boolean to add cert tag to the return string
 * @return certificate as string
 */
String getTrustStoreCertificate(@Nonnull String bundleName,@Nonnull String alias,boolean withTag);

Fixed version (ground truth):
/** 
 * Get a Network node certificate from the Trust keystore.
 * @param bundleName name of the bundle that will use the keystores
 * @param alias of the certificate
 * @param withTag  boolean to add cert tag to the return string
 * @return certificate as string
 */
@Nullable String getTrustStoreCertificate(@Nonnull String bundleName,@Nonnull String alias,boolean withTag);
Program: 135698
Project: 135698
Buggy source:
@Override public String[] getTlsProtocols(final String bundleName){
  final SslData sslData=keyStoresData.getSslData(dataBroker,bundleName);
  if (sslData != null) {
    String tlsProtocols=sslData.getTlsProtocols();
    if (tlsProtocols != null && !tlsProtocols.isEmpty()) {
      tlsProtocols=tlsProtocols.replace("String_Node_Str","String_Node_Str");
      if (tlsProtocols.contains("String_Node_Str")) {
        return tlsProtocols.split("String_Node_Str");
      }
 else {
        return new String[]{tlsProtocols};
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Override @SuppressFBWarnings("String_Node_Str") public String[] getTlsProtocols(final String bundleName){
  final SslData sslData=keyStoresData.getSslData(dataBroker,bundleName);
  if (sslData != null) {
    String tlsProtocols=sslData.getTlsProtocols();
    if (tlsProtocols != null && !tlsProtocols.isEmpty()) {
      tlsProtocols=tlsProtocols.replace("String_Node_Str","String_Node_Str");
      if (tlsProtocols.contains("String_Node_Str")) {
        return tlsProtocols.split("String_Node_Str");
      }
 else {
        return new String[]{tlsProtocols};
      }
    }
  }
  return null;
}
Program: 135699
Project: 135699
Buggy source:
@Override public String[] getCipherSuites(final String bundleName){
  final SslData sslData=keyStoresData.getSslData(dataBroker,bundleName);
  if (sslData != null && sslData.getCipherSuites() != null && !sslData.getCipherSuites().isEmpty()) {
    final List<String> suites=new ArrayList<>();
    sslData.getCipherSuites().stream().forEach(cs -> {
      if (!cs.getSuiteName().isEmpty()) {
        suites.add(cs.getSuiteName());
      }
    }
);
    return suites.toArray(new String[suites.size()]);
  }
  return null;
}

Fixed version (ground truth):
@Override @SuppressFBWarnings("String_Node_Str") public String[] getCipherSuites(final String bundleName){
  final SslData sslData=keyStoresData.getSslData(dataBroker,bundleName);
  if (sslData != null && sslData.getCipherSuites() != null && !sslData.getCipherSuites().isEmpty()) {
    final List<String> suites=new ArrayList<>();
    sslData.getCipherSuites().stream().forEach(cs -> {
      if (!cs.getSuiteName().isEmpty()) {
        suites.add(cs.getSuiteName());
      }
    }
);
    return suites.toArray(new String[suites.size()]);
  }
  return null;
}
Program: 135700
Project: 135700
Buggy source:
@Override public String[] getTlsProtocols(){
  String tlsProtocols=ctlKeyStore.getTlsProtocols();
  if (tlsProtocols != null && !tlsProtocols.isEmpty()) {
    tlsProtocols=tlsProtocols.replace("String_Node_Str","String_Node_Str");
    if (tlsProtocols.contains("String_Node_Str")) {
      return tlsProtocols.split("String_Node_Str");
    }
 else {
      return new String[]{tlsProtocols};
    }
  }
  return null;
}

Fixed version (ground truth):
@Override @SuppressFBWarnings("String_Node_Str") public String[] getTlsProtocols(){
  String tlsProtocols=ctlKeyStore.getTlsProtocols();
  if (tlsProtocols != null && !tlsProtocols.isEmpty()) {
    tlsProtocols=tlsProtocols.replace("String_Node_Str","String_Node_Str");
    if (tlsProtocols.contains("String_Node_Str")) {
      return tlsProtocols.split("String_Node_Str");
    }
 else {
      return new String[]{tlsProtocols};
    }
  }
  return null;
}
Program: 135701
Project: 135701
Buggy source:
@Override public String[] getCipherSuites(){
  final List<CipherSuites> cipherSuites=ctlKeyStore.getCipherSuites();
  if (cipherSuites != null && !cipherSuites.isEmpty()) {
    final List<String> suites=new ArrayList<>();
    cipherSuites.stream().forEach(cs -> {
      if (!cs.getSuiteName().isEmpty()) {
        suites.add(cs.getSuiteName());
      }
    }
);
    return suites.toArray(new String[suites.size()]);
  }
  return null;
}

Fixed version (ground truth):
@Override @SuppressFBWarnings("String_Node_Str") public String[] getCipherSuites(){
  final List<CipherSuites> cipherSuites=ctlKeyStore.getCipherSuites();
  if (cipherSuites != null && !cipherSuites.isEmpty()) {
    final List<String> suites=new ArrayList<>();
    cipherSuites.stream().forEach(cs -> {
      if (!cs.getSuiteName().isEmpty()) {
        suites.add(cs.getSuiteName());
      }
    }
);
    return suites.toArray(new String[suites.size()]);
  }
  return null;
}