auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testSimplestMessage() throws Exception { RecordConsumer readConsumerMock = Mockito.mock(RecordConsumer.class); ProtoWriteSupport instance = createReadConsumerInstance(TestProtobuf.InnerMessage.class, readConsumerMock); TestProtobuf.InnerMessage.Builder msg = TestProtobuf.InnerMessage.newBuilder(); msg.setOne("oneValue"); instance.write(msg.build()); InOrder inOrder = Mockito.inOrder(readConsumerMock); inOrder.verify(readConsumerMock).startMessage(); inOrder.verify(readConsumerMock).startField("one", 0); inOrder.verify(readConsumerMock).addBinary(Binary.fromConstantByteArray("oneValue".getBytes())); inOrder.verify(readConsumerMock).endField("one", 0); inOrder.verify(readConsumerMock).endMessage(); Mockito.verifyNoMoreInteractions(readConsumerMock); }

Target:
public void testSimplestMessage() throws Exception { RecordConsumer readConsumerMock = Mockito.mock(RecordConsumer.class); ProtoWriteSupport instance = createReadConsumerInstance(TestProtobuf.InnerMessage.class, readConsumerMock); TestProtobuf.InnerMessage.Builder msg = TestProtobuf.InnerMessage.newBuilder(); msg.setOne("oneValue"); instance.write(msg.build()); InOrder inOrder = Mockito.inOrder(readConsumerMock); inOrder.verify(readConsumerMock).startMessage(); inOrder.verify(readConsumerMock).startField("one", 0); inOrder.verify(readConsumerMock).addBinary(Binary.fromString("oneValue")); inOrder.verify(readConsumerMock).endField("one", 0); inOrder.verify(readConsumerMock).endMessage(); Mockito.verifyNoMoreInteractions(readConsumerMock); }
Source:
protected ActionResult execute() { gateKeeper.verifyAdminPrivileges(account); data = new AdminSessionsPageData(account, sessionToken); isShowAll = getRequestParamAsBoolean("all"); ActionResult result = createShowPageResultIfParametersInvalid(); if (result != null) { return result; } Date rangeStartUtc = TimeHelper.convertLocalDateToUtc(this.rangeStart, zone); Date rangeEndUtc = TimeHelper.convertLocalDateToUtc(this.rangeEnd, zone); List<FeedbackSessionAttributes> allOpenFeedbackSessionsList = logic.getAllOpenFeedbackSessions(rangeStartUtc, rangeEndUtc); result = createShowPageResultIfNoOngoingSession(allOpenFeedbackSessionsList); if (result != null) { return result; } result = createAdminSessionPageResult(allOpenFeedbackSessionsList); return result; }

Target:
protected ActionResult execute() { gateKeeper.verifyAdminPrivileges(account); data = new AdminSessionsPageData(account, sessionToken); isShowAll = getRequestParamAsBoolean("all"); ActionResult result = createShowPageResultIfParametersInvalid(); if (result != null) { return result; } Date rangeStartUtc = TimeHelper.convertLocalDateToUtc(rangeStart, zone); Date rangeEndUtc = TimeHelper.convertLocalDateToUtc(rangeEnd, zone); List<FeedbackSessionAttributes> allOpenFeedbackSessionsList = logic.getAllOpenFeedbackSessions(rangeStartUtc, rangeEndUtc); result = createShowPageResultIfNoOngoingSession(allOpenFeedbackSessionsList); if (result != null) { return result; } result = createAdminSessionPageResult(allOpenFeedbackSessionsList); return result; }
Source:
public MessageFormatMetrics(MetricRegistry registry) { calculateOffsetMessageSendTime = registry.histogram(MetricRegistry.name(MessageFormatSend.class, "CalculateOffsetMessageSendTime")); }

Target:
public MessageFormatMetrics(MetricRegistry registry) { calculateOffsetMessageFormatSendTime = registry.histogram(MetricRegistry.name(MessageFormatSend.class, "CalculateOffsetMessageFormatSendTime")); }
Source:
private List<SingularityPendingTask> getScheduledTaskIds(int numMissingInstances, List<SingularityTaskId> matchingTaskIds, SingularityRequest request, RequestState state, SingularityDeployStatistics deployStatistics, String deployId, SingularityPendingRequest pendingRequest, Optional<SingularityPendingDeploy> maybePendingDeploy) { final Optional<Long> nextRunAt = getNextRunAt(request, state, deployStatistics, pendingRequest, maybePendingDeploy); if (!nextRunAt.isPresent()) { return Collections.emptyList(); } final Set<Integer> inuseInstanceNumbers = Sets.newHashSetWithExpectedSize(matchingTaskIds.size()); for (SingularityTaskId matchingTaskId : matchingTaskIds) { inuseInstanceNumbers.add(matchingTaskId.getInstanceNo()); } final List<SingularityPendingTask> newTasks = Lists.newArrayListWithCapacity(numMissingInstances); int nextInstanceNumber = 1; for (int i = 0; i < numMissingInstances; i++) { while (inuseInstanceNumbers.contains(nextInstanceNumber)) { nextInstanceNumber++; } newTasks.add( new SingularityPendingTask( new SingularityPendingTaskId( request.getId(), deployId, nextRunAt.get(), nextInstanceNumber, pendingRequest.getPendingType(), pendingRequest.getTimestamp()), pendingRequest.getCmdLineArgsList(), pendingRequest.getUser(), pendingRequest.getRunId(), pendingRequest.getSkipHealthchecks(), pendingRequest.getMessage(), pendingRequest.getResources(), null, pendingRequest.getActionId())); nextInstanceNumber++; } return newTasks; }

