auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static <P extends VdcActionParametersBase> CommandBase<P> CreateCommand(VdcActionType action, P parameters) { injector.bindBeanManager(); try { Constructor<CommandBase<? extends VdcActionParametersBase>> constructor = findCommandConstructor(getCommandClass(action.name(), CommandSuffix), parameters.getClass()); CommandBase<P> cmd = (CommandBase<P>) constructor.newInstance(new Object[] { parameters }); injector.inject(cmd); return cmd; } catch (Exception e) { log.error( "CommandsFactory [parameter: VdcActionParametersBase]: Failed to get type information using " + "reflection for Action: " + action, e); return null; } }

Target:
public static <P extends VdcActionParametersBase> CommandBase<P> CreateCommand(VdcActionType action, P parameters) { try { Constructor<CommandBase<? extends VdcActionParametersBase>> constructor = findCommandConstructor(getCommandClass(action.name(), CommandSuffix), parameters.getClass()); CommandBase<P> cmd = (CommandBase<P>) constructor.newInstance(new Object[] { parameters }); injector.inject(cmd); return cmd; } catch (Exception e) { log.error( "CommandsFactory [parameter: VdcActionParametersBase]: Failed to get type information using " + "reflection for Action: " + action, e); return null; } }
Source:
public void obtain_date_in_past_before_specified_number_of_years() { final Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.YEAR, -1); final LocalDate today = LocalDates.now(); final LocalDate yearAgo = LocalDates.minusYears(today, 1); assertEquals(calendar.get(Calendar.YEAR), yearAgo.getYear()); assertEquals(calendar.get(Calendar.MONTH) + 1, yearAgo.getMonthValue()); assertEquals(calendar.get(Calendar.DAY_OF_MONTH), yearAgo.getDay()); }

Target:
public void obtain_date_in_past_before_specified_number_of_years() { final int yearsToSubstract = 2; final LocalDate localDate = LocalDates.of(year, month, day); final LocalDate fewYearsAgo = LocalDates.minusYears(localDate, yearsToSubstract); assertTrue(year - yearsToSubstract == fewYearsAgo.getYear()); assertTrue(month == fewYearsAgo.getMonth()); assertTrue(day == fewYearsAgo.getDay()); }
Source:
public void test() { JavaCheckVerifier.verify("src/test/files/checks/security/CookieHttpOnlyCheck.java", new CookieHttpOnlyCheck()); }

Target:
public void test() { JavaCheckVerifier.verify("src/test/files/checks/security/CookieHttpOnlyCheck.java", new CookieHttpOnlyCheck()); JavaCheckVerifier.verifyNoIssueWithoutSemantic("src/test/files/checks/security/CookieHttpOnlyCheck.java", new CookieHttpOnlyCheck()); }
Source:
public ScoreWithSource() { this(null, null); }

Target:
ScoreWithSource() { this(null, null); }
Source:
public Operator createOperator(DriverContext driverContext) { checkState(!closed, "Factory is already closed"); OperatorContext operatorContext = driverContext.addOperatorContext(operatorId, planNodeId, HashBuilderOperator.class.getSimpleName()); return new SpatialJoinOperator(operatorContext, getTypes(), probeTypes, probeOutputChannels, probeGeometryChannel, pagesSpatialIndexFactory.createPagesSpatialIndex(), spatialRelationshipTest); }

Target:
public Operator createOperator(DriverContext driverContext) { checkState(!closed, "Factory is already closed"); OperatorContext operatorContext = driverContext.addOperatorContext( operatorId, planNodeId, SpatialJoinOperator.class.getSimpleName()); return new SpatialJoinOperator( operatorContext, getTypes(), probeTypes, probeOutputChannels, probeGeometryChannel, pagesSpatialIndexFactory); }
Source:
int getChildCount() { return getChildren().size(); }

Target:
int getChildCount() { ComponentModel model = getComponentModel(); return (model.getChildren() == null ? 0 : model.getChildren().size()); }
Source:
public void deleteRoles(List<Role> roles) { EKBCommit commit = getEKBCommit(); preparePersistenceAccess(); for (Role role : roles) { List<Role> result = queryService.queryByString(Role.class, "name:\"" + role.getName() + "\""); if (result.size() == 0) { LOGGER.warn("User {1} does not exist.", role.getName()); } else { commit.addDelete(role); } } persistService.commit(commit); revokePersistenceAccess(); }

Target:
public void deleteRoles(List<Role> roles) { EKBCommit commit = getEKBCommit(); preparePersistenceAccess(); for (Role role : roles) { List<Role> result = queryService.query(Role.class, QueryRequest.query("name", role.getName())); if (result.size() == 0) { LOGGER.warn("User {1} does not exist.", role.getName()); } else { commit.addDelete(role); } } persistService.commit(commit); revokePersistenceAccess(); }
Source:
public UserDetailsService userDetailsService() { return new InMemoryUserDetailsManager( User.builder() .passwordEncoder(it-> PasswordEncoderFactories.createDelegatingPasswordEncoder().encode(it)) .username("user") .password("password") .roles("USER") .build() ); }

Target:
public UserDetailsService userDetailsService() { return new InMemoryUserDetailsManager( User.withDefaultPasswordEncoder() .username("user") .password("password") .roles("USER") .build() ); }
Source:
void doOnProcessorChange(List<String> processors) { List<String> currentProcessorIds = getActualProcessorIds(processors); Set<String> uniqueProcessorIds = new HashSet<String>(currentProcessorIds); if (currentProcessorIds.size() != uniqueProcessorIds.size()) { LOG.info("Processors: has duplicates. Not generating job model.", currentProcessorIds); return; } JobModel jobModel = generateNewJobModel(currentProcessorIds); JobModelManager.createChangeLogStreams(new StorageConfig(config), jobModel.maxChangeLogStreamPartitions); String currentJMVersion = zkUtils.getJobModelVersion(); String nextJMVersion; if (currentJMVersion == null) { nextJMVersion = "1"; } else { nextJMVersion = Integer.toString(Integer.valueOf(currentJMVersion) + 1); } LOG.info("pid=" + processorId + "Generated new Job Model. Version = " + nextJMVersion); zkUtils.publishJobModel(nextJMVersion, jobModel); barrier.create(nextJMVersion, currentProcessorIds); zkUtils.publishJobModelVersion(currentJMVersion, nextJMVersion); LOG.info("pid=" + processorId + "Published new Job Model. Version = " + nextJMVersion); debounceTimer.scheduleAfterDebounceTime(ON_ZK_CLEANUP, 0, () -> zkUtils.cleanupZK(NUM_VERSIONS_TO_LEAVE)); }

