auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
int gdk_pointer_grab (long window, int grab_ownership, boolean owner_events, int event_mask, long confine_to, long cursor, int time_) { long display = 0; if( window != 0) { display = GDK.gdk_window_get_display (window); } else { window = GDK.gdk_get_default_root_window (); display = GDK.gdk_window_get_display (window); } if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) { long seat = GDK.gdk_display_get_default_seat(display); GDK.gdk_window_show(window); return GDK.gdk_seat_grab(seat, window, GDK.GDK_SEAT_CAPABILITY_ALL_POINTING, owner_events, cursor, 0, 0, 0); } else { long pointer = GDK.gdk_get_pointer(display); return GDK.gdk_device_grab (pointer, window, grab_ownership, owner_events, event_mask, cursor, time_); } }

Target:
int gdk_pointer_grab (long window, int grab_ownership, boolean owner_events, int event_mask, long confine_to, long cursor, int time_) { long display = 0; if( window != 0) { display = GDK.gdk_window_get_display (window); } else { window = GDK.gdk_get_default_root_window (); display = GDK.gdk_window_get_display (window); } if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) { long seat = GDK.gdk_display_get_default_seat(display); if (gdkSeatGrabPrepareFunc == null) { gdkSeatGrabPrepareFunc = new Callback(Widget.class, "GdkSeatGrabPrepareFunc", 3); } long gdkSeatGrabPrepareFuncAddress = gdkSeatGrabPrepareFunc.getAddress(); if (gdkSeatGrabPrepareFuncAddress == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS); return GDK.gdk_seat_grab(seat, window, GDK.GDK_SEAT_CAPABILITY_ALL_POINTING, owner_events, cursor, 0, gdkSeatGrabPrepareFuncAddress, window); } else { long pointer = GDK.gdk_get_pointer(display); return GDK.gdk_device_grab (pointer, window, grab_ownership, owner_events, event_mask, cursor, time_); } }
Source:
public void migratePrimaryKeyTableIfNeeded_second() throws IOException { configFactory.copyRealmFromAssets(context, "0841_annotationtypes.realm", "default.realm"); sharedRealm = SharedRealm.getInstance(config); sharedRealm.beginTransaction(); assertTrue(Table.migratePrimaryKeyTableIfNeeded(sharedRealm)); sharedRealm.commitTransaction(); Table t = sharedRealm.getTable("class_AnnotationTypes"); assertEquals(t.getColumnIndex("id"), t.getPrimaryKey()); assertTrue(t.hasPrimaryKey()); assertEquals("AnnotationTypes", sharedRealm.getTable("pk").getString(0, 0)); }

Target:
public void migratePrimaryKeyTableIfNeeded_second() throws IOException { configFactory.copyRealmFromAssets(context, "0841_annotationtypes.realm", "default.realm"); sharedRealm = SharedRealm.getInstance(config); sharedRealm.beginTransaction(); assertTrue(Table.migratePrimaryKeyTableIfNeeded(sharedRealm)); sharedRealm.commitTransaction(); Table t = sharedRealm.getTable("class_AnnotationTypes"); assertTrue(t.hasPrimaryKey()); assertEquals(t.getColumnIndex("id"), t.getPrimaryKey()); assertEquals("AnnotationTypes", sharedRealm.getTable("pk").getString(0, 0)); }
Source:
public void invalidate(String namespace) { topologyEntityCache.refresh(); serviceLocator.findServices(MetaTopologyProvider.class, null).stream() .filter(metaTopologyProvider -> metaTopologyProvider.getGraphProviderBy(namespace) != null) .forEach(metaTopologyProvider -> { graphProviderCache.invalidate(new GraphProviderKey(metaTopologyProvider.getId(), namespace)); }); }

Target:
public void invalidate(String namespace) { if(namespace.startsWith("nodes")) { topologyEntityCache.refresh(); } serviceLocator.findServices(MetaTopologyProvider.class, null).stream() .filter(metaTopologyProvider -> metaTopologyProvider.getGraphProviderBy(namespace) != null) .forEach(metaTopologyProvider -> { graphProviderCache.invalidate(new GraphProviderKey(metaTopologyProvider.getId(), namespace)); }); }
Source:
public ResponseEntity saveStorage(@ApiParam(value = "The storage object", required = true) @RequestBody Storage storage) throws IOException, JAXBException { try { configurationManagementService.saveStorage(storage); if (!storage.existsOnFileSystem()) { storageManagementService.createStorage(storage); } return ResponseEntity.ok(ResponseStatusEnum.OK.value()); } catch (IOException | JAXBException e) { logger.error(e.getMessage(), e); return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) .body(ResponseStatusEnum.FAILED.value()); } }

Target:
public ResponseEntity saveStorage(@ApiParam(value = "The storage object", required = true) @RequestBody Storage storage) throws IOException, JAXBException { try { configurationManagementService.saveStorage(storage); if (!storage.existsOnFileSystem()) { storageManagementService.createStorage(storage); } return ResponseEntity.ok("The storage was updated successfully."); } catch (IOException | JAXBException e) { logger.error(e.getMessage(), e); return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR); } }
Source:
public void serialize(XMLExtendedStreamWriter writer, JpaStoreConfiguration configuration) throws XMLStreamException { AttributeSet attributes = configuration.attributes(); writer.writeStartElement(Element.JPA_STORE); attributes.write(writer, JpaStoreConfiguration.ENTITY_CLASS, Attribute.ENTITY_CLASS_NAME); attributes.write(writer, JpaStoreConfiguration.PERSISTENCE_UNIT_NAME, Attribute.PERSISTENCE_UNIT_NAME); attributes.write(writer, JpaStoreConfiguration.BATCH_SIZE, Attribute.BATCH_SIZE); attributes.write(writer, JpaStoreConfiguration.STORE_METADATA, Attribute.STORE_METADATA); writeCommonStoreSubAttributes(writer, configuration); writeCommonStoreElements(writer, configuration); writer.writeEndElement(); }

