auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public String getUserIDFromUserName(String userName) throws UserStoreException { String userID; UserStore userStore = getUserStore(userName); if (userStore.isRecurssive()) { return ((AbstractUserStoreManager) userStore.getUserStoreManager()) .getUserIDFromUserName(userStore.getDomainFreeName()); } if (isUniqueUserIdEnabledInUserStore(userStore)) { userID = AbstractUserStoreManagerCache.getInstance().getValueFromCache(userName, RESOLVE_USER_ID_FROM_USER_NAME_CACHE_NAME); if (StringUtils.isEmpty(userID)){ return doGetUserIDFromUserNameWithID(userStore.getDomainFreeName()); } else { AbstractUserStoreManagerCache.getInstance().addToCache(userName, userID, RESOLVE_USER_ID_FROM_USER_NAME_CACHE_NAME); } } Map<String, String> claims = doGetUserClaimValues(userName, new String[]{UserCoreClaimConstants.USER_ID_CLAIM_URI}, userStore.getDomainName(), null); if (claims != null && claims.size() == 1) { userID = AbstractUserStoreManagerCache.getInstance().getValueFromCache(userName, RESOLVE_USER_NAME_FROM_USER_ID_CACHE_NAME); if (StringUtils.isEmpty(userID)) { return claims.get(UserCoreClaimConstants.USER_ID_CLAIM_URI); } else { AbstractUserStoreManagerCache.getInstance().addToCache(userName, userID, RESOLVE_USER_ID_FROM_USER_NAME_CACHE_NAME); } } return null; }

Target:
public String getUserIDFromUserName(String userName) throws UserStoreException { UserStore userStore = getUserStore(userName); if (userStore.isRecurssive()) { return ((AbstractUserStoreManager) userStore.getUserStoreManager()) .getUserIDFromUserName(userStore.getDomainFreeName()); } String userID = getFromUserIDCache(userName, userStore); if (StringUtils.isEmpty(userID)) { if (isUniqueUserIdEnabledInUserStore(userStore)) { userID = doGetUserIDFromUserNameWithID(userName); addToUserIDCache(userID, userName, userStore); addToUserNameCache(userID, userName, userStore); return userID; } Map<String, String> claims = doGetUserClaimValues(userName, new String[]{UserCoreClaimConstants.USER_ID_CLAIM_URI}, userStore.getDomainName(), null); if (claims != null && claims.size() == 1) { userID = claims.get(UserCoreClaimConstants.USER_ID_CLAIM_URI); addToUserIDCache(userID, userName, userStore); addToUserNameCache(userID, userName, userStore); return userID; } } return userID; }
Source:
public Translation getTranslation() { return null; }

Target:
public Translation getTranslation() { throw new UnsupportedOperationException("No translation is present for this catalog type (this method will be removed in a later release of SpongeAPI)"); }
Source:
private static boolean shouldServiceVersionBeTested(CryptographyServiceVersion serviceVersion) { if (Configuration.getGlobalConfiguration().get(AZURE_TEST_SERVICE_VERSIONS) == null) { return CryptographyServiceVersion.getLatest().equals(serviceVersion); } return true; }

Target:
private static boolean shouldServiceVersionBeTested(CryptographyServiceVersion serviceVersion) { if (CoreUtils.isNullOrEmpty(SERVICE_VERSION_FROM_ENV)) { return CryptographyServiceVersion.getLatest().equals(serviceVersion); } if (AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL.equalsIgnoreCase(SERVICE_VERSION_FROM_ENV)) { return true; } String[] configuredServiceVersionList = SERVICE_VERSION_FROM_ENV.split(","); return Arrays.stream(configuredServiceVersionList).anyMatch(configuredServiceVersion -> serviceVersion.toString().equals(configuredServiceVersion.trim())); }
Source:
public int fileOrderCompare(final SAMRecord samRecord1, final SAMRecord samRecord2) { if (null == samRecord1.getHeader() || null == samRecord2.getHeader()) { throw new IllegalArgumentException("Record must have non-null SAMFileHeaders to be comapred"); } final int refIndex1 = samRecord1.getReferenceIndex(); final int refIndex2 = samRecord2.getReferenceIndex(); if (refIndex1 == -1) { return (refIndex2 == -1? 0: 1); } else if (refIndex2 == -1) { return -1; } final int cmp = refIndex1 - refIndex2; if (cmp != 0) { return cmp; } return samRecord1.getAlignmentStart() - samRecord2.getAlignmentStart(); }

Target:
public int fileOrderCompare(final SAMRecord samRecord1, final SAMRecord samRecord2) { if (null == samRecord1.getHeader() || null == samRecord2.getHeader()) { throw new IllegalArgumentException("Records must have non-null SAMFileHeaders to be compared"); } final int refIndex1 = samRecord1.getReferenceIndex(); final int refIndex2 = samRecord2.getReferenceIndex(); if (refIndex1 == -1) { return (refIndex2 == -1? 0: 1); } else if (refIndex2 == -1) { return -1; } final int cmp = refIndex1 - refIndex2; if (cmp != 0) { return cmp; } return samRecord1.getAlignmentStart() - samRecord2.getAlignmentStart(); }
Source:
protected boolean saveBaseMessageToCacheDir( boolean overrideIfExists ) throws IOException { String baseMsgPath = Util.joinPath( getDashboardFolderPath(), ( BASE_MESSAGES_FILENAME + MESSAGES_EXTENSION ) ); IBasicFile basePropertiesFile = null; String basePropertiesCachePath = Util.joinPath( getBaseTempCacheFolder(), ( BASE_MESSAGES_FILENAME + MESSAGES_EXTENSION ) ); if ( getDashboardAccess().fileExists( baseMsgPath ) ) { basePropertiesFile = getDashboardAccess().fetchFile( baseMsgPath ); if ( !getPluginAccess().fileExists( basePropertiesCachePath ) || overrideIfExists ) { getPluginAccess().saveFile( basePropertiesCachePath, basePropertiesFile.getContents() ); } } if ( !getPluginAccess().fileExists( basePropertiesCachePath ) ) { getPluginAccess().saveFile( basePropertiesCachePath, new ByteArrayInputStream( new String().getBytes() ) ); } return true; }