Target:
void doOnProcessorChange(List<String> processors) { List<String> currentProcessorIds = getActualProcessorIds(processors); Set<String> uniqueProcessorIds = new HashSet<String>(currentProcessorIds); if (currentProcessorIds.size() != uniqueProcessorIds.size()) { LOG.info("Processors: has duplicates. Not generating job model.", currentProcessorIds); return; } JobModel jobModel = generateNewJobModel(currentProcessorIds); if (!hasCreatedChangeLogStreams) { JobModelManager.createChangeLogStreams(new StorageConfig(config), jobModel.maxChangeLogStreamPartitions); hasCreatedChangeLogStreams = true; } String currentJMVersion = zkUtils.getJobModelVersion(); String nextJMVersion; if (currentJMVersion == null) { nextJMVersion = "1"; } else { nextJMVersion = Integer.toString(Integer.valueOf(currentJMVersion) + 1); } LOG.info("pid=" + processorId + "Generated new Job Model. Version = " + nextJMVersion); zkUtils.publishJobModel(nextJMVersion, jobModel); barrier.create(nextJMVersion, currentProcessorIds); zkUtils.publishJobModelVersion(currentJMVersion, nextJMVersion); LOG.info("pid=" + processorId + "Published new Job Model. Version = " + nextJMVersion); debounceTimer.scheduleAfterDebounceTime(ON_ZK_CLEANUP, 0, () -> zkUtils.cleanupZK(NUM_VERSIONS_TO_LEAVE)); }
Source:
public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException { SubMonitor subMon = SubMonitor.convert(monitor, Messages.LoadTargetOperation_mainTaskName, 40); try { subMon.checkCanceled(); if (!fTarget.isResolved()) { fTarget.resolve(subMon.split(20)); } subMon.checkCanceled(); subMon.setWorkRemaining(20); PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager(); ((TargetPlatformService) TargetPlatformService.getDefault()).setWorkspaceTargetDefinition(fTarget); String memento = fTarget.getHandle().getMemento(); if (fNone) { memento = ICoreConstants.NO_TARGET; } if (memento.equals(preferences.getString(ICoreConstants.WORKSPACE_TARGET_HANDLE))) { preferences.setValue(ICoreConstants.WORKSPACE_TARGET_HANDLE, ""); } preferences.setValue(ICoreConstants.WORKSPACE_TARGET_HANDLE, memento); clearDeprecatedPreferences(preferences, subMon.split(3)); loadJRE(subMon.split(3)); PDECore.getDefault().getPreferencesManager().savePluginPreferences(); resetPlatform(subMon.split(14)); } catch (OperationCanceledException e) { return Status.CANCEL_STATUS; } finally { if (monitor != null) { monitor.done(); } } return Status.OK_STATUS; }

Target:
public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException { try { SubMonitor subMon = SubMonitor.convert(monitor, Messages.LoadTargetOperation_mainTaskName, 40) .checkCanceled(); if (!fTarget.isResolved()) { fTarget.resolve(subMon.split(20)); } subMon.checkCanceled(); subMon.setWorkRemaining(20); PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager(); ((TargetPlatformService) TargetPlatformService.getDefault()).setWorkspaceTargetDefinition(fTarget); String memento = fTarget.getHandle().getMemento(); if (fNone) { memento = ICoreConstants.NO_TARGET; } if (memento.equals(preferences.getString(ICoreConstants.WORKSPACE_TARGET_HANDLE))) { preferences.setValue(ICoreConstants.WORKSPACE_TARGET_HANDLE, ""); } preferences.setValue(ICoreConstants.WORKSPACE_TARGET_HANDLE, memento); clearDeprecatedPreferences(preferences, subMon.split(3)); loadJRE(subMon.split(3)); PDECore.getDefault().getPreferencesManager().savePluginPreferences(); resetPlatform(subMon.split(14)); } catch (OperationCanceledException e) { return Status.CANCEL_STATUS; } return Status.OK_STATUS; }
Source:
public ByteUiColumn( final List<HeaderMetaData> headerMetaData, final double width, final boolean isResizable, final boolean isVisible, final GuidedDecisionTablePresenter.Access access, final TextBoxByteSingletonDOMElementFactory factory ) { super( headerMetaData, new CellRenderer<Byte, NumericByteTextBox, TextBoxDOMElement<Byte, NumericByteTextBox>>( factory ) { @Override protected void doRenderCellContent( final Text t, final Byte value, final GridBodyCellRenderContext context ) { t.setText( value.toString() ); } }, width, isResizable, isVisible, access, factory ); }

Target:
public ByteUiColumn( final List<HeaderMetaData> headerMetaData, final double width, final boolean isResizable, final boolean isVisible, final GuidedDecisionTablePresenter.Access access, final TextBoxByteSingletonDOMElementFactory factory ) { super( headerMetaData, new CellRenderer<Byte, NumericByteTextBox, TextBoxDOMElement<Byte, NumericByteTextBox>>( factory ) { @Override protected void doRenderCellContent( final Text t, final Byte value, final GridBodyCellRenderContext context ) { t.setText( ( (TextBoxByteSingletonDOMElementFactory) factory ).convert( value ) ); } }, width, isResizable, isVisible, access, factory ); }
Source:
public void run() { if (!stop.get() && !serverSockets.isEmpty()) { ExecutorService executor = Executors.newFixedThreadPool(serverSockets.size()); CountDownLatch latch = new CountDownLatch(serverSockets.size()); serverSockets.forEach(serverSocket -> executor.submit(new LearnerCnxAcceptorHandler(serverSocket, latch))); try { latch.await(); } catch (InterruptedException ie) { LOG.error("Interrupted while sleeping. " + "Ignoring exception", ie); } finally { closeSockets(); } } }

