auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private IPluginModelBase getBestCandidate(IPluginModelBase[] models) { IPluginModelBase result = null; for (final IPluginModelBase model : models) { if (model.getBundleDescription() == null) continue; if (result == null) { result = model; continue; } if (!result.isEnabled() && model.isEnabled()) { result = model; continue; } final BundleDescription current = result.getBundleDescription(); final BundleDescription candidate = model.getBundleDescription(); if (!current.isResolved() && candidate.isResolved()) { result = model; continue; } if (current.getVersion().compareTo(candidate.getVersion()) < 0) { result = model; } } return result; }

Target:
private IPluginModelBase getBestCandidate(IPluginModelBase[] models) { IPluginModelBase result = null; for (IPluginModelBase model : models) { if (model.getBundleDescription() == null) continue; if (result == null) { result = model; continue; } if (!result.isEnabled() && model.isEnabled()) { result = model; continue; } BundleDescription current = result.getBundleDescription(); BundleDescription candidate = model.getBundleDescription(); if (!current.isResolved() && candidate.isResolved()) { result = model; continue; } if (current.getVersion().compareTo(candidate.getVersion()) < 0) { result = model; } } return result; }
Source:
public CepSink build() { return new CepSink(cepSinkType, actionConfigurations); }

Target:
private CepSink build() { return new CepSink(cepSinkType, actionConfigurations); }
Source:
public int hashCode() { return Objects.hash(filter, leftBlocksSize, sortChannel); }

Target:
public int hashCode() { return Objects.hash(leftBlocksSize, filter); }
Source:
public static void main(String[] args) { try { boolean udp = true; boolean tcp = false; if (0 < args.length) { tcp = args[0].equalsIgnoreCase("coap+tcp:"); } HelloWorldServer server = new HelloWorldServer(); server.addEndpoints(udp, tcp); server.start(); } catch (SocketException e) { System.err.println("Failed to initialize server: " + e.getMessage()); } }

Target:
public static void main(String[] args) { try { boolean udp = true; boolean tcp = false; if (0 < args.length) { tcp = args[0].equalsIgnoreCase("coap+tcp:"); if (tcp) { System.out.println("Please Note: the TCP support is currently experimental!"); } } HelloWorldServer server = new HelloWorldServer(); server.addEndpoints(udp, tcp); server.start(); } catch (SocketException e) { System.err.println("Failed to initialize server: " + e.getMessage()); } }
Source:
public void handle(HeartbeatResponse heartbeatResponse, RequestFuture<Void> future) { sensors.heartbeatSensor.record(response.requestLatencyMs()); Errors error = heartbeatResponse.error(); if (error == Errors.NONE) { log.debug("Received successful Heartbeat response"); future.complete(null); } else if (error == Errors.COORDINATOR_NOT_AVAILABLE || error == Errors.NOT_COORDINATOR) { log.info("Attempt to heartbeat failed since coordinator is either not started or not valid", coordinator()); markCoordinatorUnknown(); future.raise(error); } else if (error == Errors.REBALANCE_IN_PROGRESS) { log.info("Attempt to heartbeat failed since group is rebalancing"); requestRejoin(); future.raise(error); } else if (error == Errors.ILLEGAL_GENERATION || error == Errors.UNKNOWN_MEMBER_ID || error == Errors.FENCED_INSTANCE_ID) { if (generationUnchanged()) { log.info("Attempt to heartbeat failed with generation and group instance id due to {}, resetting generation", sentGeneration, rebalanceConfig.groupInstanceId, error.message()); resetGenerationOnResponseError(ApiKeys.HEARTBEAT, error); future.raise(error); } else { log.info("Attempt to heartbeat failed with stale generation and group instance id due to {}, ignoring the error", sentGeneration, rebalanceConfig.groupInstanceId, error.message()); future.complete(null); } } else if (error == Errors.GROUP_AUTHORIZATION_FAILED) { future.raise(GroupAuthorizationException.forGroupId(rebalanceConfig.groupId)); } else { future.raise(new KafkaException("Unexpected error in heartbeat response: " + error.message())); } }

Target:
public void handle(HeartbeatResponse heartbeatResponse, RequestFuture<Void> future) { sensors.heartbeatSensor.record(response.requestLatencyMs()); Errors error = heartbeatResponse.error(); if (error == Errors.NONE) { log.debug("Received successful Heartbeat response"); future.complete(null); } else if (error == Errors.COORDINATOR_NOT_AVAILABLE || error == Errors.NOT_COORDINATOR) { log.info("Attempt to heartbeat failed since coordinator is either not started or not valid", coordinator()); markCoordinatorUnknown(); future.raise(error); } else if (error == Errors.REBALANCE_IN_PROGRESS) { log.info("Attempt to heartbeat failed since group is rebalancing"); requestRejoin(); future.raise(error); } else if (error == Errors.ILLEGAL_GENERATION || error == Errors.UNKNOWN_MEMBER_ID || error == Errors.FENCED_INSTANCE_ID) { if (generationUnchanged()) { log.info("Attempt to heartbeat with and group instance id failed due to {}, resetting generation", sentGeneration, rebalanceConfig.groupInstanceId, error); resetGenerationOnResponseError(ApiKeys.HEARTBEAT, error); future.raise(error); } else { log.info("Attempt to heartbeat with stale and group instance id failed due to {}, ignoring the error", sentGeneration, rebalanceConfig.groupInstanceId, error); future.complete(null); } } else if (error == Errors.GROUP_AUTHORIZATION_FAILED) { future.raise(GroupAuthorizationException.forGroupId(rebalanceConfig.groupId)); } else { future.raise(new KafkaException("Unexpected error in heartbeat response: " + error.message())); } }
Source:
public boolean put(long ledgerId, long entryId, ByteBuf entry) { int size = entry.readableBytes(); int alignedSize = align64(size); long offset; int localOffset; int segmentIdx; while (true) { offset = cacheSize.getAndAdd(alignedSize); localOffset = (int) (offset & SegmentOffsetMask); segmentIdx = (int) (offset / MaxSegmentSize); if ((offset + size) > maxCacheSize) { return false; } else if (MaxSegmentSize - localOffset < size) { continue; } else { break; } } cacheSegments[segmentIdx].setBytes(localOffset, entry, entry.readerIndex(), entry.readableBytes()); while (true) { long currentLastEntryId = lastEntryMap.get(ledgerId); if (currentLastEntryId > entryId) { break; } if (lastEntryMap.compareAndSet(ledgerId, currentLastEntryId, entryId)) { break; } } index.put(ledgerId, entryId, offset, size); cacheCount.increment(); return true; }