Target:
protected boolean saveBaseMessageToCacheDir( boolean overrideIfExists ) throws IOException { String baseMsgPath = Util.joinPath( getDashboardFolderPath(), ( BASE_MESSAGES_FILENAME + MESSAGES_EXTENSION ) ); IBasicFile basePropertiesFile = null; String basePropertiesCachePath = Util.joinPath( getBaseTempCacheFolder(), ( BASE_MESSAGES_FILENAME + MESSAGES_EXTENSION ) ); if ( getDashboardAccess().fileExists( baseMsgPath ) ) { basePropertiesFile = getDashboardAccess().fetchFile( baseMsgPath ); if ( !getPluginAccess().fileExists( basePropertiesCachePath ) || overrideIfExists ) { getPluginAccess().saveFile( basePropertiesCachePath, basePropertiesFile.getContents() ); } } if ( !getPluginAccess().fileExists( basePropertiesCachePath ) ) { getPluginAccess().saveFile( basePropertiesCachePath, new ByteArrayInputStream( new byte[0] ) ); } return true; }
Source:
public void close() { env.getSharedResources().getTimestampTracker().removeTimestamp(startTs); }

Target:
public synchronized void close() { if (status != TxStatus.CLOSED) { status = TxStatus.CLOSED; env.getSharedResources().getTimestampTracker().removeTimestamp(startTs); } }
Source:
public void onInteractEntity(PlayerInteractEntityEvent e) { if (!e.getRightClicked().isValid() || e.getRightClicked().getType() != EntityType.PIGLIN) { return; } ItemStack itemStack; if (e.getHand() == EquipmentSlot.OFF_HAND) { itemStack = e.getPlayer().getInventory().getItemInOffHand(); } else { itemStack = e.getPlayer().getInventory().getItemInMainHand(); } SlimefunItem sfItem = SlimefunItem.getByItem(itemStack); if (sfItem != null) { e.setCancelled(true); } }

Target:
public void onInteractEntity(PlayerInteractEntityEvent e) { if (!e.getRightClicked().isValid() || e.getRightClicked().getType() != EntityType.PIGLIN) { return; } ItemStack itemStack; if (e.getHand() == EquipmentSlot.OFF_HAND) { itemStack = e.getPlayer().getInventory().getItemInOffHand(); } else { itemStack = e.getPlayer().getInventory().getItemInMainHand(); } if (itemStack.getType() != Material.GOLD_INGOT) { return; } SlimefunItem sfItem = SlimefunItem.getByItem(itemStack); if (sfItem != null) { SlimefunPlugin.getLocalization().sendMessage(e.getPlayer(), "messages.piglin-barter", true); e.setCancelled(true); } }
Source:
public void publishTelemetry(String name) { Map<String, Double> angleMap = new HashMap<String, Double>(); for (DHLink l : arms.get(name).getLinks()) { String jointName = l.getName(); double theta = l.getTheta(); double angle = MathUtils.radToDeg(theta) + l.getOffset(); angleMap.put(jointName, (double) angle % 360.0F); invoke("publishJointAngles", new AngleData(jointName, (double) angle % 360.0F)); log.info("Servo : Angle : {}", jointName, angleMap.get(jointName)); } double[][] jointPositionMap = createJointPositionMap(name); invoke("publishJointPositions", (Object) jointPositionMap); }

Target:
public void publishTelemetry(String name) { Map<String, Double> angleMap = new HashMap<String, Double>(); for (DHLink l : arms.get(name).getLinks()) { String jointName = l.getName(); double theta = l.getTheta(); double angle = MathUtils.radToDeg(theta) + l.getOffset(); angleMap.put(jointName, (double) angle % 360.0F); invoke("publishJointAngle", new AngleData(jointName, (double) angle % 360.0F)); log.info("Servo : Angle : {}", jointName, angleMap.get(jointName)); } double[][] jointPositionMap = createJointPositionMap(name); invoke("publishJointPositions", (Object) jointPositionMap); }
Source:
public void update(float delta) { super.update(delta); if (previewGenerator != null) { PreviewSettings newSettings = new PreviewSettings(layerDropdown.getSelection(), TeraMath.floorToInt(zoomSlider.getValue()), seedBinding.get()); if (currentSettings == null || !currentSettings.equals(newSettings)) { UIImage image = find("preview", UIImage.class); try { Texture tex = createTexture(imageSize, imageSize, newSettings.zoom, newSettings.layer); image.setImage(tex); image.setVisible(true); } catch (Exception ex) { image.setVisible(false); } currentSettings = newSettings; } } }

Target:
public void update(float delta) { super.update(delta); if (previewGenerator != null) { PreviewSettings newSettings = new PreviewSettings(layerDropdown.getSelection(), TeraMath.floorToInt(zoomSlider.getValue()), seedBinding.get()); if (currentSettings == null || !currentSettings.equals(newSettings)) { UIImage image = find("preview", UIImage.class); try { Texture tex = createTexture(imageSize, imageSize, newSettings.zoom, newSettings.layer); image.setImage(tex); image.setVisible(true); } catch (Exception ex) { image.setVisible(false); logger.info("Error generating a 2d preview for " + layerDropdown.getSelection()); } currentSettings = newSettings; } } }
Source:
private ConnectorSplit createBucketSplit(int bucketNumber, Set<ShardNodes> shards) { String nodeId = bucketToNode.get().get(bucketNumber); Node node = nodesById.get(nodeId); if (node == null) { throw new PrestoException(NO_NODES_AVAILABLE, "Node for bucket is offline: " + nodeId); } Set<UUID> shardUuids = shards.stream() .map(ShardNodes::getShardUuid) .collect(toSet()); Map<UUID, Optional<UUID>> shardDeltaMap = shards.stream() .collect(toImmutableMap(shard -> shard.getShardUuid(), shard -> shard.getDeltaShardUuid())); HostAddress address = node.getHostAndPort(); return new RaptorSplit(connectorId, shardUuids, shardDeltaMap, bucketNumber, address, effectivePredicate, transactionId, columnTypes, Optional.of(deltaDeleteEnabled)); }

Target:
private ConnectorSplit createBucketSplit(int bucketNumber, Set<ShardNodes> shards) { String nodeId = bucketToNode.get().get(bucketNumber); Node node = nodesById.get(nodeId); if (node == null) { throw new PrestoException(NO_NODES_AVAILABLE, "Node for bucket is offline: " + nodeId); } Set<UUID> shardUuids = shards.stream() .map(ShardNodes::getShardUuid) .collect(toSet()); ImmutableMap.Builder<UUID, UUID> shardMapBuilder = new ImmutableMap.Builder<>(); shards.stream().forEach( shard -> { if (shard.getDeltaShardUuid().isPresent()) { shardMapBuilder.put(shard.getShardUuid(), shard.getDeltaShardUuid().get()); } }); HostAddress address = node.getHostAndPort(); return new RaptorSplit( connectorId, shardUuids, shardMapBuilder.build(), tableSupportsDeltaDelete, bucketNumber, address, effectivePredicate, transactionId, columnTypes); }
Source:
public void executeTask( @NotNull final Map<String, Object> context ) throws GenieException { log.debug("Executing JobKillLogic Task in the workflow."); super.executeTask(context); Utils.appendToWriter(writer, JobConstants.JOB_KILL_HANDLER_LOGIC.toString()); }