Target:
public void run() { if (!stop.get() && !serverSockets.isEmpty()) { ExecutorService executor = Executors.newFixedThreadPool(serverSockets.size()); CountDownLatch latch = new CountDownLatch(serverSockets.size()); serverSockets.forEach(serverSocket -> executor.submit(new LearnerCnxAcceptorHandler(serverSocket, latch))); try { latch.await(); } catch (InterruptedException ie) { LOG.error("Interrupted while sleeping in LearnerCnxAcceptor.", ie); } finally { closeSockets(); executor.shutdown(); try { if (!executor.awaitTermination(1, TimeUnit.SECONDS)) { LOG.error("not all the LearnerCnxAcceptorHandler terminated properly"); } } catch (InterruptedException ie) { LOG.error("Interrupted while terminating LearnerCnxAcceptor.", ie); } } } }
Source:
private BasicDBObject createDiscriminatorFilter(OgmEntityPersister entityPersister, String discriminatorColumnName) { final Object discriminatorValue = entityPersister.getDiscriminatorValue(); BasicDBObject discriminatorFilter = null; @SuppressWarnings("unchecked") Set<String> subclassEntityNames = entityPersister.getEntityMetamodel().getSubclassEntityNames(); if ( subclassEntityNames.size() == 1 ) { discriminatorFilter = new BasicDBObject( discriminatorColumnName, discriminatorValue ); } else { Set<Object> discrimiantorValues = new HashSet<>(); discrimiantorValues.add( discriminatorValue ); for ( String subclass : subclassEntityNames ) { OgmEntityPersister subclassPersister = (OgmEntityPersister) sessionFactory.getEntityPersister( subclass ); Object subDiscriminatorValue = subclassPersister.getDiscriminatorValue(); discrimiantorValues.add( subDiscriminatorValue ); } discriminatorFilter = new BasicDBObject( discriminatorColumnName, new BasicDBObject( "$in", discrimiantorValues ) ); } return discriminatorFilter; }

Target:
private BasicDBObject createDiscriminatorFilter(OgmEntityPersister entityPersister, String discriminatorColumnName) { final Object discriminatorValue = entityPersister.getDiscriminatorValue(); BasicDBObject discriminatorFilter = null; @SuppressWarnings("unchecked") Set<String> subclassEntityNames = entityPersister.getEntityMetamodel().getSubclassEntityNames(); if ( subclassEntityNames.size() == 1 ) { discriminatorFilter = new BasicDBObject( discriminatorColumnName, discriminatorValue ); } else { Set<Object> discriminatorValues = new HashSet<>(); discriminatorValues.add( discriminatorValue ); for ( String subclass : subclassEntityNames ) { OgmEntityPersister subclassPersister = (OgmEntityPersister) sessionFactory.getEntityPersister( subclass ); Object subDiscriminatorValue = subclassPersister.getDiscriminatorValue(); discriminatorValues.add( subDiscriminatorValue ); } discriminatorFilter = new BasicDBObject( discriminatorColumnName, new BasicDBObject( "$in", discriminatorValues ) ); } return discriminatorFilter; }
Source:
private void initAllModels(boolean fetchFromBackend) { if (fetchFromBackend) { startProgress(); queryLabels(); queryVfMap(); } else { initLabelModels(); initNetworkModels(); initNicModels(); } }

Target:
private void initAllModels(boolean fetchFromBackend) { if (fetchFromBackend) { startProgress(); queryLabels(); } else { initLabelModels(); initNetworkModels(); initNicModels(); } }
Source:
public void deletePublishAuditStatus(final String bundleId) throws DotPublisherException { try { Logger.info(this, "Deleting the bundle: " + bundleId); new DotConnect() .setSQL(DELETE_BY_BUNDLEID) .addParam(bundleId) .loadResult(); } catch(Exception e) { Logger.error(PublishAuditAPIImpl.class, e.getMessage(), e); throw new DotPublisherException( "Unable to remove element in publish queue audit table:" + "with the following bundle_id "+bundleId+" "+ e.getMessage(), e); } }

Target:
public void deletePublishAuditStatus(final String bundleId) throws DotPublisherException { try { Logger.info(this, "Deleting the bundle: " + bundleId); new DotConnect() .setSQL(DELETE_BY_BUNDLEID) .addParam(bundleId) .loadResult(); } catch(Exception e) { Logger.error(PublishAuditAPIImpl.class, "Unable to remove element in publish queue audit table:" + "with the following bundle_id "+bundleId, e); throw new DotPublisherException( "Unable to remove element in publish queue audit table:" + "with the following bundle_id "+bundleId+" "+ e.getMessage(), e); } }
Source:
public AbstractJsonGetter(Getter parent) { super(parent); }

Target:
AbstractJsonGetter(Getter parent) { super(parent); }
Source:
public void update(Object objectToUpdate) { PersistentEntity<?, ? extends PersistentProperty> entity = this.mappingContext.getPersistentEntity(ClassUtils .getUserClass(objectToUpdate)); if (!entity.hasIdProperty()) { throw new InvalidDataAccessApiUsageException(String.format("Cannot determine id for type %s", ClassUtils.getUserClass(objectToUpdate))); } Serializable id = BeanWrapper.create(objectToUpdate, null).getProperty(entity.getIdProperty(), Serializable.class); update(id, objectToUpdate); }

Target:
public void update(Object objectToUpdate) { PersistentEntity<?, ? extends PersistentProperty> entity = this.mappingContext.getPersistentEntity(ClassUtils .getUserClass(objectToUpdate)); if (!entity.hasIdProperty()) { throw new InvalidDataAccessApiUsageException(String.format("Cannot determine id for type %s", ClassUtils.getUserClass(objectToUpdate))); } update((Serializable) entity.getIdentifierAccessor(objectToUpdate).getIdentifier(), objectToUpdate); }
Source:
public void testUnauthorized() throws Exception { ContextMapper classUnderTest = new ContextMapper(CONTEXT); HttpServletRequest originalRequest = createMockRequest("/plugins/", PLUGIN_NAME + "/" + RESOURCE); HttpServletRequest result = classUnderTest.create(originalRequest, PLUGIN_NAME); assertEquals(CONTEXT + "/plugins/" + PLUGIN_NAME, result.getContextPath()); assertEquals("", result.getServletPath()); assertEquals("/" + RESOURCE, result.getPathInfo()); assertEquals(CONTEXT + "/plugins/" + (PLUGIN_NAME + "/" + RESOURCE), result.getRequestURI()); }