Target:
public boolean put(long ledgerId, long entryId, ByteBuf entry) { int size = entry.readableBytes(); int alignedSize = align64(size); long offset; int localOffset; int segmentIdx; while (true) { offset = cacheOffset.getAndAdd(alignedSize); localOffset = (int) (offset & segmentOffsetMask); segmentIdx = (int) (offset >>> segmentOffsetBits); if ((offset + size) > maxCacheSize) { return false; } else if (maxSegmentSize - localOffset < size) { continue; } else { break; } } cacheSegments[segmentIdx].setBytes(localOffset, entry, entry.readerIndex(), entry.readableBytes()); while (true) { long currentLastEntryId = lastEntryMap.get(ledgerId); if (currentLastEntryId > entryId) { break; } if (lastEntryMap.compareAndSet(ledgerId, currentLastEntryId, entryId)) { break; } } index.put(ledgerId, entryId, offset, size); cacheCount.increment(); cacheSize.addAndGet(size); return true; }
Source:
public abstract <T extends Password> boolean exists(String key, Class<T> passwordClass) throws StorageException, UnsupportedPasswordClassException; public abstract <T extends Password> void store(String key, Class<T> passwordClass, Password password) throws StorageException, UnsupportedPasswordClassException; public abstract <T extends Password> T retrieve(String key, Class<T> passwordClass) throws StorageException, UnsupportedPasswordClassException; public abstract <T extends Password> void remove(String key, Class<T> passwordClass) throws StorageException, UnsupportedPasswordClassException; public abstract void initialize(Map<String, String> attributes) throws StorageException; public boolean isInitialized() { return initialized; }

Target:
public abstract <T extends Password> boolean exists(String key, Class<T> passwordClass) throws StorageException, UnsupportedPasswordClassException; public abstract <T extends Password> void store(String key, Class<T> passwordClass, T password) throws StorageException, UnsupportedPasswordClassException; public abstract <T extends Password> T retrieve(String key, Class<T> passwordClass) throws StorageException, UnsupportedPasswordClassException; public abstract <T extends Password> void remove(String key, Class<T> passwordClass) throws StorageException, UnsupportedPasswordClassException; public abstract void initialize(Map<String, String> attributes) throws StorageException; public boolean isInitialized() { return initialized; }
Source:
public void testThreeRegionSplit() throws IOException { Admin admin = getConnection().getAdmin(); TableName tableName = TableName.valueOf("TestTableWithThreeSplits"); HTableDescriptor descriptor = new HTableDescriptor(tableName); descriptor.addFamily(new HColumnDescriptor(COLUMN_FAMILY)); byte[] startKey = Bytes.toBytes("AAA"); byte[] endKey = Bytes.toBytes("ZZZ"); try { if (admin.tableExists(tableName)) { LOG.warn("Not creating the table since it exists: %s", tableName); } else { admin.createTable(descriptor, startKey, endKey, 3); List<HRegionLocation> regions = null; try (RegionLocator locator = getConnection().getRegionLocator(tableName)) { regions = locator.getAllRegionLocations(); } Assert.assertEquals(3, regions.size()); for (int i = 0; i < regions.size(); i++) { HRegionLocation region = regions.get(i); String start_key = Bytes.toString( region.getRegionInfo().getStartKey()); String end_key = Bytes.toString(region.getRegionInfo().getEndKey()); if (i == 0) { Assert.assertEquals(Bytes.toString(startKey), end_key); } else if (i == 1) { Assert.assertEquals(Bytes.toString(startKey), start_key); Assert.assertEquals(Bytes.toString(endKey), end_key); } else { Assert.assertEquals(Bytes.toString(endKey), start_key); } } } } finally { try { admin.disableTable(tableName); admin.deleteTable(tableName); } catch (Throwable t) { LOG.warn("Error cleaning up the table", t); } } }

Target:
public void testThreeRegionSplit() throws IOException { Admin admin = getConnection().getAdmin(); TableName tableName = TableName.valueOf("TestTable" + UUID.randomUUID().toString()); HTableDescriptor descriptor = new HTableDescriptor(tableName); descriptor.addFamily(new HColumnDescriptor(COLUMN_FAMILY)); byte[] startKey = Bytes.toBytes("AAA"); byte[] endKey = Bytes.toBytes("ZZZ"); try { admin.createTable(descriptor, startKey, endKey, 3); List<HRegionLocation> regions = null; try (RegionLocator locator = getConnection().getRegionLocator(tableName)) { regions = locator.getAllRegionLocations(); } Assert.assertEquals(3, regions.size()); for (int i = 0; i < regions.size(); i++) { HRegionLocation region = regions.get(i); String start_key = Bytes.toString( region.getRegionInfo().getStartKey()); String end_key = Bytes.toString(region.getRegionInfo().getEndKey()); if (i == 0) { Assert.assertEquals(Bytes.toString(startKey), end_key); } else if (i == 1) { Assert.assertEquals(Bytes.toString(startKey), start_key); Assert.assertEquals(Bytes.toString(endKey), end_key); } else { Assert.assertEquals(Bytes.toString(endKey), start_key); } } } finally { try { admin.disableTable(tableName); admin.deleteTable(tableName); } catch (Throwable t) { LOG.warn("Error cleaning up the table", t); } } }
Source:
public static void updateCheckoutAddressAndEmail(Checkout checkout, MaskedWallet maskedWallet) { if (checkout == null) { throw new NullPointerException("checkout cannot be null"); } if (maskedWallet == null) { throw new NullPointerException("maskedWallet cannot be null"); } Address shippingAddress = AndroidPayHelper.createShopifyAddress(maskedWallet.getBuyerShippingAddress()); Address billingAddress = AndroidPayHelper.createShopifyAddress(maskedWallet.getBuyerBillingAddress()); if (!shippingAddress.locationsAreEqual(checkout.getShippingAddress())) { checkout.setShippingRate(null); } checkout.setShippingAddress(shippingAddress); checkout.setBillingAddress(billingAddress); checkout.setEmail(maskedWallet.getEmail()); }