Target:
public void executeTask( @NotNull final Map<String, Object> context ) throws GenieException { log.debug("Executing JobKillLogic Task in the workflow."); super.executeTask(context); Utils.appendToWriter(writer, JobConstants.JOB_KILL_HANDLER_LOGIC); }
Source:
public Workflow setupWorkflowVersions(String repositoryId, Workflow workflow, Optional<Workflow> existingWorkflow, Map<String, WorkflowVersion> existingDefaults) { GHRateLimit startRateLimit = getGhRateLimitQuietly(); GHRepository repository = getRepository(repositoryId); List<Triple<String, Date, String>> references = new ArrayList<>(); try { GHRef[] refs = repository.getRefs(); for (GHRef ref : refs) { if (workflow.getMode() != WorkflowMode.DOCKSTORE_YML || ref.getRef().startsWith("refs/tags")) { references.add(getRef(ref, repository)); } } } catch (GHFileNotFoundException e) { LOG.debug("repo had no releases or tags: " + repositoryId); } catch (IOException e) { LOG.info(gitUsername + ": Cannot get branches or tags for workflow {}"); throw new CustomWebApplicationException("Could not reach GitHub, please try again later", HttpStatus.SC_SERVICE_UNAVAILABLE); } for (Triple<String, Date, String> ref : references) { if (ref != null) { SourceFile dockstoreYml = null; if (workflow.getMode() == WorkflowMode.DOCKSTORE_YML) { try { dockstoreYml = getDockstoreYml(repository.getFullName(), ref.getLeft()); } catch (CustomWebApplicationException ex) { LOG.info("No .dockstore.yml present."); continue; } } WorkflowVersion version = setupWorkflowVersionsHelper(repositoryId, workflow, ref, existingWorkflow, existingDefaults, repository, dockstoreYml); if (version != null) { workflow.addWorkflowVersion(version); } } } GHRateLimit endRateLimit = getGhRateLimitQuietly(); reportOnRateLimit("setupWorkflowVersions", startRateLimit, endRateLimit); return workflow; }

Target:
public Workflow setupWorkflowVersions(String repositoryId, Workflow workflow, Optional<Workflow> existingWorkflow, Map<String, WorkflowVersion> existingDefaults) { GHRateLimit startRateLimit = getGhRateLimitQuietly(); GHRepository repository = getRepository(repositoryId); List<Triple<String, Date, String>> references = new ArrayList<>(); try { GHRef[] refs = repository.getRefs(); for (GHRef ref : refs) { if (workflow.getMode() != WorkflowMode.DOCKSTORE_YML || ref.getRef().startsWith("refs/tags")) { references.add(getRef(ref, repository)); } } } catch (GHFileNotFoundException e) { LOG.debug("repo had no releases or tags: " + repositoryId); } catch (IOException e) { LOG.info(gitUsername + ": Cannot get branches or tags for workflow {}"); throw new CustomWebApplicationException("Could not reach GitHub, please try again later", HttpStatus.SC_SERVICE_UNAVAILABLE); } for (Triple<String, Date, String> ref : references) { if (ref != null) { SourceFile dockstoreYml = null; if (workflow.getMode() == WorkflowMode.DOCKSTORE_YML) { try { dockstoreYml = getDockstoreYml(repository.getFullName(), ref.getLeft()); } catch (CustomWebApplicationException ex) { LOG.error("No .dockstore.yml present.", ex); continue; } } WorkflowVersion version = setupWorkflowVersionsHelper(repositoryId, workflow, ref, existingWorkflow, existingDefaults, repository, dockstoreYml); if (version != null) { workflow.addWorkflowVersion(version); } } } GHRateLimit endRateLimit = getGhRateLimitQuietly(); reportOnRateLimit("setupWorkflowVersions", startRateLimit, endRateLimit); return workflow; }
Source:
public boolean onActionItemClicked(ActionMode mode, MenuItem item) { if (item.getItemId() == 16) { int selectionStart = mTextBox.getSelectionStart(); int selectionEnd = mTextBox.getSelectionEnd(); String text = mTextBox.getText().toString(); String beforeText = text.substring(0, selectionStart); String selectedText = text.substring(selectionStart, selectionEnd); String afterText = text.substring(selectionEnd); String clozeOpenBracket = "{{c" + mClozeCounter + "::"; mClozeCounter++; mTextBox.setText(beforeText + clozeOpenBracket + selectedText + "}}" + afterText); int clozeOpenSize = clozeOpenBracket.length(); mTextBox.setSelection(selectionStart+clozeOpenSize, selectionEnd+clozeOpenSize); mode.finish(); return true; } else { return false; } }

Target:
public boolean onActionItemClicked(ActionMode mode, MenuItem item) { if (item.getItemId() == mMenuId) { int selectionStart = mTextBox.getSelectionStart(); int selectionEnd = mTextBox.getSelectionEnd(); String text = mTextBox.getText().toString(); String beforeText = text.substring(0, selectionStart); String selectedText = text.substring(selectionStart, selectionEnd); String afterText = text.substring(selectionEnd); Matcher matcher = mClozeRegexPattern.matcher(text); int highestClozeId = 0; while (matcher.find()) { int detectedClozeId = Integer.parseInt(matcher.group(1)); if (detectedClozeId > highestClozeId) { highestClozeId = detectedClozeId; } } String clozeOpenBracket = "{{c" + (highestClozeId + 1) + "::"; mTextBox.setText(beforeText + clozeOpenBracket + selectedText + "}}" + afterText); int clozeOpenSize = clozeOpenBracket.length(); mTextBox.setSelection(selectionStart+clozeOpenSize, selectionEnd+clozeOpenSize); mode.finish(); return true; } else { return false; } }
Source:
public Response intercept(Chain chain) throws IOException { Request original = chain.request(); if (credential == null) { return chain.proceed(original); } if (!original.isHttps() && credential != null) { throw new PlainTextPasswordException(); } Request.Builder builder = original.newBuilder() .header("Authorization", credential); Request request = builder.build(); return chain.proceed(request); }

