auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void deleteBucket() throws Exception { final String bucketName = "test_delete_bucket"; try { final String expected = "Success: Deleted " + bucketName + " and all the objects contained in it."; Util.createBucket(client, bucketName); final CommandResponse response = Util.deleteBucket(client, bucketName); assertThat(response.getMessage(), is(expected)); } finally { } }

Target:
public void deleteBucket() throws Exception { final String bucketName = "test_delete_bucket"; final String expected = "Success: Deleted " + bucketName + " and all the objects contained in it."; Util.createBucket(client, bucketName); final CommandResponse response = Util.deleteBucket(client, bucketName); assertThat(response.getMessage(), is(expected)); }
Source:
public void installMirrorController(MirrorController mirrorController) { logger.debug("Remote control is being installed"); if (postOffice != null) { postOffice.setMirrorControlSource(mirrorController); } this.mirrorControllerService = mirrorController; }

Target:
public void installMirrorController(MirrorController mirrorController) { logger.debug("Mirror controller is being installed"); if (postOffice != null) { postOffice.setMirrorControlSource(mirrorController); } this.mirrorControllerService = mirrorController; }
Source:
private Component buildCriteriaPane() { FormLayout layout = new FormLayout( "left:pref, 3dlu, fill:0:grow", "p, 3dlu, p, 3dlu, p" ); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); JLabel criteriaLabel = new JLabel("Criteria"); criteriaLabel.setFont( criteriaLabel.getFont().deriveFont(Font.BOLD)); builder.add(criteriaLabel, cc.xy(1, 1)); if ( checkValidMetaAnalysesAvailable( d_pm ) ) { int row = 1; for(OutcomeMeasure out : d_metaPM.getCriteriaListModel()){ if(d_metaPM.getMetaAnalyses(out).isEmpty()) continue; row = addCriterionCheckbox(out, d_metaPM, layout, builder, cc, row); row = LayoutUtil.addRow(layout, row); builder.add(buildRadioButtonAnalysisPanel(out), cc.xy(3, row, CellConstraints.LEFT, CellConstraints.DEFAULT)); } } else { String warnHTMLText = "<i>Note</i>: To create a benefit-risk analysis, first create at least two " + "meta-analyses with at least two overlapping alternatives."; JComponent htmlField = AuxComponentFactory.createHtmlField( warnHTMLText ); htmlField.setPreferredSize( new Dimension( PREFERRED_COLUMN_SIZE.width - 5, 100 ) ); int row = 1; row = LayoutUtil.addRow(layout, row); builder.add(htmlField, cc.xyw( 1, row, 3 )); } return AuxComponentFactory.createInScrollPane(builder, PREFERRED_COLUMN_SIZE); }

Target:
private Component buildCriteriaPane() { FormLayout layout = new FormLayout( "left:pref, 3dlu, fill:0:grow", "p, 3dlu, p, 3dlu, p" ); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); JLabel criteriaLabel = new JLabel("Criteria"); criteriaLabel.setFont( criteriaLabel.getFont().deriveFont(Font.BOLD)); builder.add(criteriaLabel, cc.xy(1, 1)); if (checkSuitableMetaAnalysesAvailable(d_pm)) { int row = 1; for (OutcomeMeasure out : d_metaPM.getCriteriaListModel()){ if (!d_metaPM.getMetaAnalyses(out).isEmpty()) { row = addCriterionCheckbox(out, d_metaPM, layout, builder, cc, row); row = LayoutUtil.addRow(layout, row); builder.add(buildRadioButtonAnalysisPanel(out), cc.xy(3, row, CellConstraints.LEFT, CellConstraints.DEFAULT)); } } } else { String warnHTMLText = "<i>Note</i>: To create a benefit-risk analysis, first create " + "at least two meta-analyses with at least two overlapping alternatives."; JComponent htmlField = AuxComponentFactory.createHtmlField(warnHTMLText); htmlField.setPreferredSize(new Dimension(PREFERRED_COLUMN_SIZE.width - 5, 100)); int row = 1; row = LayoutUtil.addRow(layout, row); builder.add(htmlField, cc.xyw(1, row, 3)); } return AuxComponentFactory.createInScrollPane(builder, PREFERRED_COLUMN_SIZE); }
Source:
public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof DeviceAuthorization)) { return false; } final DeviceAuthorization authorization = (DeviceAuthorization) o; final boolean isDeviceEqual = Objects.equals(this.device, authorization.device); final boolean isOrganisationEqual = Objects.equals(this.organisation, authorization.organisation); final boolean isDeviceFunctionGroupEqual = Objects.equals(this.functionGroup.name(), authorization.functionGroup.name()); return isDeviceEqual && isOrganisationEqual && isDeviceFunctionGroupEqual; }

Target:
public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof DeviceAuthorization)) { return false; } final DeviceAuthorization authorization = (DeviceAuthorization) o; final boolean isDeviceEqual = Objects.equals(this.device, authorization.device); final boolean isOrganisationEqual = Objects.equals(this.organisation, authorization.organisation); final boolean isDeviceFunctionGroupEqual = Objects.equals(this.functionGroup, authorization.functionGroup); return isDeviceEqual && isOrganisationEqual && isDeviceFunctionGroupEqual; }
Source:
private File createKnownCertFileIfNotExists() throws IOException { if ( !knownCerts.exists() ) { File parentDir = knownCerts.getParentFile(); if( parentDir != null && !parentDir.exists() ) { if(!parentDir.mkdirs()) { throw new IOException( "Failed to create directories for the known hosts file in " + knownCerts.getAbsolutePath() + ". This is usually " + "because you do not have write permissions to the directory. Try configuring the Neo4j driver to use a file " + "system location you do have write permissions to." ); } } if(!knownCerts.createNewFile()) { throw new IOException( "Failed to create a known hosts file at " + knownCerts.getAbsolutePath() + ". This is usually " + "because you do not have write permissions to the directory. Try configuring the Neo4j driver to use a file " + "system location you do have write permissions to." ); } BufferedWriter writer = new BufferedWriter( new FileWriter( knownCerts ) ); writer.write( "# This file contains trusted certificates for Neo4j servers, it's created by Neo4j drivers." ); writer.newLine(); writer.write( "# You can configure the location of this file in `org.neo4j.driver.Config`" ); writer.newLine(); writer.close(); } return knownCerts; }