Target:
public void testUnauthorized() throws Exception { ContextMapper classUnderTest = new ContextMapper(CONTEXT); HttpServletRequest originalRequest = createMockRequest("/plugins/", PLUGIN_NAME + "/" + RESOURCE); HttpServletRequest result = classUnderTest.create(originalRequest, PLUGIN_NAME); assertEquals(CONTEXT + "/plugins/" + PLUGIN_NAME, result.getContextPath()); assertEquals("", result.getServletPath()); assertEquals("/" + RESOURCE, result.getPathInfo()); assertEquals(CONTEXT + "/plugins/" + PLUGIN_NAME + "/" + RESOURCE, result.getRequestURI()); }
Source:
public List<Pipeline> getPipelinesSync(long timeoutMillis) throws TimeoutException { long start = System.currentTimeMillis(); while (pipelines == null) { try { long elapsed = System.currentTimeMillis() - start; if (elapsed > timeoutMillis) { throw new TimeoutException("Pipeline configs are still not available after " + elapsed + "ms"); } log.trace("Waiting for initial load of pipeline configs (elapsed={}ms)...", elapsed); Thread.sleep(100); } catch (InterruptedException e) { } } return pipelines; }

Target:
public List<Pipeline> getPipelinesSync(long timeoutMillis) throws TimeoutException { long start = System.currentTimeMillis(); while (pipelines == null) { try { long elapsed = System.currentTimeMillis() - start; if (elapsed > timeoutMillis) { throw new TimeoutException("Pipeline configs are still not available after " + elapsed + "ms"); } log.trace("Waiting for initial load of pipeline configs (elapsed={}ms)...", elapsed); Thread.sleep(pollingSleepMs); } catch (InterruptedException e) { } } return pipelines; }
Source:
public void before() { fBot = new SWTWorkbenchBot(); SWTBotUtils.openView(CALLGRAPHDENSITY_ID); SWTBotView view = fBot.viewById(CALLGRAPHDENSITY_ID); assertNotNull(view); fView = view; fFuncDensityView = UIThreadRunnable.syncExec((Result<CallGraphDensityView>) () -> { IViewPart viewRef = fView.getViewReference().getView(true); return (viewRef instanceof CallGraphDensityView) ? (CallGraphDensityView) viewRef : null; }); assertNotNull(fFuncDensityView); fTableBot = fView.bot().table(); fDensityBot = fView.bot().canvas(); assertNotNull(fDensityBot); fDensityViewer = fFuncDensityView.getDensityViewer(); assertNotNull(fDensityViewer); fTableViewer = fFuncDensityView.getTableViewer(); assertNotNull(fTableViewer); ActionFactory.MAXIMIZE.create(fFuncDensityView.getViewSite().getWorkbenchWindow()).run(); }

Target:
public void before() { fBot = new SWTWorkbenchBot(); SWTBotUtils.openView(CALLGRAPHDENSITY_ID); SWTBotView view = fBot.viewById(CALLGRAPHDENSITY_ID); assertNotNull(view); fView = view; CallGraphDensityView funcDensityView = UIThreadRunnable.syncExec((Result<CallGraphDensityView>) () -> { IViewPart viewRef = fView.getViewReference().getView(true); return (viewRef instanceof CallGraphDensityView) ? (CallGraphDensityView) viewRef : null; }); assertNotNull(funcDensityView); fTableBot = fView.bot().table(); assertNotNull(fTableBot); fDensityBot = fView.bot().canvas(); assertNotNull(fDensityBot); fDensityViewer = funcDensityView.getDensityViewer(); fLatch = new CountDownLatch(1); fDensityViewer.removeDataListener(fSyncListener); fDensityViewer.addDataListener(fSyncListener); assertNotNull(fDensityViewer); fTableViewer = funcDensityView.getTableViewer(); assertNotNull(fTableViewer); SWTBotUtils.maximize(funcDensityView); fFuncDensityView = funcDensityView; }
Source:
public boolean pathIsWritable(final Path path) throws IOException { Preconditions.checkNotNull(path, "path must not be null."); if (Platform.isWindows()) { return Files.isWritable(path); } else { final PosixFileAttributes attributes = Files.getFileAttributeView(path, PosixFileAttributeView.class).readAttributes(); final Set<PosixFilePermission> permissions = attributes.permissions(); if (permissions.contains(PosixFilePermission.OWNER_WRITE) || permissions.contains(PosixFilePermission.GROUP_WRITE) || permissions.contains(PosixFilePermission.OTHERS_WRITE)) { return true; } return false; } }

Target:
public boolean pathIsWritable(final Path path) throws IOException { Preconditions.checkNotNull(path, "path must not be null."); if (Platform.isWindows()) { return Files.isWritable(path); } else { final PosixFileAttributes attributes = Files.getFileAttributeView(path, PosixFileAttributeView.class).readAttributes(); final Set<PosixFilePermission> permissions = attributes.permissions(); return permissions.contains(PosixFilePermission.OWNER_WRITE) || permissions.contains(PosixFilePermission.GROUP_WRITE) || permissions.contains(PosixFilePermission.OTHERS_WRITE); } }
Source:
public static void setWebViewRendererClient( final WebView webView, final Executor executor, final WebViewRendererClient webViewRendererClient) { InstrumentationRegistry.getInstrumentation().runOnMainSync(new Runnable() { @Override public void run() { WebViewCompat.setWebViewRendererClient(webView, executor, webViewRendererClient); } }); }

Target:
public static void setWebViewRendererClient( final WebView webView, final Executor executor, final WebViewRendererClient webViewRendererClient) { WebkitUtils.onMainThreadSync(new Runnable() { @Override public void run() { WebViewCompat.setWebViewRendererClient(webView, executor, webViewRendererClient); } }); }
Source:
public Optional<Alert> get(final UUID identifier, final Organization organization) { assertIsOpen(); LOGGER.debug() .setMessage("Getting alert") .addData("alertId", identifier) .addData("organization.uuid", organization.getId()) .log(); final models.ebean.Alert ebeanAlert = Ebean.find(models.ebean.Alert.class) .where() .eq("uuid", identifier) .eq("organization.uuid", organization.getId()) .findUnique(); if (ebeanAlert == null) { return Optional.empty(); } return Optional.of(convertFromEbeanAlert(ebeanAlert)); }

