auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public Set<String> getDefinitions(final String label) { final Set<String> ids = definitionsByLabel.get(label); if (null == ids) { return Collections.emptySet(); } return ids; }

Target:
public Set<String> getDefinitions(final String label) { final Set<String> ids = definitionsByLabel.get(label); return null != ids ? ids : Collections.emptySet(); }
Source:
public Observable<BufferingState> forInterest(final Interest<T> interest) { return Observable.create(new OnSubscribe<BufferingState>() { @Override public void call(Subscriber<? super BufferingState> subscriber) { updatesSubject.pause(); try { BufferingState current = shouldBatch(interest); if (current != BufferingState.FinishBuffering) { subscriber.onNext(current); } updatesSubject.map(new Func1<Boolean, BufferingState>() { @Override public BufferingState call(Boolean tick) { return shouldBatch(interest); } }).subscribe(subscriber); } finally { updatesSubject.resume(); } } }).distinctUntilChanged(); }

Target:
public Observable<BufferState> forInterest(final Interest<T> interest) { return Observable.create(new OnSubscribe<BufferState>() { @Override public void call(Subscriber<? super BufferState> subscriber) { updatesSubject.pause(); try { BufferState current = shouldBatch(interest); if (current != BufferState.BufferEnd) { subscriber.onNext(current); } updatesSubject.map(new Func1<Boolean, BufferState>() { @Override public BufferState call(Boolean tick) { return shouldBatch(interest); } }).subscribe(subscriber); } finally { updatesSubject.resume(); } } }).distinctUntilChanged(); }
Source:
private Mono<ServerOAuth2AuthorizeRequest> authorizeRequest(String registrationId, ServerWebExchange exchange) { Mono<Authentication> defaultedAuthentication = currentAuthentication(); Mono<String> defaultedRegistrationId = Mono.justOrEmpty(registrationId) .switchIfEmpty(clientRegistrationId(defaultedAuthentication)) .switchIfEmpty(Mono.error(() -> new IllegalArgumentException("The clientRegistrationId could not be resolved. Please provide one"))); Mono<Optional<ServerWebExchange>> defaultedExchange = Mono.justOrEmpty(exchange) .switchIfEmpty(currentServerWebExchange()).map(Optional::of) .defaultIfEmpty(Optional.empty()); return Mono.zip(defaultedRegistrationId, defaultedAuthentication, defaultedExchange) .map(t3 -> new ServerOAuth2AuthorizeRequest(t3.getT1(), t3.getT2(), t3.getT3().orElse(null))); }

Target:
private Mono<ServerOAuth2AuthorizeRequest> authorizeRequest(String registrationId, ServerWebExchange exchange) { Mono<Authentication> defaultedAuthentication = currentAuthentication(); Mono<String> defaultedRegistrationId = Mono.justOrEmpty(registrationId) .switchIfEmpty(clientRegistrationId(defaultedAuthentication)) .switchIfEmpty(Mono.error(() -> new IllegalArgumentException("The clientRegistrationId could not be resolved. Please provide one"))); Mono<ServerWebExchange> defaultedExchange = Mono.justOrEmpty(exchange) .switchIfEmpty(currentServerWebExchange()); return Mono.zip(defaultedRegistrationId, defaultedAuthentication, defaultedExchange) .map(t3 -> new ServerOAuth2AuthorizeRequest(t3.getT1(), t3.getT2(), t3.getT3())); }
Source:
public boolean equals(Object o) { if (o instanceof CaseFileVariables) { CaseFileVariables other = (CaseFileVariables) o; return (null != value) ? value.equals(other.value) : null == other.value; } return false; }

Target:
public boolean equals(Object o) { if (o instanceof CaseFileVariables) { CaseFileVariables other = (CaseFileVariables) o; return Objects.equals(value, other.value); } return false; }
Source:
private void setDescription(ProgData progData, Item item, Channel channel) { if (progData.getBillings() != null) { for (Billing billing : progData.getBillings().getBilling()) { if((item.getDescription() == null || (channel !=null && !channel.getUri().contains("wales"))) && billing.getType().equals("synopsis")) { item.setDescription(billing.getvalue()); } if ((item.getShortDescription() == null || (channel !=null && !channel.getUri().contains("wales"))) && billing.getType().equals("pa_detail1")) { item.setShortDescription(billing.getvalue()); } if ((item.getMediumDescription() == null || (channel !=null && !channel.getUri().contains("wales"))) && billing.getType().equals("pa_detail2")) { item.setMediumDescription(billing.getvalue()); } if ((item.getLongDescription() == null || (channel !=null && !channel.getUri().contains("wales"))) && billing.getType().equals("pa_detail3")) { item.setLongDescription(billing.getvalue()); } } } }

Target:
private void setDescription(ProgData progData, Item item, Channel channel) { if (progData.getBillings() != null) { for (Billing billing : progData.getBillings().getBilling()) { boolean channelContainsWales = channel !=null && !channel.getUri().contains("wales"); if((item.getDescription() == null || !channelContainsWales) && billing.getType().equals("synopsis")) { item.setDescription(billing.getvalue()); } if ((item.getShortDescription() == null || !channelContainsWales) && billing.getType().equals("pa_detail1")) { item.setShortDescription(billing.getvalue()); } if ((item.getMediumDescription() == null || !channelContainsWales) && billing.getType().equals("pa_detail2")) { item.setMediumDescription(billing.getvalue()); } if ((item.getLongDescription() == null || !channelContainsWales) && billing.getType().equals("pa_detail3")) { item.setLongDescription(billing.getvalue()); } } } }
Source:
default @NonNull Map<String, String> getFilterInput(ITimeEvent event) { Map<String, String> inputs = new HashMap<>(); ITimeGraphEntry entry = event.getEntry(); String stateTypeName = getStateTypeName(entry); String entryName = entry.getName(); if (stateTypeName == null) { stateTypeName = getStateTypeName(); } if (!entryName.isEmpty()) { inputs.put(stateTypeName, entry.getName()); } String state = getEventName(event); if (state != null) { inputs.put("State", state); } return inputs; }