Target:
public static void updateCheckoutAddressAndEmail(Checkout checkout, MaskedWallet maskedWallet) { if (checkout == null) { throw new NullPointerException("checkout cannot be null"); } if (maskedWallet == null) { throw new NullPointerException("maskedWallet cannot be null"); } Address shippingAddress = createShopifyAddress(maskedWallet.getBuyerShippingAddress()); Address billingAddress = createShopifyAddress(maskedWallet.getBuyerBillingAddress()); if (!shippingAddress.locationsAreEqual(checkout.getShippingAddress())) { checkout.setShippingRate(null); } checkout.setShippingAddress(shippingAddress); checkout.setBillingAddress(billingAddress); checkout.setEmail(maskedWallet.getEmail()); }
Source:
public void shouldNotValidateEmailAddress_withInvalidEmailAddresses() { final List<String> invalidEmails = new ArrayList<String>(); invalidEmails.add("Abc.example.com"); invalidEmails.add("A@b@c@example.com"); invalidEmails.add("a\"b(c)d,e:f;g<h>i[j\\k]l@example.com"); invalidEmails.add("just\"not\"right@example.com"); invalidEmails.add("this is\"not\\allowed@example.com"); invalidEmails.add("this\\ still\\\"not\\allowed@example.com"); invalidEmails.add("john.doe@example..com"); final List<String> wrongValidatedEmails = new ArrayList<>(); for (final String email : invalidEmails) { try { Check.isValidEmail(field, email); wrongValidatedEmails.add(email); } catch (final ValidationException e) { } } if (!wrongValidatedEmails.isEmpty()) { fail("Expected to invalidate the following email addresses, but were actually validated: " + wrongValidatedEmails); } }

Target:
public void shouldNotValidateEmailAddress_withInvalidEmailAddresses() { final List<String> invalidEmails = new ArrayList<String>(); invalidEmails.add("Abc.example.com"); invalidEmails.add("A@b@c@example.com"); invalidEmails.add("a\"b(c)d,e:f;g<h>i[j\\k]l@example.com"); invalidEmails.add("just\"not\"right@example.com"); invalidEmails.add("this is\"not\\allowed@example.com"); invalidEmails.add("this\\ still\\\"not\\allowed@example.com"); invalidEmails.add("john.doe@example..com"); final List<String> validatedEmails = new ArrayList<>(); for (final String email : invalidEmails) { try { Check.isValidEmail(field, email); validatedEmails.add(email); } catch (final ValidationException e) { } } if (!validatedEmails.isEmpty()) { fail("Expected to invalidate the following email addresses, but were actually validated: " + validatedEmails); } }
Source:
public int hashCode() { int result = config.hashCode(); result = 31 * result + totalAmount.hashCode(); result = 31 * result + count.hashCode(); result = 31 * result + max.hashCode(); result = 31 * result + min.hashCode(); result = 31 * result + monitors.hashCode(); return result; }

Target:
public int hashCode() { int result = config.hashCode(); result = 31 * result + totalAmount.hashCode(); result = 31 * result + count.hashCode(); result = 31 * result + max.hashCode(); result = 31 * result + min.hashCode(); return result; }
Source:
public String toString() { StringJoiner joiner = new StringJoiner(", ", "Worldpay authorisation response (", ")"); if (StringUtils.isNotBlank(getTransactionId())) { joiner.add("orderCode: " + getTransactionId()); } if (StringUtils.isNotBlank(getLastEvent())) { joiner.add("lastEvent: " + getLastEvent()); } if (StringUtils.isNotBlank(getRefusedReturnCode())) { joiner.add("ISO8583ReturnCode code: " + getRefusedReturnCode()); } if (StringUtils.isNotBlank(getRefusedReturnCodeDescription())) { joiner.add("ISO8583ReturnCode description: " + getRefusedReturnCodeDescription()); } if (StringUtils.isNotBlank(issuerUrl)) { joiner.add("issuerURL: " + issuerUrl); } if (StringUtils.isNotBlank(challengeAcsUrl)) { joiner.add("threeDSChallengeDetails acsUrl: " + challengeAcsUrl); } if (StringUtils.isNotBlank(challengeTransactionId)) { joiner.add("threeDSChallengeDetails transactionId3DS: " + challengeTransactionId); } if (StringUtils.isNotBlank(challengePayload)) { joiner.add("threeDSChallengeDetails payload: " + challengePayload); } if (StringUtils.isNotBlank(threeDsVersion)) { joiner.add("threeDSChallengeDetails threeDSVersion: " + threeDsVersion); } if (StringUtils.isNotBlank(getErrorCode())) { joiner.add("error code: " + getErrorCode()); } if (StringUtils.isNotBlank(getErrorMessage())) { joiner.add("error: " + getErrorMessage()); } return joiner.toString(); }

Target:
public String toString() { StringJoiner joiner = new StringJoiner(", ", "Worldpay authorisation response (", ")"); if (StringUtils.isNotBlank(getTransactionId())) { joiner.add("orderCode: " + getTransactionId()); } if (StringUtils.isNotBlank(getLastEvent())) { joiner.add("lastEvent: " + getLastEvent()); } if (StringUtils.isNotBlank(getRefusedReturnCode())) { joiner.add("ISO8583ReturnCode code: " + getRefusedReturnCode()); } if (StringUtils.isNotBlank(getRefusedReturnCodeDescription())) { joiner.add("ISO8583ReturnCode description: " + getRefusedReturnCodeDescription()); } if (StringUtils.isNotBlank(issuerUrl)) { joiner.add("issuerURL: " + issuerUrl); } if (StringUtils.isNotBlank(challengeAcsUrl)) { joiner.add("threeDSChallengeDetails acsUrl: " + challengeAcsUrl); } if (StringUtils.isNotBlank(challengeTransactionId)) { joiner.add("threeDSChallengeDetails transactionId3DS: " + challengeTransactionId); } if (StringUtils.isNotBlank(threeDsVersion)) { joiner.add("threeDSChallengeDetails threeDSVersion: " + threeDsVersion); } if (StringUtils.isNotBlank(getErrorCode())) { joiner.add("error code: " + getErrorCode()); } if (StringUtils.isNotBlank(getErrorMessage())) { joiner.add("error: " + getErrorMessage()); } return joiner.toString(); }
Source:
public void refresh() { if (parent != null) parent.refresh(); }