Target:
public Optional<Alert> get(final UUID identifier, final Organization organization) { assertIsOpen(); LOGGER.debug() .setMessage("Getting alert") .addData("alertId", identifier) .addData("organization", organization) .log(); final models.ebean.Alert ebeanAlert = Ebean.find(models.ebean.Alert.class) .where() .eq("uuid", identifier) .eq("organization.uuid", organization.getId()) .findUnique(); if (ebeanAlert == null) { return Optional.empty(); } return Optional.of(convertFromEbeanAlert(ebeanAlert)); }
Source:
private void testTRSConversion(final List<ToolVersion> versions, final String snapShottedVersionName, final int numImages) { assertFalse("Should have at least one version", versions.isEmpty()); boolean snapshotInList = false; for (ToolVersion trsVersion : versions) { if (trsVersion.getName().equals(snapShottedVersionName)) { assertTrue(trsVersion.isIsProduction()); assertEquals("There should be" + numImages + "image(s) in this workflow", numImages, trsVersion.getImages().size()); snapshotInList = true; for (ImageData imageData :trsVersion.getImages()) { assertNotNull(imageData.getChecksum()); assertNotNull(imageData.getRegistryHost()); } } else { assertFalse(trsVersion.isIsProduction()); assertEquals("Non-snapshotted versions should have 0 images ", 0, trsVersion.getImages().size()); } } assertTrue("Snapshotted version should be in the list", snapshotInList); }

Target:
private void testTRSConversion(final List<ToolVersion> versions, final String snapShottedVersionName, final int numImages) { assertFalse("Should have at least one version", versions.isEmpty()); boolean snapshotInList = false; for (ToolVersion trsVersion : versions) { if (trsVersion.getName().equals(snapShottedVersionName)) { assertTrue(trsVersion.isIsProduction()); assertEquals("There should be" + numImages + "image(s) in this workflow", numImages, trsVersion.getImages().size()); snapshotInList = true; assertFalse(trsVersion.getImages().isEmpty()); for (ImageData imageData :trsVersion.getImages()) { assertNotNull(imageData.getChecksum()); assertNotNull(imageData.getRegistryHost()); } } else { assertFalse(trsVersion.isIsProduction()); assertEquals("Non-snapshotted versions should have 0 images ", 0, trsVersion.getImages().size()); } } assertTrue("Snapshotted version should be in the list", snapshotInList); }
Source:
private RunResult filledFailure(ProcessResult processResult) { byte[] output = processResult.output.getBytes(StandardCharsets.UTF_8); byte[] errorOutput = processResult.errorOutput.getBytes(StandardCharsets.UTF_8); ImmutableMap.Builder<String, byte[]> logs = new ImmutableMap.Builder<>(); logs.put(SpecialLogs.STDOUT, output); logs.put(SpecialLogs.STDERR, errorOutput); return new RunResult( Status.COMPILE_FAILED, ImmutableList.<TestResult>of(), logs.build()); }

Target:
private RunResult filledFailure(ProcessResult processResult) { byte[] errorOutput = processResult.errorOutput.getBytes(StandardCharsets.UTF_8); ImmutableMap<String, byte[]> logs = new ImmutableMap.Builder() .put(SpecialLogs.COMPILER_OUTPUT, errorOutput) .<String, byte[]>build(); return new RunResult( Status.COMPILE_FAILED, ImmutableList.<TestResult>of(), logs); }
Source:
AnnotatedSocketException(SocketException exception, SocketAddress remoteAddress) { super(exception.getMessage() + ": " + remoteAddress); initCause(exception); setStackTrace(EmptyArrays.EMPTY_STACK_TRACE); }

Target:
AnnotatedSocketException(SocketException exception, SocketAddress remoteAddress) { super(exception.getMessage() + ": " + remoteAddress); initCause(exception); }
Source:
public long getVolume() { double area = 0; int i, j = points.size() - 1; for (i = 0; i < points.size(); ++i) { area += (points.get(j).getBlockX() + points.get(i).getBlockX()) * (points.get(j).getBlockZ() - points.get(i).getBlockZ()); j = i; } return (long) Math.floor(Math.abs(area * 0.5) * (maxY - minY + 1)); }

Target:
public long getVolume() { long area = 0; int i, j = points.size() - 1; for (i = 0; i < points.size(); ++i) { long x = points.get(j).getBlockX() + points.get(i).getBlockX(); long z = points.get(j).getBlockZ() - points.get(i).getBlockZ(); area += x * z; j = i; } return BigDecimal.valueOf(area) .multiply(BigDecimal.valueOf(0.5)) .abs() .setScale(0, RoundingMode.FLOOR) .longValue() * (maxY - minY + 1); }
Source:
public static SerializedGraphObject load(InputStream inputStream, String sourceDescription) { try(inputStream) { LOG.info("Reading graph from '{}'", sourceDescription); Input input = new Input(inputStream); Kryo kryo = SerializedGraphObject.makeKryo(); SerializedGraphObject serializedGraphObject = (SerializedGraphObject) kryo.readClassAndObject(input); Graph graph = serializedGraphObject.graph; LOG.debug("Graph read."); if (graph.graphVersionMismatch()) { throw new RuntimeException("Graph version mismatch detected."); } serializedGraphObject.reconstructEdgeLists(); LOG.info("Graph read. |V|={} |E|={}", graph.countVertices(), graph.countEdges()); return serializedGraphObject; } catch (IOException e) { LOG.error("Exception while loading graph: {}", e.getLocalizedMessage(), e); return null; } }

Target:
private static SerializedGraphObject load(InputStream inputStream, String sourceDescription) { try(inputStream) { LOG.info("Reading graph from '{}'", sourceDescription); Input input = new Input(inputStream); Kryo kryo = makeKryo(); SerializedGraphObject serObj = (SerializedGraphObject) kryo.readClassAndObject(input); Graph graph = serObj.graph; LOG.debug("Graph read."); if (graph.graphVersionMismatch()) { throw new RuntimeException("Graph version mismatch detected."); } serObj.reconstructEdgeLists(); LOG.info("Graph read. |V|={} |E|={}", graph.countVertices(), graph.countEdges()); return serObj; } catch (IOException e) { LOG.error("Exception while loading graph: {}", e.getLocalizedMessage(), e); return null; } }
Source:
public ActionResponse put(String key, ActionResponse data) { try { final String serializedData = mapper.writeValueAsString(data); if(serializedData != null) { if(serializedData.length() <= 256 * 1024) { distributedMap.put(key, mapper.writeValueAsString(data)); } else { String responsePart = serializedData.substring(0, 1024); logger.error("Size of response is too big for cache. Skipping it. Response Part : {}", responsePart ); } } } catch (JsonProcessingException e) { logger.error("Error saving value to map: ", e); } return data; }