Target:
private File createKnownCertFileIfNotExists() throws IOException { if ( !knownHosts.exists() ) { File parentDir = knownHosts.getParentFile(); try { if ( parentDir != null && !parentDir.exists() ) { if ( !parentDir.mkdirs() ) { throw new IOException( "Failed to create directories for the known hosts file in " + knownHosts.getAbsolutePath() + ". This is usually because you do not have write permissions to the directory. " + "Try configuring the Neo4j driver to use a file system location you do have write permissions to." ); } } if ( !knownHosts.createNewFile() ) { throw new IOException( "Failed to create a known hosts file at " + knownHosts.getAbsolutePath() + ". This is usually because you do not have write permissions to the directory. " + "Try configuring the Neo4j driver to use a file system location you do have write permissions to." ); } } catch( SecurityException e ) { throw new IOException( "Failed to create known host file and/or parent directories at " + knownHosts.getAbsolutePath() + ". This is usually because you do not have write permission to the directory. " + "Try configuring the Neo4j driver to use a file location you have write permissions to." ); } BufferedWriter writer = new BufferedWriter( new FileWriter( knownHosts ) ); writer.write( "# This file contains trusted certificates for Neo4j servers, it's created by Neo4j drivers." ); writer.newLine(); writer.write( "# You can configure the location of this file in `org.neo4j.driver.Config`" ); writer.newLine(); writer.close(); } return knownHosts; }
Source:
public void setUp() throws Exception { super.setUp(); defaultDb = createWorkRepository(); try (Git git = new Git(defaultDb)) { JGitTestUtil.writeTrashFile(defaultDb, "hello.txt", "branch world"); git.add().addFilepattern("hello.txt").call(); git.commit().setMessage("Initial commit").call(); git.checkout().setName(BRANCH).setCreateBranch(true).call(); git.checkout().setName("master").call(); git.tag().setName(TAG).call(); JGitTestUtil.writeTrashFile(defaultDb, "hello.txt", "master world"); git.add().addFilepattern("hello.txt").call(); git.commit().setMessage("Second commit").call(); addRepoToClose(defaultDb); } defaultUri = defaultDb.getDirectory().toURI().toString(); int root = defaultUri.lastIndexOf("/", defaultUri.lastIndexOf("/.git") - 1) + 1; rootUri = defaultUri.substring(0, root) + "manifest"; defaultUri = defaultUri.substring(root); }

Target:
public void setUp() throws Exception { super.setUp(); defaultDb = createWorkRepository(); try (Git git = new Git(defaultDb)) { JGitTestUtil.writeTrashFile(defaultDb, "hello.txt", "hello world"); git.add().addFilepattern("hello.txt").call(); git.commit().setMessage("Initial commit").call(); addRepoToClose(defaultDb); } defaultUri = defaultDb.getDirectory().toURI().toString(); int root = defaultUri.lastIndexOf("/", defaultUri.lastIndexOf("/.git") - 1) + 1; rootUri = defaultUri.substring(0, root) + "manifest"; defaultUri = defaultUri.substring(root); }
Source:
public GroupByColumnNode(VariableReferenceExpression inputColumn, VariableReferenceExpression output) { super(ExpressionType.GROUP_BY, output); this.inputColumn = inputColumn; }

Target:
public GroupByColumnNode(VariableReferenceExpression inputColumn, VariableReferenceExpression output) { super(ExpressionType.GROUP_BY, output); this.inputColumn = requireNonNull(inputColumn, "inputColumn is null"); }
Source:
public E next() { E e = iterator.next(); lastRet = ObservableArrayList.this.list.indexOf(e); return e; }

Target:
public E next() { final E e = iterator.next(); lastRet = ObservableArrayList.this.list.indexOf(e); return e; }
Source:
public void realmClosed(RealmConfiguration configuration) { if (configuration instanceof SyncConfiguration) { SyncConfiguration syncConfig = (SyncConfiguration) configuration; SyncSessionHolder.remove(syncConfig); } else { throw new IllegalArgumentException(WRONG_TYPE_OF_CONFIGURATION); } }

Target:
public void realmClosed(RealmConfiguration configuration) { if (configuration instanceof SyncConfiguration) { SyncConfiguration syncConfig = (SyncConfiguration) configuration; invokeRemoveSession(syncConfig); } else { throw new IllegalArgumentException(WRONG_TYPE_OF_CONFIGURATION); } }
Source:
public static boolean isCompatibleName(String name) { return (TABLE_NAME_START.matches(name.charAt(0)) && TABLE_NAME_CHARS.matchesAllOf(name)); }

Target:
public static boolean isCompatibleName(String name) { return hiveCompatible.matcher(name).matches(); }
Source:
static AuthenticationResult createResult(final TokenCacheItem cacheItem) { if (cacheItem == null) { AuthenticationResult result = new AuthenticationResult(); result.mStatus = AuthenticationStatus.Failed; return result; } final AuthenticationResult result = new AuthenticationResult(cacheItem.getAccessToken(), cacheItem.getRefreshToken(), cacheItem.getExpiresOn(), cacheItem.getIsMultiResourceRefreshToken(), cacheItem.getUserInfo(), cacheItem.getTenantId(), cacheItem.getRawIdToken(), null); if (cacheItem.isExtendedLifetimeValid()) { result.setExtendedExpiresOn(cacheItem.getExtendedExpiresOn()); } return result; }

Target:
static AuthenticationResult createResult(final TokenCacheItem cacheItem) { if (cacheItem == null) { AuthenticationResult result = new AuthenticationResult(); result.mStatus = AuthenticationStatus.Failed; return result; } final AuthenticationResult result = new AuthenticationResult(cacheItem.getAccessToken(), cacheItem.getRefreshToken(), cacheItem.getExpiresOn(), cacheItem.getIsMultiResourceRefreshToken(), cacheItem.getUserInfo(), cacheItem.getTenantId(), cacheItem.getRawIdToken(), cacheItem.getExtendedExpiresOn()); return result; }
Source:
private void redirectToLoggedOnPage() { String token = placeManager.getCurrentPlaceRequest().getParameter(REDIRECT_PARAMETER_NAME, NameTokens.getOnLoginDefaultPage()); PlaceRequest placeRequest = new Builder().nameToken(token).build(); placeManager.revealPlace(placeRequest); }