Target:
public Response intercept(Chain chain) throws IOException { Request original = chain.request(); if (credential == null) { return chain.proceed(original); } if (enforceSecureEndpoint && !original.isHttps() && credential != null) { throw new PlainTextPasswordException(); } Request.Builder builder = original.newBuilder() .header("Authorization", credential); Request request = builder.build(); return chain.proceed(request); }
Source:
public String toString() { return new StringBuilder() .append("VpnConfig") .append("{ user=").append(user) .append(", interface=").append(interfaze) .append(", session=").append(session) .append(", mtu=").append(mtu) .append(", addresses=").append(toString(addresses)) .append(", routes=").append(toString(routes)) .append(", dns=").append(toString(dnsServers)) .append(", searchDomains=").append(toString(searchDomains)) .append(", allowedApps=").append(toString(allowedApplications)) .append(", disallowedApps=").append(toString(disallowedApplications)) .append(", configureIntent=").append(configureIntent) .append(", startTime=").append(startTime) .append(", legacy=").append(legacy) .append(", blocking=").append(blocking) .append(", allowBypass=").append(allowBypass) .append(", allowIPv4=").append(allowIPv4) .append(", allowIPv6=").append(allowIPv6) .append(", underlyingNetworks=").append(Arrays.toString(underlyingNetworks)) .append(", proxyHost=").append(proxy == null ? "" : proxy.getHost()) .append(", proxyPort=").append(proxy == null ? "" : proxy.getPort()) .append("}") .toString(); }

Target:
public String toString() { return new StringBuilder() .append("VpnConfig") .append("{ user=").append(user) .append(", interface=").append(interfaze) .append(", session=").append(session) .append(", mtu=").append(mtu) .append(", addresses=").append(toString(addresses)) .append(", routes=").append(toString(routes)) .append(", dns=").append(toString(dnsServers)) .append(", searchDomains=").append(toString(searchDomains)) .append(", allowedApps=").append(toString(allowedApplications)) .append(", disallowedApps=").append(toString(disallowedApplications)) .append(", configureIntent=").append(configureIntent) .append(", startTime=").append(startTime) .append(", legacy=").append(legacy) .append(", blocking=").append(blocking) .append(", allowBypass=").append(allowBypass) .append(", allowIPv4=").append(allowIPv4) .append(", allowIPv6=").append(allowIPv6) .append(", underlyingNetworks=").append(Arrays.toString(underlyingNetworks)) .append(", proxy=").append(proxy) .append("}") .toString(); }
Source:
public void close() throws IOException { try { flush(); } finally { if (writer != null) { writer.close(); } } }

Target:
public void close() throws IOException { try (@SuppressWarnings("unused") Writer writer = this.writer) { flush(); } }
Source:
private void createBulkUsers() throws Exception { FileUtils.writeLines(sourceLoginFile, sourceUsers1); FileUtils.writeLines(sourceGroupFile, sourceGroups1); ManageUsers.manageUsers(new String[]{"-" + ManageUsers.CREATE_OPTION, "-" + ManageUsers.SOURCE_LOGINFILE_OPTION, sourceLoginFile.getAbsolutePath(), "-" + ManageUsers.SOURCE_GROUPFILE_OPTION, sourceGroupFile.getAbsolutePath(), "-" + ManageUsers.LOGINFILE_OPTION, loginFile.getAbsolutePath(), "-" + ManageUsers.GROUPFILE_OPTION, groupFile.getAbsolutePath(), "-" + ManageUsers.KEYFILE_OPTION, publicKeyFile.getAbsolutePath() }); validateContents(users, groups); }

Target:
private void createBulkUsers() throws Exception { FileUtils.writeLines(sourceLoginFile, sourceUsers1); FileUtils.writeLines(sourceGroupFile, sourceGroups1); ManageUsers.manageUsers("-" + ManageUsers.CREATE_OPTION, "-" + ManageUsers.SOURCE_LOGINFILE_OPTION, sourceLoginFile.getAbsolutePath(), "-" + ManageUsers.SOURCE_GROUPFILE_OPTION, sourceGroupFile.getAbsolutePath(), "-" + ManageUsers.LOGINFILE_OPTION, loginFile.getAbsolutePath(), "-" + ManageUsers.GROUPFILE_OPTION, groupFile.getAbsolutePath(), "-" + ManageUsers.KEYFILE_OPTION, publicKeyFile.getAbsolutePath() ); validateContents(users, groups); }
Source:
public Iterator<Entry<K, V>> crappyterator() { final Store.Iterator<Entry<K, ValueHolder<V>>> iterator = store.iterator(); return new Iterator<Entry<K, V>>() { K current; @Override public boolean hasNext() { return iterator.hasNext(); } @Override public Entry<K, V> next() { try { final Entry<K, ValueHolder<V>> next = iterator.next(); if (get(next.getKey()) == null) { current = null; return null; } store.get(next.getKey()); current = next.getKey(); return new Entry<K, V>() { @Override public K getKey() { return next.getKey(); } @Override public V getValue() { return next.getValue().value(); } }; } catch (CacheAccessException e) { current = null; return null; } } @Override public void remove() { if (current == null) { throw new IllegalStateException(); } Ehcache.this.remove(current); } }; }

Target:
public Iterator<Entry<K, V>> crappyterator() { return new Crappyterator<K, V>(Ehcache.this, store); }
Source:
protected ILogData removeFromQueue(NavigableSet<Long> queue) { Long thisRead = queue.pollFirst(); if (thisRead != null) { ILogData ld; try { ld = readRange(thisRead, queue, false); } catch (TrimmedException te) { if (!options.ignoreTrimmed) { throw te; } log.warn("removeFromQueue[{}]: ignoring trimmed addresses {}", this, te.getTrimmedAddresses()); te.getTrimmedAddresses().forEach(address -> queue.remove(address)); return removeFromQueue(queue); } if (queue == getCurrentContext().readQueue && ld != null) { if (ld.containsStream(this.id)) { addToResolvedQueue(getCurrentContext(), thisRead, ld); return ld; } else { log.trace("getNextEntry[{}]: the data for address does not belong to this stream. Skip.", this, thisRead); return removeFromQueue(queue); } } return ld; } return null; }

