auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private boolean isManagementNetworkChanged(){ String mgmtNetworkName = managementNetworkUtil.getManagementNetwork(getVds().getVdsGroupId()).getName(); for (HostNetwork network : getNetworksToConfigure()) { if (mgmtNetworkName.equals(network.getNetworkName())){ return true; } } for (Bond bond : getParameters().getBonds()) { if (mgmtNetworkName.equals(bond.getNetworkName())){ return true; } } return false; }

Target:
private boolean isManagementNetworkChanged(){ List<NetworkAttachment> newAttachments = getParameters().getNetworkAttachments(); List<NetworkAttachment> existingAttachments = this.existingAttachments; String mgmtNetworkName = managementNetworkUtil.getManagementNetwork(getVds().getVdsGroupId()).getName(); for (HostNetwork network : getNetworksToConfigure()) { if (mgmtNetworkName.equals(network.getNetworkName())){ return true; } } for (Bond bond : getParameters().getBonds()) { VdsNetworkInterface bondNic = existingNicsBusinessEntityMap.get(bond.getId()); if (bondNic != null && mgmtNetworkName.equals(bondNic.getNetworkName())) { return true; } } return false; }
Source:
public synchronized V remove(Object key) { if (!super.containsKey(key)) { return null; } Integer currentCount = this.updateReference(key, -1); if (currentCount == 0) { counterMap.remove(key); V value = super.remove(key); if (cleanerCallback != null) { cleanerCallback.call(value); } return value; } else { return super.get(key); } }

Target:
public synchronized V remove(Object key) { if (!super.containsKey(key)) { return null; } Integer currentCount = this.updateReference(key, -1); if (currentCount <= 0) { V value = super.remove(key); if (cleanerCallback != null) { cleanerCallback.call(value); } return value; } else { return super.get(key); } }
Source:
public void setupRoutes() { path(controllerBasePath(), () -> { before("", mimeType, this::setContentType); before("/*", mimeType, this::setContentType); before("", mimeType, this::verifyContentType); before("", mimeType, this.apiAuthenticationHelper::checkUserAnd403); before("/*", mimeType, this.apiAuthenticationHelper::checkUserAnd403); get("", mimeType, this::index); }); }

Target:
public void setupRoutes() { path(controllerBasePath(), () -> { before("", mimeType, this::setContentType); before("/*", mimeType, this::setContentType); before("", mimeType, this::verifyContentType); before("", mimeType, this.apiAuthenticationHelper::checkPipelineViewPermissionsAnd403); before("/*", mimeType, this.apiAuthenticationHelper::checkPipelineViewPermissionsAnd403); get("", mimeType, this::index); }); }
Source:
public static TreeMap<String, String> convertToCaseInsensitiveMap(Map<String, String> hashMap) { return hashMap.entrySet().stream() .collect(toMap( Map.Entry::getKey, Map.Entry::getValue, (oldVal, newVal) -> newVal, () -> new TreeMap<>(String.CASE_INSENSITIVE_ORDER) )); }

Target:
private TreeMap<String, String> convertToCaseInsensitiveMap(Map<String, String> hashMap) { return hashMap.entrySet().stream() .collect(toMap( Map.Entry::getKey, Map.Entry::getValue, (oldVal, newVal) -> newVal, () -> new TreeMap<>(String.CASE_INSENSITIVE_ORDER) )); }
Source:
public String urlForImageWith(ImageOption... options) { if (options == null || options.length == 0) { throw new IllegalArgumentException("Do not use empty options argument. " + "If you want to manipulate the url by hand, please use `CDAAsset.url()` instead."); } final String mimeType = mimeType(); if (mimeType == null || !mimeType.startsWith("image")) { throw new IllegalStateException("Asset has not image mime type. Please make sure it is " + "of jpg, png, or webp format."); } final Map<String, ImageOption> mappedOptions = new LinkedHashMap<String, ImageOption>(options.length); for (final ImageOption option : options) { mappedOptions.put(option.getOperation(), option); } String url = url(); for (final ImageOption option : mappedOptions.values()) { url = option.apply(url); } return url; }

Target:
public String urlForImageWith(ImageOption... options) { if (options == null || options.length == 0) { throw new IllegalArgumentException("Do not use empty options argument. " + "If you want to manipulate the url by hand, please use `CDAAsset.url()` instead."); } final String mimeType = mimeType(); if (mimeType == null || !mimeType.startsWith("image")) { throw new IllegalStateException("Asset does not have an image mime type."); } final Map<String, ImageOption> mappedOptions = new LinkedHashMap<String, ImageOption>(options.length); for (final ImageOption option : options) { mappedOptions.put(option.getOperation(), option); } String url = url(); for (final ImageOption option : mappedOptions.values()) { url = option.apply(url); } return url; }
Source:
private HeartbeatResponse heartbeat(final Lock lock) { Id lockHeartbeat = heartbeatId.withTag("lockName", lock.getName().toLowerCase()); Lock extendedLock = lock; try { extendedLock = tryUpdateLock(lock, lock.nextVersion()); registry.counter(lockHeartbeat.withTag("status", "SUCCESS")).increment(); return new HeartbeatResponse(extendedLock, LockStatus.ACQUIRED); } catch (Exception e) { if (e instanceof LockExpiredException) { registry.counter(lockHeartbeat.withTag("status", "EXPIRED")).increment(); return new HeartbeatResponse(extendedLock, LockStatus.EXPIRED); } log.error("Heartbeat failed for lock {}", extendedLock, e); registry.counter(lockHeartbeat.withTag("status", "ERROR")).increment(); return new HeartbeatResponse(extendedLock, LockStatus.ERROR); } }