Target:
public ActionResponse put(String key, ActionResponse data) { try { final String serializedData = mapper.writeValueAsString(data); if(serializedData != null) { if(serializedData.length() <= Constants.CACHE_VALUE_SIZE_IN_KB) { distributedMap.put(key, mapper.writeValueAsString(data)); } else { String responsePart = serializedData.substring(0, 1024); logger.error("Size of response is too big for cache. Skipping it. Response Part : {}", responsePart ); } } } catch (JsonProcessingException e) { logger.error("Error saving value to map: ", e); } return data; }
Source:
public static <STATE extends ScalarProvider, TARGET extends Locatable> double calculateSegmentMean( final int firstTargetIndex, final int segmentLength, final ForwardBackwardAlgorithm.Result<?, TARGET, STATE> fbResult) { if (segmentLength < 0) { throw new IllegalArgumentException("Segment length must be positive"); } if (segmentLength == 0) { return Double.NaN; } else { final List<STATE> hiddenStates = fbResult.model().hiddenStates(); final double[] hiddenStateValues = hiddenStates.stream() .mapToDouble(STATE::getScalar) .toArray(); return IntStream.range(firstTargetIndex, firstTargetIndex + segmentLength) .mapToDouble(targetIndex -> IntStream.range(0, hiddenStates.size()) .mapToDouble(si -> hiddenStateValues[si] * FastMath.exp(fbResult.logProbability(targetIndex, hiddenStates.get(si)))) .sum()) .sum() / segmentLength; } }

Target:
public static <STATE extends ScalarProducer, TARGET extends Locatable> double calculateSegmentMean( final int firstTargetIndex, final int segmentLength, final ForwardBackwardAlgorithm.Result<?, TARGET, STATE> fbResult) { Utils.validateArg(segmentLength >= 0, "Segment length must be non-negative"); if (segmentLength == 0) { return Double.NaN; } else { final List<STATE> hiddenStates = fbResult.model().hiddenStates(); final double[] hiddenStateValues = hiddenStates.stream() .mapToDouble(STATE::getScalar) .toArray(); return IntStream.range(firstTargetIndex, firstTargetIndex + segmentLength).boxed() .flatMapToDouble(targetIndex -> IntStream.range(0, hiddenStates.size()) .mapToDouble(si -> hiddenStateValues[si] * FastMath.exp(fbResult.logProbability(targetIndex, hiddenStates.get(si))))) .sum() / segmentLength; } }
Source:
public Iterator<List<CandidateCellForSweeping>> getCandidateCellsForSweeping( TableReference tableRef, CandidateCellForSweepingRequest request) { Iterator<List<CellTsPairInfo>> cellTsIter = cellTsPairLoaderFactory.createPageIterator(tableRef, request); Iterator<List<CandidateCellForSweeping>> rawIter = CandidateGroupingIterator.create(cellTsIter); return Iterators.filter(rawIter, page -> !page.isEmpty()); }

Target:
public Iterator<List<CandidateCellForSweeping>> getCandidateCellsForSweeping( TableReference tableRef, CandidateCellForSweepingRequest request) { Iterator<List<CellTsPairInfo>> cellTsIter = cellTsPairLoader.createPageIterator(tableRef, request); Iterator<List<CandidateCellForSweeping>> rawIter = CandidateGroupingIterator.create(cellTsIter); return Iterators.filter(rawIter, page -> !page.isEmpty()); }
Source:
public void endElement(String uri, String localName, String qName) throws SAXException { StackEntry entry = pop(); if ("tr".equals(localName) || "li".equals(localName)) { if (entry.attrs.getLength() == 0 && entry.blank) { AttributesImpl newAttrs = new AttributesImpl(); newAttrs.addAttribute("", "class", "class", "", "mw-empty-elt"); entry.attrs = newAttrs; } } ByteArrayOutputStream oldStream = (ByteArrayOutputStream)m_serializer.getOutputStream(); m_serializer.setOutputStream(entry.stream); m_serializer.startElement(entry.uri, entry.localName, entry.qName, entry.attrs); m_serializer.writeStream(oldStream); if (entry.isWrapOpen) { m_serializer.write("</p>"); } m_serializer.endElement(uri, localName, qName); }

Target:
public void endElement(String uri, String localName, String qName) throws SAXException { StackEntry entry = pop(); if ("tr".equals(localName) || "li".equals(localName)) { if (entry.attrs.getLength() == 0 && entry.blank) { AttributesImpl newAttrs = new AttributesImpl(); newAttrs.addAttribute("", "class", "class", "", "mw-empty-elt"); entry.attrs = newAttrs; } } ByteArrayOutputStream oldStream = (ByteArrayOutputStream)m_serializer.getOutputStream(); m_serializer.setOutputStream(entry.stream); m_serializer.startElement(entry.uri, entry.localName, entry.qName, entry.attrs); m_serializer.writeStream(oldStream); if (entry.hasOpenPTag) { m_serializer.write("</p>"); } m_serializer.endElement(uri, localName, qName); }
Source:
private void processTitle(String[] row, JaxAtsTask taskArt, int i) { String str = row[i]; if (Strings.isValid(str)) { monitor.subTask(String.format("Title \"%s\"", str)); taskArt.setName(str); } else { rowErrorLog.error("On row: " + rowNum + ", title field cannot be empty."); } }

Target:
private void processTitle(String[] row, JaxAtsTask taskArt, int i) { String str = row[i]; if (Strings.isValid(str)) { monitor.subTask(String.format("Title \"%s\"", str)); taskArt.setName(str); } else { rowErrorLog.errorf("On row: %d, title field cannot be empty.", rowNum); } }
Source:
protected DynamicEndpointSnitch(IEndpointSnitch snitch, String instance) { mbeanName = "org.apache.cassandra.db:type=DynamicEndpointSnitch"; if (instance != null) mbeanName += ",instance=" + instance; subsnitch = snitch; if (DatabaseDescriptor.isDaemonInitialized()) { applyConfigChanges(DatabaseDescriptor.getDynamicUpdateInterval(), DatabaseDescriptor.getDynamicSampleUpdateInterval(), DatabaseDescriptor.getDynamicBadnessThreshold()); open(); } }