Target:
protected ILogData removeFromQueue(NavigableSet<Long> queue) { Long thisRead = queue.pollFirst(); if (thisRead != null) { ILogData ld; try { ld = read(thisRead, queue); } catch (TrimmedException te) { if (!options.ignoreTrimmed) { throw te; } log.warn("removeFromQueue[{}]: ignoring trimmed addresses {}", this, te.getTrimmedAddresses()); te.getTrimmedAddresses().forEach(address -> queue.remove(address)); return removeFromQueue(queue); } if (queue == getCurrentContext().readQueue && ld != null) { if (ld.containsStream(this.id)) { addToResolvedQueue(getCurrentContext(), thisRead, ld); return ld; } else { log.trace("getNextEntry[{}]: the data for address does not belong to this stream. Skip.", this, thisRead); return removeFromQueue(queue); } } return ld; } return null; }
Source:
private void addAssociatedResource(Object value) { if (value instanceof EObject) { if (((EObject) value).eResource() != null) { resourceToRootEObjectMap.put(((EObject) value).eResource().getURI().toString(), (EObject) value); } } else if (value instanceof EList<?>) { EList<?> eListNotifier = (EList<?>) value; for (Object object : eListNotifier) { addAssociatedResource(object); } } }

Target:
private void addAssociatedResource(Object value) { if (value instanceof EObject) { Resource eResource = ((EObject) value).eResource(); if (eResource != null) { resourceToRootEObjectMap.put(eResource.getURI().toString(), (EObject) value); } } else if (value instanceof EList<?>) { EList<?> eListNotifier = (EList<?>) value; for (Object object : eListNotifier) { addAssociatedResource(object); } } }
Source:
Resource(byte pos, String name) { this.lockLevel = pos; this.mask += (short) Math.pow(2, lockLevel + 1) - 1; this.setMask = (short) Math.pow(2, lockLevel); this.name = name; }

Target:
Resource(byte pos, String name) { this.lockLevel = pos; this.mask = (short) (Math.pow(2, lockLevel + 1) - 1); this.setMask = (short) Math.pow(2, lockLevel); this.name = name; }
Source:
public List<DocumentReference> getDocumentParentsList(DocumentReference docRef, boolean includeDoc) { ArrayList<DocumentReference> docParents = new ArrayList<DocumentReference>(); ArrayList<String> secondKeyMaster = new ArrayList<String>( docParentProviderMap.keySet()); secondKeyMaster.remove(XDocParents.DOC_PROVIDER_NAME); ArrayList<String> secondKeys = new ArrayList<String>(secondKeyMaster); String firstKey = XDocParents.DOC_PROVIDER_NAME; try { if (includeDoc) { docParents.add(docRef); } boolean hasMore = false; do { List<DocumentReference> parentList = docParentProviderMap.get(firstKey ).getDocumentParentsList(docRef); joinParentLists(docParents, parentList); docRef = docParents.get(docParents.size() - 1); hasMore = false; if (secondKeys.size() > 0) { int secKeyIndex = -1; parentList = Collections.emptyList(); while ((secKeyIndex < secondKeys.size()) && ((parentList == null) || parentList.isEmpty())) { secKeyIndex = secKeyIndex + 1; parentList = docParentProviderMap.get(secondKeys.get(secKeyIndex) ).getDocumentParentsList(docRef); } hasMore = ((parentList != null) && !parentList.isEmpty()); if (hasMore) { joinParentLists(docParents, parentList); docRef = docParents.get(docParents.size() - 1); secondKeys = new ArrayList<String>(secondKeyMaster); secondKeys.remove(secKeyIndex); } } } while (hasMore); } catch (XDocRecursionException recExp) { _LOGGER.info("Recursion in document parents found [" + recExp + "]."); } return docParents; }

Target:
public List<DocumentReference> getDocumentParentsList(DocumentReference docRef, boolean includeDoc) { ArrayList<DocumentReference> docParents = new ArrayList<DocumentReference>(); ArrayList<String> secondKeyMaster = new ArrayList<String>( docParentProviderMap.keySet()); secondKeyMaster.remove(XDocParents.DOC_PROVIDER_NAME); ArrayList<String> secondKeys = new ArrayList<String>(secondKeyMaster); String firstKey = XDocParents.DOC_PROVIDER_NAME; try { if (includeDoc) { docParents.add(docRef); } boolean hasMore = false; do { List<DocumentReference> parentList = docParentProviderMap.get(firstKey ).getDocumentParentsList(docRef); if (parentList.size() > 0) { joinParentLists(docParents, parentList); docRef = docParents.get(docParents.size() - 1); } hasMore = false; if (secondKeys.size() > 0) { int secKeyIndex = -1; parentList = Collections.emptyList(); while (((secKeyIndex + 1) < secondKeys.size()) && ((parentList == null) || parentList.isEmpty())) { secKeyIndex = secKeyIndex + 1; parentList = docParentProviderMap.get(secondKeys.get(secKeyIndex) ).getDocumentParentsList(docRef); } hasMore = ((parentList != null) && !parentList.isEmpty()); if (hasMore) { joinParentLists(docParents, parentList); docRef = docParents.get(docParents.size() - 1); secondKeys = new ArrayList<String>(secondKeyMaster); secondKeys.remove(secKeyIndex); } } } while (hasMore); } catch (XDocRecursionException recExp) { _LOGGER.info("Recursion in document parents found [" + recExp + "]."); } return docParents; }
Source:
private boolean hasGroupItemChanged(Item item1, Item item2) { GroupItem gItem1 = null; GroupItem gItem2 = null; if (item1 instanceof GroupItem) { gItem1 = (GroupItem) item1; } if (item2 instanceof GroupItem) { gItem2 = (GroupItem) item2; } if (gItem1 == null && gItem2 == null) { return false; } if ((gItem1 != null && gItem2 == null) || (gItem1 == null && gItem2 != null)) { return true; } boolean sameBaseItemClass = false; if (gItem1.getBaseItem() != null && gItem2.getBaseItem() != null) { sameBaseItemClass = Objects.equals(gItem1.getBaseItem().getClass(), gItem2.getBaseItem().getClass()); } boolean sameFunction = false; GroupFunction gf1 = gItem1.getFunction(); GroupFunction gf2 = gItem2.getFunction(); if (gf1 != null && gf2 != null) { if (Objects.equals(gf1.getClass(), gf2.getClass())) { sameFunction = Arrays.equals(gf1.getParameters(), gf2.getParameters()); } } boolean sameMembers = true; Set<Item> members1 = gItem1.getMembers(); Set<Item> members2 = gItem2.getMembers(); if (members1 != null && members2 != null) { if (members1.size() != members2.size()) { sameMembers = false; } else { sameMembers = Objects.equals(members1, members2); } } else if ((gItem1.getMembers() == null && gItem2.getMembers() != null) || gItem1.getMembers() != null && gItem2.getMembers() == null) { sameMembers = false; } return !(sameBaseItemClass && sameFunction && sameMembers); }