Target:
private List<SingularityPendingTask> getScheduledTaskIds(int numMissingInstances, List<SingularityTaskId> matchingTaskIds, SingularityRequest request, RequestState state, SingularityDeployStatistics deployStatistics, String deployId, SingularityPendingRequest pendingRequest, Optional<SingularityPendingDeploy> maybePendingDeploy) { final Optional<Long> nextRunAt = getNextRunAt(request, state, deployStatistics, pendingRequest, maybePendingDeploy); if (!nextRunAt.isPresent()) { return Collections.emptyList(); } final Set<Integer> inuseInstanceNumbers = Sets.newHashSetWithExpectedSize(matchingTaskIds.size()); for (SingularityTaskId matchingTaskId : matchingTaskIds) { inuseInstanceNumbers.add(matchingTaskId.getInstanceNo()); } final List<SingularityPendingTask> newTasks = Lists.newArrayListWithCapacity(numMissingInstances); int nextInstanceNumber = 1; for (int i = 0; i < numMissingInstances; i++) { while (inuseInstanceNumbers.contains(nextInstanceNumber)) { nextInstanceNumber++; } newTasks.add( new SingularityPendingTask( new SingularityPendingTaskId( request.getId(), deployId, nextRunAt.get(), nextInstanceNumber, pendingRequest.getPendingType(), pendingRequest.getTimestamp()), pendingRequest.getCmdLineArgsList(), pendingRequest.getUser(), pendingRequest.getRunId(), pendingRequest.getSkipHealthchecks(), pendingRequest.getMessage(), pendingRequest.getResources(), pendingRequest.getRunAsUserOverride(), pendingRequest.getEnvOverrides(), pendingRequest.getExtraArtifacts(), pendingRequest.getActionId())); nextInstanceNumber++; } return newTasks; }
Source:
public TupleBatch[] partition(final TupleBatch tb) { BitSet[] partitions = new BitSet[numPartition()]; for (int i = 0; i < tb.numTuples(); i++) { int p = 0; for (int j = 0; j < hashedColumns.length; j++) { p += Math.floorMod( HashUtils.hashSubRow(tb, new int[] {hashedColumns[j]}, i, mappedHCDimensions[j]), hyperCubeDimensions[mappedHCDimensions[j]]); if (p != hashedColumns.length - 1) { p *= hyperCubeDimensions[mappedHCDimensions[j]]; } } partitions[p].set(i); } TupleBatch[] tbs = new TupleBatch[numPartition()]; for (int i = 0; i < tbs.length; ++i) { tbs[i] = tb.filter(partitions[i]); } return tbs; }

Target:
public TupleBatch[] partition(final TupleBatch tb) { BitSet[] partitions = new BitSet[numPartitions()]; for (int i = 0; i < partitions.length; ++i) { partitions[i] = new BitSet(); } for (int i = 0; i < tb.numTuples(); i++) { int p = 0; for (int j = 0; j < hashedColumns.length; j++) { p += Math.floorMod( HashUtils.hashSubRow(tb, new int[] {hashedColumns[j]}, i, mappedHCDimensions[j]), hyperCubeDimensions[mappedHCDimensions[j]]); if (p != hashedColumns.length - 1) { p *= hyperCubeDimensions[mappedHCDimensions[j]]; } } partitions[p].set(i); } TupleBatch[] tbs = new TupleBatch[numPartitions()]; for (int i = 0; i < tbs.length; ++i) { tbs[i] = tb.filter(partitions[i]); } return tbs; }
Source:
private static void testBasicStatisticsRoundTrip(HiveBasicStatistics expected) { assertThat(getHiveBasicStatistics(toStatisticParameters(expected))) .isEqualTo(expected); }

Target:
private static void testBasicStatisticsRoundTrip(HiveBasicStatistics expected) { assertEquals(getHiveBasicStatistics(updateStatisticParameters(ImmutableMap.of(), expected)), expected); }
Source:
private ChargeStatus determineTerminalState(ChargeEntity chargeEntity, GatewayResponse<BaseCancelResponse> cancelResponse, StatusFlow statusFlow) { if (!cancelResponse.isSuccessful() && !cancelResponse.getBaseResponse().isPresent()) { logUnsuccessfulResponseReasons(chargeEntity, cancelResponse); return statusFlow.getFailureTerminalState(); } switch (cancelResponse.getBaseResponse().get().cancelStatus()) { case CANCELLED: return statusFlow.getSuccessTerminalState(); case SUBMITTED: return statusFlow.getSubmittedState(); } return statusFlow.getFailureTerminalState(); }

Target:
private ChargeStatus determineTerminalState(ChargeEntity chargeEntity, GatewayResponse<BaseCancelResponse> cancelResponse, StatusFlow statusFlow) { if (!cancelResponse.isSuccessful()) { logUnsuccessfulResponseReasons(chargeEntity, cancelResponse); } return cancelResponse.getBaseResponse().map(response -> { switch (response.cancelStatus()) { case CANCELLED: return statusFlow.getSuccessTerminalState(); case SUBMITTED: return statusFlow.getSubmittedState(); default: return statusFlow.getFailureTerminalState(); } }).orElse(statusFlow.getFailureTerminalState()); }
Source:
public void intercept(IMethodInvocation invocation) throws Throwable { Object result = evaluateCondition(condition, invocation, invocation.getIteration().getDataVariables()); iterationConditionResult(GroovyRuntimeUtil.isTruthy(result), annotation, invocation); invocation.proceed(); }

Target:
public void intercept(IMethodInvocation invocation) throws Throwable { Object result = evaluateCondition(condition, invocation.getInstance(), invocation.getIteration().getDataVariables()); iterationConditionResult(GroovyRuntimeUtil.isTruthy(result), annotation, invocation); invocation.proceed(); }
Source:
public boolean isDirty() { boolean dirty = super.isDirty(); if (dirty) { return dirty; } return fDirty.get() != 0; }

Target:
public boolean isDirty() { return super.isDirty() || (fDirty.get() != 0); }
Source:
void onAddMe(ClickEvent e) { String reviewer = Gerrit.getUserAccountInfo().name(); if (!reviewer.isEmpty()) { addReviewer(reviewer, false); } }

Target:
void onAddMe(ClickEvent e) { String accountId = String.valueOf(Gerrit.getUserAccountInfo()._account_id()); addReviewer(accountId, false); }
Source:
private void showQuickStartFocusPoint() { mRecycler.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { RecyclerView.ViewHolder holder = mRecycler.findViewHolderForAdapterPosition(0); if (holder != null) { final View quickStartTarget = holder.itemView; quickStartTarget.post(new Runnable() { @Override public void run() { ViewGroup focusPointContainer = getView().findViewById(R.id.publicize_scroll_view_child); int focusPointSize = getResources().getDimensionPixelOffset(R.dimen.quick_start_focus_point_size); int verticalOffset = (((quickStartTarget.getHeight()) - focusPointSize) / 2); QuickStartUtils.addQuickStartFocusPointAboveTheView(focusPointContainer, quickStartTarget, 0, verticalOffset); } }); mRecycler.getViewTreeObserver().removeOnGlobalLayoutListener(this); } } }); }