Target:
public void serialize(XMLExtendedStreamWriter writer, JpaStoreConfiguration configuration) throws XMLStreamException { writer.writeStartElement(Element.JPA_STORE); configuration.attributes().write(writer); writeCommonStoreSubAttributes(writer, configuration); writeCommonStoreElements(writer, configuration); writer.writeEndElement(); }
Source:
public Boolean delete(List<T> items) { boolean deleted = true; if (items != null) { for (T item : items) { if (null == item) { continue; } updateApiVersionResource(item); try { R op; if (item instanceof HasMetadata && ((HasMetadata) item).getMetadata() != null && ((HasMetadata) item).getMetadata().getName() != null && !((HasMetadata) item).getMetadata().getName().isEmpty()) { op = (R) inNamespace(checkNamespace(item)).withName(((HasMetadata) item).getMetadata().getName()); } else { op = (R) withItem(item); } deleted &= op.delete(); } catch (KubernetesClientException e) { if (e.getCode() != HttpURLConnection.HTTP_NOT_FOUND) { throw e; } return false; } } } return deleted; }

Target:
public Boolean delete(List<T> items) { boolean deleted = true; if (items != null) { for (T item : items) { updateApiVersionResource(item); try { R op; if (item instanceof HasMetadata && ((HasMetadata) item).getMetadata() != null && ((HasMetadata) item).getMetadata().getName() != null && !((HasMetadata) item).getMetadata().getName().isEmpty()) { op = (R) inNamespace(checkNamespace(item)).withName(((HasMetadata) item).getMetadata().getName()); } else { op = (R) withItem(item); } deleted &= op.delete(); } catch (KubernetesClientException e) { if (e.getCode() != HttpURLConnection.HTTP_NOT_FOUND) { throw e; } return false; } } } return deleted; }
Source:
private static void checkMaxSize(long bytes, long count) { checkCondition(bytes <= (MAX_SIZE_IN_BYTES + count) / count, INVALID_FUNCTION_ARGUMENT, "repeat should not create an array greater than %s bytes", MAX_SIZE_IN_BYTES); }

Target:
private static void checkMaxSize(long bytes, long count) { checkCondition( bytes <= (MAX_SIZE_IN_BYTES + count) / count, INVALID_FUNCTION_ARGUMENT, "result of repeat function must not take more than 1000000 bytes"); }
Source:
public Host cancelMaintenance(final CancelMaintenanceCmd cmd) { final Long hostId = cmd.getId(); final HostVO host = _hostDao.findById(hostId); if (host == null || host.getRemoved() != null) { throw new InvalidParameterValueException("Host with id " + hostId.toString() + " doesn't exist"); } if (host.getResourceState() != ResourceState.PrepareForMaintenance && host.getResourceState() != ResourceState.ErrorInPrepareForMaintenance && host.getResourceState() != ResourceState.Maintenance && host.getResourceState() != ResourceState.ErrorInMaintenance) { throw new CloudRuntimeException("Cannot perform cancelMaintenance when resource state is " + host.getResourceState() + ", hostId = " + hostId); } processResourceEvent(ResourceListener.EVENT_CANCEL_MAINTENANCE_BEFORE, hostId); final boolean success = cancelMaintenance(hostId); processResourceEvent(ResourceListener.EVENT_CANCEL_MAINTENANCE_AFTER, hostId); if (!success) { throw new CloudRuntimeException("Internal error cancelling maintenance."); } return host; }

Target:
public Host cancelMaintenance(final CancelMaintenanceCmd cmd) { final Long hostId = cmd.getId(); final HostVO host = _hostDao.findById(hostId); if (host == null || host.getRemoved() != null) { throw new InvalidParameterValueException("Host with id " + hostId.toString() + " doesn't exist"); } if (!ResourceState.isMaintenanceState(host.getResourceState())) { throw new CloudRuntimeException("Cannot perform cancelMaintenance when resource state is " + host.getResourceState() + ", hostId = " + hostId); } processResourceEvent(ResourceListener.EVENT_CANCEL_MAINTENANCE_BEFORE, hostId); final boolean success = cancelMaintenance(hostId); processResourceEvent(ResourceListener.EVENT_CANCEL_MAINTENANCE_AFTER, hostId); if (!success) { throw new CloudRuntimeException("Internal error cancelling maintenance."); } return host; }
Source:
private void validatePositionOfPortOnContainer(String containerName, String portName, boolean pinBorderedNodes) { SWTBotGefEditPart swtbotContainerEditPart = editor.getEditPart(containerName); assertNotNull("No container edit part found with this name", swtbotContainerEditPart); EditPart containerSquareEP = swtbotContainerEditPart.part(); assertTrue("The parent edit part of the container label is not a AbstractBorderedShapeEditPart", containerSquareEP.getParent() instanceof AbstractBorderedShapeEditPart); final AbstractBorderedShapeEditPart containerEP = (AbstractBorderedShapeEditPart) containerSquareEP.getParent(); final AbstractDiagramBorderNodeEditPart portEP = findPortInContainer(containerEP, portName); assertNotNull("No port edit part found with this name", portEP); if (pinBorderedNodes) { pinDiagramElement((DDiagramElement) ((Node) portEP.getModel()).getElement()); } boolean edgeFromPortCrossParentContainer = validateEdgeFromPortCrossParentContainer(containerEP, portEP); assertFalse("The port " + portName + " has an edge that cross the parent container " + containerName, edgeFromPortCrossParentContainer); boolean validateEdgeFromPortHaveBendpointsReseted = validateEdgeFromPortHaveBendpointsReseted(containerEP, portEP); assertTrue("The port " + portName + " has an edge that don't have its bendpoints reseted " + containerName, validateEdgeFromPortHaveBendpointsReseted); }