Target:
private HeartbeatResponse heartbeat(final Lock lock) { Id lockHeartbeat = heartbeatId.withTag("lockName", lock.getName()); Lock extendedLock = lock; try { extendedLock = tryUpdateLock(lock, lock.nextVersion()); registry.counter(lockHeartbeat.withTag("status", LockStatus.ACQUIRED.toString())).increment(); return new HeartbeatResponse(extendedLock, LockStatus.ACQUIRED); } catch (Exception e) { if (e instanceof LockExpiredException) { registry.counter(lockHeartbeat.withTag("status", LockStatus.EXPIRED.toString())).increment(); return new HeartbeatResponse(extendedLock, LockStatus.EXPIRED); } log.error("Heartbeat failed for lock {}", extendedLock, e); registry.counter(lockHeartbeat.withTag("status", LockStatus.ERROR.toString())).increment(); return new HeartbeatResponse(extendedLock, LockStatus.ERROR); } }
Source:
public synchronized void recordSent(final Operator operator, final int numTuples, final int destWorkerId) throws DbException { SubQueryId sq = operator.getSubQueryId(); events.putLong(0, sq.getQueryId()); events.putInt(1, (int) sq.getSubqueryId()); sent.putInt(2, operator.getFragmentId()); sent.putLong(3, getTime(operator)); sent.putLong(4, numTuples); sent.putInt(5, destWorkerId); flush(MyriaConstants.SENT_PROFILING_RELATION, sent.popFilled()); }

Target:
public synchronized void recordSent(final Operator operator, final int numTuples, final int destWorkerId) throws DbException { SubQueryId sq = operator.getSubQueryId(); sent.putLong(0, sq.getQueryId()); sent.putInt(1, (int) sq.getSubqueryId()); sent.putInt(2, operator.getFragmentId()); sent.putLong(3, getTime(operator)); sent.putLong(4, numTuples); sent.putInt(5, destWorkerId); flush(MyriaConstants.SENT_PROFILING_RELATION, sent.popFilled()); }
Source:
public Map<Cell, byte[]> get(TableReference tableRef, Set<Cell> cells) { if (cells.isEmpty()) { if (log.isTraceEnabled()) { log.trace(String.format("Attempted get on %s table with empty cells argument", tableRef), new Exception()); } else if (log.isDebugEnabled()) { log.debug("Attempted get on '{}' table with empty cells argument", tableRef); } return ImmutableMap.of(); } Set<Cell> toLoad = Sets.newHashSet(); Map<Cell, byte[]> cacheHit = Maps.newHashMapWithExpectedSize(cells.size()); for (Cell cell : cells) { byte[] val = getCachedCellIfPresent(tableRef, cell); if (val != null) { if (val.length > 0) { cacheHit.put(cell, val); } } else { toLoad.add(cell); } } final Map<Cell, byte[]> loaded = super.get(tableRef, toLoad); cacheLoadedCells(tableRef, toLoad, loaded); cacheHit.putAll(loaded); return cacheHit; }

Target:
public Map<Cell, byte[]> get(TableReference tableRef, Set<Cell> cells) { if (cells.isEmpty()) { return ImmutableMap.of(); } Set<Cell> toLoad = Sets.newHashSet(); Map<Cell, byte[]> cacheHit = Maps.newHashMapWithExpectedSize(cells.size()); for (Cell cell : cells) { byte[] val = getCachedCellIfPresent(tableRef, cell); if (val != null) { if (val.length > 0) { cacheHit.put(cell, val); } } else { toLoad.add(cell); } } final Map<Cell, byte[]> loaded = super.get(tableRef, toLoad); cacheLoadedCells(tableRef, toLoad, loaded); cacheHit.putAll(loaded); return cacheHit; }
Source:
public SecurityGroupDefinition allowingPublicPorts(int port1, int port2, int ...ports) { allowing(IpPermissions.permit(IpProtocol.TCP).port(port1)); allowing(IpPermissions.permit(IpProtocol.TCP).port(port2)); for (int port: ports) allowing(IpPermissions.permit(IpProtocol.TCP).port(port).originatingFromCidrBlock(Cidr.UNIVERSAL.toString())); return this; }

Target:
public SecurityGroupDefinition allowingPublicPorts(int port1, int port2, int ...ports) { allowing(IpPermissions.permit(IpProtocol.TCP).port(port1).originatingFromCidrBlock(Cidr.UNIVERSAL.toString())); allowing(IpPermissions.permit(IpProtocol.TCP).port(port2).originatingFromCidrBlock(Cidr.UNIVERSAL.toString())); for (int port: ports) allowing(IpPermissions.permit(IpProtocol.TCP).port(port).originatingFromCidrBlock(Cidr.UNIVERSAL.toString())); return this; }
Source:
public void close() { logger.debug("close(): Closing TCP Connection"); super.cleanup(); try { if (tcpSocket != null) { tcpSocket.close(); } } catch (IOException ioException) { logger.debug("close(): Closing connection error: {}", ioException.getMessage()); } catch (Exception exception) { logger.debug("close(): Closing connection error: {}", exception.getMessage()); } tcpSocket = null; setConnected(false); }

Target:
public void close() { logger.debug("close(): Closing TCP Connection"); super.cleanup(); try { if (tcpSocket != null) { tcpSocket.close(); } } catch (IOException ioException) { logger.debug("close(): Closing connection error: {}", ioException.getMessage()); } tcpSocket = null; setConnected(false); }
Source:
private List<VMImage> listImagesByLocation(String location) { final List<VMImage> osImages = Lists.newArrayList(); getImagesFromPublisher("Microsoft.WindowsAzure.Compute", osImages, location); getImagesFromPublisher("MicrosoftWindowsServer", osImages, location); getImagesFromPublisher("Canonical", osImages, location); return osImages; }

Target:
private List<VMImage> listImagesByLocation(String location) { final List<VMImage> osImages = Lists.newArrayList(); Iterable<String> publishers = Splitter.on(',').trimResults().omitEmptyStrings().split(this.azureComputeConstants.azureImagePublishers()); for (String publisher : publishers) { getImagesFromPublisher(publisher, osImages, location); } return osImages; }
Source:
private void testValidEmailWithFeedbackSessionsInRecentSixMonths() { ______TS("Valid Email Address, user with email has feedback sessions in recent six month"); requestResendAccessLinksPage.fillEmailAddress(studentEmailAddress); requestResendAccessLinksPage.clickSubmitButton(); requestResendAccessLinksPage.waitForTextsForAllStatusMessagesToUserEquals( Const.StatusMessages.FEEDBACK_SESSION_ACCESS_LINKS_RESENT); }