Target:
private void showQuickStartFocusPoint() { mRecycler.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { RecyclerView.ViewHolder holder = mRecycler.findViewHolderForAdapterPosition(0); if (holder != null) { final View quickStartTarget = holder.itemView; quickStartTarget.post(new Runnable() { @Override public void run() { if (getView() == null) { return; } ViewGroup focusPointContainer = getView().findViewById(R.id.publicize_scroll_view_child); int focusPointSize = getResources().getDimensionPixelOffset(R.dimen.quick_start_focus_point_size); int verticalOffset = (((quickStartTarget.getHeight()) - focusPointSize) / 2); QuickStartUtils.addQuickStartFocusPointAboveTheView(focusPointContainer, quickStartTarget, 0, verticalOffset); } }); mRecycler.getViewTreeObserver().removeOnGlobalLayoutListener(this); } } }); }
Source:
private Map<String, Object> processUserListWithPermissionOnInode(String assetInode, String permission, String query, int start, int limit) { Map<String, Object> results; try { int permissionType = Integer.parseInt(permission); String inode = assetInode; results = new UsersListTemplate(inode, permissionType, query, start, limit) { PermissionAPI perAPI = APILocator.getPermissionAPI(); @Override public int getUserCount() { return perAPI.getUserCount(inode, permissionType, filter); } @Override public List<User> getUsers() { return perAPI.getUsers(inode, permissionType, filter, start, limit); } }.perform(); } catch (NumberFormatException nfe) { Logger.warn(UserServiceImpl.class, String.format( "::getUsersList -> Invalid parameters inode(%s) permission(%s).", assetInode, permission)); results = new HashMap<String, Object>(0); } return results; }

Target:
private Map<String, Object> processUserListWithPermissionOnInode(String assetInode, String permission, String query, int start, int limit) { Map<String, Object> results; try { final int permissionType = toInt(permission, 0); results = new UsersListTemplate(assetInode, permissionType, query, start, limit) { @Override public int getUserCount() { return permissionAPI.getUserCount(inode, permissionType, filter); } @Override public List<User> getUsers() { return permissionAPI.getUsers(inode, permissionType, filter, start, limit); } }.perform(); } catch (Exception e) { Logger.warn(UserServiceImpl.class, String.format( "::getUsersList -> Invalid parameters inode(%s) permission(%s).", assetInode, permission)); results = Collections.EMPTY_MAP; } return results; }
Source:
public void finishUp() { int numFolders = 0; int numNonFolders = 0; for (Set<BookmarkRecord> records : recordsWaitingForParent.values()) { for (BookmarkRecord record : records) { if (record.isFolder()) { numFolders += 1; if (!insertFolder(record)) { Logger.warn(LOG_TAG, "Folder with known parent with guid " + record.parentID + " failed to insert!"); return; } Logger.debug(LOG_TAG, "Folder with known parent with guid " + record.parentID + " inserted; adding to inserted folders."); insertedFolders.add(record.guid); continue; } numNonFolders += 1; nonFoldersToWrite.add(record); } } recordsWaitingForParent.clear(); incrementalFlush(); if (!nonFoldersToWrite.isEmpty()) { bulkInsertNonFolders(nonFoldersToWrite); nonFoldersToWrite.clear(); } Logger.debug(LOG_TAG, "finishUp inserted " + numFolders + " folders without known parents " + "and " + numNonFolders + " non-folders without known parents."); if (DEBUG) { dumpState(); } }

Target:
public void finishUp() { int numFolders = 0; int numNonFolders = 0; for (Set<BookmarkRecord> records : recordsWaitingForParent.values()) { for (BookmarkRecord record : records) { if (!record.isFolder()) { numNonFolders += 1; nonFoldersToWrite.add(record); continue; } numFolders += 1; if (!inserter.insertFolder(record)) { Logger.warn(LOG_TAG, "Folder with known parent with guid " + record.parentID + " failed to insert!"); continue; } Logger.debug(LOG_TAG, "Folder with known parent with guid " + record.parentID + " inserted; adding to inserted folders."); insertedFolders.add(record.guid); } } recordsWaitingForParent.clear(); flushNonFolders(); Logger.debug(LOG_TAG, "finishUp inserted " + numFolders + " folders without known parents and " + numNonFolders + " non-folders without known parents."); if (DEBUG) { dumpState(); } }
Source:
public void ensureSize(int rows) { for(int i=0; i < cols.length; ++i) { cols[i].ensureSize(rows, false); } }

Target:
public void ensureSize(int rows) { for(int i=0; i < cols.length; ++i) { cols[i].ensureSize(rows, false); } updateSelected(rows); }
Source:
public void unparse( SqlWriter writer, SqlCall call, int leftPrec, int rightPrec) { writer.getDialect().unparseRow(writer, call, leftPrec, rightPrec); }

Target:
public void unparse( SqlWriter writer, SqlCall call, int leftPrec, int rightPrec) { SqlUtil.unparseFunctionSyntax(this, writer, call); }
Source:
Map<String, VideoConstraints> computeVideoConstraints() { int maxFrameHeightCopy = maxFrameHeight; final VideoConstraints selectedEndpointConstraints; if (selectedEndpoints.size() > 1) { selectedEndpointConstraints = new VideoConstraints(Math.min(1080, maxFrameHeightCopy)); } else { selectedEndpointConstraints = new VideoConstraints(Math.min(1080, maxFrameHeightCopy), BitrateControllerConfig.Config.onstagePreferredHeightPx(), BitrateControllerConfig.Config.onstagePreferredFramerate()); } Map<String, VideoConstraints> selectedVideoConstraintsMap = selectedEndpoints .stream() .collect(Collectors.toMap(e -> e, e -> selectedEndpointConstraints)); final VideoConstraints pinnedEndpointConstraints = new VideoConstraints(Math.min( BitrateControllerConfig.Config.thumbnailMaxHeightPx(), maxFrameHeightCopy)); Map<String, VideoConstraints> pinnedVideoConstraintsMap = pinnedEndpoints .stream() .collect(Collectors.toMap(e -> e, e -> pinnedEndpointConstraints)); Map<String, VideoConstraints> newVideoConstraints = new HashMap<>(pinnedVideoConstraintsMap); newVideoConstraints.putAll(selectedVideoConstraintsMap); return newVideoConstraints; }