Target:
private void validatePositionOfPortOnContainer(String containerName, String portName, boolean pinBorderedNodes) { SWTBotGefEditPart swtbotContainerEditPart = editor.getEditPart(containerName); assertNotNull("No container edit part found with this name", swtbotContainerEditPart); EditPart containerSquareEP = swtbotContainerEditPart.part(); assertTrue("The parent edit part of the container label is not a AbstractBorderedShapeEditPart", containerSquareEP.getParent() instanceof AbstractBorderedShapeEditPart); final AbstractBorderedShapeEditPart containerEP = (AbstractBorderedShapeEditPart) containerSquareEP.getParent(); final AbstractDiagramBorderNodeEditPart portEP = findPortInContainer(containerEP, portName); assertNotNull("No port edit part found with this name", portEP); if (pinBorderedNodes) { pinDiagramElement((DDiagramElement) ((Node) portEP.getModel()).getElement()); } boolean edgeFromPortCrossParentContainer = validateEdgeFromPortCrossParentContainer(containerEP, portEP); assertFalse("The port " + portName + " has an edge that cross the parent container " + containerName, edgeFromPortCrossParentContainer); boolean validateEdgeFromPortHaveBendpointsReset = validateEdgeFromPortHaveBendpointsReset(containerEP, portEP); assertTrue("The port " + portName + " has an edge that don't have its bendpoints reset " + containerName, validateEdgeFromPortHaveBendpointsReset); }
Source:
@Test void testAggregateRelMdColumnOrigins() { final RelBuilder relBuilder = RelBuilder.create(config().build()); final LogicalProject project = (LogicalProject) relBuilder.scan("EMP") .project(relBuilder.field("EMPNO"), relBuilder.field("ENAME"), relBuilder.field("JOB"), relBuilder.field("SAL"), relBuilder.field("DEPTNO")).build(); final LogicalAggregate aggregate = (LogicalAggregate) relBuilder.push(project) .aggregate( relBuilder.groupKey(relBuilder.field(1, 0, "DEPTNO")), relBuilder.count(relBuilder.field(1, 0, "SAL"))) .build(); RelMetadataQuery mq = aggregate.getCluster().getMetadataQuery(); final RelColumnOrigin nameColumn = mq.getColumnOrigin(aggregate, 0); assertThat(nameColumn.getOriginTable().getRowType(). getFieldNames().get(7).equals("DEPTNO"), is(true)); assertThat(nameColumn.getOriginColumnOrdinal() == 7, is(true)); }

Target:
@Test void testAggregateRelMdColumnOrigins() { final RelBuilder relBuilder = RelBuilder.create(config().build()); final LogicalProject project = (LogicalProject) relBuilder.scan("EMP") .project(relBuilder.field("EMPNO"), relBuilder.field("ENAME"), relBuilder.field("JOB"), relBuilder.field("SAL"), relBuilder.field("DEPTNO")).build(); final LogicalAggregate aggregate = (LogicalAggregate) relBuilder.push(project) .aggregate( relBuilder.groupKey(relBuilder.field(1, 0, "DEPTNO")), relBuilder.count(relBuilder.field(1, 0, "SAL"))) .build(); RelMetadataQuery mq = aggregate.getCluster().getMetadataQuery(); final RelColumnOrigin nameColumn = mq.getColumnOrigin(aggregate, 0); assertEquals(nameColumn.getOriginTable().getRowType(). getFieldNames().get(7), "DEPTNO"); assertEquals(nameColumn.getOriginColumnOrdinal(), 7); }
Source:
public InternationalFixedDate plusMonths(final long months) { if (months == 0) { return this; } int day = isYearDay() ? InternationalFixedChronology.DAYS_IN_MONTH : getCalculatedDayOfMonth(); int newMonth = (int) Math.addExact(getCalculatedProlepticMonth(), months); int year = newMonth / InternationalFixedChronology.MONTHS_IN_YEAR; newMonth = 1 + (newMonth % InternationalFixedChronology.MONTHS_IN_YEAR); return create(year, newMonth, day); }

Target:
public InternationalFixedDate plusMonths(final long months) { if (months == 0) { return this; } if (months % MONTHS_IN_YEAR == 0) { return plusYears(months / MONTHS_IN_YEAR); } int newMonth = (int) Math.addExact(getProlepticMonth(), months); int newYear = newMonth / MONTHS_IN_YEAR; newMonth = 1 + (newMonth % MONTHS_IN_YEAR); return resolvePreviousValid(newYear, newMonth, this.day); }
Source:
private void bindCard(SquareButtonViewHolder squareButtonViewHolder, int i, List<Object> payload) { HomeCardDisplayData cardDisplayData = getItem(i); String notificationText = null; if (payload != null) { notificationText = getLastPayloadString(payload); } cardDisplayData.textSetter.update(cardDisplayData, squareButtonViewHolder, context, notificationText); setupViewHolder(context, cardDisplayData, squareButtonViewHolder); }

Target:
private void bindCard(SquareButtonViewHolder squareButtonViewHolder, int i, List<Object> payload) { HomeCardDisplayData cardDisplayData = getItem(i); String notificationText = null; if (payload != null) { notificationText = getFirstPayloadString(payload); } cardDisplayData.textSetter.update(cardDisplayData, squareButtonViewHolder, context, notificationText); setupViewHolder(context, cardDisplayData, squareButtonViewHolder); }
Source:
public void setHeight(String height) { this.getElement().getStyle().setProperty("height", height); final String lineHeightStyle = "line-height: " + height + ";"; boolean isVisible = optionsPanel.isVisible(); currentItemLabel.setAttribute("style", lineHeightStyle); optionsPanel.getElement().setAttribute("style", lineHeightStyle + ";max-height:calc(6*" + height + ");"); optionsPanel.setVisible(isVisible); }

Target:
public void setHeight(String height) { this.getElement().getStyle().setProperty("height", height); currentItemLabel.getStyle().setProperty("lineHeight", height); optionsPanel.getElement().getStyle().setProperty("lineHeight", height); optionsPanel.getElement().getStyle().setProperty("maxHeight", "calc(" + dropDownSize + "*" + height + ")"); }
Source:
public static long getRandomLong(long n) { if (n<=0) { throw new IllegalArgumentException("Cannot generate random long in range [0,n) for n<=0."); } return (long)(new Random().nextDouble()*n); }

Target:
public static long getRandomLong(long n) { if (n<=0) { throw new IllegalArgumentException("Cannot generate random long in range [0,n) for n<=0."); } final int BITS_PER_LONG = 63; long bits, val; do { bits = new Random().nextLong() & (~(1L << BITS_PER_LONG)); val = bits % n; } while (bits - val + (n - 1) < 0L); return val; }
Source:
private void initEvaluator() throws DbException { ExpressionOperator op = getExpression().getRootExpressionOperator(); String pyFunc = ((PyUDFExpression) op).getName(); try { String pyCodeString = pyFunction.getFunction(pyFunc); if (pyCodeString == null) { LOGGER.info("no python UDF with name registered.", pyFunc); throw new DbException("No Python UDf with given name registered."); } else { LOGGER.info("tuple size is: " + tupleSize); pyWorker.sendCodePickle(pyCodeString, tupleSize, outputType, isFlatmap); } } catch (Exception e) { throw new DbException(e); } }