Target:
default @NonNull Map<String, String> getFilterInput(ITimeEvent event) { Map<String, String> inputs = new HashMap<>(); ITimeGraphEntry entry = event.getEntry(); String stateTypeName = getStateTypeName(entry); String entryName = entry.getName(); if (stateTypeName == null) { stateTypeName = getStateTypeName(); } if (!entryName.isEmpty()) { inputs.put(stateTypeName, entry.getName()); } String state = getEventName(event); if (state != null) { inputs.put(Messages.TmfTimeTipHandler_TRACE_STATE, state); } return inputs; }
Source:
public void flushStreamsToBlocks() { closeAllStreams(); sliceBlocks.setCoreBlock(Block.createRawCoreDataBlock(coreBlockByteOutputStream.toByteArray())); for (final Map.Entry<Integer, ByteArrayOutputStream> streamEntry : externalOutputStreams.entrySet()) { final Integer contentId = streamEntry.getKey(); if (streamEntry.getKey().equals(Block.NO_CONTENT_ID)) { throw new CRAMException("A valid content ID is required. Given: " + contentId); } final Block externalBlock = compressionHeader.getEncodingMap().createCompressedBlockForStream(contentId, streamEntry.getValue()); sliceBlocks.addExternalBlock(externalBlock); } }

Target:
public SliceBlocks flushStreamsToBlocks() { closeAllStreams(); final Block coreBlock = Block.createRawCoreDataBlock(coreBlockByteOutputStream.toByteArray()); final List<Block> externalBlocks = new ArrayList<>(); externalOutputStreams.forEach((contentId, contentStream) -> { if (contentId.equals(Block.NO_CONTENT_ID)) { throw new CRAMException("A valid content ID is required. Given: " + contentId); } externalBlocks.add(compressionHeader.getEncodingMap().createCompressedBlockForStream(contentId, contentStream)); }); return new SliceBlocks(coreBlock, externalBlocks); }
Source:
private void initDataStore(RegionShortcut regionShortcut) { @SuppressWarnings("rawtypes") PartitionAttributes attributes = new PartitionAttributesFactory<String, String>() .setTotalNumBuckets(BUCKETS) .create(); cacheRule.getCache().createRegionFactory(regionShortcut) .setPartitionAttributes(attributes) .create(REGION_NAME); }

Target:
private void initDataStore(RegionShortcut regionShortcut) { PartitionAttributes<String, String> attrs = new PartitionAttributesFactory<String, String>() .setTotalNumBuckets(BUCKETS) .create(); cacheRule.getCache().createRegionFactory(regionShortcut) .setPartitionAttributes(attrs) .create(REGION_NAME); }
Source:
public static String identifyVM() { SystemInfo si = new SystemInfo(); HardwareAbstractionLayer hw = si.getHardware(); NetworkIF[] nifs = hw.getNetworkIFs(); for (NetworkIF nif : nifs) { String mac = nif.getMacaddr().toUpperCase(); String oui = findOuiByMacAddressIfPossible(mac); if (oui != null && oui != "") { return oui; } } String model = hw.getComputerSystem().getModel(); for (String vm : vmModelArray) { if (model.contains(vm)) { return vm; } } String manufacturer = hw.getComputerSystem().getManufacturer(); if ("Microsoft Corporation".equals(manufacturer) && "Virtual Machine".equals(model)) { return "Microsoft Hyper-V"; } return ""; }

Target:
public static String identifyVM() { SystemInfo si = new SystemInfo(); HardwareAbstractionLayer hw = si.getHardware(); NetworkIF[] nifs = hw.getNetworkIFs(); for (NetworkIF nif : nifs) { String mac = nif.getMacaddr().toUpperCase(); String oui = findOuiByMacAddressIfPossible(mac); if (oui != null && !oui.isEmpty()) { return oui; } } String model = hw.getComputerSystem().getModel(); for (String vm : vmModelArray) { if (model.contains(vm)) { return vm; } } String manufacturer = hw.getComputerSystem().getManufacturer(); if ("Microsoft Corporation".equals(manufacturer) && "Virtual Machine".equals(model)) { return "Microsoft Hyper-V"; } return ""; }
Source:
public void testProcessFunctions() throws IOException { Assert.assertNull(ProcessStore.getProcess(applicationName, scopedInstancePath)); Process process = (new ProcessBuilder("ls")).start(); ProcessStore.setProcess(applicationName, scopedInstancePath, process); Assert.assertEquals(ProcessStore.getProcess(applicationName, scopedInstancePath), process); ProcessStore.setProcess(null, null, process); Assert.assertEquals(ProcessStore.getProcess(null, null), process); ProcessStore.clearProcess(applicationName, scopedInstancePath); Assert.assertEquals(ProcessStore.getProcess(null, null), process); Assert.assertNull(ProcessStore.getProcess(applicationName, scopedInstancePath)); ProcessStore.clearProcess(null, null); Assert.assertNull(ProcessStore.getProcess(null, null)); }

Target:
public void testProcessFunctions() throws IOException { Assert.assertNull(ProcessStore.getProcess(applicationName, scopedInstancePath)); Process process = (new ProcessBuilder("date")).start(); ProcessStore.setProcess(applicationName, scopedInstancePath, process); Assert.assertEquals(ProcessStore.getProcess(applicationName, scopedInstancePath), process); Assert.assertSame(ProcessStore.getProcess(applicationName, scopedInstancePath), process); ProcessStore.setProcess(null, null, process); Assert.assertEquals(ProcessStore.getProcess(null, null), process); ProcessStore.clearProcess(applicationName, scopedInstancePath); Assert.assertEquals(ProcessStore.getProcess(null, null), process); Assert.assertNull(ProcessStore.getProcess(applicationName, scopedInstancePath)); ProcessStore.clearProcess(null, null); Assert.assertNull(ProcessStore.getProcess(null, null)); }
Source:
public void run(final T configuration, final Environment environment) throws Exception { Preconditions.checkArgument(configuration instanceof AlchemyServiceConfiguration); final AlchemyModule module = new AlchemyModule(configuration, environment); environment.lifecycle().manage(module); final Injector injector = Guice.createInjector(module); runInjected(injector, configuration, environment); environment.jersey().register(new SparseFieldSetFilter(environment.getObjectMapper())); environment.jersey().register(new RuntimeExceptionMapper()); environment.lifecycle().manage(new JmxMetricsManaged(environment)); registerIdentitySubTypes(configuration, environment); }

