Source:
<code>public void associateID(String idpID, String associatedID) throws UserProfileException { Connection connection = null; PreparedStatement prepStmt = null; String sql = null; int tenantID = CarbonContext.getThreadLocalCarbonContext().getTenantId(); String tenantAwareUsername = MultitenantUtils.getTenantAwareUsername(CarbonContext.getThreadLocalCarbonContext() .getUsername()); String domainName = getDomainName(tenantAwareUsername); tenantAwareUsername = getUsernameWithoutDomain(tenantAwareUsername); try { connection = JDBCPersistenceManager.getInstance().getDBConnection(); sql = "INSERT INTO IDN_ASSOCIATED_ID (TENANT_ID, IDP_ID, IDP_USER_ID, DOMAIN_ID, USER_NAME) " + "VALUES (? , (SELECT ID FROM IDP WHERE NAME = ? AND TENANT_ID = ? ), ? , " + "(SELECT UM_DOMAIN_ID FROM UM_DOMAIN WHERE UM_DOMAIN_NAME = ? AND UM_TENANT_ID= ? ), ?);"; prepStmt = connection.prepareStatement(sql); prepStmt.setInt(1, tenantID); prepStmt.setString(2, idpID); prepStmt.setInt(3, tenantID); prepStmt.setString(4, associatedID); prepStmt.setString(5, domainName); prepStmt.setInt(6, tenantID); prepStmt.setString(7, tenantAwareUsername); prepStmt.execute(); connection.commit(); } catch (IdentityException e) { log.error(persistenceErrorMsg, e); throw new UserProfileException(persistenceErrorMsg, e); } catch (SQLException e) { log.error(SQLErrorMsg + sql); <START> log.error(e.getMessage(), e); <END> throw new UserProfileException("Error occurred while persisting the federated user ID"); } finally { IdentityDatabaseUtil.closeAllConnections(connection, null, prepStmt); } }</code><technical_language>log.error(SQLErrorMsg + sql); log.error(e.getMessage(), e); replace log.error(SQLErrorMsg + sql, e)</technical_language>

Target:
public void associateID(String idpID, String associatedID) throws UserProfileException { Connection connection = null; PreparedStatement prepStmt = null; String sql = null; int tenantID = CarbonContext.getThreadLocalCarbonContext().getTenantId(); String tenantAwareUsername = MultitenantUtils.getTenantAwareUsername(CarbonContext.getThreadLocalCarbonContext() .getUsername()); String domainName = getDomainName(tenantAwareUsername); tenantAwareUsername = getUsernameWithoutDomain(tenantAwareUsername); try { connection = JDBCPersistenceManager.getInstance().getDBConnection(); sql = "INSERT INTO IDN_ASSOCIATED_ID (TENANT_ID, IDP_ID, IDP_USER_ID, DOMAIN_ID, USER_NAME) " + "VALUES (? , (SELECT ID FROM IDP WHERE NAME = ? AND TENANT_ID = ? ), ? , " + "(SELECT UM_DOMAIN_ID FROM UM_DOMAIN WHERE UM_DOMAIN_NAME = ? AND UM_TENANT_ID= ? ), ?);"; prepStmt = connection.prepareStatement(sql); prepStmt.setInt(1, tenantID); prepStmt.setString(2, idpID); prepStmt.setInt(3, tenantID); prepStmt.setString(4, associatedID); prepStmt.setString(5, domainName); prepStmt.setInt(6, tenantID); prepStmt.setString(7, tenantAwareUsername); prepStmt.execute(); connection.commit(); } catch (IdentityException e) { log.error(persistenceErrorMsg, e); throw new UserProfileException(persistenceErrorMsg, e); } catch (SQLException e) { log.error(SQLErrorMsg + sql, e); throw new UserProfileException("Error occurred while persisting the federated user ID"); } finally { IdentityDatabaseUtil.closeAllConnections(connection, null, prepStmt); } }