Target:
private void redirectToLoggedOnPage() { String token = placeManager .getCurrentPlaceRequest() .getParameter(ParameterTokens.REDIRECT, NameTokens.getOnLoginDefaultPage()); PlaceRequest placeRequest = new Builder().nameToken(token).build(); placeManager.revealPlace(placeRequest); }
Source:
protected Subject createEvidenceSubject(final CallbackProperties properties, final X509Certificate certificate, final PublicKey publicKey) throws SAMLComponentBuilderException { final String evidenceSubject = properties.getEvidenceSubject(); String x509Name; if (NullChecker.isNullish(evidenceSubject)) { String userName = properties.getUsername(); if ((NullChecker.isNullish(userName) || !checkDistinguishedName(userName)) && null != certificate && null != certificate.getSubjectDN()) { userName = certificate.getSubjectDN().getName(); } x509Name = userName; } else { x509Name = evidenceSubject; } return createSubject(x509Name, publicKey); }

Target:
protected Subject createEvidenceSubject(final CallbackProperties properties, final X509Certificate certificate, final PublicKey publicKey) throws SAMLComponentBuilderException { final String evidenceSubject = properties.getEvidenceSubject(); String x509Name; if (NullChecker.isNullish(evidenceSubject)) { String userName = properties.getUsername(); if ((NullChecker.isNullish(userName) || !checkDistinguishedName(userName)) && null != certificate && null != certificate.getSubjectDN()) { userName = certificate.getSubjectDN().getName(); } x509Name = userName; } else { x509Name = evidenceSubject; } return OpenSAML2ComponentBuilder.getInstance().createSubject(x509Name, publicKey); }
Source:
public void addDeviceAuthorization(@Identification final String ownerOrganisationIdentification, @Identification final String organisationIdentification, @Identification final String deviceIdentification, @NotNull final DeviceFunctionGroup group) throws FunctionalException { if (group == DeviceFunctionGroup.OWNER) { throw new FunctionalException(FunctionalExceptionType.METHOD_NOT_ALLOWED_FOR_OWNER, ComponentType.WS_ADMIN, new OperationNotSupportedException("Owner not allowed to set via this method.")); } final Organisation organisation = this.findOrganisation(organisationIdentification); final Organisation ownerOrganisation = this.findOrganisation(ownerOrganisationIdentification); final Device device = this.findDevice(deviceIdentification); this.isAllowed(ownerOrganisation, device, DeviceFunction.SET_DEVICE_AUTHORIZATION); for (final DeviceAuthorization authorization : device.getAuthorizations()) { if (authorization.getOrganisation() == organisation && authorization.getFunctionGroup() == group) { LOGGER.info("Organisation already has authorization for group on device {}", new Object[] { organisationIdentification, deviceIdentification, group }); return; } } final DeviceAuthorization authorization = device.addAuthorization(organisation, group); this.deviceRepository.save(device); this.authorizationRepository.save(authorization); LOGGER.info("Organisation now has authorization for function group on device {}", organisationIdentification, deviceIdentification, group); }

Target:
public void addDeviceAuthorization(@Identification final String ownerOrganisationIdentification, @Identification final String organisationIdentification, @Identification final String deviceIdentification, @NotNull final DeviceFunctionGroup group) throws FunctionalException { if (group == DeviceFunctionGroup.OWNER) { throw new FunctionalException(FunctionalExceptionType.METHOD_NOT_ALLOWED_FOR_OWNER, ComponentType.WS_ADMIN, new OperationNotSupportedException("Owner not allowed to set via this method.")); } final Organisation organisation = this.findOrganisation(organisationIdentification); final Organisation ownerOrganisation = this.findOrganisation(ownerOrganisationIdentification); final Device device = this.findDevice(deviceIdentification); this.isAllowed(ownerOrganisation, device, DeviceFunction.SET_DEVICE_AUTHORIZATION); for (final DeviceAuthorization authorization : device.getAuthorizations()) { if (authorization.getOrganisation() == organisation && authorization.getFunctionGroup() == group) { LOGGER.info("Organisation already has authorization for group on device {}", organisationIdentification, group, deviceIdentification); return; } } final DeviceAuthorization authorization = device.addAuthorization(organisation, group); this.deviceRepository.save(device); this.authorizationRepository.save(authorization); LOGGER.info("Organisation now has authorization for function group on device {}", organisationIdentification, group, deviceIdentification); }
Source:
protected CqlSessionBuilder buildBuilder() { Assert.hasText(this.contactPoints, "At least one server is required"); CqlSessionBuilder sessionBuilder = setCqlSessionBuilderSupplier.get(); if (contactPointsWithPort == null) { StringUtils.commaDelimitedListToSet(this.contactPoints) .forEach(host -> sessionBuilder.addContactPoint(InetSocketAddress.createUnresolved(host, this.port))); } else { StringUtils.commaDelimitedListToSet(this.contactPointsWithPort).stream().map(HOST_PORT_SPLITTER::splitToList) .forEach(hostAndPort -> { if (hostAndPort.size() != 2) { throw new IllegalArgumentException( String.format("The provided contactPointsWithPort: %s has wrong format.", contactPointsWithPort)); } sessionBuilder.addContactPoint( InetSocketAddress.createUnresolved(hostAndPort.get(0), Integer.parseInt(hostAndPort.get(1)))); }); } if (StringUtils.hasText(this.username)) { sessionBuilder.withAuthCredentials(this.username, this.password); } if (StringUtils.hasText(this.localDatacenter)) { sessionBuilder.withLocalDatacenter(this.localDatacenter); } return this.sessionBuilderConfigurer != null ? this.sessionBuilderConfigurer.configure(sessionBuilder) : sessionBuilder; }

Target:
protected CqlSessionBuilder buildBuilder() { Collection<InetSocketAddress> addresses = contactPoints.apply(this.port); Assert.notEmpty(addresses, "At least one server is required"); CqlSessionBuilder sessionBuilder = setCqlSessionBuilderSupplier.get(); addresses.forEach(sessionBuilder::addContactPoint); if (StringUtils.hasText(this.username)) { sessionBuilder.withAuthCredentials(this.username, this.password); } if (StringUtils.hasText(this.localDatacenter)) { sessionBuilder.withLocalDatacenter(this.localDatacenter); } return this.sessionBuilderConfigurer != null ? this.sessionBuilderConfigurer.configure(sessionBuilder) : sessionBuilder; }
Source:
public String getUsage() { StringBuilder help = new StringBuilder(String.format("Options:%n")); for(String arg : getPrefixArguments()) { Argument argument = this.arguments.get(arg); help.append( String.format( " --%s%n" + " %s%n" + "%n", arg + (argument.getType() != Argument.Type.NO_ARGUMENT ? "=[" + argument.getMetavar() + "]" : ""), argument.getHelp() .replace("@CLI_PRM_DEFAULT@", argument.getDefaultValue() == null ? "" : argument.getDefaultValue()) .replace("@CLI_PRM_PATTERN@", argument.getMatcher().pattern()) ) ); } return doSubstitutions( String.format("%1$s%n%2$s%n%n%3$s%4$s%n", properties.getProperty( prefix + ".help.usage", (String) defaultProperties.get("help.usage") ), properties.getProperty( prefix + ".help.header", (String) defaultProperties.get("help.header") ), help.toString(), properties.getProperty( prefix + ".help.footer", (String) defaultProperties.get("help.footer") ) ) ); }