Target:
public void run(final T configuration, final Environment environment) throws Exception { Preconditions.checkState(configuration instanceof AlchemyServiceConfiguration); final AlchemyModule module = new AlchemyModule(configuration, environment); environment.lifecycle().manage(module); final Injector injector = Guice.createInjector(module); runInjected(injector, configuration, environment); environment.jersey().register(new SparseFieldSetFilter(environment.getObjectMapper())); environment.jersey().register(new RuntimeExceptionMapper()); environment.lifecycle().manage(new JmxMetricsManaged(environment)); registerIdentitySubTypes(configuration, environment); }
Source:
protected void checkFormMappingResolution(TenantServiceAccessor tenantAccessor, SFormMapping formMapping, List<Problem> problems) throws SBonitaReadException, SObjectNotFoundException { if (isMappingRelatedToCustomPage(formMapping)) { SPageMapping pageMapping = formMapping.getPageMapping(); if (pageMapping == null) { addProblem(formMapping, problems); return; } final Long pageId = pageMapping.getPageId(); if (pageId == null || tenantAccessor.getPageService().getPage(pageId) == null) { addProblem(formMapping, problems); } } if (isUndefined(formMapping)) { addProblem(formMapping, problems); } }

Target:
protected void checkFormMappingResolution(TenantServiceAccessor tenantAccessor, SFormMapping formMapping, List<Problem> problems) throws SBonitaReadException, SObjectNotFoundException { if (isMappingRelatedToCustomPage(formMapping)) { SPageMapping pageMapping = formMapping.getPageMapping(); if (pageMapping == null) { addProblem(formMapping, problems); return; } final Long pageId = pageMapping.getPageId(); if (pageId == null || tenantAccessor.getPageService().getPage(pageId) == null) { addProblem(formMapping, problems); } } else if (isUndefined(formMapping)) { addProblem(formMapping, problems); } }
Source:
private void addDefaultGraphicsDevice() { VmDevice device = VmDeviceCommonUtils.findVmDeviceByGeneralType( vmBase.getManagedDeviceMap(), VmDeviceGeneralType.GRAPHICS); if (device != null) { return; } List<Pair<GraphicsType, DisplayType>> graphicsAndDisplays = osRepository.getGraphicsAndDisplays(vmBase.getOsId(), new Version(getVersion())); GraphicsType graphicsType = vmBase.getDefaultDisplayType() == DisplayType.vga ? GraphicsType.VNC : GraphicsType.SPICE; GraphicsType supportedGraphicsType = null; for (Pair<GraphicsType, DisplayType> pair : graphicsAndDisplays) { if (pair.getSecond() == vmBase.getDefaultDisplayType()) { if (pair.getFirst() == graphicsType) { supportedGraphicsType = graphicsType; break; } if (supportedGraphicsType == null) { supportedGraphicsType = pair.getFirst(); } } } if (supportedGraphicsType != null) { device = new GraphicsDevice(supportedGraphicsType.getCorrespondingDeviceType()); device.setId(new VmDeviceId(Guid.newGuid(), vmBase.getId())); addManagedVmDevice(device); } }

Target:
private void addDefaultGraphicsDevice() { VmDevice device = VmDeviceCommonUtils.findVmDeviceByGeneralType( vmBase.getManagedDeviceMap(), VmDeviceGeneralType.GRAPHICS); if (device != null) { return; } List<Pair<GraphicsType, DisplayType>> graphicsAndDisplays = osRepository.getGraphicsAndDisplays(vmBase.getOsId(), new Version(getVersion())); GraphicsType graphicsType = vmBase.getDefaultDisplayType() == DisplayType.cirrus ? GraphicsType.VNC : GraphicsType.SPICE; GraphicsType supportedGraphicsType = null; for (Pair<GraphicsType, DisplayType> pair : graphicsAndDisplays) { if (pair.getSecond() == vmBase.getDefaultDisplayType()) { if (pair.getFirst() == graphicsType) { supportedGraphicsType = graphicsType; break; } if (supportedGraphicsType == null) { supportedGraphicsType = pair.getFirst(); } } } if (supportedGraphicsType != null) { device = new GraphicsDevice(supportedGraphicsType.getCorrespondingDeviceType()); device.setId(new VmDeviceId(Guid.newGuid(), vmBase.getId())); addManagedVmDevice(device); } else { log.warn("Cannot find any graphics type for display type supported by OS in compatibility version {}", vmBase.getDefaultDisplayType().name(), osRepository.getOsName(vmBase.getOsId()), getVersion()); } }
Source:
List<String> getRecommendationsForUser(String userId) throws TasteException { List<String> results = new ArrayList<>(); long id = usersMap.get(userId); List<RecommendedItem> recommendations = recommender.recommend(id, 3); for (RecommendedItem r : recommendations) { results.add(invertedProductsMap.get((int) r.getItemID())); } return results; }