Target:
private void initEvaluator() throws DbException { ExpressionOperator op = getExpression().getRootExpressionOperator(); String pyFunctionName = ((PyUDFExpression) op).getName(); try { if (pyFuncRegistrar != null) { FunctionStatus fs = pyFuncRegistrar.getFunctionStatus(pyFunctionName); if (fs == null) { throw new DbException("No Python UDf with given name registered."); } isMultiValued = fs.getIsMultivalued(); pyWorker.sendCodePickle(fs.getBinary(), numColumns, outputType, isMultiValued); List<ExpressionOperator> childops = op.getChildren(); if (childops != null) { for (int i = 0; i < childops.size(); i++) { if (childops.get(i).getClass().equals(StateExpression.class)) { isStateColumn[i] = true; columnIdxs[i] = ((StateExpression) childops.get(i)).getColumnIdx(); } else if (childops.get(i).getClass().equals(VariableExpression.class)) { columnIdxs[i] = ((VariableExpression) childops.get(i)).getColumnIdx(); } else { throw new DbException( "Python expression can only have State or Variable expression as child expressions."); } } } } else { throw new DbException("PythonRegistrar should not be null in PythonUDFEvaluator."); } } catch (Exception e) { throw new DbException(e); } }
Source:
public void setValue(Double value, boolean fireEvents) { if (this.getValue().equals(value)) { view.setValue(value.toString()); if (fireEvents) { notifyValueChange(value.toString()); } } }

Target:
public void setValue(Double value, boolean fireEvents) { if (value == null && this.getValue() == null) { return; } if (this.getValue() == null || !this.getValue().equals(value)) { view.setValue(Objects.toString(value, null)); if (fireEvents) { notifyValueChange(Objects.toString(value, null)); } } }
Source:
public void runAction(final VdcActionType actionType, final VdcActionParametersBase parameters, final IFrontendActionAsyncCallback callback, final Object state, final boolean showErrorDialog) { VdcOperation<VdcActionType, VdcActionParametersBase> operation = new VdcOperation<VdcActionType, VdcActionParametersBase>(actionType, parameters, new VdcOperationCallback<VdcOperation<VdcActionType, VdcActionParametersBase>, VdcReturnValueBase>() { @Override public void onSuccess(final VdcOperation<VdcActionType, VdcActionParametersBase> operation, final VdcReturnValueBase result) { logger.finer("Frontend: sucessfully executed RunAction, determining result!"); handleActionResult(actionType, parameters, result, callback != null ? callback : NULLABLE_ASYNC_CALLBACK, state, showErrorDialog); } @Override public void onFailure(final VdcOperation<VdcActionType, VdcActionParametersBase> operation, final Throwable caught) { if (ignoreFailure(caught)) { return; } logger.log(Level.SEVERE, "Failed to execute RunAction: " + caught, caught); failureEventHandler(caught); FrontendActionAsyncResult f = new FrontendActionAsyncResult(actionType, parameters, null, state); if (callback != null) { callback.executed(f); } } }); getInstance().getOperationManager().addOperation(operation); }

Target:
public void runAction(final VdcActionType actionType, final VdcActionParametersBase parameters, final IFrontendActionAsyncCallback callback, final Object state, final boolean showErrorDialog) { VdcOperation<VdcActionType, VdcActionParametersBase> operation = new VdcOperation<VdcActionType, VdcActionParametersBase>(actionType, parameters, new VdcOperationCallback<VdcOperation<VdcActionType, VdcActionParametersBase>, VdcReturnValueBase>() { @Override public void onSuccess(final VdcOperation<VdcActionType, VdcActionParametersBase> operation, final VdcReturnValueBase result) { logger.finer("Frontend: sucessfully executed runAction, determining result!"); handleActionResult(actionType, parameters, result, callback != null ? callback : NULLABLE_ASYNC_CALLBACK, state, showErrorDialog); } @Override public void onFailure(final VdcOperation<VdcActionType, VdcActionParametersBase> operation, final Throwable caught) { if (ignoreFailure(caught)) { return; } logger.log(Level.SEVERE, "Failed to execute runAction: " + caught, caught); failureEventHandler(caught); FrontendActionAsyncResult f = new FrontendActionAsyncResult(actionType, parameters, null, state); if (callback != null) { callback.executed(f); } } }); getInstance().getOperationManager().addOperation(operation); }
Source:
private RevCommit parseCommit(AnyObjectId id) throws IncorrectObjectTypeException, IOException, MissingObjectException { if (id instanceof RevCommit) { return (RevCommit) id; } try (RevWalk walk = new RevWalk(this)) { return walk.parseCommit(id); } }

Target:
public RevCommit parseCommit(AnyObjectId id) throws IncorrectObjectTypeException, IOException, MissingObjectException { if (id instanceof RevCommit) { return (RevCommit) id; } try (RevWalk walk = new RevWalk(this)) { return walk.parseCommit(id); } }
Source:
public void assertInvalidFunction(String projection, StandardErrorCode errorCode, String messagePattern) { try { evaluateInvalid(projection); fail("Expected to throw a PrestoException with message matching " + messagePattern); } catch (PrestoException e) { try { assertEquals(e.getErrorCode(), errorCode.toErrorCode()); assertTrue(e.getMessage().equals(messagePattern) || e.getMessage().matches(messagePattern), format("Exception message[%s] should either equals or matches messagePattern[%s]", e.getMessage(), messagePattern)); } catch (Throwable failure) { failure.addSuppressed(e); throw failure; } } }