Target:
public void refresh() { if (parent != null) { parent.refresh(); } }
Source:
public void handle(Request request, Response response) throws Exception { userSession.checkLoggedIn(); String projectKey = request.mandatoryParam(PARAM_PROJECT); String newBranchName = request.mandatoryParam(PARAM_NAME); try (DbSession dbSession = dbClient.openSession(false)) { ComponentDto project = componentFinder.getRootComponentByUuidOrKey(dbSession, null, projectKey); checkPermission(project); Optional<BranchDto> branch = dbClient.branchDao().selectByKey(dbSession, project.uuid(), newBranchName); if (branch.isPresent() && !branch.get().isMain()) { throw new IllegalArgumentException("Impossible to update branch name: a branch with name \"" + newBranchName + "\" already exists in the project."); } dbClient.branchDao().updateMainBranchName(dbSession, project.uuid(), newBranchName); dbSession.commit(); response.noContent(); } }

Target:
public void handle(Request request, Response response) throws Exception { userSession.checkLoggedIn(); String projectKey = request.mandatoryParam(PARAM_PROJECT); String newBranchName = request.mandatoryParam(PARAM_NAME); try (DbSession dbSession = dbClient.openSession(false)) { ComponentDto project = componentFinder.getRootComponentByUuidOrKey(dbSession, null, projectKey); checkPermission(project); Optional<BranchDto> existingBranch = dbClient.branchDao().selectByKey(dbSession, project.uuid(), newBranchName); checkArgument(!existingBranch.filter(b -> !b.isMain()).isPresent(), "Impossible to update branch name: a branch with name \"%s\" already exists in the project.", newBranchName); dbClient.branchDao().updateMainBranchName(dbSession, project.uuid(), newBranchName); dbSession.commit(); response.noContent(); } }
Source:
@Test public void testInvalidUri() { try { new DeepLinkAnnotatedElement("http", element, DeepLinkEntry.Type.CLASS, null); fail(); } catch (MalformedURLException ignored) { } }

Target:
@Test public void testInvalidUri() { try { new DeepLinkAnnotatedElement("http", element, DeepLinkEntry.Type.CLASS); fail(); } catch (MalformedURLException ignored) { } }
Source:
protected void executeQueryCommand() { if (FeatureSupported.isLlldpInformationSupported(getVds().getClusterCompatibilityVersion())) { VDSReturnValue command = runVdsCommand(VDSCommandType.GetLldp, lldpVDSCommandParameters); getQueryReturnValue().setReturnValue(command.getReturnValue()); } }

Target:
protected void executeQueryCommand() { if (FeatureSupported.isLlldpInformationSupported(getHost().getClusterCompatibilityVersion())) { VDSReturnValue command = runVdsCommand(VDSCommandType.GetLldp, lldpVDSCommandParameters); getQueryReturnValue().setReturnValue(command.getReturnValue()); } }
Source:
public ErrorCode getCode() { return SUBSCRIPTION_ALREADY_EXISTS; }

Target:
public ErrorCode getCode() { return SUBSCRIPTION_CONSTRAINTS_ALREADY_EXIST; }
Source:
protected boolean hasContent(DocumentModel document, String query) throws IOException { try (SessionWrapper wrapper = ctx.getSession(document)) { DocumentModelList children = wrapper.getSession() .query(String.format(query, NXQL.escapeString(document.getId())), 1); return !children.isEmpty(); } }

Target:
protected boolean hasContent(DocumentModel document, String query) throws IOException { try (SessionWrapper wrapper = ctx.getSession(document)) { return wrapper.getSession() .queryProjection(String.format(query, NXQL.escapeString(document.getId())), 1, 0) .size() > 0; } }
Source:
public static String resourceIdFromLockId(String lockId) { String[] lockIdParts = lockIdParts(lockId); if (lockIdParts.length == 0) { return null; } StringBuilder resourceId = new StringBuilder(); for (int i = 0; i < lockIdParts.length - 4; i++) { if (!lockIdParts[i].isEmpty()) { resourceId.append("/").append(lockIdParts[i]); } } return resourceId.toString(); }

Target:
static String resourceIdFromLockId(String lockId) { String[] lockIdParts = lockIdParts(lockId); if (CoreUtils.isNullOrEmpty(lockIdParts)) { return null; } StringBuilder resourceId = new StringBuilder(); for (int i = 0; i < lockIdParts.length - 4; i++) { if (!lockIdParts[i].isEmpty()) { resourceId.append("/").append(lockIdParts[i]); } } return resourceId.toString(); }
Source:
public static RegisteredObservers load(CuratorFramework curator) throws Exception { ObserverStore ov1 = new ObserverStoreV1(); ObserverStore ov2 = new ObserverStoreV2(); RegisteredObservers co = ov1.load(curator); if (co == null) { co = ov2.load(curator); } if (co == null) { co = new RegisteredObservers() { @Override public Observers getObservers(Environment env) { return new Observers() { @Override public void close() { } @Override public void returnObserver(Observer o) { throw new UnsupportedOperationException(); } @Override public Observer getObserver(Column col) { throw new UnsupportedOperationException(); } @Override public String getObserverId(Column col) { throw new UnsupportedOperationException(); } }; } @Override public ImmutableSet<Column> getObservedColumns(NotificationType nt) { return ImmutableSet.of(); } }; } return co; }