Target:
private void testValidEmailWithFeedbackSessionsInRecentSixMonths() throws IOException { ______TS("Valid Email Address, user with email has feedback sessions over the recent six months"); AdminHomePage accountHomePage = loginAdmin(); accountHomePage.verifyHtml("/adminHomePage.html"); requestResendAccessLinksPage = getHomePage().clickRequestResendLink(); requestResendAccessLinksPage.fillEmailAddress(studentEmailAddress); requestResendAccessLinksPage.clickSubmitButton(); requestResendAccessLinksPage.waitForTextsForAllStatusMessagesToUserEquals( Const.StatusMessages.FEEDBACK_SESSION_ACCESS_LINKS_RESENT); loginAdmin(); logout(); }
Source:
public CompletableFuture<Either<List<CompletionItem>, CompletionList>> completion(CompletionParams completionParams) { List<CompletionItem> completions = new ArrayList<>(); try { String uri = completionParams.getTextDocument().getUri(); String input = fFiltersInputs.get(uri); if (input == null) { return CompletableFuture.completedFuture(Either.forLeft(completions)); } Position cursor = completionParams.getPosition(); List<String> suggestions = AutoCompletion.autoCompletion(input, cursor); for (int i = 0; i < suggestions.size(); i++) { Position start = new Position(0, 0); Position end = new Position(0, input.length()); CompletionItem item = new CompletionItem(); TextEdit textEdit = new TextEdit(new Range(start, end), suggestions.get(i)); item.setTextEdit(textEdit); completions.add(item); } } catch (RecognitionException error) { Activator.getInstance().logError(error.getMessage()); } catch (IOException error) { Activator.getInstance().logError(error.getMessage()); } return CompletableFuture.completedFuture(Either.forLeft(completions)); }

Target:
public CompletableFuture<Either<List<CompletionItem>, CompletionList>> completion(CompletionParams completionParams) { List<CompletionItem> completions = new ArrayList<>(); try { String uri = completionParams.getTextDocument().getUri(); String input = fFiltersInputs.get(uri); if (input == null) { return CompletableFuture.completedFuture(Either.forLeft(completions)); } Position cursor = completionParams.getPosition(); List<String> suggestions = AutoCompletion.autoCompletion(input, cursor); for (int i = 0; i < suggestions.size(); i++) { Position start = new Position(0, 0); Position end = new Position(0, input.length()); CompletionItem item = new CompletionItem(); TextEdit textEdit = new TextEdit(new Range(start, end), suggestions.get(i)); item.setTextEdit(textEdit); completions.add(item); } } catch (RecognitionException | IOException error) { Activator.getInstance().logError(error.getMessage()); } return CompletableFuture.completedFuture(Either.forLeft(completions)); }
Source:
public static AbsoluteIborFutureTemplate of(YearMonth yearMonth, IborFutureConvention convention) { return AbsoluteIborFutureTemplate.of(yearMonth, convention); }

Target:
public static IborFutureTemplate of(YearMonth yearMonth, IborFutureConvention convention) { return AbsoluteIborFutureTemplate.of(yearMonth, convention); }
Source:
public void replacesTypeWithXml() throws Exception { MatcherAssert.assertThat( new RsPrint( new RsWithType.XML(new RsWithType(new RsEmpty(), TYPE_HTML)) ).print(), Matchers.equalTo( Joiner.on(CRLF).join( HTTP_OK, String.format(CONTENT_TYPE, TYPE_XML), "", "" ) ) ); MatcherAssert.assertThat( new RsPrint( new RsWithType.XML( new RsWithType(new RsEmpty(), TYPE_HTML), StandardCharsets.ISO_8859_1 ) ).print(), Matchers.equalTo( Joiner.on(CRLF).join( HTTP_OK, String.format( CONTENT_TYPE_WITH_CHARSET, TYPE_XML, StandardCharsets.ISO_8859_1 ), "", "" ) ) ); }

Target:
public void replacesTypeWithXml() throws Exception { MatcherAssert.assertThat( new RsPrint( new RsWithType.XML( new RsWithType(new RsEmpty(), RsWithTypeTest.TYPE_HTML) ) ).print(), Matchers.equalTo( Joiner.on(RsWithTypeTest.CRLF).join( RsWithTypeTest.HTTP_OK, String.format( RsWithTypeTest.CONTENT_TYPE, RsWithTypeTest.TYPE_XML ), "", "" ) ) ); MatcherAssert.assertThat( new RsPrint( new RsWithType.XML( new RsWithType(new RsEmpty(), RsWithTypeTest.TYPE_HTML), StandardCharsets.ISO_8859_1 ) ).print(), Matchers.equalTo( Joiner.on(RsWithTypeTest.CRLF).join( RsWithTypeTest.HTTP_OK, String.format( RsWithTypeTest.TYPE_WITH_CHARSET, RsWithTypeTest.TYPE_XML, StandardCharsets.ISO_8859_1 ), "", "" ) ) ); }
Source:
public void getConceptNameTagByName_shouldReturnNullIfNoConceptNameTagIsFound() { assertNull(conceptService.getConceptNameTagByName(null)); }

Target:
public void getConceptNameTagByName_shouldReturnNullIfNoConceptNameTagIsFound() { assertNull(conceptService.getConceptNameTagByName("random-tag")); }
Source:
public void getObjects() throws IOException, SignatureException, URISyntaxException, XmlProcessingException { final String bucketName = "test_get_objs"; try { client.putBucket(new PutBucketRequest(bucketName)); Util.loadBookTestData(client, bucketName); HeadObjectResponse headResponse = client.headObject(new HeadObjectRequest( bucketName, "beowulf.txt")); assertThat(headResponse.getStatus(), is(HeadObjectResponse.Status.EXISTS)); final GetObjectsResponse response = client .getObjects(new GetObjectsRequest().withBucket("test_get_objs")); assertFalse(response.getS3ObjectList().getObjects().isEmpty()); assertThat(response.getS3ObjectList().getObjects().size(), is(4)); assertTrue(s3ObjectExists(response.getS3ObjectList().getObjects(), "beowulf.txt")); } finally { Util.deleteAllContents(client,bucketName); } }