Target:
public String getUsage() { StringBuilder help = new StringBuilder(String.format("Options:%n")); for(String arg : getPrefixArguments()) { Argument argument = this.arguments.get(arg); help.append( String.format( " --%s%n" + " %s%n" + "%n", arg + (argument.getType() != Argument.Type.NO_ARGUMENT ? "=[" + argument.getMetavar() + "]" : ""), argument.getHelp() .replace("@CLI_PRM_DEFAULT@", StringUtils.defaultString(argument.getDefaultValue())) .replace("@CLI_PRM_PATTERN@", argument.getMatcher().pattern()) ) ); } String usage = String.format("%1$s%n%2$s%n%n%3$s%4$s%n", properties.getProperty( prefix + ".help.usage", (String) defaultProperties.get("help.usage") ), properties.getProperty( prefix + ".help.header", (String) defaultProperties.get("help.header") ), help.toString(), properties.getProperty( prefix + ".help.footer", (String) defaultProperties.get("help.footer") ) ); for (Map.Entry<String, String> substitution : substitutions.entrySet()) { usage = usage.replaceAll(substitution.getKey(), substitution.getValue()); } return usage; }
Source:
private void connectServiceRequestPerSecondSensor() { serverLatencyFeed = FunctionFeed.builder() .entity(this) .period(Duration.seconds(1)) .poll(new FunctionPollConfig<Double, Double>(REQUEST_PER_SECOND) .onException(Functions.constant(0.0)) .callable(new Callable<Double>() { public Double call() { Double currentRequestPerSecond = getAttribute(SERVER_REQUESTS) - lastTotalRequest; if (currentRequestPerSecond >= 0) { lastTotalRequest = getAttribute(SERVER_REQUESTS); return currentRequestPerSecond; } else { return getAttribute(SERVER_REQUESTS); } } })) .build(); }

Target:
private void connectServiceRequestPerSecondSensor() { requestPerSecondLatencyFeed = FunctionFeed.builder() .entity(this) .period(Duration.seconds(1)) .poll(new FunctionPollConfig<Double, Double>(REQUEST_PER_SECOND) .onException(Functions.constant(0.0)) .callable(new Callable<Double>() { public Double call() { Double currentRequestPerSecond = getAttribute(SERVER_REQUESTS) - lastTotalRequest; if (currentRequestPerSecond >= 0) { lastTotalRequest = getAttribute(SERVER_REQUESTS); return currentRequestPerSecond; } else { return getAttribute(SERVER_REQUESTS); } } })) .build(); }
Source:
private boolean entityDataStatement(Statement statement) { boolean knownPredicate = false; String predicate = statement.getPredicate().stringValue(); switch (predicate) { case SchemaDotOrg.VERSION: knownPredicate = true; revisionId = objectAsLiteral(statement); break; case SchemaDotOrg.DATE_MODIFIED: knownPredicate = true; lastModified = objectAsLiteral(statement); break; case SchemaDotOrg.SOFTWARE_VERSION: setFormatVersion(objectAsLiteral(statement).stringValue()); break; default: if (predicate.startsWith(Ontology.NAMESPACE)) { knownPredicate = true; } } if (knownPredicate) { dataStatements.add(new ImmutablePair<>( statement.getPredicate(), objectAsLiteral(statement))); } return false; }

Target:
private boolean entityDataStatement(Statement statement) { boolean knownPredicate = false; String predicate = statement.getPredicate().stringValue(); switch (predicate) { case SchemaDotOrg.VERSION: knownPredicate = true; revisionId = objectAsLiteral(statement); break; case SchemaDotOrg.DATE_MODIFIED: knownPredicate = true; lastModified = objectAsLiteral(statement); break; case SchemaDotOrg.SOFTWARE_VERSION: setFormatVersion(objectAsLiteral(statement).stringValue()); break; default: if (predicate.startsWith(Ontology.NAMESPACE)) { knownPredicate = true; } } if (knownPredicate) { dataStatements.add(new ImmutablePair<>( statement.getPredicate(), objectAsLiteral())); } return false; }
Source:
protected void createButtonsForButtonBar(Composite parent) { Button selectAllButton = createButton(parent, IDialogConstants.SELECT_ALL_ID, Messages.TraceControl_ImportDialog_SelectAll, true); selectAllButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { setFolderChildrenChecked(true); } }); Button deselectAllButton = createButton(parent, IDialogConstants.DESELECT_ALL_ID, Messages.TraceControl_ImportDialog_DeselectAll, true); deselectAllButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { setFolderChildrenChecked(false); } }); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); }

Target:
protected void createButtonsForButtonBar(Composite parent) { Button selectAllButton = createButton(parent, IDialogConstants.SELECT_ALL_ID, Messages.TraceControl_ImportDialog_SelectAll, true); selectAllButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { setFolderChildrenChecked(true); } }); Button deselectAllButton = createButton(parent, IDialogConstants.DESELECT_ALL_ID, Messages.TraceControl_ImportDialog_DeselectAll, true); deselectAllButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { setFolderChildrenChecked(false); } }); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); updateOKButtonEnablement(); }
Source:
public DependencyPair executePlanFragment(Map<Integer, List<VoltTable>> dependencies, long fragmentId, ParameterSet params, SystemProcedureExecutionContext context) { VoltTable dummy = new VoltTable(STATUS_SCHEMA); dummy.addRow(STATUS_OK); if (fragmentId == SysProcFragmentId.PF_swapTables) { if (context.isLowestSiteId()) { UndoAction undoSwapDR = new UndoAction() { @Override public void release() @Override public void undo() { VoltDB.instance().swapTables((String) params.getParam(0), (String) params.getParam(1)); } }; registerUndoAction(undoSwapDR); VoltDB.instance().swapTables((String) params.getParam(0), (String) params.getParam(1)); SysprocFaultInjection.check(FaultType.SwapTablesCoreFragment); } return new TableDependencyPair(SysProcFragmentId.PF_swapTables, dummy); } else if (fragmentId == SysProcFragmentId.PF_swapTablesAggregate) { return new TableDependencyPair(SysProcFragmentId.PF_swapTablesAggregate, VoltTableUtil.unionTables(dependencies.get(SysProcFragmentId.PF_swapTables))); } assert false; return null; }