Target:
public static RegisteredObservers load(CuratorFramework curator) throws Exception { ObserverStore ov1 = new ObserverStoreV1(); ObserverStore ov2 = new ObserverStoreV2(); RegisteredObservers co = ov1.load(curator); if (co == null) { co = ov2.load(curator); } if (co == null) { co = new RegisteredObservers() { @Override public Observers getObservers(Environment env) { return new Observers() { @Override public void close() { } @Override public void returnObserver(Observer o) { throw new UnsupportedOperationException(); } @Override public Observer getObserver(Column col) { throw new UnsupportedOperationException(); } @Override public String getObserverId(Column col) { throw new UnsupportedOperationException(); } }; } @Override public Set<Column> getObservedColumns(NotificationType nt) { return Collections.emptySet(); } }; } return co; }
Source:
public void VisualEditorEditing_005_switchToSourceMode() { String articleName2 = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp(); VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName2); ve.verifyVEToolBarPresent(); ve.verifyEditorSurfacePresent(); ve = ve.typeInSourceEditor(text); ve.verifyVEToolBarPresent(); ve.verifyEditorSurfacePresent(); ve.clickPublishButton(); ve.waitForPageLoad(); ArticlePageObject article = new ArticlePageObject(); article.openVEModeWithMainEditButton(); ve.typeInSourceEditor(text); VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton(); saveDialog.savePage(); article.verifyVEPublishComplete(); article.verifyContent("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); }

Target:
public void VisualEditorEditing_005_switchToSourceMode() { String articleName2 = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp(); VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName2); ve.verifyVEToolBarPresent(); ve.verifyEditorSurfacePresent(); ve = ve.typeInSourceEditor(text); ve.verifyVEToolBarPresent(); ve.verifyEditorSurfacePresent(); ve.clickPublishButton(); ve.waitForPageLoad(); ArticlePageObject article = new ArticlePageObject(); article.openVEModeWithMainEditButton(); ve.typeInSourceEditor(text); VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton(); saveDialog.savePage(); article.verifyVEPublishComplete(); article.verifyContent(text); }
Source:
public Table getTable(String tableId) { GetTableRequest request = GetTableRequest.newBuilder() .setName(instanceName.toTableNameStr(tableId)) .build(); return Table.fromProto(adminClient.getTable(request)); }

Target:
public Table getTable(String tableId) { GetTableRequest requestProto = GetTableRequest.newBuilder() .setName(instanceName.toTableNameStr(tableId)) .build(); return Table.fromProto(adminClient.getTable(requestProto)); }
Source:
public synchronized HashSet<Guid> getDomainProblematicVdsList(Guid domainId) { HashSet<Guid> vdsList = new HashSet<>(); Map<Guid, Status> domainVdsStatus = domainsVisibility.get(domainId); for (Entry<Guid, Status> status : domainVdsStatus.entrySet()) { if (status.getValue().isProblematic()) vdsList.add(status.getKey()); } return vdsList; }

Target:
public synchronized HashSet<Guid> getDomainProblematicVdsList(Guid domainId) { HashSet<Guid> vdsList = new HashSet<>(); Map<Guid, Status> domainVdsStatus = domainsVisibility.get(domainId); for (Entry<Guid, Status> status : domainVdsStatus.entrySet()) { if (status.getValue().isProblematic()) { vdsList.add(status.getKey()); } } return vdsList; }
Source:
public static String getLabelFromId(String directoryName, String id) { if (id == null) { return ""; } try (Session directory = DirectoryHelper.getDirectoryService().open(directoryName)) { DocumentModel documentModel = directory.getEntry(id); String schemaName = documentModel.getSchemas()[0]; return (String) documentModel.getProperty(schemaName, "label"); } catch (PropertyException e) { return ""; } }

Target:
public static String getLabelFromId(String directoryName, String id) { if (id == null) { return ""; } try (Session directory = Framework.getService(DirectoryService.class).open(directoryName)) { DocumentModel documentModel = directory.getEntry(id); String schemaName = documentModel.getSchemas()[0]; return (String) documentModel.getProperty(schemaName, "label"); } catch (PropertyException e) { return ""; } }
Source:
private URI createSubReport(final BufferedImage originalImage, final File tempTaskDirectory) throws IOException, JRException { assert (this.maxWidth != null); double scaleFactor = getScaleFactor(); BufferedImage image = originalImage; if (image.getWidth() * scaleFactor > this.maxWidth) { image = cropToMaxWidth(image, scaleFactor); } URI imageFile = writeToFile(image, tempTaskDirectory); final MapSubReport subReport = new MapSubReport( Lists.newArrayList(imageFile), new Dimension((int) (image.getWidth() * scaleFactor), (int) (image.getHeight() * scaleFactor)), this.dpi); final File compiledReport = File.createTempFile("legend-report-", JasperReportBuilder.JASPER_REPORT_COMPILED_FILE_EXT, tempTaskDirectory); subReport.compile(compiledReport); return compiledReport.toURI(); }

Target:
private URI createSubReport(final BufferedImage originalImage, final File tempTaskDirectory) throws IOException, JRException { assert (this.maxWidth != null); double scaleFactor = getScaleFactor(); BufferedImage image = originalImage; if (image.getWidth() * scaleFactor > this.maxWidth) { image = cropToMaxWidth(image, scaleFactor); } URI imageFile = writeToFile(image, tempTaskDirectory); final ImagesSubReport subReport = new ImagesSubReport( Lists.newArrayList(imageFile), new Dimension((int) (image.getWidth() * scaleFactor), (int) (image.getHeight() * scaleFactor)), this.dpi); final File compiledReport = File.createTempFile("legend-report-", JasperReportBuilder.JASPER_REPORT_COMPILED_FILE_EXT, tempTaskDirectory); subReport.compile(compiledReport); return compiledReport.toURI(); }
Source:
private ListenableFuture<Void> startAsyncUpload(HashCode hash, Chunker chunker) { try { chunker.reset(); } catch (IOException e) { return Futures.immediateFailedFuture(e); } UUID uploadId = UUID.randomUUID(); String resourceName = newResourceName(instanceName, uploadId, hash, chunker.getSize()); AsyncUpload newUpload = new AsyncUpload(channel, callCredentials, callTimeoutSecs, retrier, resourceName, chunker); ListenableFuture<Void> currUpload = newUpload.start(); currUpload.addListener( () -> { if (currUpload.isCancelled()) { newUpload.cancel(); } }, MoreExecutors.directExecutor()); return currUpload; }

Target:
private ListenableFuture<Void> startAsyncUpload(HashCode hash, Chunker chunker) { try { chunker.reset(); } catch (IOException e) { return Futures.immediateFailedFuture(e); } UUID uploadId = UUID.randomUUID(); String resourceName = uploadResourceName(instanceName, uploadId, hash, chunker.getSize()); AsyncUpload newUpload = new AsyncUpload(channel, callCredentials, callTimeoutSecs, retrier, resourceName, chunker); ListenableFuture<Void> currUpload = newUpload.start(); currUpload.addListener( () -> { if (currUpload.isCancelled()) { newUpload.cancel(); } }, MoreExecutors.directExecutor()); return currUpload; }
Source:
public void visitToken(DetailAST ast) { final DetailAST slistToken = ast.findFirstToken(TokenTypes.SLIST); final DetailAST leftCurly; if (slistToken == null) { leftCurly = ast.findFirstToken(TokenTypes.LCURLY); } else { leftCurly = slistToken; } if (leftCurly != null) { if (option == BlockOption.STMT) { final boolean emptyBlock; if (leftCurly.getType() == TokenTypes.LCURLY) { emptyBlock = leftCurly.getNextSibling().getType() != TokenTypes.CASE_GROUP; } else { emptyBlock = leftCurly.getChildCount() <= 1; } if (emptyBlock) { log(leftCurly.getLineNo(), leftCurly.getColumnNo(), MSG_KEY_BLOCK_NO_STMT, ast.getText()); } } else if (!hasText(leftCurly)) { log(leftCurly.getLineNo(), leftCurly.getColumnNo(), MSG_KEY_BLOCK_EMPTY, ast.getText()); } } if (ast.getType() == TokenTypes.LITERAL_CASE) { checkForEmptyCase(ast); } }