Target:
public void getObjects() throws IOException, SignatureException, URISyntaxException, XmlProcessingException { final String bucketName = "test_get_objs"; try { client.putBucket(new PutBucketRequest(bucketName)); Util.loadBookTestData(client, bucketName); final HeadObjectResponse headResponse = client.headObject(new HeadObjectRequest( bucketName, "beowulf.txt")); assertThat(headResponse.getStatus(), is(HeadObjectResponse.Status.EXISTS)); final GetObjectsResponse response = client .getObjects(new GetObjectsRequest().withBucket("test_get_objs")); assertFalse(response.getS3ObjectList().getObjects().isEmpty()); assertThat(response.getS3ObjectList().getObjects().size(), is(4)); assertTrue(s3ObjectExists(response.getS3ObjectList().getObjects(), "beowulf.txt")); } finally { Util.deleteAllContents(client,bucketName); } }
Source:
public static void setValue( CodeBlock cqlName, PropertyType type, CodeBlock valueExtractor, String targetName, MethodSpec.Builder methodBuilder, BindableHandlingSharedCode enclosingClass) { setValue( cqlName, type, valueExtractor, targetName, methodBuilder, enclosingClass, CodeBlock.of("$T.$L", NullSavingStrategy.class, NullSavingStrategy.SET_TO_NULL)); }

Target:
public static void setValue( CodeBlock cqlName, PropertyType type, CodeBlock valueExtractor, String targetName, MethodSpec.Builder methodBuilder, BindableHandlingSharedCode enclosingClass) { setValue(cqlName, type, valueExtractor, targetName, methodBuilder, enclosingClass, false); }
Source:
public void onConnected(@Nullable Bundle bundle) { if (mEmail == null) { Log.e(TAG, "Unable to save null credential!"); mActivity.finish(RESULT_OK, mActivity.getIntent()); return; } Credential.Builder builder = new Credential.Builder(mEmail); builder.setPassword(mPassword); if (mPassword == null) { if (mProvider != null) { String translatedProvider = null; if (mProvider.equals(GoogleAuthProvider.PROVIDER_ID)) { translatedProvider = IdentityProviders.GOOGLE; } else if (mProvider.equals(FacebookAuthProvider.PROVIDER_ID)) { translatedProvider = IdentityProviders.FACEBOOK; } if (translatedProvider != null) { builder.setAccountType(translatedProvider); } } } if (mName != null) { builder.setName(mName); } if (mProfilePictureUri != null) { builder.setProfilePictureUri(Uri.parse(mProfilePictureUri)); } Auth.CredentialsApi .save(mCredentialsApiClient, builder.build()) .setResultCallback(this); }

Target:
public void onConnected(@Nullable Bundle bundle) { if (mEmail == null) { Log.e(TAG, "Unable to save null credential!"); finish(RESULT_CANCELED); return; } Credential.Builder builder = new Credential.Builder(mEmail); builder.setPassword(mPassword); if (mPassword == null) { if (mProvider != null) { String translatedProvider = null; switch (mProvider) { case GoogleAuthProvider.PROVIDER_ID: translatedProvider = IdentityProviders.GOOGLE; break; case FacebookAuthProvider.PROVIDER_ID: translatedProvider = IdentityProviders.FACEBOOK; break; case TwitterAuthProvider.PROVIDER_ID: translatedProvider = IdentityProviders.TWITTER; break; default: Log.e(TAG, "Unable to save null credential!"); finish(RESULT_CANCELED); return; } builder.setAccountType(translatedProvider); } } if (mName != null) { builder.setName(mName); } if (mProfilePictureUri != null) { builder.setProfilePictureUri(Uri.parse(mProfilePictureUri)); } mActivityHelper.getCredentialsApi() .save(mCredentialsApiClient, builder.build()) .setResultCallback(this); }
Source:
private boolean updateStateEntries(ITmfStateSystem ss, List<ITmfStateInterval> fullState, TmfTreeViewerEntry parent, int parentQuark, long timestamp) { boolean changed = false; try { for (int quark : ss.getSubAttributes(parentQuark, false)) { if (quark >= fullState.size()) { continue; } ITmfStateInterval interval = fullState.get(quark); StateEntry stateEntry = findStateEntry(parent, quark); if (stateEntry == null) { stateEntry = new StateEntry(ss.getAttributeName(quark), quark, ss.getFullAttributePath(quark), interval.getStateValue(), new TmfTimestamp(interval.getStartTime(), ITmfTimestamp.NANOSECOND_SCALE), new TmfTimestamp(interval.getEndTime(), ITmfTimestamp.NANOSECOND_SCALE), interval.getStartTime() == timestamp); updateStateEntries(ss, fullState, stateEntry, quark, timestamp); if (!fFilterStatus || stateEntry.hasChildren() || interval.getStartTime() == timestamp) { parent.addChild(stateEntry); changed = true; } } else { stateEntry.update(interval.getStateValue(), new TmfTimestamp(interval.getStartTime(), ITmfTimestamp.NANOSECOND_SCALE), new TmfTimestamp(interval.getEndTime(), ITmfTimestamp.NANOSECOND_SCALE)); updateStateEntries(ss, fullState, stateEntry, quark, timestamp); } } } catch (AttributeNotFoundException e) { } return changed; }

Target:
private boolean updateStateEntries(ITmfStateSystem ss, List<ITmfStateInterval> fullState, TmfTreeViewerEntry parent, int parentQuark, long timestamp) { boolean changed = false; try { for (int quark : ss.getSubAttributes(parentQuark, false)) { if (quark >= fullState.size()) { continue; } ITmfStateInterval interval = fullState.get(quark); StateEntry stateEntry = findStateEntry(parent, quark); if (stateEntry == null) { boolean modified = fFilterStatus ? interval.getStartTime() == timestamp : !interval.getStateValue().isNull(); stateEntry = new StateEntry(ss.getAttributeName(quark), quark, ss.getFullAttributePath(quark), interval.getStateValue(), new TmfTimestamp(interval.getStartTime(), ITmfTimestamp.NANOSECOND_SCALE), new TmfTimestamp(interval.getEndTime(), ITmfTimestamp.NANOSECOND_SCALE), modified); updateStateEntries(ss, fullState, stateEntry, quark, timestamp); if (!fFilterStatus || stateEntry.hasChildren() || interval.getStartTime() == timestamp) { parent.addChild(stateEntry); changed = true; } } else { stateEntry.update(interval.getStateValue(), new TmfTimestamp(interval.getStartTime(), ITmfTimestamp.NANOSECOND_SCALE), new TmfTimestamp(interval.getEndTime(), ITmfTimestamp.NANOSECOND_SCALE)); updateStateEntries(ss, fullState, stateEntry, quark, timestamp); } } } catch (AttributeNotFoundException e) { } return changed; }
Source:
public void loadComplete(FMLLoadCompleteEvent event) { BlockState state = Fluids.WATER.getDefaultState().getBlockState(); BlockState state2 = Fluids.WATER.getAttributes().getBlock(null,null,Fluids.WATER.getDefaultState()); assert state.getBlock() == Blocks.WATER && state2 == state; ItemStack stack = Fluids.WATER.getAttributes().getBucket(new FluidStack(Fluids.WATER, 1)); assert stack.getItem() == Fluids.WATER.getFilledBucket(); }