Target:
Map<String, VideoConstraints> computeVideoConstraints() { int maxFrameHeightCopy = maxFrameHeight; final VideoConstraints selectedEndpointConstraints; if (selectedEndpoints.size() > 1) { selectedEndpointConstraints = new VideoConstraints( Math.min(BitrateControllerConfig.Config.onstageIdealHeightPx(), maxFrameHeightCopy)); } else { selectedEndpointConstraints = new VideoConstraints( Math.min(BitrateControllerConfig.Config.onstageIdealHeightPx(), maxFrameHeightCopy), BitrateControllerConfig.Config.onstagePreferredHeightPx(), BitrateControllerConfig.Config.onstagePreferredFramerate()); } Map<String, VideoConstraints> selectedVideoConstraintsMap = selectedEndpoints .stream() .collect(Collectors.toMap(e -> e, e -> selectedEndpointConstraints)); final VideoConstraints pinnedEndpointConstraints = new VideoConstraints(Math.min( BitrateControllerConfig.Config.thumbnailMaxHeightPx(), maxFrameHeightCopy)); Map<String, VideoConstraints> pinnedVideoConstraintsMap = pinnedEndpoints .stream() .collect(Collectors.toMap(e -> e, e -> pinnedEndpointConstraints)); Map<String, VideoConstraints> newVideoConstraints = new HashMap<>(pinnedVideoConstraintsMap); newVideoConstraints.putAll(selectedVideoConstraintsMap); return newVideoConstraints; }
Source:
private <R> R getDeserializedResponse(RestAction<R> action, Response response) throws ActionException { String resultClass = action.getResultClass(); String contentType = response.getHeader(HttpHeaders.CONTENT_TYPE); if (resultClass != null) { Serialization serialization = findSerialization(resultClass, contentType); if (serialization != null) { return deserializeValue(serialization, resultClass, contentType, response.getText()); } } throw new ActionException("Unable to deserialize response. No serializer found."); }

Target:
private <R> R getDeserializedResponse(RestAction<R> action, Response response) throws ActionException { String resultClass = action.getResultClass(); if (resultClass != null) { ContentType contentType = ContentType.valueOf(response.getHeader(HttpHeaders.CONTENT_TYPE)); Serialization serialization = findSerialization(resultClass, contentType); if (serialization != null) { return deserializeValue(serialization, resultClass, contentType, response.getText()); } } throw new ActionException("Unable to deserialize response. No serializer found."); }
Source:
private RestRequest rewriteRequest(RestRequest originalRequest, String darkServiceName) { _uriRewriterMap.computeIfAbsent(darkServiceName, k -> { URI configuredURI = URI.create("d2://" + darkServiceName); URIRewriter rewriter = new D2URIRewriter(configuredURI); return new AtomicReference<>(rewriter); }); URIRewriter rewriter = _uriRewriterMap.get(darkServiceName).get(); return originalRequest.builder().setURI(rewriter.rewriteURI(originalRequest.getURI())).build(); }

Target:
private RestRequest rewriteRequest(RestRequest originalRequest, String darkServiceName) { if (!_uriRewriterMap.containsKey(darkServiceName)) { _uriRewriterMap.computeIfAbsent(darkServiceName, k -> { URI configuredURI = URI.create("d2://" + darkServiceName); URIRewriter rewriter = new D2URIRewriter(configuredURI); return new AtomicReference<>(rewriter); }); } URIRewriter rewriter = _uriRewriterMap.get(darkServiceName).get(); return originalRequest.builder().setURI(rewriter.rewriteURI(originalRequest.getURI())).build(); }
Source:
public void initGui() { super.initGui(); for( int i = 0; i < DualityFluidInterface.NUMBER_OF_TANKS; ++i ) { this.buttonList.add( new GuiFluidTank( ID_BUTTON_TANK + i, this.host.getDualityFluidInterface() .getTank( i ), this.getGuiLeft() + 7 + 18 * i, this.getGuiTop() + 16 + 8, 16, 80 ) ); } }

Target:
public void initGui() { super.initGui(); for( int i = 0; i < DualityFluidInterface.NUMBER_OF_TANKS; ++i ) { this.buttonList.add( new GuiFluidTank( ID_BUTTON_TANK + i, this.host.getDualityFluidInterface() .getTank( i ), this.getGuiLeft() + 7 + 18 * i, this.getGuiTop() + 16 + 8, 16, 80 ) ); } this.priority = new GuiTabButton( this.getGuiLeft() + 154, this.getGuiTop(), 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ); this.buttonList.add( this.priority ); }
Source:
public void setup() throws Exception { this.stream = new ByteArrayOutputStream(); response = mock(HttpServletResponse.class); when(response.getWriter()).thenReturn(new PrintWriter(stream)); extractor = new DefaultTypeNameExtractor(); initializer = new HibernateProxyInitializer(); serializee = new Serializee(); VRaptorGsonBuilderCreator gsonBuilderCreator = new VRaptorGsonBuilderCreator(new DefaultJsonSerializers(Collections.<JsonSerializer> emptyList()), serializee); this.serialization = new GsonJSONSerialization(response, extractor, initializer, gsonBuilderCreator.getInstance(), serializee); }

Target:
public void setup() throws Exception { this.stream = new ByteArrayOutputStream(); response = mock(HttpServletResponse.class); when(response.getWriter()).thenReturn(new PrintWriter(stream)); extractor = new DefaultTypeNameExtractor(); initializer = new HibernateProxyInitializer(); serializee = new Serializee(); this.serialization = new GsonJSONSerialization(response, extractor, initializer, createBuilder(), serializee); }
Source:
public synchronized void cleanCallBack(Future<ScriptResult<?>> future) { Iterator<Entry<Node, ScriptResult<?>>> iterator = nodes.entrySet().iterator(); NodeSet ns = new NodeSet(); while (iterator.hasNext()) { Entry<Node, ScriptResult<?>> entry = iterator.next(); if (!PAFuture.isAwaited(entry.getValue())) { if (logger.isInfoEnabled()) { String nodeUrl = entry.getKey().getNodeInformation().getURL(); logger.info("Cleaning script successfull, node freed : " + nodeUrl ); try { logger.info("Cleaning script output on node " + nodeUrl + ":"+future.get().getOutput()); } catch (Exception e) { logger.warn("Exception occurred while executing cleaning script on node "+ nodeUrl +":", e); } } ns.add(entry.getKey()); iterator.remove(); } } if (ns.size() > 0) { releaseNodes(ns); } }