Target:
public DependencyPair executePlanFragment(Map<Integer, List<VoltTable>> dependencies, long fragmentId, ParameterSet params, SystemProcedureExecutionContext context) { VoltTable dummy = new VoltTable(STATUS_SCHEMA); dummy.addRow(STATUS_OK); if (fragmentId == SysProcFragmentId.PF_swapTables) { if (context.isLowestSiteId()) { UndoAction undoSwapDR = new UndoAction() { @Override public void release() @Override public void undo() { VoltDB.instance().swapTables((String) params.getParam(0), (String) params.getParam(1)); } }; registerUndoAction(undoSwapDR); VoltDB.instance().swapTables((String) params.getParam(0), (String) params.getParam(1)); } return new TableDependencyPair(SysProcFragmentId.PF_swapTables, dummy); } else if (fragmentId == SysProcFragmentId.PF_swapTablesAggregate) { return new TableDependencyPair(SysProcFragmentId.PF_swapTablesAggregate, VoltTableUtil.unionTables(dependencies.get(SysProcFragmentId.PF_swapTables))); } assert false; return null; }
Source:
public @NonNull List<@NonNull IDataChartDescriptor<Object, ?>> getDataDescriptors() { return new ArrayList<>(); }

Target:
public @NonNull List<@NonNull IDataChartDescriptor<Object, ?>> getDataDescriptors() { return Collections.EMPTY_LIST; }
Source:
private static ArrayList<String> parse(String str) { ArrayList<String> resArray = new ArrayList<String>(); StringBuilder builder = new StringBuilder(); for (int i = 0; i < str.length(); ++i) { if (str.charAt(i) == ',') { resArray.add(builder.toString()); builder = new StringBuilder(); } else { builder.append(str.charAt(i)); } } return resArray; }

Target:
private static String[] parse(String str) { String[] resArray = str.split(","); return resArray; }
Source:
public void deactivate() { logger.debug("neohub deactivated"); }

Target:
public void deactivate() { }
Source:
public List<Result> execute(IotasEvent input) { List<Result> results = new ArrayList<>(); for (ActionRuntime action : actions) { results.add(action.execute(input)); } return results; }

Target:
public List<Result> execute(IotasEvent input) { LOG.debug("execute invoked with IotasEvent {}", input); List<Result> results = new ArrayList<>(); for (ActionRuntime action : actions) { Result result = action.execute(input); LOG.debug("Applied action {}, Result {}", action, result); results.add(result); } LOG.debug("Returning results {}", results); return results; }
Source:
public void sendSerialDataAsync(XBee16BitAddress address, byte[] data) throws XBeeException { if (address == null) throw new NullPointerException("Address cannot be null"); if (data == null) throw new NullPointerException("Data cannot be null"); if (!connectionInterface.isOpen()) throw new InterfaceNotOpenException(); XBeePacket xbeePacket; logger.info(toString() + "Sending serial data asynchronously to >> {}.", address, HexUtils.prettyHexString(data)); switch (getXBeeProtocol()) { case RAW_802_15_4: xbeePacket = new TX16Packet(getNextFrameID(), address, XBeeTransmitOptions.NONE, data); try { sendXBeePacketAsync(xbeePacket); } catch (IOException e) { throw new XBeeException("Error writing in the communication interface.", e); } break; default: xbeePacket = new TransmitPacket(getNextFrameID(), XBee64BitAddress.UNKNOWN_ADDRESS, address, 0, XBeeTransmitOptions.NONE, data); try { sendXBeePacketAsync(xbeePacket); } catch (IOException e) { throw new XBeeException("Error writing in the communication interface.", e); } } }

Target:
public void sendSerialDataAsync(XBee16BitAddress address, byte[] data) throws XBeeException { if (address == null) throw new NullPointerException("Address cannot be null"); if (data == null) throw new NullPointerException("Data cannot be null"); if (!connectionInterface.isOpen()) throw new InterfaceNotOpenException(); XBeePacket xbeePacket; logger.info(toString() + "Sending serial data asynchronously to >> {}.", address, HexUtils.prettyHexString(data)); switch (getXBeeProtocol()) { case RAW_802_15_4: xbeePacket = new TX16Packet(getNextFrameID(), address, XBeeTransmitOptions.NONE, data); break; default: xbeePacket = new TransmitPacket(getNextFrameID(), XBee64BitAddress.UNKNOWN_ADDRESS, address, 0, XBeeTransmitOptions.NONE, data); } sendAndCheckXBeePacket(xbeePacket, true); }
Source:
static void writePubKeyContentsIntoBuffer(PublicKey publicKey, KeyType innerKeyType, Buffer<?> buf) { Certificate<PublicKey> certificate = toCertificate(publicKey); buf.putString(certificate.getNonce()); innerKeyType.writePubKeyContentsIntoBuffer(certificate.getKey(), buf); buf.putUInt64(certificate.getSerial()) .putUInt32(certificate.getType()) .putString(certificate.getId()) .putString(packList(certificate.getValidPrincipals())) .putUInt64(epochFromDate(certificate.getValidAfter())) .putUInt64(epochFromDate(certificate.getValidBefore())) .putString(packMap(certificate.getCritOptions())) .putString(packMap(certificate.getExtensions())) .putString("") .putString(certificate.getSignatureKey()) .putString(certificate.getSignature()); }