Target:
public void loadComplete(FMLLoadCompleteEvent event) { BlockState state = Fluids.WATER.getDefaultState().getBlockState(); BlockState state2 = Fluids.WATER.getAttributes().getBlock(null,null,Fluids.WATER.getDefaultState()); Validate.isTrue(state.getBlock() == Blocks.WATER && state2 == state); ItemStack stack = Fluids.WATER.getAttributes().getBucket(new FluidStack(Fluids.WATER, 1)); Validate.isTrue(stack.getItem() == Fluids.WATER.getFilledBucket()); }
Source:
private boolean isANewPerspective(LayoutTemplate layoutTemplate) { final IOCBeanDef<Activity> activity = activityBeansCache.getActivity(layoutTemplate.getName()); return activity == null; }

Target:
private boolean isANewPerspective(LayoutTemplate layoutTemplate) { return activityBeansCache.getActivity(layoutTemplate.getName()) == null; }
Source:
public final void rightClickBlock(GlowPlayer player, GlowBlock against, BlockFace face, ItemStack holding, Vector clickedLoc) { GlowBlock target = against.getRelative(face); GlowBlockState newState = target.getState(); if (against.getType() == Material.LONG_GRASS) { target = against; } else if (!target.isEmpty() && !target.isLiquid()) { return; } if (!EventFactory.onBlockCanBuild(target, getId(), face).isBuildable()) { return; } placeBlock(player, newState, face, holding, clickedLoc); BlockPlaceEvent event = EventFactory.onBlockPlace(target, newState, against, player); if (event.isCancelled() || !event.canBuild()) { return; } newState.update(true); getPlaceSound().play(target.getLocation()); afterPlace(player, target, holding); if (player.getGameMode() != GameMode.CREATIVE) { holding.setAmount(holding.getAmount() - 1); } }

Target:
public final void rightClickBlock(GlowPlayer player, GlowBlock against, BlockFace face, ItemStack holding, Vector clickedLoc) { GlowBlock target = against.getRelative(face); BlockType againstType = ItemTable.instance().getBlock(against.getTypeId()); if (againstType.canAbsorb(against, face, holding)) { target = against; } else if (!target.isEmpty()) { BlockType targetType = ItemTable.instance().getBlock(target.getTypeId()); if (!targetType.canOverride(target, face, holding)) { return; } } GlowBlockState newState = target.getState(); if (!EventFactory.onBlockCanBuild(target, getId(), face).isBuildable()) { return; } placeBlock(player, newState, face, holding, clickedLoc); BlockPlaceEvent event = EventFactory.onBlockPlace(target, newState, against, player); if (event.isCancelled() || !event.canBuild()) { return; } newState.update(true); getPlaceSound().play(target.getLocation()); afterPlace(player, target, holding); if (player.getGameMode() != GameMode.CREATIVE) { holding.setAmount(holding.getAmount() - 1); } }
Source:
protected File getLogFile() { return new File(Jenkins.getInstance().getRootDir(),"logs/tasks/"+name+".log"); }

Target:
protected File getLogFile() { return new File(Jenkins.getActiveInstance().getRootDir(),"logs/tasks/"+name+".log"); }
Source:
boolean validateSingleHostAttachedToLocalStorage() { boolean retrunValue = true; storage_pool storagePool = DbFacade.getInstance().getStoragePoolDao().getForVdsGroup( getParameters().getVdsStaticData().getVdsGroupId()); if (storagePool != null && storagePool.getstorage_pool_type() == StorageType.LOCALFS) { if (!DbFacade.getInstance() .getVdsStaticDao() .getAllForVdsGroup(getParameters().getVdsStaticData().getVdsGroupId()) .isEmpty()) { addCanDoActionMessage(VdcBllMessages.VDS_CANNOT_ADD_MORE_THEN_ONE_HOST_TO_LOCAL_STORAGE); retrunValue = false; } } return retrunValue; }

Target:
protected boolean validateSingleHostAttachedToLocalStorage() { boolean retrunValue = true; storage_pool storagePool = DbFacade.getInstance().getStoragePoolDao().getForVdsGroup( getParameters().getVdsStaticData().getVdsGroupId()); if (storagePool != null && storagePool.getstorage_pool_type() == StorageType.LOCALFS) { if (!DbFacade.getInstance() .getVdsStaticDao() .getAllForVdsGroup(getParameters().getVdsStaticData().getVdsGroupId()) .isEmpty()) { addCanDoActionMessage(VdcBllMessages.VDS_CANNOT_ADD_MORE_THEN_ONE_HOST_TO_LOCAL_STORAGE); retrunValue = false; } } return retrunValue; }
Source:
public ImageTemplate buildImageTemplateFromNode(String name, String id) { DataCenterAndId datacenterAndId = DataCenterAndId.fromSlashEncoded(id); Server server = client.serverApi().getServer(datacenterAndId.getDataCenter(), datacenterAndId.getId()); if (server == null) { throw new NoSuchElementException("Cannot find server with id: " + id); } CloneImageTemplate template = new ImageTemplateBuilder.CloneImageTemplateBuilder().nodeId(id).name(name).build(); return template; }

Target:
public ImageTemplate buildImageTemplateFromNode(String name, String id) { DataCenterAndId datacenterAndId = DataCenterAndId.fromSlashEncoded(id); Server server = client.serverApi().getServer(datacenterAndId.getDataCenter(), datacenterAndId.getId()); if (server == null) { throw new IllegalArgumentException("Cannot find server with id: " + id); } CloneImageTemplate template = new ImageTemplateBuilder.CloneImageTemplateBuilder().nodeId(id).name(name).build(); return template; }
Source:
protected XWikiRepositorySystemSession createRepositorySystemSession() throws ResolveException { XWikiRepositorySystemSession session; try { session = this.repositoryFactory.createRepositorySystemSession(); } catch (IOException e) { throw new ResolveException("Failed to create the repository system session", e); } Map<String, String> sessionHttpHeaders = new HashMap<>(); for (Map.Entry<String, String> property : getDescriptor().getProperties().entrySet()) { if (StringUtils.startsWith(property.getKey(), "httpHeaders.")) { String headerName = StringUtils.split(property.getKey(), ".", 2)[1]; sessionHttpHeaders.put(headerName, property.getValue()); } } session.addConfigurationProperties(Collections.singletonMap(ConfigurationProperties.HTTP_HEADERS, sessionHttpHeaders)); session.addConfigurationProperties(getDescriptor().getProperties()); return session; }