Target:
public synchronized void cleanCallBack(Future<ScriptResult<?>> future) { Iterator<Entry<Node, ScriptResult<?>>> iterator = nodes.entrySet().iterator(); NodeSet ns = new NodeSet(); while (iterator.hasNext()) { Entry<Node, ScriptResult<?>> entry = iterator.next(); if (!PAFuture.isAwaited(entry.getValue())) { String nodeUrl = entry.getKey().getNodeInformation().getURL(); ScriptResult<?> sResult = null; try { sResult = future.get(); } catch (Exception e) { logger.warn("Exception occurred while executing cleaning script on node " + nodeUrl + ":", e); } printCleaningScriptInformations(nodeUrl, sResult); ns.add(entry.getKey()); iterator.remove(); } } if (ns.size() > 0) { releaseNodes(ns); } }
Source:
public void verifyDefaultStructure() { init(); builder.open("verifyDefaultStructure") .switchToIFrame() .verifyDefaultTemplateStructure(); }

Target:
public void verifyDefaultStructure() { new InfoboxBuilderPage() .open("verifyDefaultStructure") .switchToIFrame() .verifyDefaultTemplateStructure(); }
Source:
public void onKPlayerPlayheadUpdate(PlayerViewController playerViewController, long currentTime) { long currentSeconds = (int) (currentTime / 1000); long totalSeconds = (int) (playerViewController.getDurationSec()); Double percentage = (double) 0; if (totalSeconds > 0) { percentage = (((double) currentSeconds) / totalSeconds) * 100; } Log.d(TAG, "onKPlayerPlayheadUpdate " + currentSeconds + "/" + totalSeconds + " => " + percentage.intValue() + "%"); mSeekBar.setProgress(percentage.intValue()); }

Target:
public void onKPlayerPlayheadUpdate(PlayerViewController playerViewController, long currentTime) { long currentSeconds = (int) (currentTime / 1000); long totalSeconds = (int) (playerViewController.getDurationSec()); double percentage = 0; if (totalSeconds > 0) { percentage = (((double) currentSeconds) / totalSeconds) * 100; } Log.d(TAG, "onKPlayerPlayheadUpdate " + currentSeconds + "/" + totalSeconds + " => " + (int)percentage + "%"); mSeekBar.setProgress((int)percentage); }
Source:
public void splitCompleteUserIdShouldReturnAll3Components() throws Exception { OpenPgpUtils.UserInfo info = OpenPgpUtils.splitUserId("Max Mustermann (this is a comment) <max@example.com>"); assertEquals(info.name, "Max Mustermann"); assertEquals(info.comment, "this is a comment"); assertEquals(info.email, "max@example.com"); }

Target:
public void splitCompleteUserIdShouldReturnAll3Components() throws Exception { OpenPgpUtils.UserInfo info = OpenPgpUtils.splitUserId("Max Mustermann (this is a comment) <max@example.com>"); assertEquals("Max Mustermann", info.name); assertEquals("this is a comment", info.comment); assertEquals("max@example.com", info.email); }
Source:
public AddManualEvent(TimeLineController controller, Long epochMillis) { super(Bundle.AddManualEvent_text()); this.controller = controller; setGraphic(new ImageView(ADD_EVENT_IMAGE)); setLongText(Bundle.AddManualEvent_longText()); setEventHandler(actionEvent -> { new EventCreationDialog(controller, epochMillis).showAndWait().ifPresent(this::addEvent); }); }

Target:
public AddManualEvent(TimeLineController controller, Long epochMillis) { super(Bundle.AddManualEvent_text()); setGraphic(new ImageView(ADD_EVENT_IMAGE)); setLongText(Bundle.AddManualEvent_longText()); setEventHandler(actionEvent -> SwingUtilities.invokeLater(() -> { JEventCreationDialog dialog = new JEventCreationDialog(controller, epochMillis, SwingUtilities.windowForComponent(controller.getTopComponent())); dialog.setVisible(true); })); }
Source:
public void changeDiscoveryMode() { validationProvider = new BeanValidationProviderCDI11(); prepareBeanXml("all", true); }

Target:
public void changeDiscoveryMode() { validationProvider = new BeanValidationProvider("JSR-365"); prepareBeanXml("all", true); }
Source:
public Resource getOrCreateRepresentationResource(DRepresentation representation, Resource airdResource) { Resource resource = null; ResourceSet resourceSet = airdResource != null ? airdResource.getResourceSet() : null; if (resourceSet != null) { resource = getURIFromExtensionPoint(representation, airdResource).map(repResourceURI -> { Resource res = resourceSet.getResource(repResourceURI, false); if (res == null) { res = resourceSet.createResource(repResourceURI); } return res; }).orElse(null); } return resource; }

Target:
public Resource getOrCreateRepresentationResource(DRepresentation representation, Resource airdResource) { Resource resource = null; ResourceSet resourceSet = airdResource != null ? airdResource.getResourceSet() : null; if (resourceSet != null) { resource = getURIFromExtensionPoint(representation, airdResource).map(repResourceURI -> { Resource res = resourceSet.getResource(repResourceURI, false); if (res == null) { if (resourceSet.getURIConverter().exists(repResourceURI, null)) { res = resourceSet.getResource(repResourceURI, true); } else { res = resourceSet.createResource(repResourceURI); } } return res; }).orElse(null); } return resource; }
Source:
private HashComputation(Iterable<VariableReferenceExpression> fields, FunctionManager functionManager) { requireNonNull(fields, "fields is null"); requireNonNull(functionManager, "functionManager is null"); this.fields = ImmutableList.copyOf(fields); this.functionManager = functionManager; checkArgument(!this.fields.isEmpty(), "fields can not be empty"); }

Target:
private HashComputation(Iterable<VariableReferenceExpression> fields, FunctionManager functionManager) { requireNonNull(fields, "fields is null"); this.fields = ImmutableList.copyOf(fields); this.functionManager = requireNonNull(functionManager, "functionManager is null"); checkArgument(!this.fields.isEmpty(), "fields can not be empty"); }
Source:
public static boolean checkIfNumerical(IDataChartDescriptor<?, ?> desc) { DescriptorTypeVisitor visitor = new DescriptorTypeVisitor(); desc.accept(visitor); if (visitor.checkIfType(DescriptorType.NUMERICAL)) { return true; } return false; }