Target:
public void assertInvalidFunction(String projection, StandardErrorCode errorCode, String messagePattern) { try { evaluateInvalid(projection); fail("Expected to throw a PrestoException with message matching " + messagePattern); } catch (PrestoException e) { try { assertEquals(e.getErrorCode(), errorCode.toErrorCode()); assertTrue(e.getMessage().equals(messagePattern) || e.getMessage().matches(messagePattern), format("Error message [%s] doesn't match [%s]", e.getMessage(), messagePattern)); } catch (Throwable failure) { failure.addSuppressed(e); throw failure; } } }
Source:
protected Node visitShowPartitions(ShowPartitions showPartitions, Void context) { QualifiedObjectName table = createQualifiedObjectName(session, showPartitions, showPartitions.getTable()); metadata.getTableHandle(session, table) .orElseThrow(() -> new SemanticException(MISSING_TABLE, showPartitions, "Table '%s' does not exist", table)); QualifiedObjectName partitionsTable = new QualifiedObjectName(table.getCatalogName(), table.getSchemaName(), table.getObjectName() + "$partitions"); metadata.getTableHandle(session, partitionsTable) .orElseThrow(() -> new SemanticException(NOT_SUPPORTED, showPartitions, "Table '%s' is not partitioned ", table)); return simpleQuery( selectList(new AllColumns()), new Table(QualifiedName.of(partitionsTable.getCatalogName(), partitionsTable.getSchemaName(), partitionsTable.getObjectName())), showPartitions.getWhere(), Optional.empty(), Optional.empty(), orderBy(showPartitions.getOrderBy()), showPartitions.getLimit()); }

Target:
protected Node visitShowPartitions(ShowPartitions showPartitions, Void context) { QualifiedObjectName table = createQualifiedObjectName(session, showPartitions, showPartitions.getTable()); if (!metadata.getTableHandle(session, table).isPresent()) { throw new SemanticException(MISSING_TABLE, showPartitions, "Table '%s' does not exist", table); } QualifiedObjectName partitionsTable = new QualifiedObjectName(table.getCatalogName(), table.getSchemaName(), table.getObjectName() + "$partitions"); if (!metadata.getTableHandle(session, partitionsTable).isPresent()) { throw new SemanticException(NOT_SUPPORTED, showPartitions, "Table does not have partition columns: %s", table); } return simpleQuery( selectList(new AllColumns()), new Table(createQualifiedName(partitionsTable)), showPartitions.getWhere(), Optional.empty(), Optional.empty(), orderBy(showPartitions.getOrderBy()), showPartitions.getLimit()); }
Source:
public void testInjection() throws Exception { final Injector injector = Guice.createInjector( new AzkabanCommonModule(props), new AzkabanWebServerModule() ); SERVICE_PROVIDER.unsetInjector(); SERVICE_PROVIDER.setInjector(injector); final ExecutorLoader executorLoader = injector.getInstance(ExecutorLoader.class); assertNotNull(executorLoader); final Executor executor = executorLoader.addExecutor("localhost", 60000); executor.setActive(true); executorLoader.updateExecutor(executor); assertNotNull(injector.getInstance(ExecutionFlowDao.class)); assertNotNull(injector.getInstance(DatabaseOperator.class)); assertSingleton(ExecutorLoader.class, injector); assertSingleton(ExecutorManager.class, injector); assertSingleton(ProjectLoader.class, injector); assertSingleton(ProjectManager.class, injector); assertSingleton(Storage.class, injector); assertSingleton(TriggerLoader.class, injector); assertSingleton(TriggerManager.class, injector); assertSingleton(AlerterHolder.class, injector); assertSingleton(Emailer.class, injector); assertSingleton(ExecutionFlowDao.class, injector); assertSingleton(ExecutorDao.class, injector); assertSingleton(ExecutionJobDao.class, injector); assertSingleton(ExecutionLogsDao.class, injector); assertSingleton(ExecutorEventsDao.class, injector); assertSingleton(ActiveExecutingFlowsDao.class, injector); assertSingleton(FetchActiveFlowDao.class, injector); assertSingleton(H2FileDataSource.class, injector); SERVICE_PROVIDER.unsetInjector(); }

Target:
public void testInjection() throws Exception { final Injector injector = Guice.createInjector( new AzkabanCommonModule(props), new AzkabanWebServerModule() ); SERVICE_PROVIDER.unsetInjector(); SERVICE_PROVIDER.setInjector(injector); final ExecutorLoader executorLoader = injector.getInstance(ExecutorLoader.class); assertNotNull(executorLoader); final Executor executor = executorLoader.addExecutor("localhost", 60000); executor.setActive(true); executorLoader.updateExecutor(executor); assertNotNull(injector.getInstance(ExecutionFlowDao.class)); assertNotNull(injector.getInstance(DatabaseOperator.class)); assertSingleton(ExecutorLoader.class, injector); assertSingleton(ExecutorManager.class, injector); assertSingleton(ProjectLoader.class, injector); assertSingleton(ProjectManager.class, injector); assertSingleton(Storage.class, injector); assertSingleton(TriggerLoader.class, injector); assertSingleton(TriggerManager.class, injector); assertSingleton(AlerterHolder.class, injector); assertSingleton(Emailer.class, injector); assertSingleton(ExecutionFlowDao.class, injector); assertSingleton(ExecutorDao.class, injector); assertSingleton(ExecutionJobDao.class, injector); assertSingleton(ExecutionLogsDao.class, injector); assertSingleton(ExecutorEventsDao.class, injector); assertSingleton(ActiveExecutingFlowsDao.class, injector); assertSingleton(FetchActiveFlowDao.class, injector); assertSingleton(AzkabanWebServer.class, injector); assertSingleton(H2FileDataSource.class, injector); SERVICE_PROVIDER.unsetInjector(); }
Source:
public String instantiateProcess(final Map<String, Serializable> inputs) throws ProcessDefinitionNotFoundException, ProcessActivationException, ProcessExecutionException, FileNotFoundException { final String userId = getRequestParameter(USER_PARAM); final long processDefinitionId = getProcessDefinitionIdParameter(); try { final ContractDefinition processContract = processAPI.getProcessContract(processDefinitionId); final long tenantId = apiSession.getTenantId(); final long maxSizeForTenant = PropertiesFactory.getConsoleProperties(tenantId).getMaxSize(); final Map<String, Serializable> processedInputs = typeConverterUtil.getProcessedInput(processContract, inputs, maxSizeForTenant, tenantId); long processInstanceId; if (userId == null) { processInstanceId = processAPI.startProcessWithInputs(processDefinitionId, processedInputs).getId(); } else { processInstanceId = processAPI.startProcessWithInputs(Long.parseLong(userId), processDefinitionId, processedInputs).getId(); } final JsonNodeFactory factory = JsonNodeFactory.instance; final ObjectNode returnedObject = factory.objectNode(); returnedObject.put("processInstanceId", processInstanceId); return returnedObject.toString(); } catch (final ContractViolationException e) { manageContractViolationException(e, "Cannot instantiate process task."); return null; } catch (final Exception e) { e.printStackTrace(); throw e; } }