Target:
protected XWikiRepositorySystemSession createRepositorySystemSession() throws ResolveException { XWikiRepositorySystemSession session; try { session = this.repositoryFactory.createRepositorySystemSession(); } catch (IOException e) { throw new ResolveException("Failed to create the repository system session", e); } Map<String, String> sessionHttpHeaders = new HashMap<>(); for (Map.Entry<String, String> property : getDescriptor().getProperties().entrySet()) { if (StringUtils.startsWith(property.getKey(), "http.headers.")) { String headerName = StringUtils.split(property.getKey(), ".", 3)[2]; sessionHttpHeaders.put(headerName, property.getValue()); } } session.addConfigurationProperties(Collections.singletonMap(ConfigurationProperties.HTTP_HEADERS, sessionHttpHeaders)); session.addConfigurationProperties(getDescriptor().getProperties()); return session; }
Source:
private static Timer timer(final MetricRegistry metricRegistry, final String... keys) { final String timerMetricName = JOINER.join("killbill-service", "kb_plugin_latency", JOINER.join(keys)); return metricRegistry.timer(timerMetricName); }

Target:
private static Timer timer(final MetricRegistry metricRegistry, final String... keys) { final String timerMetricName = DOT_JOINER.join("killbill-service", "kb_plugin_latency", DOT_JOINER.join(keys)); return metricRegistry.timer(timerMetricName); }
Source:
WebAppBaseImpl<FluentT, FluentImplT> withNewHostNameSslBinding( final HostNameSslBindingImpl<FluentT, FluentImplT> hostNameSslBinding) { hostNameSslBinding.newCertificate(); sslBindingsToCreate.put(hostNameSslBinding.name(), hostNameSslBinding); return this; }

Target:
WebAppBaseImpl<FluentT, FluentImplT> withNewHostNameSslBinding( final HostNameSslBindingImpl<FluentT, FluentImplT> hostNameSslBinding) { sslBindingsToCreate.put(hostNameSslBinding.name(), hostNameSslBinding); return this; }
Source:
public Collection<JType> getTypes() { return Collections.unmodifiableCollection(types.values()); }

Target:
public Collection<JType> getTypes() { return Jack.getUnmodifiableCollections().getUnmodifiableCollection(types.values()); }
Source:
public void returnsUserFriendlyMessage() throws Exception { final MkBase base = new MkBase(); final String urn = "urn:test:4"; final User user = base.user(new URN(urn)); user.aliases().add("alias4"); final Alias alias = user.aliases().iterate().iterator().next(); alias.email("old@example.com!new4@example.com"); try { new TkEmVerify(base).act( new RqRegex.Fake(PATTERN, "x") ); } catch (final RsForward ex) { final Iterator<String> response = ex.head().iterator(); response.next(); final String space = " "; final String[] cookie = response .next().split(space)[1].split("./")[0].split("="); MatcherAssert.assertThat( cookie[1].replace("+", space), Matchers.equalTo("verification link not valid") ); } }

Target:
public void returnsUserFriendlyMessage() throws Exception { final MkBase base = new MkBase(); final String urn = "urn:test:4"; final User user = base.user(new URN(urn)); user.aliases().add("alias4"); final Alias alias = user.aliases().iterate().iterator().next(); alias.email("old@example.com!new4@example.com"); try { new TkEmVerify(base).act( new RqRegex.Fake(TkEmVerifyTest.PATTERN, "x") ); } catch (final RsForward ex) { MatcherAssert.assertThat( ex, Matchers.not(Matchers.instanceOf(RsFailure.class)) ); final Iterator<String> response = ex.head().iterator(); response.next(); final String space = " "; final String[] cookie = response .next().split(space)[1].split("./")[0].split("="); MatcherAssert.assertThat( cookie[1].replace("+", space), Matchers.equalTo("verification link not valid") ); } }
Source:
public String getQpidHome() { qpidPath = System.getProperty(QPID_CONF); if(qpidPath != null){ QPID_CONF_DIR = Paths.get(qpidPath).toString(); } return System.getProperty(ServerConstants.CARBON_HOME) + QPID_CONF_DIR; }

Target:
public String getQpidHome() { String qpidPath = System.getProperty(QPID_CONF); if (qpidPath != null) { QPID_CONF_DIR = Paths.get(qpidPath).toString(); } return System.getProperty(ServerConstants.CARBON_HOME) + QPID_CONF_DIR; }
Source:
public void testAlterReplicaLogDirsPartialResponse() throws Exception { try (AdminClientUnitTestEnv env = mockClientEnv()) { createAlterLogDirsResponse(env, env.cluster().nodeById(0), Errors.NONE, 1); TopicPartitionReplica tpr1 = new TopicPartitionReplica("topic", 1, 0); TopicPartitionReplica tpr2 = new TopicPartitionReplica("topic", 2, 0); Map<TopicPartitionReplica, String> logDirs = new HashMap<>(); logDirs.put(tpr1, "/data1"); logDirs.put(tpr2, "/data1"); AlterReplicaLogDirsResult result = env.adminClient().alterReplicaLogDirs(logDirs); assertNull(result.values().get(tpr1).get()); try { result.values().get(tpr2).get(); fail("Expected an exception."); } catch (ExecutionException e) { assertTrue("Expected an ExecutionException wrapping an ApiException, but got " + Utils.stackTrace(e), e.getCause() instanceof ApiException); } } }