Target:
private boolean hasGroupItemChanged(Item item1, Item item2) { GroupItem gItem1 = null; GroupItem gItem2 = null; if (item1 instanceof GroupItem) { gItem1 = (GroupItem) item1; } if (item2 instanceof GroupItem) { gItem2 = (GroupItem) item2; } if (gItem1 == null && gItem2 == null) { return false; } if ((gItem1 != null && gItem2 == null) || (gItem1 == null && gItem2 != null)) { return true; } boolean sameBaseItemClass = Objects.equals(gItem1.getBaseItem(), gItem2.getBaseItem()); boolean sameFunction = false; GroupFunction gf1 = gItem1.getFunction(); GroupFunction gf2 = gItem2.getFunction(); if (gf1 != null && gf2 != null) { if (Objects.equals(gf1.getClass(), gf2.getClass())) { sameFunction = Arrays.equals(gf1.getParameters(), gf2.getParameters()); } } else if (gf1 == null && gf2 == null) { sameFunction = true; } boolean sameMembers = Objects.equals(gItem1.getMembers(), gItem2.getMembers()); return !(sameBaseItemClass && sameFunction && sameMembers); }
Source:
public void removeMouseListener(MouseListener listener) { if (this.dropdownTableViewer != null && !this.dropdownTable.isDisposed()) this.dropdownTable.removeMouseListener(listener); }

Target:
public void removeMouseListener(MouseListener listener) { if (this.dropdownTable != null && !this.dropdownTable.isDisposed()) this.dropdownTable.removeMouseListener(listener); }
Source:
public boolean isIdProperty() { return isAnnotationPresent(Id.class) || super.isIdProperty() || this.getFieldName().equals("id"); }

Target:
public boolean isIdProperty() { return isAnnotationPresent(Id.class) || super.isIdProperty() || this.getFieldName().toLowerCase(Locale.ROOT).equals("id"); }
Source:
public boolean shouldWait() { if (resultSet == null) { resultSet = createResultSet(); sequence = startSequence; } final EventJournal<J> journal = getJournal(); final int partitionId = getPartitionId(); journal.cleanup(namespace, partitionId); sequence = clampToBounds(journal, partitionId, sequence); if (minSize == 0) { if (!journal.isNextAvailableSequence(namespace, partitionId, sequence)) { sequence = journal.readMany(namespace, partitionId, sequence, resultSet); resultSet.setNextSequenceToReadFrom(sequence); } return false; } if (resultSet.isMinSizeReached()) { return false; } if (journal.isNextAvailableSequence(namespace, partitionId, sequence)) { return true; } sequence = journal.readMany(namespace, partitionId, sequence, resultSet); resultSet.setNextSequenceToReadFrom(sequence); return !resultSet.isMinSizeReached(); }

Target:
public boolean shouldWait() { if (resultSet == null) { resultSet = createResultSet(); sequence = startSequence; } final EventJournal<J> journal = getJournal(); final int partitionId = getPartitionId(); journal.cleanup(namespace, partitionId); sequence = clampToBounds(journal, partitionId, sequence); if (minSize == 0) { if (!journal.isNextAvailableSequence(namespace, partitionId, sequence)) { readMany(journal, partitionId); } return false; } if (resultSet.isMinSizeReached()) { return false; } if (journal.isNextAvailableSequence(namespace, partitionId, sequence)) { return true; } readMany(journal, partitionId); return !resultSet.isMinSizeReached(); }
Source:
public void close() throws IOException { if ( flusher != null ) { stopFlushingPageCache(); } flushAndForce(); safeClose( propertyKeyRepository, labelRepository, relationshipTypeRepository ); life.shutdown(); safeClose( neoStores, temporaryNeoStores ); if ( !externalPageCache ) { pageCache.close(); } if ( successful ) { cleanup(); } }

Target:
public void close() throws IOException { if ( flusher != null ) { stopFlushingPageCache(); } flushAndForce(); closeAll( propertyKeyRepository, labelRepository, relationshipTypeRepository ); life.shutdown(); closeAll( neoStores, temporaryNeoStores ); if ( !externalPageCache ) { pageCache.close(); } if ( successful ) { cleanup(); } }
Source:
public void afterRegionDestroyIsInvokedInEveryMember() { CacheListener<String, Integer> listener = new RegionDestroyCountingCacheListener(); Region<String, Integer> region = createRegion(regionName, listener); for (int i = 0; i < getVMCount(); i++) { getVM(i).invoke(() -> { createRegion(regionName, listener); }); } region.destroyRegion(); if (region instanceof PartitionedRegion) { assertThat(sharedCountersRule.getTotal(REGION_DESTROY)) .isGreaterThanOrEqualTo(expectedRegionDestroys()); } else { assertThat(sharedCountersRule.getTotal(REGION_DESTROY)).isEqualTo(expectedRegionDestroys()); } }

Target:
public void afterRegionDestroyIsInvokedInEveryMember() { CacheListener<String, Integer> listener = new RegionDestroyCountingCacheListener(); Region<String, Integer> region = createRegion(regionName, listener); for (int i = 0; i < getVMCount(); i++) { getVM(i).invoke(() -> { createRegion(regionName, listener); }); } region.destroyRegion(); assertThat(sharedCountersRule.getTotal(REGION_DESTROY)).isEqualTo(expectedRegionDestroys()); }
Source:
protected <K, V> Store<K, V> wrap(Store<K, V> store, Store.Configuration<K, V> storeConfig, ServiceConfiguration<?, ?>... serviceConfigs) { DelegatingLoaderWriterStore<K, V> loaderWriterStore = new DelegatingLoaderWriterStore<>(store); serviceProvider.getService(StatisticsService.class).registerWithParent(store, loaderWriterStore); return loaderWriterStore; }

Target:
protected <K, V> Store<K, V> wrap(Store<K, V> store, Store.Configuration<K, V> storeConfig, ServiceConfiguration<?, ?>... serviceConfigs) { DelegatingLoaderWriterStore<K, V> loaderWriterStore = new DelegatingLoaderWriterStore<>(store); return loaderWriterStore; }
Source:
public void onPackageAdded(String packageName) { final PackageInfo app = getPackageInfo(packageName); if (app == null) { Slog.wtf(TAG, "Failed to get information of installed package: " + packageName); return; } int uid = (app.applicationInfo != null) ? app.applicationInfo.uid : INVALID_UID; if (uid == INVALID_UID) { return; } sendPackagePermissionsForUid(uid, filterPermission(Arrays.asList(app.requestedPermissions))); synchronized (mPackageNameUidMap) { mPackageNameUidMap.put(packageName, uid); } }