Target:
public String instantiateProcess(final Map<String, Serializable> inputs) throws ProcessDefinitionNotFoundException, ProcessActivationException, ProcessExecutionException, FileNotFoundException { final String userId = getRequestParameter(USER_PARAM); final long processDefinitionId = getProcessDefinitionIdParameter(); try { final ContractDefinition processContract = processAPI.getProcessContract(processDefinitionId); final long tenantId = apiSession.getTenantId(); final long maxSizeForTenant = PropertiesFactory.getConsoleProperties(tenantId).getMaxSize(); final Map<String, Serializable> processedInputs = typeConverterUtil.getProcessedInput(processContract, inputs, maxSizeForTenant, tenantId); long processInstanceId; if (userId == null) { processInstanceId = processAPI.startProcessWithInputs(processDefinitionId, processedInputs).getId(); } else { processInstanceId = processAPI.startProcessWithInputs(Long.parseLong(userId), processDefinitionId, processedInputs).getId(); } final JsonNodeFactory factory = JsonNodeFactory.instance; final ObjectNode returnedObject = factory.objectNode(); returnedObject.put(CASE_ID_ATTRIBUTE, processInstanceId); return returnedObject.toString(); } catch (final ContractViolationException e) { manageContractViolationException(e, "Cannot instantiate process task."); return null; } catch (final Exception e) { e.printStackTrace(); throw e; } }
Source:
private MVCCEntry wrapMvccEntryForPut(InvocationContext ctx, Object key, CacheEntry cacheEntry, Metadata providedMetadata, boolean skipRead) { if (cacheEntry instanceof MVCCEntry) { MVCCEntry mvccEntry = (MVCCEntry) cacheEntry; updateMetadata(mvccEntry, providedMetadata); return mvccEntry; } return wrapInternalCacheEntryForPut(ctx, key, (InternalCacheEntry) cacheEntry, providedMetadata, true); }

Target:
private MVCCEntry wrapMvccEntryForPut(InvocationContext ctx, Object key, CacheEntry cacheEntry, Metadata providedMetadata, boolean skipRead) { if (cacheEntry instanceof MVCCEntry) { MVCCEntry mvccEntry = (MVCCEntry) cacheEntry; updateMetadata(mvccEntry, providedMetadata); return mvccEntry; } return wrapInternalCacheEntryForPut(ctx, key, (InternalCacheEntry) cacheEntry, providedMetadata, skipRead); }
Source:
public static int getRemoteVersion(Project project) { if (!project.isRemote()) { return -1; } return Integer.valueOf(ProjectUtilities.getVersion(project.getPrimaryProject()).getName()); }

Target:
public static long getRemoteVersion(Project project) { if (!project.isRemote()) { return -1; } return Long.valueOf(ProjectUtilities.getVersion(project.getPrimaryProject()).getName()); }
Source:
private DataSet<ExecRow> getTableDataSet(DataSetProcessor dsp, long conglomerateId, List<DDLMessage.TentativeIndex> tentativeIndexList) throws StandardException { SpliceConglomerate conglomerate = (SpliceConglomerate) ((SpliceTransactionManager) activation.getTransactionController()).findConglomerate(conglomerateId); int[] formatIds = conglomerate.getFormat_ids(); int[] columnOrdering = conglomerate.getColumnOrdering(); int[] baseColumnMap = getBaseColumnMap(tentativeIndexList); FormatableBitSet accessedKeyColumns = new FormatableBitSet(columnOrdering.length); ExecRow templateRow = getTemplateRow(baseColumnMap, formatIds); this.leadingIndexColumnInfoMap = getIndexColumnMap(tentativeIndexList, baseColumnMap); DataSet<ExecRow> scanSet = dsp.<TableScanOperation,ExecRow>newScanSet(null, Long.toString(conglomerateId)) .activation(activation) .tableDisplayName(tableName) .transaction(txn) .scan(createScan(txn)) .tableVersion(tableVersion) .template(templateRow) .keyColumnEncodingOrder(columnOrdering) .keyColumnTypes(ScanOperation.getKeyFormatIds(columnOrdering, formatIds)) .accessedKeyColumns(accessedKeyColumns) .keyDecodingMap(ScanOperation.getKeyDecodingMap(accessedKeyColumns, columnOrdering, baseColumnMap)) .rowDecodingMap(ScanOperation.getRowDecodingMap(accessedKeyColumns, columnOrdering, baseColumnMap)) .baseColumnMap(baseColumnMap) .buildDataSet(); return scanSet; }

Target:
private DataSet<ExecRow> getTableDataSet(DataSetProcessor dsp, long conglomerateId, List<DDLMessage.TentativeIndex> tentativeIndexList) throws StandardException { SpliceConglomerate conglomerate = (SpliceConglomerate) ((SpliceTransactionManager) activation.getTransactionController()).findConglomerate(conglomerateId); int[] formatIds = conglomerate.getFormat_ids(); int[] columnOrdering = conglomerate.getColumnOrdering(); int[] baseColumnMap = getBaseColumnMap(tentativeIndexList); FormatableBitSet accessedKeyColumns = getAccessedKeyColumns(columnOrdering, baseColumnMap); ExecRow templateRow = getTemplateRow(baseColumnMap, formatIds); ExecRow defaultValueRow = getDefaultValueRow(baseColumnMap, templateRow); FormatableBitSet defaultValueMap = getDefaultValueMap(defaultValueRow); this.leadingIndexColumnInfoMap = getIndexColumnMap(tentativeIndexList, baseColumnMap); DataSet<ExecRow> scanSet = dsp.<TableScanOperation,ExecRow>newScanSet(null, Long.toString(conglomerateId)) .activation(activation) .tableDisplayName(tableName) .transaction(txn) .scan(createScan(txn)) .tableVersion(tableVersion) .template(templateRow) .keyColumnEncodingOrder(columnOrdering) .keyColumnTypes(ScanOperation.getKeyFormatIds(columnOrdering, formatIds)) .accessedKeyColumns(accessedKeyColumns) .keyDecodingMap(ScanOperation.getKeyDecodingMap(accessedKeyColumns, columnOrdering, baseColumnMap)) .rowDecodingMap(ScanOperation.getRowDecodingMap(accessedKeyColumns, columnOrdering, baseColumnMap)) .baseColumnMap(baseColumnMap) .defaultRow(defaultValueRow, defaultValueMap) .buildDataSet(); return scanSet; }
Source:
private boolean resolveOptionalConstraints(ResolverBundle bundle) { BundleConstraint[] requires = bundle.getRequires(); List<ResolverBundle> cycle = new ArrayList<>(); boolean resolvedOptional = false; for (BundleConstraint require : requires) { if (require.isOptional() && require.getSelectedSupplier() == null) { cycle.clear(); resolveRequire(require, cycle); if (require.getSelectedSupplier() != null) { resolvedOptional = true; } } } ResolverImport[] imports = bundle.getImportPackages(); for (ResolverImport import1 : imports) { if (import1.isOptional() && import1.getSelectedSupplier() == null) { cycle.clear(); resolveImport(import1, cycle); if (import1.getSelectedSupplier() != null) { resolvedOptional = true; } } } return resolvedOptional; }