Target:
public void testAlterReplicaLogDirsPartialResponse() throws Exception { try (AdminClientUnitTestEnv env = mockClientEnv()) { createAlterLogDirsResponse(env, env.cluster().nodeById(0), Errors.NONE, 1); TopicPartitionReplica tpr1 = new TopicPartitionReplica("topic", 1, 0); TopicPartitionReplica tpr2 = new TopicPartitionReplica("topic", 2, 0); Map<TopicPartitionReplica, String> logDirs = new HashMap<>(); logDirs.put(tpr1, "/data1"); logDirs.put(tpr2, "/data1"); AlterReplicaLogDirsResult result = env.adminClient().alterReplicaLogDirs(logDirs); assertNull(result.values().get(tpr1).get()); TestUtils.assertFutureThrows(result.values().get(tpr2), ApiException.class); } }
Source:
public Status insert(String table, String key, Map<String, ByteIterator> values) { Message record = getRecord(key, values); String rowKey = (String) record.getField(msgDesc.findFieldByName("YCSB")); logger.debug("insert key = {}", rowKey); try { batchRecords.add(record); batchCount++; if (batchSize == 0 || batchSize == batchCount) { batchInsert(); batchCount = 0; } return Status.OK; } catch (Throwable e) { logger.error(MessageFormatter.format("Error inserting key: {}", rowKey).getMessage(), e); } return Status.ERROR; }

Target:
public Status insert(String table, String key, Map<String, ByteIterator> values) { Message record = getRecord(key, values); String rowKey = (String) record.getField(msgDesc.findFieldByName("YCSB")); LOGGER.debug("insert key = {}", rowKey); try { batchRecords.add(record); batchCount++; if (batchSize == 0 || batchSize == batchCount) { batchInsert(); batchCount = 0; } return Status.OK; } catch (Throwable e) { LOGGER.error(MessageFormatter.format("Error inserting key: {}", rowKey).getMessage(), e); } return Status.ERROR; }
Source:
public void shutdown(final String taskId) { if (!started) { log.info("This TaskRunner is stopped. Ignoring shutdown command for task: %s", taskId); } else if (pendingTasks.remove(taskId) != null) { pendingTaskPayloads.remove(taskId); log.info("Removed task from pending queue: %s", taskId); } else if (completeTasks.containsKey(taskId)) { cleanup(taskId); } else { final ZkWorker zkWorker = findWorkerRunningTask(taskId); if (zkWorker == null) { log.info("Can't shutdown! No worker running task %s", taskId); return; } URL url = null; try { url = makeWorkerURL(zkWorker.getWorker(), String.format("/task/%s/shutdown", taskId)); final StatusResponseHolder response = httpClient.go( new Request(HttpMethod.POST, url), RESPONSE_HANDLER, shutdownTimeout ).get(); log.info( "Sent shutdown message to worker: %s, status %s, response: %s", zkWorker.getWorker().getHost(), response.getStatus(), response.getContent() ); if (!response.getStatus().equals(HttpResponseStatus.OK)) { log.error("Shutdown failed for %s! Are you sure the task was running?", taskId); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RE(e, "Interrupted posting shutdown to [%s] for task [%s]", url, taskId); } catch (Exception e) { throw new RE(e, "Error in handling post to [%s] for task [%s]", zkWorker.getWorker().getHost(), taskId); } } }

Target:
public void shutdown(final String taskId) { if (!started) { log.info("This TaskRunner is stopped. Ignoring shutdown command for task: %s", taskId); } else if (pendingTasks.remove(taskId) != null) { pendingTaskPayloads.remove(taskId); log.info("Removed task from pending queue: %s", taskId); } else if (completeTasks.containsKey(taskId)) { cleanup(taskId); } else { final ZkWorker zkWorker = findWorkerRunningTask(taskId); if (zkWorker == null) { log.info("Can't shutdown! No worker running task %s", taskId); return; } URL url = null; try { url = makeWorkerURL(zkWorker.getWorker(), String.format("/task/%s/shutdown", taskId)); final StatusResponseHolder response = httpClient.go( new Request(HttpMethod.POST, url), RESPONSE_HANDLER, shutdownTimeout ).get(); log.info( "Sent shutdown message to worker: %s, status %s, response: %s", zkWorker.getWorker().getHost(), response.getStatus(), response.getContent() ); if (!HttpResponseStatus.OK.equals(response.getStatus())) { log.error("Shutdown failed for %s! Are you sure the task was running?", taskId); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RE(e, "Interrupted posting shutdown to [%s] for task [%s]", url, taskId); } catch (Exception e) { throw new RE(e, "Error in handling post to [%s] for task [%s]", zkWorker.getWorker().getHost(), taskId); } } }
Source:
private void verifyExistenceOfsectionName(String sectionName) { this.sessionLevel.computeIfAbsent(sectionName, key -> { addSectionWithDefaultPrivileges(sectionName); return new LinkedHashMap<String, Map<String, Boolean>>(); }); }

Target:
private void verifyExistenceOfsectionName(String sectionName) { this.sessionLevel.computeIfAbsent(sectionName, key -> { addSectionWithDefaultPrivileges(sectionName); return new LinkedHashMap<>(); }); }
Source:
private static Boolean canPlayFile(final FileSync.FileManifest senseManifest, final FileInfo fileInfo) { for (final FileSync.FileManifest.File file : senseManifest.getFileInfoList()) { if (file.hasDownloadInfo() && file.getDownloadInfo().hasSdCardFilename() && file.getDownloadInfo().hasSdCardPath()) { final String sdCardPath = file.getDownloadInfo().getSdCardPath(); final String sdCardFilename = file.getDownloadInfo().getSdCardFilename(); final byte[] fileInfoSha; try { fileInfoSha = fileInfo.getShaBytes(); } catch (DecoderException e) { LOGGER.error("method=canPlayFile exception=DecoderException file-info-path={} file-info-sha={} error={}", fileInfo.path, fileInfo.sha, e); continue; } LOGGER.trace("method=canPlayFile device-id={} sd-card-path={} sd-card-filename={} file-info-path={}", senseManifest.getSenseId(), sdCardPath, sdCardFilename, fileInfo.path); if (getFullPath(sdCardPath, sdCardFilename).equals(fileInfo.path)) { if (Arrays.equals(fileInfoSha, file.getDownloadInfo().getSha1().toByteArray())) { return true; } else { LOGGER.warn("device-id={} file-info-path={} file-info-sha={} error=sha-does-not-match", senseManifest.getSenseId(), fileInfo.path, fileInfo.sha); } } } else { LOGGER.debug("device-id={} error=incomplete-download-info", senseManifest.getSenseId()); } } LOGGER.debug("device-id={} error=cannot-play-file file-info-path={}", senseManifest.getSenseId(), fileInfo.path); return false; }

Target:
private static Boolean canPlayFile(final FileSync.FileManifest senseManifest, final FileInfo fileInfo) { for (final FileSync.FileManifest.File file : senseManifest.getFileInfoList()) { if (file.hasDownloadInfo() && file.getDownloadInfo().hasSdCardFilename() && file.getDownloadInfo().hasSdCardPath()) { final String sdCardPath = file.getDownloadInfo().getSdCardPath(); final String sdCardFilename = file.getDownloadInfo().getSdCardFilename(); final byte[] fileInfoSha; try { fileInfoSha = fileInfo.getShaBytes(); } catch (DecoderException e) { LOGGER.error("method=canPlayFile exception=DecoderException file-info-path={} file-info-sha={} error={}", fileInfo.path, fileInfo.sha, e); continue; } LOGGER.trace("method=canPlayFile device-id={} sd-card-path={} sd-card-filename={} file-info-path={}", senseManifest.getSenseId(), sdCardPath, sdCardFilename, fileInfo.path); if (getFullPath(sdCardPath, sdCardFilename).equals(fileInfo.path)) { if (Arrays.equals(fileInfoSha, file.getDownloadInfo().getSha1().toByteArray())) { return true; } LOGGER.warn("device-id={} file-info-path={} file-info-sha={} error=sha-does-not-match", senseManifest.getSenseId(), fileInfo.path, fileInfo.sha); } } else { LOGGER.debug("device-id={} error=incomplete-download-info", senseManifest.getSenseId()); } } LOGGER.debug("device-id={} error=cannot-play-file file-info-path={}", senseManifest.getSenseId(), fileInfo.path); return false; }
Source:
public static String truncateFileNameFromFullPath(String file) { return file.substring(file.lastIndexOf('/')+1); }

Target:
public static String truncateFileNameFromFullPath(String file) { return file.substring(file.lastIndexOf(File.separator) + 1); }
Source:
Mono<Response<KeyVaultKey>> updateKeyPropertiesWithResponse(KeyProperties keyProperties, Context context, KeyOperation... keyOperations) { Objects.requireNonNull(keyProperties, "The key properties input parameter cannot be null."); context = context == null ? Context.NONE : context; KeyRequestParameters parameters = new KeyRequestParameters() .setTags(keyProperties.getTags()) .setKeyAttributes(new KeyRequestAttributes(keyProperties)) .setKeyReleasePolicy(keyProperties.getKeyReleasePolicy()); if (keyOperations.length > 0) { parameters.setKeyOps(Arrays.asList(keyOperations)); } return service.updateKey(vaultUrl, keyProperties.getName(), keyProperties.getVersion(), apiVersion, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE)) .doOnRequest(ignored -> logger.info("Updating key - {}", keyProperties.getName())) .doOnSuccess(response -> logger.info("Updated key - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to update key - {}", keyProperties.getName(), error)); }

Target:
Mono<Response<KeyVaultKey>> updateKeyPropertiesWithResponse(KeyProperties keyProperties, Context context, KeyOperation... keyOperations) { Objects.requireNonNull(keyProperties, "The key properties input parameter cannot be null."); context = context == null ? Context.NONE : context; KeyRequestParameters parameters = new KeyRequestParameters() .setTags(keyProperties.getTags()) .setKeyAttributes(new KeyRequestAttributes(keyProperties)) .setReleasePolicy(keyProperties.getReleasePolicy()); if (keyOperations.length > 0) { parameters.setKeyOps(Arrays.asList(keyOperations)); } return service.updateKey(vaultUrl, keyProperties.getName(), keyProperties.getVersion(), apiVersion, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE)) .doOnRequest(ignored -> logger.info("Updating key - {}", keyProperties.getName())) .doOnSuccess(response -> logger.info("Updated key - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to update key - {}", keyProperties.getName(), error)); }
Source:
public static Resource getResource(FBNetworkElement fbne){ if(null != fbne.getFbNetwork()) { if(fbne.getFbNetwork().eContainer() instanceof Resource){ return (Resource)fbne.getFbNetwork().eContainer(); } if(fbne.getFbNetwork().eContainer() instanceof SubApp){ return getResource(((SubApp)fbne.getFbNetwork().eContainer())); } } if(fbne.isMapped()){ return fbne.getMapping().getTo().getResource(); } return null; }