Target:
public void visitToken(DetailAST ast) { final DetailAST leftCurly = findLeftCurly(ast); if (leftCurly != null) { if (option == BlockOption.STMT) { final boolean emptyBlock; if (leftCurly.getType() == TokenTypes.LCURLY) { emptyBlock = leftCurly.getNextSibling().getType() != TokenTypes.CASE_GROUP; } else { emptyBlock = leftCurly.getChildCount() <= 1; } if (emptyBlock) { log(leftCurly.getLineNo(), leftCurly.getColumnNo(), MSG_KEY_BLOCK_NO_STMT, ast.getText()); } } else if (!hasText(leftCurly)) { log(leftCurly.getLineNo(), leftCurly.getColumnNo(), MSG_KEY_BLOCK_EMPTY, ast.getText()); } } }
Source:
public AbstractApexRule() { super.setLanguage(LanguageRegistry.getLanguage(ApexLanguageModule.NAME)); definePropertyDescriptor(CODECLIMATE_CATEGORIES); definePropertyDescriptor(CODECLIMATE_REMEDIATION_MULTIPLIER); definePropertyDescriptor(CODECLIMATE_BLOCK_HIGHLIGHTING); definePropertyDescriptor(new IntegerProperty("codacy_minutes_to_fix", "Codacy.com Time to fix in minutes", Integer.MIN_VALUE, Integer.MAX_VALUE, 5, 1.0f)); }

Target:
public AbstractApexRule() { super.setLanguage(LanguageRegistry.getLanguage(ApexLanguageModule.NAME)); definePropertyDescriptor(CODECLIMATE_CATEGORIES); definePropertyDescriptor(CODECLIMATE_REMEDIATION_MULTIPLIER); definePropertyDescriptor(CODECLIMATE_BLOCK_HIGHLIGHTING); definePropertyDescriptor(CODACY_MINUTES_TO_FIX); }
Source:
public static void writeTo(MimeMessage message, OutputStream headerOs, OutputStream bodyOs, String[] ignoreList) throws IOException, MessagingException { MimeMessage testMessage = message; if (testMessage instanceof MimeMessageWrapper) { MimeMessageWrapper wrapper = (MimeMessageWrapper) testMessage; if (!wrapper.isModified()) { wrapper.writeTo(headerOs, bodyOs, ignoreList); return; } } writeToInternal(message, headerOs, bodyOs, ignoreList); }

Target:
public static void writeTo(MimeMessage message, OutputStream headerOs, OutputStream bodyOs, String[] ignoreList) throws IOException, MessagingException { if (message instanceof MimeMessageWrapper) { MimeMessageWrapper wrapper = (MimeMessageWrapper) message; if (!wrapper.isModified()) { wrapper.writeTo(headerOs, bodyOs, ignoreList); return; } } writeToInternal(message, headerOs, bodyOs, ignoreList); }
Source:
private void validateApiKey(String value) { if (value == null || !value.matches(API_KEY_REGEX)) { if (value == null) { value = ""; } DebugLogger.INSTANCE.w(String.format("Invalid configuration. apiKey should be a " + "32-character hexademical string, got %s", value)); } }

Target:
private void validateApiKey(String value) { if (Intrinsics.isEmpty(value)) { throw new IllegalArgumentException("No Bugsnag API Key set"); } if (!value.matches(API_KEY_REGEX)) { DebugLogger.INSTANCE.w(String.format("Invalid configuration. apiKey should be a " + "32-character hexademical string, got \"%s\"", value)); } }
Source:
void verifyTimeDurationComputation() { final Instant banExpiry = CURRENT_TIME.plus(10, ChronoUnit.MINUTES); final String result = PlayerIsMutedMessage.muteDurationRemainingToString.apply( Clock.fixed(CURRENT_TIME, ZoneOffset.UTC), banExpiry); assertThat(result, is("10 minutes")); }

Target:
void verifyTimeDurationComputation() { final Instant banExpiry = CURRENT_TIME.plus(10, ChronoUnit.MINUTES); final String result = formattingFunction.apply(banExpiry); assertThat(result, is("10 minutes")); }
Source:
public Managed<BigtableConnection> connection( final AsyncFramework async, final ExecutorService executorService ) { Optional<Integer> batchSize = empty(); return async.managed(new ManagedSetup<BigtableConnection>() { @Override public AsyncFuture<BigtableConnection> construct() throws Exception { return async.call( new BigtableConnectionBuilder(project, cluster, credentials, async, executorService, DEFAULT_DISABLE_BULK_MUTATIONS, DEFAULT_FLUSH_INTERVAL_SECONDS, batchSize)); } @Override public AsyncFuture<Void> destruct(final BigtableConnection value) throws Exception { return async.call(new Callable<Void>() { @Override public Void call() throws Exception { value.close(); return null; } }); } }); }

Target:
public Managed<BigtableConnection> connection( final AsyncFramework async, final ExecutorService executorService ) { return async.managed(new ManagedSetup<BigtableConnection>() { @Override public AsyncFuture<BigtableConnection> construct() throws Exception { return async.call( new BigtableConnectionBuilder(project, cluster, credentials, async, executorService, DEFAULT_DISABLE_BULK_MUTATIONS, DEFAULT_FLUSH_INTERVAL_SECONDS, Optional.empty())); } @Override public AsyncFuture<Void> destruct(final BigtableConnection value) throws Exception { return async.call(new Callable<Void>() { @Override public Void call() throws Exception { value.close(); return null; } }); } }); }
Source:
protected void readValue(BlockBuilder blockBuilder, Type type) { if (definitionLevel == columnDescriptor.getMaxDefinitionLevel()) { Binary binary = valuesReader.readBytes(); Slice value; if (binary.length() == 0) { value = EMPTY_SLICE; } else { value = wrappedBuffer(binary.getBytes()); } if (isVarcharType(type)) { value = truncateToLength(value, type); } if (isCharType(type)) { value = truncateToLengthAndTrimSpaces(value, type); } type.writeSlice(blockBuilder, value); } else if (valueIsNull()) { blockBuilder.appendNull(); } }