Target:
List<String> getRecommendationsForUser(String userId) { List<String> results = new ArrayList<>(); long id = usersMap.get(userId); try { List<RecommendedItem> recommendations = recommender.recommend(id, 3); for (RecommendedItem recommendedItem : recommendations) { results.add(invertedProductsMap.get((int) recommendedItem.getItemID())); } } catch (TasteException e) { System.out.println("Error encountered: " + e.getMessage()); } return results; }
Source:
public void process(FContext ctx, FProtocol iprot, FProtocol oprot) throws TException { Store.buyAlbum_args args = new Store.buyAlbum_args(); try { args.read(iprot); } catch (TException e) { iprot.readMessageEnd(); synchronized (WRITE_LOCK) { writeApplicationException(ctx, oprot, TApplicationException.PROTOCOL_ERROR, "buyAlbum", e.getMessage()); } throw e; } iprot.readMessageEnd(); Store.buyAlbum_result result = new Store.buyAlbum_result(); try { result.success = this.handler.buyAlbum(ctx, args.ASIN, args.acct); result.setSuccessIsSet(true); } catch (PurchasingError error) { result.error = error; } catch (FRateLimitException e) { writeApplicationException(ctx, oprot, FRateLimitException.RATE_LIMIT_EXCEEDED, "buyAlbum", "rate limit exceeded"); } catch (TException e) { synchronized (WRITE_LOCK) { writeApplicationException(ctx, oprot, TApplicationException.INTERNAL_ERROR, "buyAlbum", "Internal error processing buyAlbum: " + e.getMessage()); } throw e; } synchronized (WRITE_LOCK) { try { oprot.writeResponseHeader(ctx); oprot.writeMessageBegin(new TMessage("buyAlbum", TMessageType.REPLY, 0)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } catch (TException e) { if (e instanceof FMessageSizeException) { writeApplicationException(ctx, oprot, FTransport.RESPONSE_TOO_LARGE, "buyAlbum", "response too large: " + e.getMessage()); } else { throw e; } } } }

Target:
public void process(FContext ctx, FProtocol iprot, FProtocol oprot) throws TException { Store.buyAlbum_args args = new Store.buyAlbum_args(); try { args.read(iprot); } catch (TException e) { iprot.readMessageEnd(); synchronized (WRITE_LOCK) { writeApplicationException(ctx, oprot, TApplicationException.PROTOCOL_ERROR, "buyAlbum", e.getMessage()); } throw e; } iprot.readMessageEnd(); Store.buyAlbum_result result = new Store.buyAlbum_result(); try { result.success = this.handler.buyAlbum(ctx, args.ASIN, args.acct); result.setSuccessIsSet(true); } catch (PurchasingError error) { result.error = error; } catch (FRateLimitException e) { writeApplicationException(ctx, oprot, FRateLimitException.RATE_LIMIT_EXCEEDED, "buyAlbum", "rate limit exceeded"); return; } catch (TException e) { synchronized (WRITE_LOCK) { writeApplicationException(ctx, oprot, TApplicationException.INTERNAL_ERROR, "buyAlbum", "Internal error processing buyAlbum: " + e.getMessage()); } throw e; } synchronized (WRITE_LOCK) { try { oprot.writeResponseHeader(ctx); oprot.writeMessageBegin(new TMessage("buyAlbum", TMessageType.REPLY, 0)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } catch (TException e) { if (e instanceof FMessageSizeException) { writeApplicationException(ctx, oprot, FTransport.RESPONSE_TOO_LARGE, "buyAlbum", "response too large: " + e.getMessage()); } else { throw e; } } } }
Source:
protected HttpEntity executeRequest(BasicHttpRequest request, DefaultBHttpClientConnection conn) { try { conn.sendRequestHeader(request); if (request instanceof HttpEntityEnclosingRequest) { conn.sendRequestEntity((HttpEntityEnclosingRequest) request); } conn.flush(); HttpResponse response = conn.receiveResponseHeader(); conn.receiveResponseEntity(response); if (response.getStatusLine().getStatusCode() >= 300) { throw new RuntimeException(String.format( "ImageioClient request failed. Status: %s, Reason: %s, Error: %s.", response.getStatusLine().getStatusCode(), response.getStatusLine().getReasonPhrase(), response.getEntity().getContent())); } HttpEntity entity = response.getEntity(); if (entity == null) { throw new RuntimeException("Empty response"); } return entity; } catch (HttpException | IOException e) { throw new RuntimeException(e.getMessage(), e); } }

Target:
protected HttpEntity executeRequest(BasicHttpRequest request, DefaultBHttpClientConnection conn) { try { conn.sendRequestHeader(request); if (request instanceof HttpEntityEnclosingRequest) { conn.sendRequestEntity((HttpEntityEnclosingRequest) request); } conn.flush(); HttpResponse response = conn.receiveResponseHeader(); conn.receiveResponseEntity(response); if (response.getStatusLine().getStatusCode() >= 300) { throw new RuntimeException(String.format( "ImageioClient request failed. Status: %s, Reason: %s, Error: %s.", response.getStatusLine().getStatusCode(), response.getStatusLine().getReasonPhrase(), readContent(response))); } HttpEntity entity = response.getEntity(); if (entity == null) { throw new RuntimeException("Empty response"); } return entity; } catch (HttpException | IOException e) { throw new RuntimeException(e.getMessage(), e); } }
Source:
public boolean documentExists(CoreSession session, String idOrPath) { DocumentRef documentRef; if (idOrPath.startsWith("/")) { documentRef = new PathRef(idOrPath); } else { documentRef = new IdRef(idOrPath); } try { session.getDocument(documentRef); } catch (DocumentNotFoundException exception) { return false; } return true; }

Target:
public boolean documentExists(CoreSession session, String idOrPath) { DocumentRef documentRef = idOrPath.startsWith("/") ? new PathRef(idOrPath) : new IdRef(idOrPath); return session.exists(documentRef); }
Source:
public List<Question> getByIds(List<Long> ids){ List<Question> questions = new ArrayList<>(); for (Long id : ids) { questions.add(getById(id)); } return questions; }

Target:
public List<Question> getByIds(List<Long> ids){ List<Question> questions = new ArrayList<>(); if(ids != null && ids.size() >0) { List<Question> result = session.createQuery("from Question where id in (:ids)").setParameterList("ids", ids).list(); for (final Long id : ids) { Question q = Iterables.find(result, new Predicate<Question>() { public boolean apply(Question input) { return input.getId().equals(id); } }); questions.add(q); } } return questions; }
Source:
public BreakpointListener(DebugEventManager debugEventManager) { this.debugEventManager = debugEventManager; this.breakpoints = new HashMap<>(); }

Target:
public BreakpointListener(DebugEventManager debugEventManager) { this.debugEventManager = debugEventManager; this.breakpoints = new HashMap<Integer, Breakpoint>(); }
Source:
private StringBuilder getGeneralLockStats() { StringBuilder logString = new StringBuilder(); logString.append("Logging current state. Time = ").append(currentTimeMillis()).append("\n"); logString.append("isStandaloneServer = ").append(isStandaloneServer).append("\n"); logString.append("maxAllowedLockTimeout = ").append(maxAllowedLockTimeout).append("\n"); logString.append("maxAllowedClockDrift = ").append(maxAllowedClockDrift).append("\n"); logString.append("maxAllowedBlockingDuration = ").append(maxAllowedBlockingDuration).append("\n"); logString.append("randomBitCount = ").append(randomBitCount).append("\n"); return logString; }

Target:
private StringBuilder getGeneralLockStats() { StringBuilder logString = new StringBuilder(); logString.append("Logging current state. Time = ").append(currentTimeMillis()).append("\n"); logString.append("isStandaloneServer = ").append(isStandaloneServer).append("\n"); logString.append("maxAllowedLockTimeout = ").append(maxAllowedLockTimeout).append("\n"); logString.append("maxAllowedClockDrift = ").append(maxAllowedClockDrift).append("\n"); logString.append("maxAllowedBlockingDuration = ").append(maxAllowedBlockingDuration).append("\n"); logString.append("randomBitCount = ").append(randomBitCount).append("\n"); logString.append("descriptorToLockMap.size = ").append(descriptorToLockMap.size()).append("\n"); logString.append("outstandingLockRequestMultimap.size = ").append(descriptorToLockMap.size()).append("\n"); logString.append("heldLocksTokenMap.size = ").append(heldLocksTokenMap.size()).append("\n"); logString.append("heldLocksGrantMap.size = ").append(heldLocksGrantMap.size()).append("\n"); logString.append("lockTokenReaperQueue.size = ").append(lockTokenReaperQueue.size()).append("\n"); logString.append("lockGrantReaperQueue.size = ").append(lockGrantReaperQueue.size()).append("\n"); logString.append("lockClientMultimap.size = ").append(lockClientMultimap.size()).append("\n"); logString.append("lockClientMultimap.size = ").append(lockClientMultimap.size()).append("\n"); return logString; }
Source:
protected ConnectionFactory createConnectionFactory( List<String> urls, Boolean startTls, String loadBalancingAlgorithm) throws LdapException { List<ConnectionFactory> connectionFactories = new ArrayList<>(); for (String singleUrl : urls) { connectionFactories.add( createLdapConnectionFactory(new PropertyResolver(singleUrl).toString(), startTls)); } Options options = Options.defaultOptions(); if (loadBalancingAlgorithm != null && loadBalancingAlgorithm.equalsIgnoreCase("failover")) { return Connections.newFailoverLoadBalancer(connectionFactories, options); } else { return Connections.newRoundRobinLoadBalancer(connectionFactories, options); } }

Target:
protected ConnectionFactory createConnectionFactory( List<String> urls, Boolean startTls, String loadBalancingAlgorithm) throws LdapException { List<ConnectionFactory> connectionFactories = new ArrayList<>(); for (String singleUrl : urls) { connectionFactories.add( createLdapConnectionFactory(new PropertyResolver(singleUrl).toString(), startTls)); } Options options = Options.defaultOptions(); if (FAILOVER.equalsIgnoreCase(loadBalancingAlgorithm)) { return Connections.newFailoverLoadBalancer(connectionFactories, options); } else { return Connections.newRoundRobinLoadBalancer(connectionFactories, options); } }
Source:
private IndexerFactory getIndexerFor(String environment) { if ("PREVIEW".toString().equals(environment)) return indexerFactoryForPreviewEnv; else if ("PUBLISH".toString().equals(environment)) return indexerFactoryForPublishEnv; else throw new RuntimeException("Specified environment is not recognized"); }

Target:
private IndexerFactory getIndexerFor(String environment) { if (TargetIndexingDatabase.PREVIEW.toString().equals(environment)) return indexerFactoryForPreviewEnv; else if (TargetIndexingDatabase.PUBLISH.toString().equals(environment)) return indexerFactoryForPublishEnv; else throw new RuntimeException("Specified environment is not recognized"); }
Source:
public void testGenerateAmazonS3GetBucketRequest() throws IOException, ParseException, TemplateModelException { final TestFileUtilsImpl fileUtils = new TestFileUtilsImpl(); final Map<String,Object> testMap = new HashMap<>(); final Request requestEntry = RequestConverter.toRequest(Ds3ModelFixtures.getBucketRequest(), new Ds3DocSpecImpl( ImmutableMap.of(), ImmutableMap.of())); testMap.put("requestEntry", requestEntry); final CCodeGenerator codeGenerator = new CCodeGenerator(); codeGenerator.processTemplate(testMap, "request-templates/RequestWithResponsePayload.ftl", fileUtils.getOutputStream()); final ByteArrayOutputStream bstream = (ByteArrayOutputStream) fileUtils.getOutputStream(); final String output = new String(bstream.toByteArray()); assertTrue(output.contains("ds3_error* ds3_get_bucket(const ds3_client* client, const ds3_request* request, ds3_list_bucket_result_response** response) {")); assertTrue(output.contains(" if (request->path->size < 2) {")); assertTrue(output.contains(" return ds3_create_error(DS3_ERROR_MISSING_ARGS, \"The bucket name parameter is required.\");")); assertTrue(output.contains(" }")); assertTrue(output.contains(" return _parse_top_level_ds3_list_bucket_result_response(client, request, response, xml_blob);")); assertTrue(output.contains("}")); }

Target:
public void testGenerateAmazonS3GetBucketRequest() throws IOException, ParseException, TemplateModelException { final TestFileUtilsImpl fileUtils = new TestFileUtilsImpl(); final Map<String,Object> testMap = new HashMap<>(); final Request requestEntry = RequestConverter.toRequest(Ds3ModelFixtures.getBucketRequest(), new Ds3DocSpecEmptyImpl()); testMap.put("requestEntry", requestEntry); final CCodeGenerator codeGenerator = new CCodeGenerator(); codeGenerator.processTemplate(testMap, "request-templates/RequestWithResponsePayload.ftl", fileUtils.getOutputStream()); final ByteArrayOutputStream bstream = (ByteArrayOutputStream) fileUtils.getOutputStream(); final String output = new String(bstream.toByteArray()); assertTrue(output.contains("ds3_error* ds3_get_bucket(const ds3_client* client, const ds3_request* request, ds3_list_bucket_result_response** response) {")); assertTrue(output.contains(" if (request->path->size < 2) {")); assertTrue(output.contains(" return ds3_create_error(DS3_ERROR_MISSING_ARGS, \"The bucket name parameter is required.\");")); assertTrue(output.contains(" }")); assertTrue(output.contains(" return _parse_top_level_ds3_list_bucket_result_response(client, request, response, xml_blob);")); assertTrue(output.contains("}")); }
Source:
public String contentUTF8() { if (content != null) { return new String(content, UTF_8); } else { return null; } }

Target:
public String contentUTF8() { if (content != null) { return new String(content, UTF_8); } else { return ""; } }
Source:
public TicketEntity findById(String ticketId) { try { return ticketRepository .findById(ticketId) .map(t -> { Ticket ticket = new Ticket(t); if (StringUtils.isNotEmpty(t.getApplication())) { ApplicationEntity application = applicationService.findById(t.getApplication()); ticket.setApplication(application.getName()); } if (StringUtils.isNotEmpty(t.getApi())) { ApiEntity api = apiService.findById(t.getApi()); ticket.setApi(api.getName()); } return ticket; }) .map(this::convert) .orElse(null); } catch (TechnicalException ex) { LOGGER.error("An error occurs while trying to search ticket {}", ticketId, ex); throw new TechnicalManagementException("An error occurs while trying to search ticket " + ticketId , ex); } }

Target:
public TicketEntity findById(String ticketId) { try { return ticketRepository .findById(ticketId) .map(this::getApiNameAndApplicationName) .map(this::convert) .orElseThrow(() -> new TicketNotFoundException(ticketId)); } catch (TechnicalException ex) { LOGGER.error("An error occurs while trying to search ticket {}", ticketId, ex); throw new TechnicalManagementException("An error occurs while trying to search ticket " + ticketId , ex); } }
Source:
public boolean isIdentifierLocallyUnique(String identifier, Dataset dataset) { boolean u = em.createNamedQuery("Dataset.findByIdentifierAuthorityProtocol") .setParameter("identifier", identifier) .setParameter("authority", dataset.getAuthority()) .setParameter("protocol", dataset.getProtocol()) .getResultList().isEmpty(); return u; }

Target:
public boolean isIdentifierLocallyUnique(String identifier, Dataset dataset) { return em.createNamedQuery("Dataset.findByIdentifierAuthorityProtocol") .setParameter("identifier", identifier) .setParameter("authority", dataset.getAuthority()) .setParameter("protocol", dataset.getProtocol()) .getResultList().isEmpty(); }
Source:
public void fromJson(JsonObject json) { this.config = json.getJsonObject("config"); this.worker = json.getBoolean("worker", DEFAULT_WORKER); this.isolationGroup = json.getString("isolationGroup", null); this.ha = json.getBoolean("ha", DEFAULT_HA); JsonArray arr = json.getJsonArray("extraClasspath", null); if (arr != null) { this.extraClasspath = arr.getList(); } this.instances = json.getInteger("instances", DEFAULT_INSTANCES); JsonArray arrIsolated = json.getJsonArray("isolatedClasses", null); if (arrIsolated != null) { this.isolatedClasses = arrIsolated.getList(); } }

Target:
public void fromJson(JsonObject json) { this.config = json.getJsonObject("config"); this.worker = json.getBoolean("worker", DEFAULT_WORKER); this.isolationGroup = json.getString("isolationGroup"); this.ha = json.getBoolean("ha", DEFAULT_HA); JsonArray arr = json.getJsonArray("extraClasspath"); if (arr != null) { this.extraClasspath = arr.getList(); } this.instances = json.getInteger("instances", DEFAULT_INSTANCES); JsonArray arrIsolated = json.getJsonArray("isolatedClasses"); if (arrIsolated != null) { this.isolatedClasses = arrIsolated.getList(); } }
Source:
public boolean isSatisfied() { if (args.length == 0) { return false; } String bundleName = bundle.getHeaders().get("Bundle-SymbolicName"); String key = bundleName + args[0]; Boolean storedResult = DECISION_MAP.get(key); if (storedResult != null) { return storedResult; } String[] bundles = REGEX.split(args[0]); for (String bundleStr : bundles) { if (bundleName.contains(bundleStr)) { DECISION_MAP.put(key, true); return true; } } DECISION_MAP.put(key, false); return false; }

Target:
public boolean isSatisfied() { if (args.length == 0) { return false; } String bundleName = bundle.getHeaders().get("Bundle-SymbolicName"); String key = bundleName + args[0]; Boolean storedResult = DECISION_MAP.get(key); if (storedResult != null) { return storedResult; } for (String bundleStr : bundles) { if (bundleName.contains(bundleStr)) { DECISION_MAP.put(key, true); return true; } } DECISION_MAP.put(key, false); return false; }
Source:
public HelixAccountServiceFactory(VerifiableProperties verifiableProperties, MetricRegistry metricRegistry) { storeConfig = new HelixPropertyStoreConfig(verifiableProperties); accountServiceConfig = new HelixAccountServiceConfig(verifiableProperties); accountServiceMetrics = new AccountServiceMetrics(metricRegistry); this.notifier = accountServiceConfig.zkClientConnectString.equals(HelixAccountServiceConfig.INVALID_ZK_CLIENT_CONNECT_STRING) ? null : new HelixNotifier(accountServiceConfig.zkClientConnectString, storeConfig); }

Target:
public HelixAccountServiceFactory(VerifiableProperties verifiableProperties, MetricRegistry metricRegistry) { this(new HelixPropertyStoreConfig(verifiableProperties), new HelixAccountServiceConfig(verifiableProperties), new AccountServiceMetrics(metricRegistry), new HelixNotifier(new HelixAccountServiceConfig(verifiableProperties).zkClientConnectString, new HelixPropertyStoreConfig(verifiableProperties))); }
Source:
synchronized String decrypt(String encryptedValue) { if (initFailureMessage != null) { alertSystem(initFailureMessage, initException); } if (isBlank(encryptedValue)) { LOGGER.debug( "Failed to decrypt value of %s, because it was null or blank.", encryptedValue); return encryptedValue; } try { return crypter.decrypt(encryptedValue); } catch (CrypterException e) { LOGGER.warn(String.format("Failed to decrypt from bundle cache. %s", e.getMessage())); return encryptedValue; } }

Target:
synchronized String decrypt(String encryptedValue) { if (initFailureMessage != null) { alertSystem(initFailureMessage, initException); } if (isBlank(encryptedValue)) { LOGGER.debug( "Failed to decrypt value of {}, because it was null or blank.", encryptedValue); return encryptedValue; } try { return crypter.decrypt(encryptedValue); } catch (CrypterException e) { LOGGER.warn("Failed to decrypt from bundle cache. {}", e.getMessage()); return encryptedValue; } }
Source:
protected IFigure createNodeShape() { final EObject eObj = resolveSemanticElement(); ViewNodeContainerFigureDesc shapeFigure = null; if (eObj instanceof DDiagramElementContainer) { final DDiagramElementContainer container = (DDiagramElementContainer) eObj; ContainerStyle ownedStyle = container.getOwnedStyle(); if (ownedStyle instanceof ShapeContainerStyle) { shapeFigure = new ViewNodeContainerParallelogram(); } else if (ownedStyle instanceof WorkspaceImage) { shapeFigure = new ViewNodeContainerRectangleFigureDesc(); } } else { deactivate(); } if (shapeFigure == null) { shapeFigure = new GradientRoundedRectangle(DiagramContainerEditPartOperation.getCornerDimension(this), DiagramContainerEditPartOperation.getBackgroundStyle(this)); } if (eObj instanceof DDiagramElement && new DDiagramElementQuery((DDiagramElement) eObj).isLabelHidden()) { shapeFigure.getLabelFigure().setVisible(false); } else { shapeFigure.getLabelFigure().setVisible(true); } return shapeFigure; }

Target:
protected IFigure createNodeShape() { DDiagramElement diagramElement = resolveDiagramElement(); ViewNodeContainerFigureDesc shapeFigure = null; if (diagramElement instanceof DDiagramElementContainer) { final DDiagramElementContainer container = (DDiagramElementContainer) diagramElement; ContainerStyle ownedStyle = container.getOwnedStyle(); if (ownedStyle instanceof ShapeContainerStyle) { shapeFigure = new ViewNodeContainerParallelogram(); } else if (ownedStyle instanceof WorkspaceImage) { shapeFigure = new ViewNodeContainerRectangleFigureDesc(); } } else { deactivate(); } if (shapeFigure == null) { shapeFigure = new GradientRoundedRectangle(DiagramContainerEditPartOperation.getCornerDimension(this), DiagramContainerEditPartOperation.getBackgroundStyle(this)); } if (diagramElement != null) { shapeFigure.getLabelFigure().setVisible(!(new DDiagramElementQuery(diagramElement).isLabelHidden())); } return shapeFigure; }
Source:
public void add(Path datasetLocation) throws AggregationException { try (NetcdfDatasetAdapter dataset = NetcdfDatasetAdapter.open(datasetLocation, getUnpackerOverrides())) { NetcdfDatasetIF subsettedDataset = dataset.subset(dateRange, verticalSubset, bbox); if (!Files.exists(outputPath)) { logger.info("Creating output file using as a template", outputPath, datasetLocation); templateDataset = new TemplateDataset(subsettedDataset, requestedVariables, attributeChanges, dateRange, verticalSubset, bbox); createFileFromTemplate(templateDataset); unpackerOverrides = dataset.getUnpackerOverrides(); } logger.info("Adding to output file", datasetLocation); appendRecordVariables(subsettedDataset); } catch (IOException e) { throw new AggregationException(e); } }

Target:
public void add(Path datasetLocation) throws AggregationException { try (NetcdfDatasetAdapter dataset = NetcdfDatasetAdapter.open(datasetLocation, getUnpackerOverrides())) { NetcdfDatasetIF subsettedDataset = dataset.subset(dateRange, verticalSubset, bbox); if (!fileProcessed) { logger.info("Creating output file using as a template", outputPath, datasetLocation); templateDataset = new TemplateDataset(subsettedDataset, requestedVariables, attributeChanges, dateRange, verticalSubset, bbox); createFileFromTemplate(templateDataset); fileProcessed = true; } logger.info("Adding to output file", datasetLocation); appendRecordVariables(subsettedDataset); } catch (IOException e) { throw new AggregationException(e); } }
Source:
public boolean hasSearchHandler(String resourceName, String resourceParentName) { if (resourceParentName != null) { resourceName = RestConstants.VERSION_1 + "/" + resourceParentName + "/" + resourceName; } else { resourceName = RestConstants.VERSION_1 + "/" + resourceName; } List<SearchHandler> searchHandlers = Context.getService(RestService.class).getAllSearchHandlers(); if (searchHandlers != null) { for (SearchHandler searchHandler : searchHandlers) { if (searchHandler.getSearchConfig().getSupportedResource().equals(resourceName)) { return true; } } } return false; }

Target:
public boolean hasSearchHandler(String resourceName, String resourceParentName) { if (resourceParentName != null) { resourceName = RestConstants.VERSION_1 + "/" + resourceParentName + "/" + resourceName; } else { resourceName = RestConstants.VERSION_1 + "/" + resourceName; } List<SearchHandler> searchHandlers = Context.getService(RestService.class).getAllSearchHandlers(); for (SearchHandler searchHandler : searchHandlers) { if (searchHandler.getSearchConfig().getSupportedResource().equals(resourceName)) { return true; } } return false; }
Source:
public void listItemClicked(int position, String formName) { List<FormResource> valueRef = formResourceList.get(position).getResourceList(); String valueRefString = null; for (FormResource resource : valueRef) { if (resource.getName().equals("json")) { valueRefString = resource.getValueReference(); } } EncounterType encType = encounterDAO.getEncounterTypeByFormName(formsStringArray[position]); if (encType != null) { String encounterType = encType.getUuid(); view.startFormDisplayActivity(formName, patientId, valueRefString, encounterType); } else { view.showError(Resources.getSystem().getString(R.string.no_such_form_name_error_message, formName)); } }

Target:
public void listItemClicked(int position, String formName) { List<FormResource> valueRef = formResourceList.get(position).getResourceList(); String valueRefString = null; for (FormResource resource : valueRef) { if (resource.getName().equals("json")) { valueRefString = resource.getValueReference(); } } EncounterType encType = encounterDAO.getEncounterTypeByFormName(formsStringArray[position]); if (encType != null) { String encounterType = encType.getUuid(); view.startFormDisplayActivity(formName, patientId, valueRefString, encounterType); } else { view.showError(formName); } }
Source:
public void writeToParcel(@NonNull Parcel out, int flags) { super.writeToParcel(out, flags); out.writeInt(color); out.writeInt(dateTextAppearance); out.writeInt(weekDayTextAppearance); out.writeInt(showOtherDates); out.writeByte((byte) (allowClickDaysOutsideCurrentMonth ? 1 : 0)); out.writeParcelable(minDate, 0); out.writeParcelable(maxDate, 0); out.writeTypedList(selectedDates); out.writeInt(firstDayOfWeek); out.writeInt(tileWidthPx); out.writeInt(tileHeightPx); out.writeInt(topbarVisible ? 1 : 0); out.writeInt(selectionMode); out.writeInt(dynamicHeightEnabled ? 1 : 0); out.writeInt(calendarMode == CalendarMode.WEEKS ? 1 : 0); out.writeParcelable(currentMonth, 0); out.writeByte((byte) (saveCurrentPosition ? 1 : 0)); }

Target:
public void writeToParcel(@NonNull Parcel out, int flags) { super.writeToParcel(out, flags); out.writeInt(color); out.writeInt(dateTextAppearance); out.writeInt(weekDayTextAppearance); out.writeInt(showOtherDates); out.writeByte((byte) (allowClickDaysOutsideCurrentMonth ? 1 : 0)); out.writeParcelable(minDate, 0); out.writeParcelable(maxDate, 0); out.writeTypedList(selectedDates); out.writeInt(firstDayOfWeek); out.writeInt(orientation); out.writeInt(tileWidthPx); out.writeInt(tileHeightPx); out.writeInt(topbarVisible ? 1 : 0); out.writeInt(selectionMode); out.writeInt(dynamicHeightEnabled ? 1 : 0); out.writeInt(calendarMode == CalendarMode.WEEKS ? 1 : 0); out.writeParcelable(currentMonth, 0); out.writeByte((byte) (saveCurrentPosition ? 1 : 0)); }
Source:
public void bucket(WebContext ctx, String bucketName) { try { Bucket bucket = storage.getBucket(bucketName); if (!bucket.exists()) { ctx.respondWith().error(HttpResponseStatus.NOT_FOUND, "Bucket does not exist"); return; } Page<StoredObject> page = new Page<StoredObject>().bindToRequest(ctx); page.withLimitedItemsSupplier(limit -> bucket.getObjects(page.getQuery(), limit)); page.withTotalItems(bucket.countObjects(page.getQuery())); ctx.respondWith().template("/templates/bucket.html.pasta", bucket, page); } catch (Exception e) { ctx.respondWith().error(HttpResponseStatus.BAD_REQUEST, Exceptions.handle(UserContext.LOG, e)); } }

Target:
public void bucket(WebContext ctx, String bucketName) { Bucket bucket = storage.getBucket(bucketName); if (!bucket.exists()) { ctx.respondWith().error(HttpResponseStatus.NOT_FOUND, "Bucket does not exist"); return; } Page<StoredObject> page = new Page<StoredObject>().bindToRequest(ctx); page.withLimitedItemsSupplier(limit -> bucket.getObjects(page.getQuery(), limit)); page.withTotalItems(bucket.countObjects(page.getQuery())); ctx.respondWith().template("/templates/bucket.html.pasta", bucket, page); }
Source:
public static MarshallingMessageDecorator<Result> resultBpmnDecorator() { return MarshallingMessageDecorator.of(r -> { BpmnNode o = (BpmnNode) r.value() .map(BpmnNode.class::cast) .get(); return Optional.ofNullable(o .value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()); }, r -> { BpmnNode o1 = (BpmnNode) r.value().get(); return o1.value() .getContent() .getDefinition() .getClass() .getSimpleName(); }); }

Target:
public static MarshallingMessageDecorator<Result> resultBpmnDecorator() { return MarshallingMessageDecorator.of(r -> { BpmnNode o = (BpmnNode) r.value(); return Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()); }, r -> { BpmnNode o1 = (BpmnNode) r.value(); return o1.value() .getContent() .getDefinition() .getClass() .getSimpleName(); }); }
Source:
private void addCache(Batch batch, Address address, LdapCache cache) { if (cache != null) { String cacheType = null; if (cache.getByAccessTime()) { cacheType = "by-access-time"; } if (cache.getBySearchTime()) { cacheType = "by-search-time"; } batch.add(address.and("cache", cacheType), Values.empty() .andOptional("cache-failures", cache.getCacheFailures()) .andOptional("eviction-time", cache.getEvictionTime()) .andOptional("max-cache-size", cache.getMaxCacheSize())); } }

Target:
private void addCache(Batch batch, Address address, LdapCache cache) { if (cache != null) { String cacheType = null; if (cache.getByAccessTime()) { cacheType = "by-access-time"; } else if (cache.getBySearchTime()) { cacheType = "by-search-time"; } batch.add(address.and("cache", cacheType), Values.empty() .andOptional("cache-failures", cache.getCacheFailures()) .andOptional("eviction-time", cache.getEvictionTime()) .andOptional("max-cache-size", cache.getMaxCacheSize())); } }
Source:
public void enhanceMetadata(Context context) { super.enhanceMetadata(context); context.put(RuleMetadata.CATEGORY, "Java"); }

Target:
public void enhanceMetadata(Context context) { super.enhanceMetadata(context); context.put(RuleMetadata.CATEGORY, "Java/Discover"); }
Source:
public void drop(LanguageConnectionContext lcc) throws StandardException { DataDictionary dd = getDataDictionary(); DependencyManager dm = getDataDictionary().getDependencyManager(); TransactionController tc = lcc.getTransactionExecute(); dm.invalidateFor(this, DependencyManager.DROP_TRIGGER, lcc); dd.dropTriggerDescriptor(this, tc); dm.clearDependencies(lcc, this); for (UUID actionId: this.actionSPSIdList) { SPSDescriptor spsd = dd.getSPSDescriptor(actionId); dm.invalidateFor(spsd, DependencyManager.DROP_TRIGGER, lcc); dm.clearDependencies(lcc, spsd); dd.dropSPSDescriptor(spsd, tc); lcc.popAllTriggerExecutionContexts(); } if (getWhenClauseId() != null) { SPSDescriptor spsd = dd.getSPSDescriptor(getWhenClauseId()); dm.invalidateFor(spsd, DependencyManager.DROP_TRIGGER, lcc); dm.clearDependencies(lcc, spsd); dd.dropSPSDescriptor(spsd, tc); } }

Target:
public void drop(LanguageConnectionContext lcc) throws StandardException { DataDictionary dd = getDataDictionary(); DependencyManager dm = getDataDictionary().getDependencyManager(); TransactionController tc = lcc.getTransactionExecute(); dm.invalidateFor(this, DependencyManager.DROP_TRIGGER, lcc); dd.dropTriggerDescriptor(this, tc); dm.clearDependencies(lcc, this); for (UUID actionId: this.actionSPSIdList) { SPSDescriptor spsd = dd.getSPSDescriptor(actionId); dm.invalidateFor(spsd, DependencyManager.DROP_TRIGGER, lcc); dm.clearDependencies(lcc, spsd); dd.dropSPSDescriptor(spsd, tc); } lcc.popAllTriggerExecutionContexts(); if (getWhenClauseId() != null) { SPSDescriptor spsd = dd.getSPSDescriptor(getWhenClauseId()); dm.invalidateFor(spsd, DependencyManager.DROP_TRIGGER, lcc); dm.clearDependencies(lcc, spsd); dd.dropSPSDescriptor(spsd, tc); } }