Target:
public static Resource getResource(FBNetworkElement fbne){ if(null != fbne.getFbNetwork()) { EObject container = fbne.getFbNetwork().eContainer(); if(container instanceof Resource){ return (Resource)container; } if(container instanceof SubApp){ return getResource(((SubApp)container)); } } if(fbne.isMapped()){ return fbne.getMapping().getTo().getResource(); } return null; }
Source:
SuggestReviewerInfo(AccountInfo a) { this.account = a; this.group = null; }

Target:
SuggestReviewerInfo(AccountInfo a) { this.account = a; }
Source:
private void updateCodeMinings() { fMonitor= new NullProgressMonitor(); IProgressMonitor monitor= fMonitor; getCodeMinings(fViewer, fCodeMiningProviders, monitor).thenAccept(symbols -> { if (!monitor.isCanceled()) { Map<Position, List<ICodeMining>> groups= groupByLines(symbols, fCodeMiningProviders); renderCodeMinings(groups, fViewer, monitor); } }); }

Target:
private void updateCodeMinings() { fMonitor= new NullProgressMonitor(); IProgressMonitor monitor= fMonitor; getCodeMinings(fViewer, fCodeMiningProviders, monitor).thenAccept(symbols -> { if (!monitor.isCanceled()) { Map<Position, List<ICodeMining>> groups= goupByLines(symbols, fCodeMiningProviders); renderCodeMinings(groups, fViewer, monitor); } }); }
Source:
SqlgDataSource setup(String driver, final Configuration configuration) throws Exception; SqlgDataSource setupFromJndi(String jndiName, Configuration configuration) throws Exception; interface SqlgDataSource { DataSource get(String jdbcUrl); void close(String jdbcUrl); String getPoolStatsAsJson(); }

Target:
SqlgDataSource setup(String driver, final Configuration configuration) throws Exception; interface SqlgDataSource { DataSource getDatasource(); void close(); String getPoolStatsAsJson(); }