Target:
private boolean resolveOptionalConstraints(ResolverBundle bundle) { BundleConstraint[] requires = bundle.getRequires(); List<ResolverBundle> cycle = new ArrayList<>(); boolean resolvedOptional = false; for (BundleConstraint require : requires) { if (require.isOptional() && require.getSelectedSupplier() == null) { cycle.clear(); resolveRequire(require, cycle); if (require.getSelectedSupplier() != null) { resolvedOptional = true; } } } ResolverImport[] imports = bundle.getImportPackages(); for (ResolverImport resolverImport : imports) { if (resolverImport.isOptional() && resolverImport.getSelectedSupplier() == null) { cycle.clear(); resolveImport(resolverImport, cycle); if (resolverImport.getSelectedSupplier() != null) { resolvedOptional = true; } } } return resolvedOptional; }
Source:
public ExpressionEvaluator getOrCreate(FactMappingValue factMappingValue) { if (Type.DMN.equals(type)) { return getOrCreateDMNExpressionEvaluator(); } Object rawValue = factMappingValue.getRawValue(); if (rawValue instanceof String && ((String) rawValue).startsWith("#")) { return getOrCreateMVELExpressionEvaluator(); } else { return getOrCreateBaseExpressionEvaluator(); } }

Target:
public ExpressionEvaluator getOrCreate(FactMappingValue factMappingValue) { if (Type.DMN.equals(type)) { return getOrCreateDMNExpressionEvaluator(); } Object rawValue = factMappingValue.getRawValue(); if (rawValue instanceof String && ((String) rawValue).trim().startsWith(MVEL_ESCAPE_SYMBOL)) { return getOrCreateMVELExpressionEvaluator(); } else { return getOrCreateBaseExpressionEvaluator(); } }
Source:
default void onExecutionStart() { throw new UnsupportedOperationException("Method is not implemented"); }

Target:
default void onExecutionStart() { }
Source:
private void createNameForm(Composite composite) { Group group = createGroup(composite, Messages.SelectDiagramKindPage_diagram_name_group); nameText = new Text(group, SWT.BORDER); nameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); nameText.setText(Messages.SelectDiagramKindPage_default_diagram_name); ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() > 0) { IStructuredSelection sSelection = (IStructuredSelection) selection; Object selectedObject = sSelection.getFirstElement(); if (selectedObject instanceof IAdaptable) { IFile selectedIFile = ((IAdaptable) selectedObject).getAdapter(IFile.class); if (selectedIFile != null) { try { ResourceSet resourceSet = new ResourceSetImpl(); Resource resource = resourceSet.getResource(URI.createURI(selectedIFile.getLocationURI().toString()), true); EObject sEObject = resource.getContents().get(0); if (sEObject != null && sEObject instanceof org.eclipse.uml2.uml.Package) { org.eclipse.uml2.uml.Package sPackage = (org.eclipse.uml2.uml.Package) sEObject; nameText.setText(sPackage.getName()); } } catch (Exception e) { Activator.log.error(e); } } } } nameText.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { validatePage(); } }); }

Target:
private void createNameForm(Composite composite) { Group group = createGroup(composite, Messages.SelectDiagramKindPage_diagram_name_group); nameText = new Text(group, SWT.BORDER); nameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); nameText.setText(Messages.SelectDiagramKindPage_default_diagram_name); ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() > 0) { IStructuredSelection sSelection = (IStructuredSelection) selection; Object selectedObject = sSelection.getFirstElement(); if (selectedObject instanceof IAdaptable) { IFile selectedIFile = ((IAdaptable) selectedObject).getAdapter(IFile.class); if (selectedIFile != null) { try { ResourceSet resourceSet = new ResourceSetImpl(); Resource resource = resourceSet.getResource(URI.createURI(selectedIFile.getLocationURI().toString()), true); if (resource.getContents().size() > 0) { EObject sEObject = resource.getContents().get(0); if (sEObject != null && sEObject instanceof org.eclipse.uml2.uml.Package) { org.eclipse.uml2.uml.Package sPackage = (org.eclipse.uml2.uml.Package) sEObject; nameText.setText(sPackage.getName()); } } } catch (Exception e) { this.setErrorMessage(Messages.SelectDiagramKindPage_Set_Root_Name_Error); Activator.log.error(e); } } } } nameText.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { validatePage(); } }); }
Source:
protected static String buildCredential(String key, String secret) { StringBuilder strBuilder = new StringBuilder(); strBuilder.append(key); strBuilder.append(':'); strBuilder.append(secret); return Base64.getEncoder().encodeToString(strBuilder.toString().getBytes(DEFAULT_CHARSET)); }