Target:
static void writePubKeyContentsIntoBuffer(PublicKey publicKey, KeyType innerKeyType, Buffer<?> buf) { Certificate<PublicKey> certificate = toCertificate(publicKey); buf.putBytes(certificate.getNonce()); innerKeyType.writePubKeyContentsIntoBuffer(certificate.getKey(), buf); buf.putUInt64(certificate.getSerial()) .putUInt32(certificate.getType()) .putString(certificate.getId()) .putBytes(packList(certificate.getValidPrincipals())) .putUInt64(epochFromDate(certificate.getValidAfter())) .putUInt64(epochFromDate(certificate.getValidBefore())) .putBytes(packMap(certificate.getCritOptions())) .putBytes(packMap(certificate.getExtensions())) .putString("") .putBytes(certificate.getSignatureKey()) .putBytes(certificate.getSignature()); }
Source:
private String readIdentifierWithSchema2(String s) { schemaName = s; s = readColumnIdentifier(); if (currentTokenType == DOT) { if (equalsToken(schemaName, database.getShortName()) || database.getIgnoreCatalogs()) { read(); schemaName = s; s = readColumnIdentifier(); } } return s; }

Target:
private String readIdentifierWithSchema2(String s) { schemaName = s; if (database.getMode().allowEmptySchemaValuesAsDefaultSchema && readIf(DOT)) { if (equalsToken(schemaName, database.getShortName()) || database.getIgnoreCatalogs()) { schemaName = session.getCurrentSchemaName(); s = readColumnIdentifier(); } } else { s = readColumnIdentifier(); if (currentTokenType == DOT) { if (equalsToken(schemaName, database.getShortName()) || database.getIgnoreCatalogs()) { read(); schemaName = s; s = readColumnIdentifier(); } } } return s; }
Source:
public void doRun() throws Exception { long iteration = 0; while (!context.isStopped()) { int partitionId = nextPartitionId(); ICompletableFuture f = invoke(partitionId); latency.started(); if (syncInvocation) { if (syncFrequency == 1) { f.get(); } else { if (iteration > 0 && iteration % syncFrequency == 0) { for (ICompletableFuture future : futureList) { future.get(); } futureList.clear(); } else { futureList.add(f); } } } else { f.andThen(this); } latency.done(); if (iteration % logFrequency == 0) { log.info(Thread.currentThread().getName() + " At iteration: " + iteration); } if (iteration % performanceUpdateFrequency == 0) { if (syncInvocation) { operations.addAndGet(performanceUpdateFrequency); } } iteration++; } operations.addAndGet(iteration % performanceUpdateFrequency); }

Target:
public void doRun() throws Exception { long iteration = 0; while (!context.isStopped()) { int partitionId = nextPartitionId(); ICompletableFuture f = invoke(partitionId); latency.started(); if (syncInvocation) { if (syncFrequency == 1) { f.get(); } else { if (iteration > 0 && iteration % syncFrequency == 0) { for (ICompletableFuture future : futureList) { future.get(); } futureList.clear(); } else { futureList.add(f); } } } else { f.andThen(this); } latency.done(); iteration++; if (iteration % logFrequency == 0) { log.info(Thread.currentThread().getName() + " At iteration: " + iteration); } if (iteration % performanceUpdateFrequency == 0) { if (syncInvocation) { operations.addAndGet(performanceUpdateFrequency); } } } operations.addAndGet(iteration % performanceUpdateFrequency); }
Source:
public String getDescription() { return ""; }

Target:
public String getDescription() { return "Spás ar iarraidh"; }
Source:
public LoadQueuePeon giveMePeon(ImmutableDruidServer server) { if ("http".equalsIgnoreCase(config.getLoadQueuePeonType())) { return new HttpLoadQueuePeon(server.getURL(), jsonMapper, httpClient, config, peonExec, callbackExec); } else { return new CuratorLoadQueuePeonV2( curator, ZKPaths.makePath(zkPaths.getLoadQueuePath(), server.getName()), jsonMapper, Executors.newFixedThreadPool( config.getCreateZkNodeNumThreads(), new ThreadFactoryBuilder().setNameFormat( "CuratorLoadQueuePeon--%d").build() ), callbackExec, config ); } }

Target:
public LoadQueuePeon giveMePeon(ImmutableDruidServer server) { if ("http".equalsIgnoreCase(config.getLoadQueuePeonType())) { return new HttpLoadQueuePeon(server.getURL(), jsonMapper, httpClient, config, peonExec, callbackExec); } else { return new CuratorLoadQueuePeon( curator, ZKPaths.makePath(zkPaths.getLoadQueuePath(), server.getName()), jsonMapper, peonExec, callbackExec, config ); } }
Source:
public void responseToDeadVertexAndUpdateEdges(BubbleMergeMessage incomingMsg) { VertexValueWritable vertex = getVertexValue(); EDGETYPE meToNeighborDir = EDGETYPE.fromByte(incomingMsg.getFlag()); EDGETYPE neighborToMeDir = meToNeighborDir.mirror(); if (vertex.getEdges(neighborToMeDir).contains(incomingMsg.getSourceVertexId())) { vertex.getEdges(neighborToMeDir).remove(incomingMsg.getSourceVertexId()); } }

Target:
public void responseToDeadVertexAndUpdateEdges(BubbleMergeMessage incomingMsg) { VertexValueWritable vertex = getVertexValue(); EDGETYPE meToNeighborDir = EDGETYPE.fromByte(incomingMsg.getFlag()); EDGETYPE neighborToMeDir = meToNeighborDir.mirror(); if (vertex.getEdges(neighborToMeDir).contains(incomingMsg.getSourceVertexId())) { vertex.getEdges(neighborToMeDir).remove(incomingMsg.getSourceVertexId()); } else { throw new IllegalStateException("Tried to remove an edge that doesn't exist! I am " + vertex + " incomingMsg is " + incomingMsg); } }
Source:
public void unsupportedType() throws Exception { context.checking(new Expectations() {{ oneOf(catalog).isSupported("SOMETHING_OTHER"); will(returnValue(false)); oneOf(validatorContext).getDefaultConstraintMessageTemplate(); oneOf(validatorContext).buildConstraintViolationWithTemplate(with(any(String.class))); }}); boolean isValid = validator.isValid("SOMETHING_OTHER", validatorContext); assertFalse(isValid); }