Target:
protected void readValue(BlockBuilder blockBuilder, Type type) { if (definitionLevel == columnDescriptor.getMaxDefinitionLevel()) { Binary binary = valuesReader.readBytes(); Slice value; if (binary.length() == 0) { value = EMPTY_SLICE; } else { value = wrappedBuffer(binary.getBytes()); } if (isVarcharType(type)) { value = truncateToLength(value, type); } if (isCharType(type)) { value = truncateToLengthAndTrimSpaces(value, type); } type.writeSlice(blockBuilder, value); } else if (isValueNull()) { blockBuilder.appendNull(); } }
Source:
protected RexInputRef input(RelDataType type, int arg) { return rexBuilder.makeInputRef(type, arg); }

Target:
protected RexNode input(RelDataType type, int arg) { return rexBuilder.makeInputRef(type, arg); }
Source:
public TreeItem(MetricDto metricDto) { MetricNameDto metricName = metricDto.getMetricName(); this.key = getTestItemId(metricDto.getMetricName().getTest()) + metricDto.getMetricName().getMetricName(); put(NAME, metricName.getMetricDisplayName()); put(TEST_DESCRIPTION, metricName.getTest().getDescription()); put(TEST_NAME, getItemKey(metricName)); for (MetricValueDto metricValue : metricDto.getValues()) { put(SESSION_HEADER + metricValue.getSessionId(), metricValue.getValueRepresentation()); if (metricValue.getDecision() != null) { put(DECISION + SESSION_HEADER + metricValue.getSessionId(), metricValue.getDecision().toString()); } } }

Target:
public TreeItem(MetricDto metricDto) { MetricNameDto metricName = metricDto.getMetricName(); this.key = getTestItemId(metricDto.getMetricName().getTest()) + metricDto.getMetricName().getMetricName(); put(NAME, metricName.getMetricDisplayName()); put(TEST_DESCRIPTION, metricName.getTest().getDescription()); put(TEST_NAME, getItemKey(metricName)); for (MetricValueDto metricValue : metricDto.getValues()) { String value = metricValue.getValueRepresentation(); if (metricValue.getDecision() != null) { String toolTip = "Decision for metric during test run. Green - value in limits. Yellow - value crossed warning limits. Red - value outside limits"; switch (metricValue.getDecision()) { case OK: value = "<p title=\"" + toolTip + "\" style=\"color:green;font-weight:700;display:inline;\">" + value + "</p>"; break; case WARNING: value = "<p title=\"" + toolTip + "\" style=\"color:#B8860B;font-weight:700;display:inline;\">" + value + "</p>"; break; default: value = "<p title=\"" + toolTip + "\" style=\"color:red;font-weight:700;display:inline;\">" + value + "</p>"; break; } } put(SESSION_HEADER + metricValue.getSessionId(),value); } }
Source:
void drainLoop() { int missed = 1; JoinInnerSubscriber<T>[] s = this.subscribers; int n = s.length; Subscriber<? super T> a = this.downstream; for (;;) { long r = requested.get(); long e = 0; middle: while (e != r) { if (cancelled) { cleanup(); return; } Throwable ex = errors.get(); if (ex != null) { cleanup(); a.onError(ex); return; } boolean d = done.get() == 0; boolean empty = true; for (JoinInnerSubscriber<T> inner : s) { SimplePlainQueue<T> q = inner.queue; if (q != null) { T v = q.poll(); if (v != null) { empty = false; a.onNext(v); inner.requestOne(); if (++e == r) { break middle; } } } } if (d && empty) { a.onComplete(); return; } if (empty) { break; } } if (e == r) { if (cancelled) { cleanup(); return; } Throwable ex = errors.get(); if (ex != null) { cleanup(); a.onError(ex); return; } boolean d = done.get() == 0; boolean empty = true; for (JoinInnerSubscriber<T> inner : s) { SimpleQueue<T> q = inner.queue; if (q != null && !q.isEmpty()) { empty = false; break; } } if (d && empty) { a.onComplete(); return; } } if (e != 0 && r != Long.MAX_VALUE) { requested.addAndGet(-e); } int w = get(); if (w == missed) { missed = addAndGet(-missed); if (missed == 0) { break; } } else { missed = w; } } }

Target:
void drainLoop() { int missed = 1; JoinInnerSubscriber<T>[] s = this.subscribers; int n = s.length; Subscriber<? super T> a = this.downstream; for (;;) { long r = requested.get(); long e = 0; middle: while (e != r) { if (cancelled) { cleanup(); return; } Throwable ex = errors.get(); if (ex != null) { cleanup(); a.onError(ex); return; } boolean d = done.get() == 0; boolean empty = true; for (int i = 0; i < s.length; i++) { JoinInnerSubscriber<T> inner = s[i]; SimplePlainQueue<T> q = inner.queue; if (q != null) { T v = q.poll(); if (v != null) { empty = false; a.onNext(v); inner.requestOne(); if (++e == r) { break middle; } } } } if (d && empty) { a.onComplete(); return; } if (empty) { break; } } if (e == r) { if (cancelled) { cleanup(); return; } Throwable ex = errors.get(); if (ex != null) { cleanup(); a.onError(ex); return; } boolean d = done.get() == 0; boolean empty = true; for (int i = 0; i < n; i++) { JoinInnerSubscriber<T> inner = s[i]; SimpleQueue<T> q = inner.queue; if (q != null && !q.isEmpty()) { empty = false; break; } } if (d && empty) { a.onComplete(); return; } } if (e != 0 && r != Long.MAX_VALUE) { requested.addAndGet(-e); } int w = get(); if (w == missed) { missed = addAndGet(-missed); if (missed == 0) { break; } } else { missed = w; } } }
Source:
public Block renderNotification(CompositeEvent eventNotification) throws NotificationException { Object oldContextAttribute = scriptContextManager.getCurrentScriptContext().getAttribute(EVENT_BINDING_NAME, ScriptContext.ENGINE_SCOPE); try { scriptContextManager.getCurrentScriptContext().setAttribute(EVENT_BINDING_NAME, eventNotification, ScriptContext.ENGINE_SCOPE); if (StringUtils.isBlank(this.notificationTemplate.getContent().getContent())) { return ((NotificationDisplayer) this.componentManager.getInstance(NotificationDisplayer.class)) .renderNotification(eventNotification); } return templateManager.execute(notificationTemplate); } catch (Exception e) { throw new NotificationException( String.format("Unable to render notification template for the [%s].", this.eventType), e); } finally { scriptContextManager.getCurrentScriptContext().setAttribute(EVENT_BINDING_NAME, oldContextAttribute, ScriptContext.ENGINE_SCOPE); } }