Target:
static boolean checkIfNumerical(IDataChartDescriptor<?, ?> desc) { DescriptorTypeVisitor visitor = new DescriptorTypeVisitor(); desc.accept(visitor); return visitor.isIndividualType(DescriptorType.NUMERICAL); }
Source:
public ArrayList<CertifyActionsParcel.CertifyAction> getSelectedCertifyActions() { return mUserIdsAdapter.getSelectedCertifyActions(); }

Target:
public ArrayList<CertifyActionsParcel.CertifyAction> getSelectedCertifyActions() { if (!checkboxVisibility) { throw new AssertionError("Item selection not allowed"); } return mUserIdsAdapter.getSelectedCertifyActions(); }
Source:
private OffsetAndMetadata greaterOffset(OffsetAndMetadata a, OffsetAndMetadata b) { if (a == null) { return b; } else if (b == null) { return a; } return a.offset() > b.offset() ? a : b; }

Target:
private OffsetAndMetadata greaterOffset(OffsetAndMetadata a, OffsetAndMetadata b) { return a.offset() > b.offset() ? a : b; }
Source:
private static void zip(StaplerResponse rsp, VirtualFile root, VirtualFile dir, String glob) throws IOException, InterruptedException { OutputStream outputStream = rsp.getOutputStream(); try (ZipOutputStream zos = new ZipOutputStream(outputStream)) { zos.setEncoding(System.getProperty("file.encoding")); for (String n : dir.list(glob.isEmpty() ? "**" : glob, null, true)) { String relativePath; if (glob.length() == 0) { relativePath = dir.getName() + '/' + n; } else { relativePath = n; } String targetFile = dir.toString().substring(root.toString().length()) + n; if (!ALLOW_SYMLINK_ESCAPE && root.supportIsDescendant() && !root.isDescendant(targetFile)) { LOGGER.log(Level.FINE, "Trying to access a file outside of the directory: " + root + ", illicit target: " + targetFile); } else { ZipEntry e = new ZipEntry(relativePath.replace('\\', '/')); VirtualFile f = dir.child(n); e.setTime(f.lastModified()); zos.putNextEntry(e); try (InputStream in = f.open()) { IOUtils.copy(in, zos); } zos.closeEntry(); } } } }

Target:
private static void zip(StaplerResponse rsp, VirtualFile root, VirtualFile dir, String glob) throws IOException, InterruptedException { boolean messageAlreadyPutInLog = false; OutputStream outputStream = rsp.getOutputStream(); try (ZipOutputStream zos = new ZipOutputStream(outputStream)) { zos.setEncoding(System.getProperty("file.encoding")); for (String n : dir.list(glob.isEmpty() ? "**" : glob, null, true)) { String relativePath; if (glob.length() == 0) { relativePath = dir.getName() + '/' + n; } else { relativePath = n; } String targetFile = dir.toString().substring(root.toString().length()) + n; if (!ALLOW_SYMLINK_ESCAPE && root.supportIsDescendant() && !root.isDescendant(targetFile)) { if (!messageAlreadyPutInLog) { messageAlreadyPutInLog = true; LOGGER.log(Level.FINE, "Trying to access a file outside of the directory: {0}, forbidden target: {1}. This message is only sent once per request.", new Object[] {root, targetFile}); } } else { ZipEntry e = new ZipEntry(relativePath.replace('\\', '/')); VirtualFile f = dir.child(n); e.setTime(f.lastModified()); zos.putNextEntry(e); try (InputStream in = f.open()) { IOUtils.copy(in, zos); } zos.closeEntry(); } } } }
Source:
public void testReadProbabilitySimulationProperties() { SimulationDataProvider provider = new BPMN2SimulationDataProvider(this.getClass().getResourceAsStream("/BPMN2-ExclusiveSplitWithSimulationProps.bpmn2")); Map<String, Object> data = provider.getSimulationDataForNode(new Node() { public List<Connection> getOutgoingConnections(String type) { return null; } public Map<String, List<Connection>> getOutgoingConnections() { return null; } public NodeContainer getNodeContainer() { return null; } public String getName() { return "Hello"; } public Object getMetaData(String name) { return null; } public Map<String, Object> getMetaData() { Map<String, Object> metaData = new HashMap<String, Object>(); metaData.put("UniqueId", "_575A78C8-C34A-445E-8B2F-BB990B513A03"); return metaData; } public List<Connection> getIncomingConnections(String type) { return null; } public Map<String, List<Connection>> getIncomingConnections() { return null; } public long getId() { return 2; } @Override public String getUniqueId() { return null; } @Override public String getNodeUniqueId() { return null; } }); assertNotNull(data); assertEquals(1, data.size()); assertTrue(data.containsKey(SimulationConstants.PROBABILITY)); }

Target:
public void testReadProbabilitySimulationProperties() { SimulationDataProvider provider = new BPMN2SimulationDataProvider(this.getClass().getResourceAsStream("/BPMN2-ExclusiveSplitWithSimulationProps.bpmn2")); Map<String, Object> data = provider.getSimulationDataForNode(new Node() { public List<Connection> getOutgoingConnections(String type) { return null; } public Map<String, List<Connection>> getOutgoingConnections() { return null; } public NodeContainer getNodeContainer() { return null; } public String getName() { return "Hello"; } public Object getMetaData(String name) { return null; } public Map<String, Object> getMetaData() { Map<String, Object> metaData = new HashMap<String, Object>(); metaData.put("UniqueId", "_575A78C8-C34A-445E-8B2F-BB990B513A03"); return metaData; } public List<Connection> getIncomingConnections(String type) { return null; } public Map<String, List<Connection>> getIncomingConnections() { return null; } public long getId() { return 2; } @Override public String getNodeUniqueId() { return null; } }); assertNotNull(data); assertEquals(1, data.size()); assertTrue(data.containsKey(SimulationConstants.PROBABILITY)); }
Source:
public FieldReference getReference(String name) { ExposedField field = exposedFields.getField(name); if (field != null) { return new FieldReference(field); } if (name != null && name.contains(".")) { ExposedField rootField = exposedFields.getField(name.split("\\.")[0]); if (rootField != null) { return new FieldReference(new ExposedField(name, true)); } } throw new IllegalArgumentException(String.format("Invalid reference '%s'!", name)); }