Target:
public void unsupportedType() throws Exception { context.checking(new Expectations() {{ oneOf(catalog).isSupported("SOMETHING_OTHER"); will(returnValue(false)); oneOf(validatorContext).getDefaultConstraintMessageTemplate(); will(returnValue("unsupported operation")); oneOf(validatorContext).buildConstraintViolationWithTemplate(with("unsupported operation")); }}); boolean isValid = validator.isValid("SOMETHING_OTHER", validatorContext); assertFalse(isValid); }
Source:
public Class<?> getCellClass(int column) { EditedStyleItem item = myAttributes.get(myRowIndex); String name = item.getName(); AttributeDefinition attrDefinition = myAttributeDefinitions.getAttrDefByName(name); ResourceValue resourceValue = mySelectedStyle.getConfiguration().getResourceResolver().resolveResValue(item.getItemResourceValue()); if (resourceValue == null) { LOG.error("Unable to resolve " + item.getValue()); return null; } ResourceType urlType = resourceValue.getResourceType(); String value = resourceValue.getValue(); if (value == null) { if (urlType == ResourceType.STYLE && column == 1) { return ThemeEditorStyle.class; } return String.class; } if (urlType == ResourceType.DRAWABLE) { return DrawableDomElement.class; } if (urlType == ResourceType.COLOR || (value.startsWith("#") && ThemeEditorUtils.acceptsFormat(attrDefinition, AttributeFormat.Color))) { return Color.class; } if (column == 1) { if (urlType == ResourceType.INTEGER || ThemeEditorUtils.acceptsFormat(attrDefinition, AttributeFormat.Integer)) { return Integer.class; } if (urlType == ResourceType.BOOL || ((value.equals("true") || value.equals("false")) && ThemeEditorUtils.acceptsFormat(attrDefinition, AttributeFormat.Boolean))) { return Boolean.class; } } return String.class; }

Target:
public Class<?> getCellClass(int column) { EditedStyleItem item = myAttributes.get(myRowIndex); String name = item.getName(); AttributeDefinition attrDefinition = myAttributeDefinitions.getAttrDefByName(name); ResourceValue resourceValue = mySelectedStyle.getConfiguration().getResourceResolver().resolveResValue(item.getItemResourceValue()); if (resourceValue == null) { LOG.error("Unable to resolve " + item.getValue()); return null; } ResourceType urlType = resourceValue.getResourceType(); String value = resourceValue.getValue(); if (urlType == ResourceType.DRAWABLE) { return DrawableDomElement.class; } if (urlType == ResourceType.COLOR || (value != null && value.startsWith("#") && ThemeEditorUtils.acceptsFormat(attrDefinition, AttributeFormat.Color))) { return Color.class; } if (column == 1) { if (urlType == ResourceType.STYLE) { return ThemeEditorStyle.class; } if (urlType == ResourceType.INTEGER || ThemeEditorUtils.acceptsFormat(attrDefinition, AttributeFormat.Integer)) { return Integer.class; } if (urlType == ResourceType.BOOL || (("true".equals(value) || "false".equals(value)) && ThemeEditorUtils.acceptsFormat(attrDefinition, AttributeFormat.Boolean))) { return Boolean.class; } } return String.class; }
Source:
public CohortDefinition getCodedObsSearchAdvanced() { CodedObsCohortDefinition cd = new CodedObsCohortDefinition(); cd.addParameter(new Parameter("timeModifier", "reporting.parameter.timeModifier", CodedObsCohortDefinition.TimeModifier.class)); cd.addParameter(new Parameter("question", "reporting.parameter.question", Concept.class)); cd.addParameter(new Parameter("onOrAfter", "reporting.parameter.startDate", Date.class)); cd.addParameter(new Parameter("onOrBefore", "reporting.parameter.endDate", Date.class)); return cd; }

Target:
public CohortDefinition getCodedObsSearchAdvanced() { CodedObsCohortDefinition cd = new CodedObsCohortDefinition(); cd.addParameter(new Parameter("timeModifier", "reporting.parameter.timeModifier", CodedObsCohortDefinition.TimeModifier.class)); cd.addParameter(new Parameter("question", "reporting.parameter.question", Concept.class)); cd.addParameter(new Parameter("onOrAfter", "reporting.parameter.onOrAfter", Date.class)); cd.addParameter(new Parameter("onOrBefore", "reporting.parameter.onOrBefore", Date.class)); return cd; }
Source:
public <C, R> void dispatch(CommandMessage<C> command, CommandCallback<? super C, R> callback) { CommandMessage<? extends C> interceptedCommand = intercept(command); MessageMonitor.MonitorCallback messageMonitorCallback = messageMonitor.onMessageIngested(interceptedCommand); Member destination = commandRouter.findDestination(interceptedCommand) .orElseThrow(() -> { NoHandlerForCommandException exception = new NoHandlerForCommandException( "No node known to accept " + interceptedCommand.getCommandName()); messageMonitorCallback.reportFailure(exception); return exception; }); try { connector.send(destination, interceptedCommand, new MonitorAwareCallback<>(callback, messageMonitorCallback)); } catch (Exception e) { destination.suspect(); throw new CommandDispatchException(DISPATCH_ERROR_MESSAGE + ": " + e.getMessage(), e); } }

Target:
public <C, R> void dispatch(CommandMessage<C> command, CommandCallback<? super C, R> callback) { CommandMessage<? extends C> interceptedCommand = intercept(command); MessageMonitor.MonitorCallback messageMonitorCallback = messageMonitor.onMessageIngested(interceptedCommand); Member destination = commandRouter.findDestination(interceptedCommand) .orElseThrow(() -> { NoHandlerForCommandException exception = new NoHandlerForCommandException( format("No node known to accept [%s]", interceptedCommand.getCommandName())); messageMonitorCallback.reportFailure(exception); return exception; }); try { connector.send(destination, interceptedCommand, new MonitorAwareCallback<>(callback, messageMonitorCallback)); } catch (Exception e) { messageMonitorCallback.reportFailure(e); destination.suspect(); throw new CommandDispatchException(DISPATCH_ERROR_MESSAGE + ": " + e.getMessage(), e); } }
Source:
public @NonNull Iterable<@NonNull TmfAnalysisRequirement> getAnalysisRequirements() { Set<@NonNull TmfAnalysisRequirement> requirements = fAnalysisRequirements; if (requirements == null) { LttngUstTrace trace = getTrace(); ILttngUstEventLayout layout = ILttngUstEventLayout.DEFAULT_LAYOUT; if (trace != null) { layout = trace.getEventLayout(); } requirements = ImmutableSet.of(new LttngUstCallStackAnalysisRequirement(layout)); fAnalysisRequirements = requirements; } return requirements; }