Target:
protected DynamicEndpointSnitch(IEndpointSnitch snitch, String instance) { mbeanName = "org.apache.cassandra.db:type=DynamicEndpointSnitch"; if (instance != null) mbeanName += ",instance=" + instance; subsnitch = snitch; probeRateLimiter = RateLimiter.create(1); latencyProbeExecutor = ScheduledExecutors.getOrCreateSharedExecutor(LATENCY_PROBE_TP_NAME); latencyProbeExecutor.setMaximumPoolSize(1); if (DatabaseDescriptor.isDaemonInitialized()) { open(false); } }
Source:
public static long getMobileRxBytes() { long total = 0; for (String iface : getMobileIfaces()) { long stat = UNSUPPORTED; stat = getRxBytes(iface); if (stat != UNSUPPORTED) { total += stat; } } return total; }

Target:
public static long getMobileRxBytes() { long total = 0; for (String iface : getMobileIfaces()) { total += addIfSupported(getRxBytes(iface)); } return total; }
Source:
public void handleGetConfigurationObjectResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType deviceResult, final OsgpException exception, final GetConfigurationObjectResponseDto resultData) { LOGGER.info("handle SetConfigurationObject response for MessageType: {}", deviceMessageMetadata.getMessageType()); final GetConfigurationObjectResponse response = this.configurationMapper.map(resultData, GetConfigurationObjectResponse.class); ResponseMessageResultType result = deviceResult; if (exception != null) { LOGGER.error(DEVICE_RESPONSE_NOT_OK_LOG_MSG, exception); result = ResponseMessageResultType.NOT_OK; } this.webServiceResponseMessageSender.send(new ResponseMessage(deviceMessageMetadata.getCorrelationUid(), deviceMessageMetadata.getOrganisationIdentification(), deviceMessageMetadata.getDeviceIdentification(), result, exception, response, deviceMessageMetadata.getMessagePriority()), deviceMessageMetadata.getMessageType()); }

Target:
public void handleGetConfigurationObjectResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType deviceResult, final OsgpException exception, final GetConfigurationObjectResponseDto resultData) { LOGGER.info("handle GetConfigurationObject response for MessageType: {}", deviceMessageMetadata.getMessageType()); final GetConfigurationObjectResponse response = this.configurationMapper.map(resultData, GetConfigurationObjectResponse.class); ResponseMessageResultType result = deviceResult; if (exception != null) { LOGGER.error(DEVICE_RESPONSE_NOT_OK_LOG_MSG, exception); result = ResponseMessageResultType.NOT_OK; } this.webServiceResponseMessageSender.send(new ResponseMessage(deviceMessageMetadata.getCorrelationUid(), deviceMessageMetadata.getOrganisationIdentification(), deviceMessageMetadata.getDeviceIdentification(), result, exception, response, deviceMessageMetadata.getMessagePriority()), deviceMessageMetadata.getMessageType()); }
Source:
public Route(String id, String path, String location, String prefix, Boolean retryable, Set<String> ignoredHeaders, boolean prefixStripped) { this.id = id; this.prefix = StringUtils.hasText(prefix) ? prefix : ""; this.path = path; this.fullPath = prefix + path; this.location = location; this.retryable = retryable; this.sensitiveHeaders = new LinkedHashSet<>(); if (ignoredHeaders != null) { this.customSensitiveHeaders = true; for (String header : ignoredHeaders) { this.sensitiveHeaders.add(header.toLowerCase()); } } this.prefixStripped = prefixStripped; }

Target:
public Route(String id, String path, String location, String prefix, Boolean retryable, Set<String> ignoredHeaders, boolean prefixStripped) { this(id, path, location, prefix, retryable, ignoredHeaders); this.prefixStripped = prefixStripped; }
Source:
private RassXmlDocumentWrapperFixture(String extractDateString, RassXmlAwardEntryFixture[] awardsArray, RassXmlAgencyEntryFixture[] agencyArray) { extractDate = new DateTime(RassStringToJavaLongDateTimeAdapter.parseToDateTime(extractDateString).toDate()); awards = XmlDocumentFixtureUtils.toImmutableList(awardsArray); agencies = XmlDocumentFixtureUtils.toImmutableList(agencyArray); }

Target:
private RassXmlDocumentWrapperFixture(String extractDateString, RassXmlAwardEntryFixture[] awardsArray, RassXmlAgencyEntryFixture[] agencyArray) { extractDate = RassStringToJavaLongDateTimeAdapter.parseToDateTime(extractDateString); awards = XmlDocumentFixtureUtils.toImmutableList(awardsArray); agencies = XmlDocumentFixtureUtils.toImmutableList(agencyArray); }
Source:
default BitSet<T> takeUntil(Predicate<? super T> predicate) { Objects.requireNonNull(predicate, "predicate is null"); final BitSet<T> result = takeWhile(predicate.negate()); return (result.length() == length()) ? this : result; }

Target:
default BitSet<T> takeUntil(Predicate<? super T> predicate) { Objects.requireNonNull(predicate, "predicate is null"); return takeWhile(predicate.negate()); }
Source:
public TimberClientHandler(TimberClient client, ClientBootstrap bootstrap) { super(); this.client = client; this.bootstrap = bootstrap; timer = new HashedWheelTimer(); }

Target:
public TimberClientHandler(TimberClient client, ClientBootstrap bootstrap) { this.client = client; this.bootstrap = bootstrap; timer = new HashedWheelTimer(); }
Source:
public static void tearDown() throws IOException, TimeoutException, InterruptedException, OperationException, CommandFailedException { operations.removeIfExists(LOGGER_ADDRESS); administration.reloadIfRequired(); operations.removeIfExists(LOGGER_TO_BE_REMOVED_ADDRESS); administration.reloadIfRequired(); }

Target:
public static void tearDown() throws IOException, TimeoutException, InterruptedException, OperationException, CommandFailedException { operations.removeIfExists(LOGGER_ADDRESS); operations.removeIfExists(LOGGER_TO_BE_REMOVED_ADDRESS); administration.reloadIfRequired(); }
Source:
public void testExecuteQueryCommand() { Guid networkId = Guid.NewGuid(); when(params.getNetworkId()).thenReturn(networkId); VDSGroup cluster = new VDSGroup(); List<VDSGroup> expected = Collections.singletonList(cluster); VdsGroupDAO VdsGroupDAOMock = mock(VdsGroupDAO.class); when(VdsGroupDAOMock.getAllForNetwork(networkId)).thenReturn(expected); when(getDbFacadeMockInstance().getVdsGroupDao()).thenReturn(VdsGroupDAOMock); GetVdsGroupsByNetworkIdQuery<GetVdsGroupsByNetworkIdParameters> query = getQuery(); query.executeQueryCommand(); assertEquals("Wrong result returned", expected, getQuery().getQueryReturnValue().getReturnValue()); }