Target:
public FieldReference getReference(String name) { Assert.notNull(name, "Name must not be null!"); ExposedField field = exposedFields.getField(name); if (field != null) { return new FieldReference(field); } if (name.contains(".")) { ExposedField rootField = exposedFields.getField(name.split("\\.")[0]); if (rootField != null) { return new FieldReference(new ExposedField(name, true)); } } throw new IllegalArgumentException(String.format("Invalid reference '%s'!", name)); }
Source:
private void checkServer() { checkState(isMainThread()); }

Target:
private void checkServer() { checkState(this.isMainThread()); }
Source:
public Response checkRoles(final @Context HttpServletRequest request, final @PathParam("userId") String userId, final @PathParam("roleIds") String roleIds) { webResource.init(true, request, true); boolean hasUserRole = false; try { String[] roles = roleIds.split(ROLE_ID_SEPARATOR); hasUserRole = this.helper.userHasRoles(userId, CollectionsUtils.list(roles)); } catch (Exception e) { Logger.error(this, "An error occurred when processing the request.", e); return ExceptionMapperUtil.createResponse(e, Response.Status.INTERNAL_SERVER_ERROR); } return Response.ok(new ResponseEntityView(map("checkRoles", hasUserRole))).build(); }

Target:
public Response checkRoles(final @Context HttpServletRequest request, final @PathParam("userId") String userId, final @PathParam("roleIds") String roleIds) { webResource.init(true, request, true); boolean hasUserRole = false; try { String[] roles = roleIds.split(ROLE_ID_SEPARATOR); hasUserRole = this.helper.userHasRoles(userId, list(roles)); } catch (Exception e) { Logger.error(this, "An error occurred when processing the request.", e); return ExceptionMapperUtil.createResponse(e, Response.Status.INTERNAL_SERVER_ERROR); } return Response.ok(new ResponseEntityView(map("checkRoles", hasUserRole))).build(); }
Source:
@Override public boolean process(Set<? extends TypeElement> types, RoundEnvironment env) { List<Element> allElements = new ArrayList<Element>(); Map<Element, Element> parametersToTheirMethods = new HashMap<Element, Element>(); getAllElements(env, allElements, parametersToTheirMethods); for (Element element : allElements) { validateScoping(element); validateQualifiers(element, parametersToTheirMethods); } return false; }

Target:
@Override public boolean process(Set<? extends TypeElement> types, RoundEnvironment env) { List<Element> allElements = new ArrayList<Element>(); Map<Element, Element> parametersToTheirMethods = new LinkedHashMap<Element, Element>(); getAllElements(env, allElements, parametersToTheirMethods); for (Element element : allElements) { validateProvides(element); validateScoping(element); validateQualifiers(element, parametersToTheirMethods); } return false; }
Source:
private Class<?> toClass(String classId) { if (this.idClassMapping.containsKey(classId)) { return this.idClassMapping.get(classId); } if (classId.equals(DEFAULT_HASHTABLE_TYPE_ID)) { return this.defaultMapClass; } try { Class<?> aClass = ClassUtils.forName(classId, getClass().getClassLoader()); Package packageToCheck = aClass.getPackage(); if (packageToCheck == null || isTrustedPackage(packageToCheck.getName())) { return aClass; } else { throw new IllegalArgumentException("The class with id '" + classId + "' and name '" + aClass.getName() + "' is not in the trusted packages: " + this.trustedPackages + ". " + "If you believe this class is safe to deserialize, please provide its name. " + "If the serialization is only done by a trusted source, you can also enable trust all (*)."); } } catch (ClassNotFoundException e) { throw new MessageConversionException( "failed to resolve class name [" + classId + "]", e); } catch (LinkageError e) { throw new MessageConversionException( "failed to resolve class name [" + classId + "]", e); } }

Target:
private Class<?> toClass(String classId) { if (this.idClassMapping.containsKey(classId)) { return this.idClassMapping.get(classId); } if (classId.equals(DEFAULT_HASHTABLE_TYPE_ID)) { return this.defaultMapClass; } try { if (!isTrustedPackage(classId)) { throw new IllegalArgumentException("The class '" + classId + "' is not in the trusted packages: " + this.trustedPackages + ". " + "If you believe this class is safe to deserialize, please provide its name. " + "If the serialization is only done by a trusted source, you can also enable trust all (*)."); } else { return ClassUtils.forName(classId, getClass().getClassLoader()); } } catch (ClassNotFoundException e) { throw new MessageConversionException( "failed to resolve class name [" + classId + "]", e); } catch (LinkageError e) { throw new MessageConversionException( "failed to resolve class name [" + classId + "]", e); } }
Source:
public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> operationList) throws XMLStreamException { Namespace readerNS = Namespace.forUri(reader.getNamespaceURI()); switch (readerNS.getMajorVersion()) { case 1: case 2: case 3: new StandaloneXml_Legacy( new ExtensionXml(loader, executorService, extensionRegistry), extensionRegistry, readerNS) .readElement(reader, operationList); break; default: new StandaloneXml_4(extensionHandler, readerNS, parsingOptions).readElement(reader, operationList); break; } }

Target:
public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> operationList) throws XMLStreamException { Namespace readerNS = Namespace.forUri(reader.getNamespaceURI()); switch (readerNS.getMajorVersion()) { case 1: case 2: case 3: new StandaloneXml_Legacy(extensionHandler, readerNS, parsingOptions) .readElement(reader, operationList); break; default: new StandaloneXml_4(extensionHandler, readerNS, parsingOptions).readElement(reader, operationList); break; } }
Source:
public View getBannerView() { if(mBannerView == null) { Log.v(TAG, "Unity Ads Adaptor null banner view"); } else { Log.v(TAG, "Unity Ads Adaptor provided a banner view for placement: " + mBannerView.getPlacementId()); } return mBannerView; }

Target:
public View getBannerView() { return mBannerView; }
Source:
private void buildHeader(MimeMessage message) throws MessagingException { message.addSentDate(sentDate, hideTimeZone); Address from = new Address(identity.getEmail(), identity.getName()); message.setFrom(from); message.setRecipients(RecipientType.TO, to); message.setRecipients(RecipientType.CC, cc); message.setRecipients(RecipientType.BCC, bcc); message.setSubject(subject); if (requestReadReceipt) { message.setHeader("Disposition-Notification-To", from.toEncodedString()); message.setHeader("X-Confirm-Reading-To", from.toEncodedString()); message.setHeader("Return-Receipt-To", from.toEncodedString()); } if (!K9.hideUserAgent()) { message.setHeader("User-Agent", context.getString(R.string.message_header_mua)); } if (isHighPriority) { message.setHeader("X-Priority", context.getString(R.string.x_priority)); } final String replyTo = identity.getReplyTo(); if (replyTo != null) { message.setReplyTo(new Address[] { new Address(replyTo) }); } if (inReplyTo != null) { message.setInReplyTo(inReplyTo); } if (references != null) { message.setReferences(references); } String messageId = messageIdGenerator.generateMessageId(message); message.setMessageId(messageId); if (isDraft && isPgpInlineEnabled) { message.setFlag(Flag.X_DRAFT_OPENPGP_INLINE, true); } }