Target:
public void onPackageAdded(String packageName) { final PackageInfo app = getPackageInfo(packageName); if (app == null) { Slog.wtf(TAG, "Failed to get information of installed package: " + packageName); return; } int uid = (app.applicationInfo != null) ? app.applicationInfo.uid : INVALID_UID; if (uid == INVALID_UID) { Slog.wtf(TAG, "Failed to get the uid of installed package: " + packageName + "uid: " + uid); return; } if (app.requestedPermissions == null) { return; } sendPackagePermissionsForUid(uid, filterPermission(Arrays.asList(app.requestedPermissions))); synchronized (mPackageNameUidMap) { mPackageNameUidMap.put(packageName, uid); } }
Source:
public void start() { long minSleepTime = env.getConfiguration().getInt(FluoConfigurationImpl.MIN_SLEEP_TIME_PROP, FluoConfigurationImpl.MIN_SLEEP_TIME_DEFAULT); long maxSleepTime = env.getConfiguration().getInt(FluoConfigurationImpl.MAX_SLEEP_TIME_PROP, FluoConfigurationImpl.MAX_SLEEP_TIME_DEFAULT); paritionManager = new ParitionManager(env, minSleepTime, maxSleepTime); scanThread = new Thread(new ScanTask(this, processor, paritionManager, env, stopped, minSleepTime, maxSleepTime)); scanThread.setName(getClass().getSimpleName() + " " + ScanTask.class.getSimpleName()); scanThread.setDaemon(true); scanThread.start(); }

Target:
public void start() { long minSleepTime = env.getConfiguration().getInt(FluoConfigurationImpl.NTFY_FINDER_MIN_SLEEP_TIME_PROP, FluoConfigurationImpl.NTFY_FINDER_MIN_SLEEP_TIME_DEFAULT); long maxSleepTime = env.getConfiguration().getInt(FluoConfigurationImpl.NTFY_FINDER_MAX_SLEEP_TIME_PROP, FluoConfigurationImpl.NTFY_FINDER_MAX_SLEEP_TIME_DEFAULT); paritionManager = new ParitionManager(env, minSleepTime, maxSleepTime); scanThread = new Thread(new ScanTask(this, processor, paritionManager, env, stopped, minSleepTime, maxSleepTime)); scanThread.setName(getClass().getSimpleName() + " " + ScanTask.class.getSimpleName()); scanThread.setDaemon(true); scanThread.start(); }
Source:
protected CompletableFuture<?> completeSingleWriteOnPrimaryOriginator(DataWriteCommand command, Address backup, CompletableFuture<?> rpcFuture) { CompletableFuture<?> revokeFuture = revokeBiasSync(command.getKey(), backup, command.getTopologyId()); return revokeFuture == null ? rpcFuture : CompletableFuture.allOf(rpcFuture, revokeFuture); }

Target:
protected CompletableFuture<?> completeSingleWriteOnPrimaryOriginator(DataWriteCommand command, Address backup, CompletableFuture<?> rpcFuture) { CompletableFuture<?> revokeFuture = revokeBiasSync(command.getKey(), backup, command.getTopologyId()); return CompletableFuture.allOf(rpcFuture, revokeFuture); }
Source:
public void should_print_error_message_when_invalid_command_is_given() throws Exception { execute("foo"); assertFailure(); assertNoOutput(out); assertContains("\"foo\" is not a valid value for \"<command>\"", err); assertContains("Usage: java -jar jacococli.jar -help | <command>", err); }

Target:
public void should_print_error_message_when_invalid_command_is_given() throws Exception { execute("foo"); assertFailure(); assertNoOutput(out); assertContains("\"foo\" is not a valid value for \"<command>\"", err); assertContains("Usage: java -jar jacococli.jar --help | <command>", err); }
Source:
private static byte[] flags(EnumSet<AdminFlag> flags) { StringJoiner sj = new StringJoiner(","); flags.forEach(f -> sj.add(f.name())); return string(sj.toString()); }

Target:
private static byte[] flags(EnumSet<AdminFlag> flags) { String sFlags = flags.stream().map(AdminFlag::toString).collect(Collectors.joining(",")); return string(sFlags); }
Source:
public boolean isHidden(Path path) throws IOException { if (context.getLayout() == StorageFileLayout.OBJECT_ID) { return path.getFileName().endsWith(".bai") || path.getFileName().endsWith(".tbi"); } return false; }

Target:
public boolean isHidden(Path path) throws IOException { if (context.getLayout() == StorageFileLayout.OBJECT_ID) { return IndexFileType.isIndexFile(path.getFileName().toString()); } return false; }
Source:
public String processText(InputStream in) throws IOException { String text = IOUtils.toString(in, StandardCharsets.UTF_8); return processText(text); }

Target:
public String processText(InputStream in) throws IOException { String text = IOUtils.toString(in, UTF_8); return processText(text); }
Source:
public Object getParameter(String name) { Object paramValue = fParameters.get(name); ITmfTrace trace = getTrace(); if ((paramValue == null) && (trace != null)) { for (IAnalysisParameterProvider provider : fParameterProviders) { paramValue = provider.getParameter(name); if (paramValue != null) { break; } } } return paramValue; }

Target:
public Object getParameter(String name) { Object paramValue = fParameters.get(name); if ((paramValue == null) && (fTrace != null)) { for (IAnalysisParameterProvider provider : fParameterProviders) { paramValue = provider.getParameter(name); if (paramValue != null) { break; } } } return paramValue; }
Source:
protected String insertResultEntity(InputStream stream, String id, String type, String mimeType) { BufferedInputStream dataStream = new BufferedInputStream(stream, DATA_BUFFER_SIZE); boolean isOutput = null != id && id.toLowerCase().contains("output"); if (isOutput && !Boolean.parseBoolean(getDatabaseProperties("saveResultsToDB"))) { try { dataStream = writeDataToDiskWithGZIP(id, stream); } catch (Exception ex) { LOGGER.error("Failed to write output data to disk", ex); } } try (Connection connection = getConnection(); PreparedStatement myInsertSQL = connection.prepareStatement(insertionString)) { myInsertSQL.setString(INSERT_COLUMN_REQUEST_ID, id); myInsertSQL.setTimestamp(INSERT_COLUMN_REQUEST_DATE, new Timestamp(Calendar.getInstance().getTimeInMillis())); myInsertSQL.setString(INSERT_COLUMN_RESPONSE_TYPE, type); myInsertSQL.setString(INSERT_COLUMN_MIME_TYPE, mimeType); myInsertSQL.setAsciiStream(INSERT_COLUMN_RESPONSE, dataStream, DATA_BUFFER_SIZE); myInsertSQL.executeUpdate(); LOGGER.debug("inserted request into database", id); } catch (SQLException ex) { LOGGER.error("Failed to insert result data into the database", ex); } return generateRetrieveResultURL(id); }