Target:
public @NonNull Iterable<@NonNull TmfAnalysisRequirement> getAnalysisRequirements() { Set<@NonNull TmfAnalysisRequirement> requirements = fAnalysisRequirements; if (requirements == null) { LttngUstTrace trace = getTrace(); ILttngUstEventLayout layout = (trace != null) ? trace.getEventLayout() : ILttngUstEventLayout.DEFAULT_LAYOUT; requirements = ImmutableSet.of(new LttngUstCallStackAnalysisRequirement(layout)); fAnalysisRequirements = requirements; } return requirements; }
Source:
public void bindHeaderView(View view, Recipient recipient) { RecipientTokenHolder holder = (RecipientTokenHolder) view.getTag(); holder.setShowAsHeader(true); holder.headerName.setText(recipient.getNameOrUnknown(context)); if (!TextUtils.isEmpty(recipient.addressLabel)) { holder.headerAddressLabel.setText(recipient.addressLabel); holder.headerAddressLabel.setVisibility(View.VISIBLE); } else { holder.headerAddressLabel.setVisibility(View.GONE); } RecipientAdapter.setContactPhotoOrPlaceholder(context, holder.headerPhoto, recipient); holder.headerPhoto.assignContactUri(recipient.getContactLookupUri()); holder.headerName.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { String recipentEmail = listener.getRecipentEmail(currentRecipient); copy_to_ClipBoard(getContext(),recipentEmail); Toast toast = Toast.makeText(context, "Address Copied to Clip Board", Toast.LENGTH_LONG); toast.show(); listener.setRecipientPopupVisibileFalse(currentRecipient); } }); holder.headerRemove.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { listener.onRecipientRemove(currentRecipient); } }); }

Target:
public void bindHeaderView(View view, Recipient recipient) { RecipientTokenHolder holder = (RecipientTokenHolder) view.getTag(); holder.setShowAsHeader(true); holder.headerName.setText(recipient.getNameOrUnknown(context)); if (!TextUtils.isEmpty(recipient.addressLabel)) { holder.headerAddressLabel.setText(recipient.addressLabel); holder.headerAddressLabel.setVisibility(View.VISIBLE); } else { holder.headerAddressLabel.setVisibility(View.GONE); } RecipientAdapter.setContactPhotoOrPlaceholder(context, holder.headerPhoto, recipient); holder.headerPhoto.assignContactUri(recipient.getContactLookupUri()); holder.copyButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { String recipentEmail = listener.getRecipentEmail(currentRecipient); copy_to_ClipBoard(context, recipentEmail); Toast.makeText(context, R.string.address_copied, Toast.LENGTH_LONG).show(); listener.setRecipientPopupVisibileFalse(currentRecipient); } }); holder.headerRemove.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { listener.onRecipientRemove(currentRecipient); } }); }
Source:
public final boolean doesProvideNewPage() { if (provision == null) { throw new IllegalStateException("Page instance not yet resolved"); } return getProvision().doesProvideNewPage(); }

Target:
public final boolean doesProvideNewPage() { return getProvision().doesProvideNewPage(); }
Source:
public void test() throws IOException { boolean soundEnabled = State.isSoundEnabled(); clickOn(stage, MouseButton.PRIMARY); sleep(SHORT); mainMenu(1); settings(1); assertFalse(State.isSoundEnabled() == soundEnabled); settings(1); assertTrue(State.isSoundEnabled() == soundEnabled); settings(0); mainMenu(5); typeName(); mainMenu(0); sleep(COUNTDOWN); keyboard(KeyCode.ESCAPE); pausePopup(0); sleep(COUNTDOWN); moveAround(); keyboard(KeyCode.ESCAPE); pausePopup(1); mainMenu(3); loadMenu(0); mainMenu(3); loadMenu(2); loadMenu(1); mainMenu(0); playerDies(); sleep(COUNTDOWN); deathPopup(0); playerDies(); sleep(COUNTDOWN); deathPopup(1); mainMenu(2); outputEventLog(); }

Target:
public void test() throws IOException { clickOn(stage, MouseButton.PRIMARY); sleep(SHORT); mainMenu(MAIN_SETTINGS); clickAllSettings(); mainMenu(MAIN_TEXTFIELD); typeName(); mainMenu(MAIN_START); sleep(COUNTDOWN); keyboard(KeyCode.ESCAPE); pausePopup(PAUSE_RESUME); sleep(COUNTDOWN); moveAround(); keyboard(KeyCode.ESCAPE); pausePopup(PAUSE_TOMAIN); mainMenu(MAIN_LOADGAME); loadMenu(LOAD_BACK); mainMenu(MAIN_LOADGAME); loadMenu(LOAD_NAMECONTAINER); loadMenu(LOAD_START); mainMenu(MAIN_START); sleep(COUNTDOWN); playerDies(); deathPopup(DEATH_RETRY); sleep(COUNTDOWN); playerDies(); deathPopup(DEATH_TOMAIN); mainMenu(MAIN_QUIT); outputEventLog(); }
Source:
public CompletionStage<EntryVersionsMap> createNewVersionsAndCheckForWriteSkews(VersionGenerator versionGenerator, TxInvocationContext context, VersionedPrepareCommand prepareCommand) { if (configuration.persistence().usingStores()) { return CompletableFutures.supplyAsyncAndContinue(CompletableFuture.supplyAsync(() -> totalOrder ? totalOrderCreateNewVersionsAndCheckForWriteSkews(versionGenerator, context, prepareCommand) : clusteredCreateNewVersionsAndCheckForWriteSkews(versionGenerator, context, prepareCommand), persistenceExecutor), cpuExecutor, prepareCommand); } else { return CompletableFuture.completedFuture(totalOrder ? totalOrderCreateNewVersionsAndCheckForWriteSkews(versionGenerator, context, prepareCommand) : clusteredCreateNewVersionsAndCheckForWriteSkews(versionGenerator, context, prepareCommand)); } }

Target:
public CompletionStage<EntryVersionsMap> createNewVersionsAndCheckForWriteSkews(VersionGenerator versionGenerator, TxInvocationContext context, VersionedPrepareCommand prepareCommand) { if (configuration.persistence().usingStores()) { CompletableFuture<EntryVersionsMap> cf = CompletableFuture.supplyAsync(() -> createNewVersionsMap(versionGenerator, context, prepareCommand), persistenceExecutor); return CompletionStages.continueOnExecutor(cf, cpuExecutor, prepareCommand); } return CompletableFuture.completedFuture(createNewVersionsMap(versionGenerator, context, prepareCommand)); }