Target:
public Block renderNotification(CompositeEvent eventNotification) throws NotificationException { Object oldContextAttribute = scriptContextManager.getCurrentScriptContext().getAttribute(EVENT_BINDING_NAME, ScriptContext.ENGINE_SCOPE); try { scriptContextManager.getCurrentScriptContext().setAttribute(EVENT_BINDING_NAME, eventNotification, ScriptContext.ENGINE_SCOPE); if (this.notificationTemplate == null) { return ((NotificationDisplayer) this.componentManager.getInstance(NotificationDisplayer.class)) .renderNotification(eventNotification); } return templateManager.execute(notificationTemplate); } catch (Exception e) { throw new NotificationException( String.format("Unable to render notification template for the [%s].", this.eventType), e); } finally { scriptContextManager.getCurrentScriptContext().setAttribute(EVENT_BINDING_NAME, oldContextAttribute, ScriptContext.ENGINE_SCOPE); } }
Source:
private void verifyFetchedLog(List<String> logs, String[] expectedLogs) { StringBuilder stringBuilder = new StringBuilder(); for (String log : logs) { stringBuilder.append(log); } String accumulatedLogs = stringBuilder.toString(); for (String expectedLog : expectedLogs) { LOG.error("Checking match for " + expectedLog); assertTrue(accumulatedLogs.contains(expectedLog)); } }

Target:
private void verifyFetchedLog(List<String> logs, String[] expectedLogs) { StringBuilder stringBuilder = new StringBuilder(); for (String log : logs) { stringBuilder.append(log); } String accumulatedLogs = stringBuilder.toString(); for (String expectedLog : expectedLogs) { LOG.info("Checking match for " + expectedLog); assertTrue(accumulatedLogs.contains(expectedLog)); } }
Source:
public void positiveEnforcementUAGTest() { VDSGroup vdsGroup = arem.perClusterMap.keySet().iterator().next(); AffinityRulesEnforcementPerCluster perCluster = arem.perClusterMap.get(vdsGroup); VDS vds1 = _vdsDao.get(addHost(vdsGroup.getId())); VDS vds2 = _vdsDao.get(addHost(vdsGroup.getId())); final Guid vmId1 = addNewVm(vds1.getId(), true); final Guid vmId2 = addNewVm(vds1.getId(), true); final Guid vmCandidateForMigrationGuid = addNewVm(vds2.getId(), true); List<Guid> agList = new ArrayList<>(); ArrayList<Guid> vmList = new ArrayList<Guid>() {{add(vmId1); add(vmId2); add(vmCandidateForMigrationGuid);}}; Guid affinityGroup = addAffinityGroup(vmList, vdsGroup.getId(), true); agList.add(affinityGroup); VM candidateVm = _vmDao.get(vmCandidateForMigrationGuid); assertEquals(perCluster.chooseNextVmToMigrate(), candidateVm); }

Target:
public void positiveEnforcementUAGTest() { VDSGroup vdsGroup = arem.perClusterMap.keySet().iterator().next(); AffinityRulesEnforcementPerCluster perCluster = arem.perClusterMap.get(vdsGroup); VDS vds1 = _vdsDao.get(addHost(vdsGroup.getId())); VDS vds2 = _vdsDao.get(addHost(vdsGroup.getId())); final Guid vmId1 = addNewVm(vds1.getId(), true); final Guid vmId2 = addNewVm(vds1.getId(), true); final Guid vmCandidateForMigrationGuid = addNewVm(vds2.getId(), true); List<Guid> agList = new ArrayList<>(); List<Guid> vmList = Arrays.asList(vmId1, vmId2, vmCandidateForMigrationGuid); Guid affinityGroup = addAffinityGroup(vmList, vdsGroup.getId(), true); agList.add(affinityGroup); VM candidateVm = _vmDao.get(vmCandidateForMigrationGuid); assertEquals(candidateVm, perCluster.chooseNextVmToMigrate()); }
Source:
public boolean getEnableManagementPlugin() { return getConfig(ENABLE_MANAGEMENT_PLUGIN); }

Target:
public boolean getEnableManagementPlugin() { return Boolean.TRUE.equals(getConfig(ENABLE_MANAGEMENT_PLUGIN)); }
Source:
private static InputStream readFile(String path) { InputStream inputStream; ClassLoader classLoader = ServerConfigurationTest.class.getClassLoader(); inputStream = classLoader.getResourceAsStream(path); return inputStream; }

Target:
private InputStream readFile(String path) { ClassLoader classLoader = ServerConfigurationTest.class.getClassLoader(); return classLoader.getResourceAsStream(path); }
Source:
public static void updateDatabase(Connection dbConnection, String sqlStmt, Object... params) throws UserStoreException { try ( PreparedStatement prepStmt = getPreparedStatement(dbConnection, sqlStmt,params)) { prepStmt.executeUpdate(); } catch (SQLException e) { String errorMessage = "Using sql : " + sqlStmt + " " + e.getMessage(); if (log.isDebugEnabled()) { log.debug(errorMessage, e); } throw new UserStoreException(errorMessage, e); } finally { close(dbConnection); } }

Target:
public static void updateDatabase(Connection dbConnection, String sqlStmt, Object... params) throws UserStoreException { try ( PreparedStatement prepStmt = getPreparedStatement(dbConnection, sqlStmt,params)) { prepStmt.executeUpdate(); } catch (SQLException e) { String errorMessage = "Using sql : " + sqlStmt + " " + e.getMessage(); if (log.isDebugEnabled()) { log.debug(errorMessage, e); } throw new UserStoreException(errorMessage, e); } }