Target:
protected static String buildCredential(String key, String secret) { return Base64.getEncoder().encodeToString((key + ':' + secret).getBytes(DEFAULT_CHARSET)); }
Source:
public static InstanceType map(org.ovirt.engine.core.common.businessentities.InstanceType entity, InstanceType incoming) { InstanceType model = incoming != null ? incoming : new InstanceType(); mapCommonEntityToModel(model, (VmTemplate) entity); model.setDisplay(DisplayMapper.map(entity, null)); if (entity.getDefaultBootSequence() != null) { OperatingSystem os = new OperatingSystem(); if (entity.getDefaultBootSequence() != null) { for (Boot boot : VmMapper.map(entity.getDefaultBootSequence(), null)) { os.getBoot().add(boot); } } model.setOs(os); } return model; }

Target:
public static InstanceType map(org.ovirt.engine.core.common.businessentities.InstanceType entity, InstanceType incoming) { InstanceType model = incoming != null ? incoming : new InstanceType(); mapCommonEntityToModel(model, (VmTemplate) entity); model.setDisplay(DisplayMapper.map(entity, null)); if (entity.getDefaultBootSequence() != null) { OperatingSystem os = model.getOs(); if (os == null) { os = new OperatingSystem(); } if (entity.getDefaultBootSequence() != null) { for (Boot boot : VmMapper.map(entity.getDefaultBootSequence(), null)) { os.getBoot().add(boot); } } model.setOs(os); } return model; }
Source:
public void visitReturnStatement(ReturnStatementTree tree) { Tree parent = tree.parent(); while (!parent.is(Tree.Kind.METHOD)) { parent = parent.parent(); if (parent == null) { return; } } MethodTree methodTree = (MethodTree) parent; String nonNullAnnotation = nonNullAnnotation((JavaSymbol) methodTree.symbol()); if (nonNullAnnotation != null) { SymbolicValue returnedValue = programState.peekValue(); Constraint constraint = programState.getConstraint(returnedValue); if (constraint == null) { reportIssue(tree, "This method''s return value is marked \"{0}\" but null may be returned.", nonNullAnnotation); } else if (constraint.isNull()) { reportIssue(tree, "This method''s return value is marked \"{0}\" but null is returned.", nonNullAnnotation); } } }

Target:
public void visitReturnStatement(ReturnStatementTree tree) { Tree parent = tree.parent(); while (!parent.is(Tree.Kind.METHOD)) { parent = parent.parent(); if (parent == null) { return; } } MethodTree mTree = (MethodTree) parent; String nonNullAnnotation = nonNullAnnotation(mTree.symbol()); if (nonNullAnnotation != null && isLocalExpression(tree.expression())) { checkReturnedValue(tree, nonNullAnnotation); } }
Source:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } AvroReplacementDescriptor other = (AvroReplacementDescriptor) obj; if (forbidden == null) { if (other.forbidden != null) { return false; } } else if (!forbidden.equals(other.forbidden)) { return false; } return true; }

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } AvroReplacementDescriptor other = (AvroReplacementDescriptor) obj; return Objects.equals(forbidden, other.forbidden); }
Source:
public String getDataLoadingPolicy() { if (StringUtils.isBlank(dataLoadingPolicy)) { return NEVER_LOAD; } String dlp = dataLoadingPolicy.toLowerCase(); if (!DATA_LOADING_POLICIES.contains(dlp)) { throw new DirectoryException("Invalid dataLoadingPolicy: " + dataLoadingPolicy + ", it should be one of: " + DATA_LOADING_POLICIES); } return dlp; }

Target:
public String getDataLoadingPolicy() { if (StringUtils.isBlank(dataLoadingPolicy)) { return DATA_LOADING_POLICY_LEGACY; } String dlp = dataLoadingPolicy.toLowerCase(Locale.ENGLISH); checkDataLoadingPolicy(dlp); return dlp; }
Source:
private static void assertValue(int priority) { if (priority < 0 || priority > 10) { throw new TaskAssigningRuntimeException(String.format("Task priority %s is out of range. " + "A valid priority value must be between 0 (inclusive) " + " and 10 (inclusive)", priority)); } }

Target:
private static void assertValue(int priority) { if (priority < 0 || priority > 10) { throw new IllegalArgumentException(String.format("Task priority %s is out of range. " + "A valid priority value must be between 0 (inclusive) " + " and 10 (inclusive)", priority)); } }
Source:
public PageTitle(final String namespace, final String text) { this.namespace = namespace; this.text = text.replaceAll("\\s+", "_"); }

Target:
public PageTitle(final String namespace, final String text) { this.namespace = namespace; this.text = text; }
Source:
public boolean removeAttributeWithoutCheck(PerunSession sess, Host host, AttributeDefinition attribute) throws InternalErrorException, WrongAttributeAssignmentException { getAttributesManagerImpl().checkNamespace(sess, attribute, AttributesManager.NS_HOST_ATTR); if (getAttributesManagerImpl().isCoreAttribute(sess, attribute)) throw new WrongAttributeAssignmentException(attribute); boolean changed = getAttributesManagerImpl().removeAttribute(sess, host, attribute); if (changed) { try { getAttributesManagerImpl().changedAttributeHook(sess, host, new Attribute(attribute)); } catch (WrongAttributeValueException | WrongReferenceAttributeValueException ex) { throw new InternalErrorException(ex); } log.info("{} removed this attribute from host {}", sess.getLogId(), attribute.getName(), host.getId()); getPerunBl().getAuditer().log(sess, "{} removed for {}.", new AttributeDefinition(attribute), host); } return changed; }

Target:
public boolean removeAttributeWithoutCheck(PerunSession sess, Host host, AttributeDefinition attribute) throws InternalErrorException, WrongAttributeAssignmentException { getAttributesManagerImpl().checkNamespace(sess, attribute, AttributesManager.NS_HOST_ATTR); if (getAttributesManagerImpl().isCoreAttribute(sess, attribute)) throw new WrongAttributeAssignmentException(attribute); boolean changed = getAttributesManagerImpl().removeAttribute(sess, host, attribute); if (changed) { try { getAttributesManagerImpl().changedAttributeHook(sess, host, new Attribute(attribute)); } catch (WrongAttributeValueException | WrongReferenceAttributeValueException ex) { throw new InternalErrorException(ex); } log.info("{} removed attribute from host {}.", sess.getLogId(), attribute.getName(), host.getId()); getPerunBl().getAuditer().log(sess, "{} removed for {}", new AttributeDefinition(attribute), host); } return changed; }