Target:
private void buildHeader(MimeMessage message) throws MessagingException { message.addSentDate(sentDate, hideTimeZone); Address from = new Address(identity.getEmail(), identity.getName()); message.setFrom(from); message.setRecipients(RecipientType.TO, to); message.setRecipients(RecipientType.CC, cc); message.setRecipients(RecipientType.BCC, bcc); message.setSubject(subject); if (requestReadReceipt) { message.setHeader("Disposition-Notification-To", from.toEncodedString()); message.setHeader("X-Confirm-Reading-To", from.toEncodedString()); message.setHeader("Return-Receipt-To", from.toEncodedString()); } if (!K9.hideUserAgent()) { message.setHeader("User-Agent", context.getString(R.string.message_header_mua)); } if (isHighPriority) { message.setHeader(MimeHeader.HEADER_HIGH_PRIORITY, X_PRIORITY_CONTENT); } final String replyTo = identity.getReplyTo(); if (replyTo != null) { message.setReplyTo(new Address[] { new Address(replyTo) }); } if (inReplyTo != null) { message.setInReplyTo(inReplyTo); } if (references != null) { message.setReferences(references); } String messageId = messageIdGenerator.generateMessageId(message); message.setMessageId(messageId); if (isDraft && isPgpInlineEnabled) { message.setFlag(Flag.X_DRAFT_OPENPGP_INLINE, true); } }
Source:
private static PersonIdent tmpAuthor(List<RevCommit> commits) { int t = 0; for (int i = 0; i < commits.size();) { t = Math.max(t, commits.get(i).getCommitTime()); } String name = "tmp"; String email = "tmp@tmp"; return new PersonIdent(name, email, t * 1000L, 0); }

Target:
private static PersonIdent tmpAuthor(List<RevCommit> commits) { int t = 0; for (int i = 0; i < commits.size();) { t = Math.max(t, commits.get(i).getCommitTime()); } String name = "Ketch Stage"; String email = "tmp@tmp"; return new PersonIdent(name, email, t * 1000L, 0); }
Source:
public void handleData(final @Nullable ITmfEvent event) { super.handleData(event); if (event != null && event.getTrace() != trace) { System.out.println("alld"); } if (event != null && event.getTrace() == trace) { sci.processEvent(event); } }

Target:
public void handleData(final @Nullable ITmfEvent event) { super.handleData(event); if (event != null && event.getTrace() == trace) { sci.processEvent(event); } }
Source:
public boolean isClientAwake(Registration registration) { if (!clientStatusList.containsKey(registration.getEndpoint())) { return false; } PresenceStatus presenceStatus = clientStatusList.get(registration.getEndpoint()); return presenceStatus.isClientAwake(); }

Target:
public boolean isClientAwake(Registration registration) { PresenceStatus presenceStatus = clientStatusList.get(registration.getEndpoint()); if (presenceStatus == null) { return false; } return presenceStatus.isClientAwake(); }
Source:
public Result next() throws IOException { values.clear(); scanner.nextRaw(values); statisticsCollector.collectStatistics(values, ! values.isEmpty()); if (values.isEmpty()) { return null; } return Result.create(values); }

Target:
public Result next() throws IOException { values.clear(); scanner.nextRaw(values); statisticsCollector.collectStatistics(values); if (values.isEmpty()) { return null; } return Result.create(values); }
Source:
public void testInputValidation() { ______TS("CONST SUM:input validation"); feedbackEditPage.fillQuestionTextBoxForNewQuestion("ConstSum-recipient qn"); feedbackEditPage.fillQuestionDescriptionForNewQuestion("more details"); feedbackEditPage.fillConstSumPointsBoxForNewQuestion(""); assertEquals("1", feedbackEditPage.getConstSumPointsBoxForNewQuestion()); feedbackEditPage.fillConstSumPointsForEachRecipientBoxForNewQuestion(""); assertEquals("1", feedbackEditPage.getConstSumPointsForEachRecipientBoxForNewQuestion()); assertFalse(feedbackEditPage.isElementVisible("constSumOptionTable--1")); feedbackEditPage.clickDiscardChangesLinkForNewQuestion(); feedbackEditPage.waitForConfirmationModalAndClickOk(); assertTrue(feedbackEditPage.getTextsForAllStatusMessagesToUser().isEmpty()); assertNull(BackDoor.getFeedbackQuestion(courseId, feedbackSessionName, 1)); }

Target:
public void testInputValidation() { ______TS("CONST SUM:input validation"); feedbackEditPage.fillQuestionTextBoxForNewQuestion("ConstSum-recipient qn"); feedbackEditPage.fillQuestionDescriptionForNewQuestion("more details"); feedbackEditPage.fillConstSumPointsBoxForNewQuestion(""); assertEquals("1", feedbackEditPage.getConstSumPointsBoxForNewQuestion()); feedbackEditPage.fillConstSumPointsForEachRecipientBoxForNewQuestion(""); assertEquals("1", feedbackEditPage.getConstSumPointsForEachRecipientBoxForNewQuestion()); assertFalse(feedbackEditPage.isElementVisible("constSumOptionTable--1")); feedbackEditPage.clickDiscardChangesLinkForNewQuestion(); feedbackEditPage.waitForConfirmationModalAndClickOk(); assertEquals(Collections.emptyList(), feedbackEditPage.getTextsForAllStatusMessagesToUser()); assertNull(BackDoor.getFeedbackQuestion(courseId, feedbackSessionName, 1)); }
Source:
private void unlockVmsManager() { Date updateTime = Calendar.getInstance().getTime(); for (VmManager vmManager : vmManagers.values()) { vmManager.setLastUpdateDate(updateTime); vmManager.unlock(); } }

Target:
private void unlockVmsManager() { for (VmManager vmManager : vmManagers.values()) { vmManager.updateVmDataChangedTime(); vmManager.unlock(); } }