Target:
protected String insertResultEntity(InputStream stream, String id, String type, String mimeType) { BufferedInputStream dataStream = new BufferedInputStream(stream, DATA_BUFFER_SIZE); boolean isOutput = null != id && id.toLowerCase().contains("output"); if (isOutput && !Boolean.parseBoolean(getDatabaseProperties("saveResultsToDB"))) { try { dataStream = writeDataToDiskWithGZIP(id, stream); } catch (Exception ex) { LOGGER.error("Failed to write output data to disk", ex); } } try (Connection connection = getConnection(); PreparedStatement insertStatement = connection.prepareStatement(insertionString)) { insertStatement.setString(INSERT_COLUMN_REQUEST_ID, id); insertStatement.setTimestamp(INSERT_COLUMN_REQUEST_DATE, new Timestamp(Calendar.getInstance().getTimeInMillis())); insertStatement.setString(INSERT_COLUMN_RESPONSE_TYPE, type); insertStatement.setString(INSERT_COLUMN_MIME_TYPE, mimeType); insertStatement.setAsciiStream(INSERT_COLUMN_RESPONSE, dataStream, DATA_BUFFER_SIZE); insertStatement.executeUpdate(); LOGGER.debug("inserted request into database", id); } catch (SQLException ex) { LOGGER.error("Failed to insert result data into the database", ex); } return generateRetrieveResultURL(id); }
Source:
private void verifyMediaContent(Question question) { String questionValue = getResponseValue(question); if (!TextUtils.isEmpty(questionValue)) { ViewInteraction downloadButton = onView( allOf(withId(R.id.media_download), withQuestionViewParent(question, MediaQuestionView.class))) .perform(scrollTo()); downloadButton.check(matches(isDisplayed())); downloadButton.perform(click()); } }

Target:
private void verifyMediaContent(Question question) { String questionValue = getResponseValue(question); if (!TextUtils.isEmpty(questionValue)) { ViewInteraction downloadButton = onView( allOf(withId(R.id.media_download), withQuestionViewParent(question, MediaQuestionView.class))) .perform(scrollTo()); downloadButton.check(matches(allOf(isDisplayed(), isEnabled()))); } }
Source:
public String getHelpNote(ConfigKey key) { return getHelpNoteByType(key, "a comma delimited sub collection of any of the possible values"); }

Target:
public String getHelpNote(ConfigKey key) { return getHelpNoteByType(key, "a comma delimited subset of any of the possible values"); }
Source:
public void destroy() { clearPartition(false); storage.destroy(false); eventJournal.destroy(mapContainer.getObjectNamespace(), partitionId); mutationObserver.onClear(); }

Target:
public void destroy() { clearPartition(false, true); storage.destroy(false); mutationObserver.onDestroy(false); }
Source:
public void deleteGroupUnprocessableTest() throws Exception { context.turnOffAuthorisationSystem(); EPerson reviewer1 = EPersonBuilder.createEPerson(context) .withEmail("reviewer1@example.com") .withPassword(password) .build(); parentCommunity = CommunityBuilder.createCommunity(context) .withName("Parent Community") .build(); Community child1 = CommunityBuilder.createSubCommunity(context, parentCommunity) .withName("Sub Community") .build(); Collection col1 = CollectionBuilder.createCollection(context, child1) .withName("Collection 1") .withWorkflowGroup(1, admin, reviewer1) .build(); final Group workflowGroup = col1.getWorkflowStep1(context); context.commit(); context.reloadEntity(workflowGroup); String authToken = getAuthToken(admin.getEmail(), password); getClient(authToken).perform( get("/api/eperson/groups/" + workflowGroup.getID()) ).andExpect(status().isOk()); getClient(authToken).perform( delete("/api/eperson/groups/" + workflowGroup.getID()) ).andExpect(status().isUnprocessableEntity()); getClient(authToken).perform( get("/api/eperson/groups/" + workflowGroup.getID()) ).andExpect(status().isOk()); }

Target:
public void deleteGroupUnprocessableTest() throws Exception { context.turnOffAuthorisationSystem(); EPerson reviewer1 = EPersonBuilder.createEPerson(context) .withEmail("reviewer1@example.com") .withPassword(password) .build(); parentCommunity = CommunityBuilder.createCommunity(context) .withName("Parent Community") .build(); Community child1 = CommunityBuilder.createSubCommunity(context, parentCommunity) .withName("Sub Community") .build(); Collection col1 = CollectionBuilder.createCollection(context, child1) .withName("Collection 1") .withWorkflowGroup(1, admin, reviewer1) .build(); Group workflowGroup = col1.getWorkflowStep1(context); context.restoreAuthSystemState(); String authToken = getAuthToken(admin.getEmail(), password); getClient(authToken).perform( get("/api/eperson/groups/" + workflowGroup.getID()) ).andExpect(status().isOk()); getClient(authToken).perform( delete("/api/eperson/groups/" + workflowGroup.getID()) ).andExpect(status().isUnprocessableEntity()); getClient(authToken).perform( get("/api/eperson/groups/" + workflowGroup.getID()) ).andExpect(status().isOk()); }
Source:
public void dispose() { logger.debug("Disposing thing {}", getThing().getUID()); if (schedulerFuture != null && !schedulerFuture.isCancelled()) { schedulerFuture.cancel(true); schedulerFuture = null; } if (scheduledExecutor.isPresent()) { final ExpressionThreadPoolExecutor executor = scheduledExecutor.get(); executor.shutdownNow(); scheduledExecutor = Optional.empty(); } logger.debug("Thing disposed", getThing().getUID()); }

Target:
public void dispose() { logger.debug("Disposing thing {}", getThing().getUID()); if (schedulerFuture != null && !schedulerFuture.isCancelled()) { schedulerFuture.cancel(true); schedulerFuture = null; } stopJobs(); logger.debug("Thing disposed", getThing().getUID()); }