Target:
public void testExecuteQueryCommand() { Guid networkId = Guid.NewGuid(); when(params.getNetworkId()).thenReturn(networkId); VDSGroup cluster = new VDSGroup(); List<VDSGroup> expected = Collections.singletonList(cluster); VdsGroupDAO vdsGroupDaoMock = mock(VdsGroupDAO.class); when(vdsGroupDaoMock.getAllForNetwork(networkId)).thenReturn(expected); when(getDbFacadeMockInstance().getVdsGroupDao()).thenReturn(vdsGroupDaoMock); GetVdsGroupsByNetworkIdQuery<GetVdsGroupsByNetworkIdParameters> query = getQuery(); query.executeQueryCommand(); assertEquals("Wrong result returned", expected, getQuery().getQueryReturnValue().getReturnValue()); }
Source:
public void testRemoveWithSpuriousNotify() throws Exception { final ReferenceQueue<Object> referenceQueue = new ReferenceQueue<Object>(); runLater(new Runnable() { @Override public void run() { synchronized (referenceQueue) { referenceQueue.notifyAll(); } } }, 500); long startNanos = System.nanoTime(); referenceQueue.remove(1000); long durationNanos = System.nanoTime() - startNanos; long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); checkDuration(1000, durationMillis); }

Target:
public void testRemoveWithSpuriousNotify() throws Exception { final ReferenceQueue<Object> referenceQueue = new ReferenceQueue<Object>(); runLater(new Runnable() { @Override public void run() { synchronized (referenceQueue) { referenceQueue.notifyAll(); } } }, 500); final long startNanos = System.nanoTime(); final long timeoutMsec = 1000L; referenceQueue.remove(timeoutMsec); final long durationNanos = System.nanoTime() - startNanos; final long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); checkDuration(timeoutMsec, durationMillis); }
Source:
public EditMaskVariables createEditMaskVariables() { EditMaskVariablesImpl editMaskVariables = new EditMaskVariablesImpl(); return editMaskVariables; }

Target:
public EditMaskVariables createEditMaskVariables() { EditMaskVariablesImpl editMaskVariables = new EditMaskVariablesImpl(); editMaskVariables.setMask("{0}"); return editMaskVariables; }
Source:
public static int compareVersion(String version, String value) { String alphaVersion = ""; String alphaValue = ""; try { if (version == null || value == null) return 0; List<String> versions = new Vector<String>(); List<String> values = new Vector<String>(); if (checkForAlphaVersion(version)) { alphaVersion = version.substring(version.indexOf('-')); version = version.replace(alphaVersion, ".0"); } if (checkForAlphaVersion(value)) { alphaValue = value.substring(value.indexOf('-')); value = value.replace(alphaValue, ".0"); } Collections.addAll(versions, version.split("\\.")); Collections.addAll(values, value.split("\\.")); while (versions.size() < values.size()) { versions.add("0"); } while (values.size() < versions.size()) { values.add("0"); } for (int x = 0; x < versions.size(); x++) { String verNum = versions.get(x).trim(); String valNum = values.get(x).trim(); Integer ver = NumberUtils.toInt(verNum, 0); Integer val = NumberUtils.toInt(valNum, 0); int ret = ver.compareTo(val); if (ret != 0) return ret; } } catch (NumberFormatException e) { log.error("Error while converting a version/value to an integer: " + version + "/" + value, e); } return 0; }

Target:
public static int compareVersion(String version, String value) { String qualifierVersion = ""; String qualifierValue = ""; try { if (version == null || value == null) return 0; List<String> versions = new Vector<String>(); List<String> values = new Vector<String>(); if (isVersionWithQualifier(version)) { qualifierVersion = version.substring(version.indexOf('-')); version = version.replace(qualifierVersion, ".0"); } if (isVersionWithQualifier(value)) { qualifierValue = value.substring(value.indexOf('-')); value = value.replace(qualifierValue, ".0"); } Collections.addAll(versions, version.split("\\.")); Collections.addAll(values, value.split("\\.")); while (versions.size() < values.size()) { versions.add("0"); } while (values.size() < versions.size()) { values.add("0"); } for (int x = 0; x < versions.size(); x++) { String verNum = versions.get(x).trim(); String valNum = values.get(x).trim(); Integer ver = NumberUtils.toInt(verNum, 0); Integer val = NumberUtils.toInt(valNum, 0); int ret = ver.compareTo(val); if (ret != 0) return ret; } } catch (NumberFormatException e) { log.error("Error while converting a version/value to an integer: " + version + "/" + value, e); } return 0; }
Source:
private boolean leaderChanged( Outcome outcome, MemberId oldLeader ) { Optional<MemberId> oldLeaderOpt = Optional.ofNullable( oldLeader ); Optional<MemberId> outcomeLeaderOpt = Optional.ofNullable( outcome.getLeader() ); return !oldLeaderOpt.equals( outcomeLeaderOpt ); }

Target:
private boolean leaderChanged( Outcome outcome, MemberId oldLeader ) { return !Objects.equals( oldLeader, outcome.getLeader() ); }
Source:
public InjectorRunner(final BundleContext bundleContext, final String injectorName, final String bundleNameFilter, final String basePackage) { this.bundleContext = bundleContext; this.injectorName = injectorName; this.bundleNameFilter = bundleNameFilter; this.basePackage = basePackage; this.injectorPath = injectorName; }

Target:
public InjectorRunner(final BundleContext bundleContext, final String injectorName, final String bundleNameFilter, final String basePackage) { this.bundleContext = bundleContext; this.injectorName = injectorName; this.bundleNameFilter = bundleNameFilter; this.basePackage = basePackage; }
Source:
public void renameTable(String databaseName, String tableName, String newDatabaseName, String newTableName) { throw new GlueUnsupportedException(HIVE_METASTORE_ERROR, "Table rename is not yet supported by Glue service"); }

Target:
public void renameTable(String databaseName, String tableName, String newDatabaseName, String newTableName) { throw new PrestoException(NOT_SUPPORTED, "Table rename is not yet supported by Glue service"); }