auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testBug544975ProjectOpenBackgroundRefresh() throws Exception { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IProject project = root.getProject("Bug544975"); try { create(project, false); IFile file = createFile(project, "someFile.txt", "some text"); long oldModificationStamp = file.getModificationStamp(); project.close(new NullProgressMonitor()); String expectedContents = "some changed text"; writeWithFileSystemAPI(file, expectedContents); project.open(IResource.BACKGROUND_REFRESH, new NullProgressMonitor()); Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_REFRESH, new NullProgressMonitor()); long newModificationStamp = file.getModificationStamp(); assertNotEquals("Expected resource to be refreshed after opening project with BACKGROUND_REFRESH flag", oldModificationStamp, newModificationStamp); } finally { project.delete(true, new NullProgressMonitor()); } }

Target:
public void testBug544975ProjectOpenBackgroundRefresh() throws Exception { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IProject project = root.getProject("Bug544975"); try { create(project, false); createFile(project, "someFile.txt", "some text"); int initialMembers = project.members().length; project.close(new NullProgressMonitor()); URI projectUri = project.getLocationURI(); Path projectPath = Paths.get(projectUri); assertTrue("Test project must exist on file system", Files.exists(projectPath)); Path filePath = projectPath.resolve("someOtherFile.txt"); Files.createFile(filePath); project.open(IResource.BACKGROUND_REFRESH, new NullProgressMonitor()); Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_REFRESH, new NullProgressMonitor()); IResource[] members = project.members(); assertEquals("Expected new project resource to be found after opening with BACKGROUND_REFRESH", initialMembers + 1, members.length); } finally { project.delete(true, new NullProgressMonitor()); } }
Source:
public static HistoryQuery unboundedHistoryQuerySinceSeq(long seqLowerBound) { return unboundedHistoryQuerySinceSeqForNamespaceAndUseCase( TimelockCorruptionTestConstants.DEFAULT_NAMESPACE_AND_USE_CASE, seqLowerBound); }

Target:
public static HistoryQuery unboundedHistoryQuerySinceSeq(long seqLowerBound) { return unboundedHistoryQuerySinceSeqForNamespaceAndUseCase(DEFAULT_NAMESPACE_AND_USE_CASE, seqLowerBound); }
Source:
public void testValidTableSchema() { DynamicConfigHelpers.setTableConfigPath("valid/"); String path = "src/test/resources/tables"; File file = new File(path); String absolutePath = file.getAbsolutePath(); try { ElideTableConfig config = DynamicConfigHelpers.getElideTablePojo( DynamicConfigHelpers.formatFilePath(absolutePath)); assertNotNull(config); } catch (JsonProcessingException e) { log.error(e.getMessage()); } }

Target:
public void testValidTableSchema() throws IOException { String path = "src/test/resources/tables"; File file = new File(path); String absolutePath = file.getAbsolutePath(); Map<String, Object> vars = DynamicConfigHelpers.getVariablesPojo( DynamicConfigHelpers.formatFilePath(absolutePath)); ElideTableConfig config = DynamicConfigHelpers.getElideTablePojo( DynamicConfigHelpers.formatFilePath(absolutePath), vars, "valid/"); assertNotNull(config); }
Source:
public InputStream createInputStream(URI uri, Map<?, ?> options) throws IOException { InputStream stream = null; synchronized(prefetchedStreams) { stream = prefetchedStreams.get(uri); if (stream != null) { prefetchedStreams.remove(uri); return stream; } } final URI normalizedUri = normalize(uri); if (normalizedUri.isPlatformPlugin() || normalizedUri.toString().matches("(\\.\\./)+?plugins/.*")) { stream = super.createInputStream(normalizedUri, options); } else { final IResource targetFile; if (normalizedUri.isPlatform()) { IPath platformString = new Path(normalizedUri.trimFragment().toPlatformString(true)); IResource temp = ResourcesPlugin.getWorkspace().getRoot().getFile(platformString); if (!temp.exists() && normalizedUri.isPlatformResource() && platformString.segmentCount() > 1) { targetFile = ResourcesPlugin.getWorkspace().getRoot().getFile( platformString.removeFirstSegments(1)); } else { targetFile = temp; } } else { targetFile = ResourcesPlugin.getWorkspace().getRoot().getFile( new Path(normalizedUri.trimFragment().toString())); } if (targetFile != null) { stream = openRevisionStream(targetFile); } else { stream = super.createInputStream(uri, options); } } return stream; }

Target:
public InputStream createInputStream(URI uri, Map<?, ?> options) throws IOException { InputStream stream = prefetchedStreams.remove(uri); if (stream != null) { return stream; } final URI normalizedUri = normalize(uri); if (normalizedUri.isPlatformPlugin() || normalizedUri.toString().matches("(\\.\\./)+?plugins/.*")) { stream = super.createInputStream(normalizedUri, options); } else { final IResource targetFile; if (normalizedUri.isPlatform()) { IPath platformString = new Path(normalizedUri.trimFragment().toPlatformString(true)); IResource temp = ResourcesPlugin.getWorkspace().getRoot().getFile(platformString); if (!temp.exists() && normalizedUri.isPlatformResource() && platformString.segmentCount() > 1) { targetFile = ResourcesPlugin.getWorkspace().getRoot().getFile( platformString.removeFirstSegments(1)); } else { targetFile = temp; } } else { targetFile = ResourcesPlugin.getWorkspace().getRoot().getFile( new Path(normalizedUri.trimFragment().toString())); } if (targetFile != null) { stream = openRevisionStream(targetFile); } else { stream = super.createInputStream(uri, options); } } return stream; }
Source:
public static int getHeartbeat(URL url) { String dubbo = url.getParameter(Constants.DUBBO_VERSION_KEY); return url.getParameter(Constants.HEARTBEAT_KEY, dubbo != null && dubbo.startsWith("1.0.") ? Constants.DEFAULT_HEARTBEAT : 0); }

Target:
public static int getHeartbeat(URL url) { return url.getParameter(Constants.HEARTBEAT_KEY, Constants.DEFAULT_HEARTBEAT); }
Source:
protected boolean cannotAdapt(final IBinding inputBinding) throws CoreException { if (inputBinding == null || inputBinding instanceof IProblemBinding) { return true; } if (inputBinding instanceof PDOMBinding) { PDOMBinding pdomBinding = (PDOMBinding) inputBinding; if (pdomBinding.getPDOM() != getPDOM() && pdomBinding.isFileLocal()) { return true; } } return false; }

Target:
protected boolean cannotAdapt(final IBinding inputBinding) throws CoreException { if (inputBinding == null || inputBinding instanceof IProblemBinding || inputBinding instanceof IParameter) { return true; } if (inputBinding instanceof PDOMBinding) { PDOMBinding pdomBinding = (PDOMBinding) inputBinding; if (pdomBinding.getPDOM() != getPDOM() && pdomBinding.isFileLocal()) { return true; } } return false; }
Source:
public String build(String amountToRefund, String currencyCode) { return "{\n" + new RequestHeaderBuilder(customerId, requestId, retryIndicator).build() + ",\n"+ "\"Refund\": {\n" + " \"Amount\": {\n" + " \"Value\": \""+amountToRefund+"\",\n" + " \"CurrencyCode\": \""+currencyCode+"\"\n" + " }\n" + "},\n" + "\"CaptureReference\": {\n" + " \"CaptureId\": \""+captureId+"\"\n" + " }"+ "}"; }

Target:
public String build(String amountToRefund, String currencyCode) { var out = new StringWriter(); var requestHeaderBuilder = new RequestHeaderBuilder(customerId, requestId, retryIndicator); try (var writer = new JsonWriter(out)) { requestHeaderBuilder.appendTo(writer.beginObject()) .name("Refund").beginObject() .name("Amount").beginObject() .name("Value").value(amountToRefund) .name("CurrencyCode").value(currencyCode) .endObject() .endObject() .name("CaptureReference").beginObject() .name("CaptureId").value(captureId) .endObject() .endObject().flush(); } return out.toString(); }
Source:
public void set(@Nullable String text) { if (text!=null && text.length() > 255) setAtOnce(text); else { WebElement e = resolve(); e.clear(); e.sendKeys(StringUtils.isEmpty(text) ? StringUtils.EMPTY : text); } }

Target:
public void set(@Nullable String text) { if (text!=null && text.length() > 255) setAtOnce(text); else { WebElement e = resolve(); e.clear(); e.sendKeys(StringUtils.defaultString(text)); } }
Source:
public void testResolveImagesCustomSorterPreferringNonNull() { final Ordering<Image> sorterPreferringNonNullArch = new Ordering<Image>() { @Override public int compare(Image left, Image right) { return ComparisonChain.start() .compare(left.getOperatingSystem().getArch(), right.getOperatingSystem().getArch(), Ordering.<String> natural().nullsFirst()) .compare(left, right, TemplateBuilderImpl.DEFAULT_IMAGE_ORDERING) .result(); } }; Assert.assertTrue(TemplateBuilderImpl.DEFAULT_IMAGE_ORDERING.compare(image64bit, imageArchNull) < 0); Assert.assertTrue(sorterPreferringNonNullArch.compare(image64bit, imageArchNull) > 0); doTestResolveImages(Suppliers.<Set<? extends Image>> ofInstance(ImmutableSet.<Image> of( image, imageArchNull, image64bit)), image64bit, new Function<TemplateBuilderImpl,TemplateBuilderImpl>() { @Override public TemplateBuilderImpl apply(TemplateBuilderImpl input) { return input.imageChooser(input.imageChooserFromOrdering(sorterPreferringNonNullArch)); } }); }

Target:
public void testResolveImagesCustomSorterPreferringNonNull() { final Ordering<Image> sorterPreferringNonNullArch = new Ordering<Image>() { @Override public int compare(Image left, Image right) { return ComparisonChain.start() .compare(left.getOperatingSystem().getArch(), right.getOperatingSystem().getArch(), Ordering.<String> natural().nullsFirst()) .compare(left, right, TemplateBuilderImpl.DEFAULT_IMAGE_ORDERING) .result(); } }; assertTrue(TemplateBuilderImpl.DEFAULT_IMAGE_ORDERING.compare(image64bit, imageArchNull) < 0, "wrong default image ordering"); assertTrue(sorterPreferringNonNullArch.compare(image64bit, imageArchNull) > 0, "wrong custom image ordering"); doTestResolveImages(Suppliers.<Set<? extends Image>> ofInstance(ImmutableSet.<Image> of( image, imageArchNull, image64bit)), image64bit, new Function<TemplateBuilderImpl,TemplateBuilderImpl>() { @Override public TemplateBuilderImpl apply(TemplateBuilderImpl input) { return input.imageChooser(input.imageChooserFromOrdering(sorterPreferringNonNullArch)); } }); }
Source:
private <T> Mono<T> doGetMono(Class<T> type, String... pathSegments) { return client.headers(authorizedHeader()) .doOnResponse(onResponseCallback) .get() .uri(uri(pathSegments)) .responseSingle(decode(type)); }

Target:
private <T> Mono<T> doGetMono(Class<T> type, String... pathSegments) { return Mono.from(client .headersWhen(authorizedHeader()) .get() .uri(uri(pathSegments)) .response(decode(type))); }
Source:
public @Nonnull UserDetails getUserDetailsForImpersonation() throws UsernameNotFoundException { ImpersonatingUserDetailsService userDetailsService = new ImpersonatingUserDetailsService( Jenkins.getInstance().getSecurityRealm().getSecurityComponents().userDetails ); try { UserDetails userDetails = userDetailsService.loadUserByUsername(id); LOGGER.log(Level.FINE, "Impersonation of the user {0} was a success", new Object[]{ id }); return userDetails; } catch (UserMayOrMayNotExistException e) { LOGGER.log(Level.FINE, "The user {0} may or may not exist in the SecurityRealm, so we provide minimum access", new Object[]{ id }); } catch (UsernameNotFoundException e) { if(ALLOW_NON_EXISTENT_USER_TO_LOGIN){ LOGGER.log(Level.FINE, "The user {0} was not found in the SecurityRealm but we are required to let it passes, due to ALLOW_NON_EXISTENT_USER_TO_LOGIN", new Object[]{ id }); }else{ LOGGER.log(Level.FINE, "The user {0} was not found in the SecurityRealm", new Object[]{ id }); throw e; } } catch (DataAccessException e) { LOGGER.log(Level.FINE, "The user {0} retrieval just thrown a DataAccess exception with msg = {1}, so we provide minimum access", new Object[]{ id, e.getMessage() }); } return new LegitimateButUnknownUserDetails(id); }

Target:
public @Nonnull UserDetails getUserDetailsForImpersonation() throws UsernameNotFoundException { ImpersonatingUserDetailsService userDetailsService = new ImpersonatingUserDetailsService( Jenkins.getInstance().getSecurityRealm().getSecurityComponents().userDetails ); try { UserDetails userDetails = userDetailsService.loadUserByUsername(id); LOGGER.log(Level.FINE, "Impersonation of the user {0} was a success", new Object[]{ id }); return userDetails; } catch (UserMayOrMayNotExistException e) { LOGGER.log(Level.FINE, "The user {0} may or may not exist in the SecurityRealm, so we provide minimum access", new Object[]{ id }); } catch (UsernameNotFoundException e) { if(ALLOW_NON_EXISTENT_USER_TO_LOGIN){ LOGGER.log(Level.FINE, "The user {0} was not found in the SecurityRealm but we are required to let it pass, due to ALLOW_NON_EXISTENT_USER_TO_LOGIN", new Object[]{ id }); }else{ LOGGER.log(Level.FINE, "The user {0} was not found in the SecurityRealm", new Object[]{ id }); throw e; } } catch (DataAccessException e) { LOGGER.log(Level.FINE, "The user {0} retrieval just threw a DataAccess exception with msg = {1}, so we provide minimum access", new Object[]{ id, e.getMessage() }); } return new LegitimateButUnknownUserDetails(id); }
Source:
public static void addAppender(String name, Properties properties) { if (getAppendersNames().contains(name)) { logger.warn("A logger appender with the name '{}' exists. Cannot add a new logger appender with the same name", name); } else { try { Method method = PropertyConfigurator.class.getDeclaredMethod("parseAppender", Properties.class, String.class); method.setAccessible(true); Appender appender = (Appender)method.invoke(new PropertyConfigurator(), properties, name); if (appender == null) { logger.warn("Cannot add a new logger appender. Name: {}, Properties: {}", name, properties); } else { Logger.getRootLogger().addAppender(appender); } } catch (Exception ex) { logger.warn("Cannot add a new logger appender. Name: {}, Properties: {}", name, properties, ex); } } }

Target:
public static boolean addAppender(String name, Properties properties) { if (getAppendersNames().contains(name)) { logger.warn("A logger appender with the name '{}' exists. Cannot add a new logger appender with the same name", name); } else { try { Method method = PropertyConfigurator.class.getDeclaredMethod("parseAppender", Properties.class, String.class); method.setAccessible(true); Appender appender = (Appender)method.invoke(new PropertyConfigurator(), properties, name); if (appender == null) { logger.warn("Cannot add a new logger appender. Name: {}, Properties: {}", name, properties); } else { LogManager.getRootLogger().addAppender(appender); return true; } } catch (Exception ex) { logger.warn("Cannot add a new logger appender. Name: {}, Properties: {}", name, properties, ex); } } return false; }
Source:
private String buildClipboardMessage(Row row) { StringBuilder builder = new StringBuilder(); builder.append(row.getLevel()) .append(", ") .append(row.getMessage()); return builder.toString(); }

Target:
private String buildClipboardMessage(Row row) { return row.getLevel() + ", " + row.getMessage(); }
Source:
public void interleavedOperationsTest() throws Exception { List<OperationInfo> opInfos = new ArrayList<>(); for (int i = 0; i < 10; i++) { Queue<OperationType> opChain = new LinkedList<>(); opChain.add(OperationType.PUT_NB); opChain.add(OperationType.AWAIT_CREATION); opChain.add(OperationType.GET_INFO_NB); opChain.add(OperationType.GET_NB); opChain.add(OperationType.DELETE_NB); opChain.add(OperationType.AWAIT_DELETION); opChain.add(OperationType.GET_INFO_DELETED_NB); opChain.add(OperationType.GET_DELETED_NB); opChain.add(OperationType.DELETE_NB); opInfos.add(testFramework.startOperationChain(32 * 1024, i, opChain)); } testFramework.checkOperationChains(opInfos); }

Target:
public void interleavedOperationsTest() throws Exception { List<OperationChain> opChains = new ArrayList<>(); Random random = new Random(); for (int i = 0; i < 10; i++) { Queue<OperationType> operations = new LinkedList<>(); switch (i % 3) { case 0: operations.add(OperationType.PUT_NB); operations.add(OperationType.AWAIT_CREATION); operations.add(OperationType.GET_NB); operations.add(OperationType.GET_INFO_NB); operations.add(OperationType.DELETE_NB); operations.add(OperationType.AWAIT_DELETION); operations.add(OperationType.GET_DELETED_NB); operations.add(OperationType.GET_INFO_DELETED_NB); break; case 1: operations.add(OperationType.PUT_NB); operations.add(OperationType.AWAIT_CREATION); operations.add(OperationType.DELETE_NB); operations.add(OperationType.AWAIT_DELETION); operations.add(OperationType.GET_DELETED_NB); operations.add(OperationType.GET_INFO_DELETED_NB); operations.add(OperationType.GET_DELETED_NB); operations.add(OperationType.GET_INFO_DELETED_NB); break; case 2: operations.add(OperationType.PUT_NB); operations.add(OperationType.AWAIT_CREATION); operations.add(OperationType.GET_NB); operations.add(OperationType.GET_NB); operations.add(OperationType.GET_NB); operations.add(OperationType.GET_INFO_NB); break; } int blobSize = random.nextInt(100 * 1024); opChains.add(testFramework.startOperationChain(blobSize, i, operations)); } testFramework.checkOperationChains(opChains); }
Source:
public void updateNode(final @Nonnull Node node) throws IOException { if (node == nodes.get(node.getNodeName())) { if (node instanceof EphemeralNode) { Util.deleteRecursive(new File(getNodesDir(), node.getNodeName())); } else { XmlFile xmlFile = new XmlFile(Jenkins.XSTREAM, new File(new File(getNodesDir(), node.getNodeName()), "config.xml")); xmlFile.write(node); } } }

Target:
public boolean updateNode(final @Nonnull Node node) throws IOException { if (node == nodes.get(node.getNodeName())) { Queue.withLock(new Runnable() { @Override public void run() { jenkins.trimLabels(); } }); persistNode(node); return true; } return false; }
Source:
public void resetTasksWithUnknownWorkerUUIDs(DbSession dbSession, Set<String> knownWorkerUUIDs) { mapper(dbSession).resetTasksWithUnknownWorkerUUIDs(knownWorkerUUIDs, system2.now()); }

Target:
public void resetTasksWithUnknownWorkerUUIDs(DbSession dbSession, Set<String> knownWorkerUUIDs) { if (knownWorkerUUIDs.isEmpty()) { mapper(dbSession).resetAllInProgressTasks(system2.now()); } else { executeLargeUpdates(knownWorkerUUIDs, (Consumer<List<String>>) uuids -> mapper(dbSession).resetTasksWithUnknownWorkerUUIDs(uuids, system2.now()) ); } }
Source:
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (shouldBlockRequest((HttpServletRequest) servletRequest)) { LOGGER.info("Got a non-GET request: " + servletRequest); ((HttpServletResponse) servletResponse).setStatus(HttpServletResponse.SC_FORBIDDEN); servletResponse.getWriter().write(""); } else { filterChain.doFilter(servletRequest, servletResponse); } }

Target:
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (shouldBlockRequest((HttpServletRequest) servletRequest)) { LOGGER.warn("Got a non-GET request: " + servletRequest); ((HttpServletResponse) servletResponse).setStatus(HttpServletResponse.SC_FORBIDDEN); servletResponse.getWriter().write(""); } else { filterChain.doFilter(servletRequest, servletResponse); } }
Source:
public void sendMetric(Metric metric) { try { MeasureLong measure = measures.get(metric.getKey()); if (measure == null) { measure = MeasureLong.create("Events", "Number of Events", "1"); measures.put(metric.getKey(), measure); final List<TagKey> columns = new ArrayList<TagKey>(metric.getTags().size()); metric.getTags().keySet().forEach(tagName -> { columns.add(TagKey.create(tagName)); }); final View view = View.create( Name.create(metric.getKey()), metric.getKey(), measure, Sum.create(), columns); Stats.getViewManager().registerView(view); } final TagContextBuilder builder = tagger.emptyBuilder(); metric.getTags().forEach((k, v) -> { builder.put(TagKey.create(k), TagValue.create(v)); }); final TagContext context = builder.build(); statsRecorder.newMeasureMap().put(measure, (long) metric.getValue()).record(context); } catch (Exception ex) { log.error("Couldn't send metric %s", ex); throw ex; } }

Target:
public void sendMetric(Metric metric) { try { String metricName = getOutputMetricName(metric); MeasureLong measure = measures.get(metricName); if (measure == null) { if (measures.size() > maxViews) { throw new RuntimeException("maxViews exceeded. " + "Please increase in configuration or decrease number of metrics."); } measure = MeasureLong.create("Events", "Number of Events", "1"); measures.put(metricName, measure); final List<TagKey> columns = new ArrayList<TagKey>(metric.getTags().size()); metric.getTags().keySet().forEach(tagName -> { columns.add(TagKey.create(tagName)); }); final View view = View.create( Name.create(metricName), metricName, measure, Sum.create(), columns); Stats.getViewManager().registerView(view); } final TagContextBuilder builder = tagger.emptyBuilder(); metric.getTags().forEach((k, v) -> { builder.putPropagating(TagKey.create(k), TagValue.create(v)); }); final TagContext context = builder.build(); statsRecorder.newMeasureMap().put(measure, (long) metric.getValue()).record(context); } catch (Exception ex) { log.error("Couldn't send metric %s", ex); throw ex; } }
Source:
public Hardware apply(final VirtualGuest from) { HardwareBuilder builder = new HardwareBuilder().ids(from.getId() + "") .name(from.getHostname()) .hypervisor("XenServer") .processors(ImmutableList.of(new Processor(from.getStartCpus(), 2))) .ram(from.getMaxMemory()); if (from.getVirtualGuestBlockDevices() != null) { builder.volumes( FluentIterable.from(from.getVirtualGuestBlockDevices()).filter(new Predicate<VirtualGuestBlockDevice>() { @Override public boolean apply(VirtualGuestBlockDevice input) { return input.getMountType().equals("Disk"); } }) .transform(new Function<VirtualGuestBlockDevice, Volume>() { @Override public Volume apply(VirtualGuestBlockDevice item) { float volumeSize = -1; if (item.getVirtualDiskImage() != null) { volumeSize = item.getVirtualDiskImage().getCapacity(); } return new VolumeImpl( item.getId() + "", from.isLocalDiskFlag() ? Volume.Type.LOCAL : Volume.Type.SAN, volumeSize, null, item.getBootableFlag() == 1, false); } }).toSet()); } return builder.build(); }

Target:
public Hardware apply(final VirtualGuest from) { HardwareBuilder builder = new HardwareBuilder().ids(from.getId() + "") .name(from.getHostname()) .hypervisor("XenServer") .processors(ImmutableList.of(new Processor(from.getStartCpus(), 2))) .ram(from.getMaxMemory()); if (from.getVirtualGuestBlockDevices() != null) { builder.volumes( FluentIterable.from(from.getVirtualGuestBlockDevices()).filter(new Predicate<VirtualGuestBlockDevice>() { @Override public boolean apply(VirtualGuestBlockDevice input) { return input.getMountType().equals("Disk"); } }) .transform(new Function<VirtualGuestBlockDevice, Volume>() { @Override public Volume apply(VirtualGuestBlockDevice item) { float volumeSize = item.getVirtualDiskImage().getCapacity(); return new VolumeImpl( item.getId() + "", from.isLocalDiskFlag() ? Volume.Type.LOCAL : Volume.Type.SAN, volumeSize, null, item.getBootableFlag() == 1, false); } }).toSet()); } return builder.build(); }
Source:
public void checkCredentialsChanged() { Credentials newCreds = workerState.stormClusterState.credentials(topologyId, null); if (!ObjectUtils.equals(newCreds, this.workerState.credentialsAtom.get())) { ClientAuthUtils.updateSubject(subject, autoCreds, (null == newCreds) ? null : newCreds.get_creds()); for (IRunningExecutor executor : executorsAtom.get()) { executor.credentialsChanged(newCreds); } this.workerState.credentialsAtom.set(newCreds); } }

Target:
public void checkCredentialsChanged() { Credentials newCreds = workerState.stormClusterState.credentials(topologyId, null); if (!ObjectUtils.equals(newCreds, this.workerState.getCredentials())) { ClientAuthUtils.updateSubject(subject, autoCreds, (null == newCreds) ? null : newCreds.get_creds()); this.workerState.setCredentials(newCreds); for (IRunningExecutor executor : executorsAtom.get()) { executor.credentialsChanged(newCreds); } } }
Source:
public void setImage (Image image) { checkWidget(); if ((style & SWT.SEPARATOR) != 0) return; super.setImage (image); enabledImage = image; if (!enabled && disabledImage != image) { enabledImage = image; return; } _setImage(image); }

Target:
public void setImage (Image image) { checkWidget(); if ((style & SWT.SEPARATOR) != 0) return; super.setImage (image); if (!enabled && disabledImage != image) { return; } _setImage(image); }
Source:
private static RestRequestMetricsGroup getMetricsGroupForGet(FrontendMetrics frontendMetrics, SubResource subResource) { RestRequestMetricsGroup group = null; if (subResource == null) { group = frontendMetrics.getBlobMetricsGroup; } else { switch (subResource) { case BlobInfo: group = frontendMetrics.getBlobInfoMetricsGroup; break; case UserMetadata: group = frontendMetrics.getUserMetadataMetricsGroup; break; case Replicas: group = frontendMetrics.getReplicasMetricsGroup; break; case Segment: group = frontendMetrics.getSegmentMetricsGroup; break; } } return group; }

Target:
private static RestRequestMetricsGroup getMetricsGroupForGet(FrontendMetrics frontendMetrics, SubResource subResource) { RestRequestMetricsGroup group = null; if (subResource == null || subResource.equals(SubResource.Segment)) { group = frontendMetrics.getBlobMetricsGroup; } else { switch (subResource) { case BlobInfo: group = frontendMetrics.getBlobInfoMetricsGroup; break; case UserMetadata: group = frontendMetrics.getUserMetadataMetricsGroup; break; case Replicas: group = frontendMetrics.getReplicasMetricsGroup; break; } } return group; }
Source:
public static void fixUq(final SAMRecord record, final ReferenceSequenceFileWalker refSeqWalker, final boolean isBisulfiteSequence) { if (record.getBaseQualities() != SAMRecord.NULL_QUALS) { final byte[] referenceBases = refSeqWalker.get(refSeqWalker.getSequenceDictionary().getSequenceIndex(record.getReferenceName())).getBases(); record.setAttribute(SAMTag.UQ.name(), SequenceUtil.sumQualitiesOfMismatches(record, referenceBases, 0, isBisulfiteSequence)); } }

Target:
public static void fixUq(final SAMRecord record, final ReferenceSequenceFileWalker refSeqWalker, final boolean isBisulfiteSequence) { if (record.getBaseQualities() != SAMRecord.NULL_QUALS) { final byte[] referenceBases = refSeqWalker.get(record.getReferenceIndex()).getBases(); record.setAttribute(SAMTag.UQ.name(), SequenceUtil.sumQualitiesOfMismatches(record, referenceBases, 0, isBisulfiteSequence)); } }
Source:
public static CliConfig fromEnvVar(Map<String, Object> config) throws URISyntaxException { final String master = environment.get("HELIOS_MASTER"); if (master == null) { return fromMap(config); } final URI uri = new URI(master); final Builder<String, Object> builder = ImmutableMap.<String, Object>builder(); if (config.containsKey(SRV_NAME_KEY)) { builder.put(SRV_NAME_KEY, config.get(SRV_NAME_KEY)); } final String scheme = uri.getScheme(); if (scheme == null) { throw new RuntimeException("Your environment variable HELIOS_MASTER=" + master + " is not a valid URI with a scheme."); } switch (scheme) { case DOMAIN_SCHEME: case DEPRECATED_SITE_SCHEME: builder.put(DOMAINS_KEY, ImmutableList.of(uri.getHost())).build(); break; case HTTP_SCHEME: builder.put(MASTER_ENDPOINTS_KEY, ImmutableList.of(master)); break; default: throw new RuntimeException("Your environment variable HELIOS_MASTER=" + master + " does not have a valid scheme."); } return fromMap(builder.build()); }

Target:
public static CliConfig fromEnvVar(Map<String, Object> config) throws URISyntaxException { final String master = environment.get("HELIOS_MASTER"); if (master == null) { return fromMap(config); } final URI uri = new URI(master); final Builder<String, Object> builder = ImmutableMap.<String, Object>builder(); if (config.containsKey(SRV_NAME_KEY)) { builder.put(SRV_NAME_KEY, config.get(SRV_NAME_KEY)); } final String scheme = uri.getScheme(); if (isNullOrEmpty(scheme)) { throw new RuntimeException("Your environment variable HELIOS_MASTER=" + master + " is not a valid URI with a scheme."); } switch (scheme) { case DOMAIN_SCHEME: case DEPRECATED_SITE_SCHEME: builder.put(DOMAINS_KEY, ImmutableList.of(uri.getHost())).build(); break; case HTTP_SCHEME: builder.put(MASTER_ENDPOINTS_KEY, ImmutableList.of(master)); break; default: throw new RuntimeException("Your environment variable HELIOS_MASTER=" + master + " does not have a valid scheme."); } return fromMap(builder.build()); }
Source:
void processMsgEcho( MsgEcho message ) throws IOException { final String content = message.getContent(); MsgEcho response = new MsgEcho( content.replaceFirst( "^PING:", "PONG:" ) ); this.logger.fine( "Responding to DM Echo message " + content + "with response " + response.getContent()); this.messagingClient.sendMessageToTheDm( response ); }

Target:
void processMsgEcho( MsgEcho message ) throws IOException { final String content = message.getContent(); MsgEcho response = new MsgEcho( content.replaceFirst( "^PING:", "PONG:" ), message.getExpirationTime(), message.getUuid() ); this.logger.fine( "Responding to DM Echo message " + content + " with response " + response.getContent()); this.messagingClient.sendMessageToTheDm( response ); }
Source:
public void apply(Player player, boolean resetActive) { GPPlayerData playerData = GriefPreventionPlugin.instance.dataStore.getOrCreatePlayerData(player.getWorld(), player.getUniqueId()); ; boolean hideBorders = GriefPreventionPlugin.instance.worldEditProvider != null && GriefPreventionPlugin.instance.worldEditProvider.hasCUISupport(player) && GriefPreventionPlugin.getActiveConfig(player.getWorld().getProperties()).getConfig().claim.hideBorders; if (!hideBorders) { if (player.isOnline() && this.elements.size() > 0 && this.elements.get(0).getOriginal().getLocation().get().getExtent().equals(player.getWorld())) { Sponge.getGame().getScheduler().createTaskBuilder().delayTicks(1L) .execute(new VisualizationApplicationTask(player, playerData, this, resetActive)).submit(GriefPreventionPlugin.instance); } } }

Target:
public void apply(Player player, boolean resetActive) { GPPlayerData playerData = GriefPreventionPlugin.instance.dataStore.getOrCreatePlayerData(player.getWorld(), player.getUniqueId()); boolean hideBorders = GriefPreventionPlugin.instance.worldEditProvider != null && GriefPreventionPlugin.instance.worldEditProvider.hasCUISupport(player) && GriefPreventionPlugin.getActiveConfig(player.getWorld().getProperties()).getConfig().claim.hideBorders; if (!hideBorders) { if (player.isOnline() && this.elements.size() > 0 && this.elements.get(0).getOriginal().getLocation().get().getExtent().equals(player.getWorld())) { Sponge.getGame().getScheduler().createTaskBuilder().delayTicks(1L) .execute(new VisualizationApplicationTask(player, playerData, this, resetActive)).submit(GriefPreventionPlugin.instance); } } }
Source:
public JobSpecification toJobSpecificationDTO( final com.netflix.genie.proto.JobSpecification protoSpec ) { return new JobSpecification( protoSpec.getCommandArgsList(), toExecutionResourceDTO(protoSpec.getJob()), toExecutionResourceDTO(protoSpec.getCluster()), toExecutionResourceDTO(protoSpec.getCommand()), protoSpec .getApplicationsList() .stream() .map(JobServiceProtoConverter::toExecutionResourceDTO) .collect(Collectors.toList()), protoSpec.getEnvironmentVariablesMap(), protoSpec.getIsInteractive(), new File(protoSpec.getJobDirectoryLocation()), protoSpec.getArchiveLocation() ); }

Target:
public JobSpecification toJobSpecificationDTO( final com.netflix.genie.proto.JobSpecification protoSpec ) { return new JobSpecification( protoSpec.getCommandArgsList(), toExecutionResourceDTO(protoSpec.getJob()), toExecutionResourceDTO(protoSpec.getCluster()), toExecutionResourceDTO(protoSpec.getCommand()), protoSpec .getApplicationsList() .stream() .map(JobServiceProtoConverter::toExecutionResourceDTO) .collect(Collectors.toList()), protoSpec.getEnvironmentVariablesMap(), protoSpec.getIsInteractive(), new File(protoSpec.getJobDirectoryLocation()), StringUtils.isBlank(protoSpec.getArchiveLocation()) ? null : protoSpec.getArchiveLocation() ); }
Source:
private void executeIdentifier(IdentifierTree tree) { Symbol symbol = tree.symbol(); SymbolicValue value = programState.getValue(symbol); if (value == null) { value = constraintManager.createSymbolicValue(tree); programState = programState.stackValue(value); learnIdentifierNullConstraints(tree, value); programState = programState.put(symbol, value); } else { programState = programState.stackValue(value); programState = programState.put(symbol, value); } }

Target:
private void executeIdentifier(IdentifierTree tree) { Symbol symbol = tree.symbol(); SymbolicValue value = programState.getValue(symbol); if (value == null) { value = constraintManager.createSymbolicValue(tree); programState = programState.stackValue(value); learnIdentifierNullConstraints(tree, value); } else { programState = programState.stackValue(value); } programState = programState.put(symbol, value); }
Source:
private HashMap<AbbreviatedObjectId, Object> populateMap( List<DiffEntry> diffEntries, ProgressMonitor pm) { HashMap<AbbreviatedObjectId, Object> map = new HashMap<>(); for (DiffEntry de : diffEntries) { Object old = map.put(id(de), de); if (old instanceof DiffEntry) { ArrayList<DiffEntry> list = new ArrayList<>(2); list.add((DiffEntry) old); list.add(de); map.put(id(de), list); } else if (old != null) { ((List<DiffEntry>) old).add(de); map.put(id(de), old); } pm.update(1); } return map; }

Target:
private HashMap<AbbreviatedObjectId, Object> populateMap( List<DiffEntry> diffEntries, ProgressMonitor pm) throws CanceledException { HashMap<AbbreviatedObjectId, Object> map = new HashMap<>(); for (DiffEntry de : diffEntries) { Object old = map.put(id(de), de); if (old instanceof DiffEntry) { ArrayList<DiffEntry> list = new ArrayList<>(2); list.add((DiffEntry) old); list.add(de); map.put(id(de), list); } else if (old != null) { ((List<DiffEntry>) old).add(de); map.put(id(de), old); } advanceOrCancel(pm); } return map; }
Source:
private ILaunchConfiguration getRunningLaunchConfiguration() { Set<IProject> projects = new HashSet<IProject>( Arrays.asList(ProjectUtil.getProjects(repository))); LaunchConfigJob j = new LaunchConfigJob(projects); j.schedule(); try { j.join(); } catch (@SuppressWarnings("unused") InterruptedException e) { return null; } return j.getRunningLaunchConfiguration(); }

Target:
private ILaunchConfiguration getRunningLaunchConfiguration() { final ILaunchConfiguration[] lc = new ILaunchConfiguration[1]; try { ModalContext.run(new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { Set<IProject> projects = new HashSet<IProject>(Arrays .asList(ProjectUtil.getProjects(repository))); ILaunchManager launchManager = DebugPlugin.getDefault() .getLaunchManager(); ILaunch[] launches = launchManager.getLaunches(); for (ILaunch launch : launches) { if (launch.isTerminated()) continue; ISourceLocator locator = launch.getSourceLocator(); if (locator instanceof ISourceLookupDirector) { ISourceLookupDirector director = (ISourceLookupDirector) locator; ISourceContainer[] containers = director .getSourceContainers(); if (isAnyProjectInSourceContainers(containers, projects)) { lc[0] = launch.getLaunchConfiguration(); return; } } } } }, true, new NullProgressMonitor(), getShell().getDisplay()); } catch (@SuppressWarnings("unused") InvocationTargetException e) { } catch (@SuppressWarnings("unused") InterruptedException e) { } return lc[0]; }
Source:
protected abstract void completeRequest(T context) throws Exception; protected abstract DataBuffer getDataBuffer(T context, long offset, int len) throws Exception; private void replyError(Error error) { mSerializingExecutor.addTask(() -> { try { mResponse.onError(error.getCause().toGrpcStatusException()); } catch (StatusRuntimeException e) { if (e.getStatus().getCode() != Status.Code.CANCELLED) { throw e; } } }); mFinished.set(true); mSerializingExecutor.shutdown(5, TimeUnit.SECONDS); }

Target:
protected abstract void completeRequest(T context) throws Exception; protected abstract DataBuffer getDataBuffer(T context, long offset, int len) throws Exception; private void replyError(Error error) { mSerializingExecutor.execute(() -> { try { if (!mContext.isDoneUnsafe()) { mResponse.onError(error.getCause().toGrpcStatusException()); mContext.setDoneUnsafe(true); } else { LOG.debug("Tried to replyError when stream was already completed. context: {}", mContext); } } catch (StatusRuntimeException e) { if (e.getStatus().getCode() != Status.Code.CANCELLED) { throw e; } } }); }
Source:
protected void update(float delta) { int lengthInterpretation; try { lengthInterpretation = length == null ? 0 : length.interpretInteger(sprite); } catch (InterpretationException interpretationException) { lengthInterpretation = 0; Log.d(getClass().getSimpleName(), "Formula interpretation for this specific Brick failed.", interpretationException); } this.sprite.runningStitch.activateStitching(sprite, new SimpleRunningStitch(sprite, lengthInterpretation)); }

Target:
protected void update(float delta) { int lengthInterpretation = 0; try { if (length != null) { lengthInterpretation = length.interpretInteger(sprite); } } catch (InterpretationException interpretationException) { lengthInterpretation = 0; Log.d(getClass().getSimpleName(), "Formula interpretation for this specific Brick failed.", interpretationException); } this.sprite.runningStitch.activateStitching(sprite, new SimpleRunningStitch(sprite, lengthInterpretation)); }
Source:
protected void checkImageValidity() { try { final DiskImage diskImage = getImage(); Guid storagePoolId = diskImage.getStoragePoolId() != null ? diskImage.getStoragePoolId().getValue() : Guid.Empty; Guid storageDomainId = getStorageDomainId() != null && !getStorageDomainId().getValue().equals(Guid.Empty) ? getStorageDomainId() .getValue() : diskImage.getStorageIds() != null && diskImage.getStorageIds().size() > 0 ? diskImage.getStorageIds() .get(0) : Guid.Empty; Guid imageGroupId = diskImage.getId() != null ? diskImage.getId().getValue() : Guid.Empty; final DiskImage image = (DiskImage) runVdsCommand( VDSCommandType.GetImageInfo, new GetImageInfoVDSCommandParameters(storagePoolId, storageDomainId, imageGroupId, getImage().getImageId())).getReturnValue(); if (image.getImageStatus() != ImageStatus.OK) { TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getCompensationContext().snapshotEntityStatus(diskImage, diskImage.getImageStatus()); diskImage.setImageStatus(image.getImageStatus()); getImageDao().update(diskImage.getImage()); getCompensationContext().stateChanged(); return null; } }); throw new VdcBLLException(VdcBllErrors.IRS_IMAGE_STATUS_ILLEGAL); } diskImage.setLastModified(image.getLastModifiedDate()); } catch (RuntimeException ex) { if (ex instanceof VdcBLLException) { throw ex; } throw new VdcBLLException(VdcBllErrors.RESOURCE_MANAGER_VM_SNAPSHOT_MISSMATCH, ex); } }

Target:
protected void checkImageValidity() { try { final DiskImage diskImage = getImage(); Guid storagePoolId = diskImage.getStoragePoolId() != null ? diskImage.getStoragePoolId().getValue() : Guid.Empty; Guid storageDomainId = getStorageDomainId() != null && !getStorageDomainId().getValue().equals(Guid.Empty) ? getStorageDomainId() .getValue() : diskImage.getStorageIds() != null && diskImage.getStorageIds().size() > 0 ? diskImage.getStorageIds() .get(0) : Guid.Empty; Guid imageGroupId = diskImage.getId() != null ? diskImage.getId().getValue() : Guid.Empty; final DiskImage image = (DiskImage) runVdsCommand( VDSCommandType.GetImageInfo, new GetImageInfoVDSCommandParameters(storagePoolId, storageDomainId, imageGroupId, getImage().getImageId())).getReturnValue(); if (image.getImageStatus() != ImageStatus.OK) { TransactionSupport.executeInScope(TransactionScopeOption.Required, new TransactionMethod<Void>() { @Override public Void runInTransaction() { getCompensationContext().snapshotEntityStatus(diskImage, diskImage.getImageStatus()); diskImage.setImageStatus(image.getImageStatus()); getImageDao().update(diskImage.getImage()); getCompensationContext().stateChanged(); return null; } }); throw new VdcBLLException(VdcBllErrors.IRS_IMAGE_STATUS_ILLEGAL); } diskImage.setLastModified(image.getLastModifiedDate()); } catch (RuntimeException ex) { if (ex instanceof VdcBLLException) { throw ex; } throw new VdcBLLException(VdcBllErrors.RESOURCE_MANAGER_VM_SNAPSHOT_MISSMATCH, ex); } }
Source:
protected boolean validateRoutingNumberAndAccountNumber(String routingNumber, String accountNumber) { boolean isValid = true; if (StringUtils.isNotEmpty(routingNumber)) { ACHBank achBank = achBankService.getByPrimaryId(routingNumber); if (ObjectUtils.isNull(achBank)) { GlobalVariables.getMessageMap().putError("payeeAchAccount", KFSKeyConstants.ERROR_CUSTOM, "ACH Bank does not exist for routing number"); isValid = false; } } if (StringUtils.isEmpty(routingNumber) && StringUtils.isEmpty(accountNumber)) { GlobalVariables.getMessageMap().putError("payeeAchAccount", KFSKeyConstants.ERROR_CUSTOM, "Routing number or account number required"); isValid = false; } return isValid; }

Target:
protected boolean validateRoutingNumberAndAccountNumber(String routingNumber, String accountNumber) { boolean valid = true; if (StringUtils.isNotBlank(routingNumber)) { ACHBank achBank = achBankService.getByPrimaryId(routingNumber); if (ObjectUtils.isNull(achBank)) { GlobalVariables.getMessageMap().putError("payeeAchAccount", KFSKeyConstants.ERROR_CUSTOM, "ACH Bank does not exist for routing number"); valid = false; } } else if (StringUtils.isBlank(accountNumber)) { GlobalVariables.getMessageMap().putError("payeeAchAccount", KFSKeyConstants.ERROR_CUSTOM, "Routing number or account number required"); valid = false; } return valid; }
Source:
public String getEmail() { return this.email; }

Target:
public String getEmail() { return email; }
Source:
public Iterable<Channel> forIds(final Iterable<Long> ids) { return channels.get() .stream() .filter(input -> Iterables.contains(ids, input.getId())) .collect(Collectors.toList()); }

Target:
public Iterable<Channel> forIds(final Iterable<Long> ids) { return channels.get() .stream() .filter(input -> Iterables.contains(ids, input.getId())) .collect(MoreCollectors.toImmutableList()); }
Source:
public URL getEmailConfig() { if (Version.current.isTest()) return getClass().getClassLoader().getResource("resources/emailConf-test.xml"); else return getClass().getClassLoader().getResource("/resources/emailConf.xml"); }

Target:
public URL getEmailConfig() { final String test = Version.current.isTest() ? "-test" : ""; return getClass().getClassLoader().getResource("/resources/emailConf" + test + ".xml"); }
Source:
protected void executeQueryCommand() { List<VDS> vdsList = getDbFacade().getVdsDao() .getAllForNetwork(getParameters().getId()); List<VdsNetworkInterface> vdsNetworkInterfaceList = getDbFacade().getInterfaceDao() .getVdsInterfacesByNetworkId(getParameters().getId()); final Map<Guid, VDS> vdsById = Entities.businessEntitiesById(vdsList); HostNetworkQosDao qosDao = getDbFacade().getHostNetworkQosDao(); Map<String, Network> networks = Entities.entitiesByName( getDbFacade().getNetworkDao().getAll()); List<PairQueryable<VdsNetworkInterface, VDS>> vdsInterfaceVdsPairs = new ArrayList<PairQueryable<VdsNetworkInterface, VDS>>(); for (final VdsNetworkInterface vdsNetworkInterface : vdsNetworkInterfaceList) { vdsInterfaceVdsPairs.add(new PairQueryable<VdsNetworkInterface, VDS>(vdsNetworkInterface, vdsById.get(vdsNetworkInterface.getVdsId()))); if (!Boolean.TRUE.equals(vdsNetworkInterface.getBonded()) || LinqUtils.filter(vdsNetworkInterfaceList, new Predicate<VdsNetworkInterface>() { @Override public boolean eval(VdsNetworkInterface bond) { return StringUtils.equals(bond.getBondName(), vdsNetworkInterface.getName()); } }).size() > 0) { Network network = networks.get(vdsNetworkInterface.getNetworkName()); vdsNetworkInterface.setNetworkImplementationDetails(NetworkUtils.calculateNetworkImplementationDetails(network, network == null ? null : qosDao.get(network.getQosId()), vdsNetworkInterface)); } } getQueryReturnValue().setReturnValue(vdsInterfaceVdsPairs); }

Target:
protected void executeQueryCommand() { List<VDS> vdsList = getDbFacade().getVdsDao() .getAllForNetwork(getParameters().getId()); List<VdsNetworkInterface> vdsNetworkInterfaceList = getDbFacade().getInterfaceDao() .getVdsInterfacesByNetworkId(getParameters().getId()); final Map<Guid, VDS> vdsById = Entities.businessEntitiesById(vdsList); List<PairQueryable<VdsNetworkInterface, VDS>> vdsInterfaceVdsPairs = new ArrayList<PairQueryable<VdsNetworkInterface, VDS>>(); Network network = getDbFacade().getNetworkDao().get(getParameters().getId()); HostNetworkQos qos = getDbFacade().getHostNetworkQosDao().get(network.getQosId()); for (final VdsNetworkInterface vdsNetworkInterface : vdsNetworkInterfaceList) { vdsInterfaceVdsPairs.add(new PairQueryable<VdsNetworkInterface, VDS>(vdsNetworkInterface, vdsById.get(vdsNetworkInterface.getVdsId()))); vdsNetworkInterface.setNetworkImplementationDetails(NetworkUtils.calculateNetworkImplementationDetails(network, qos, vdsNetworkInterface)); } getQueryReturnValue().setReturnValue(vdsInterfaceVdsPairs); }
Source:
public FFmpegOutputBuilder addMetaTag(String key, String value) { this.video_enabled = true; if (this.meta_tags == null) { this.meta_tags = new ArrayList<>(); } this.meta_tags.add(key + "=" + value); return this; }

Target:
public FFmpegOutputBuilder addMetaTag(String key, String value) { this.video_enabled = true; if (this.video_meta_tags == null) { this.video_meta_tags = new ArrayList<>(); } this.video_meta_tags.add(checkNotNull(key) + "=" + checkNotNull(value).replace("\"", "")); return this; }
Source:
private void deleteStagedCatalogIfNeeded() { if (((m_commandLog != null) && m_commandLog.isEnabled()) || (m_terminusNonce != null)){ assert((m_terminusNonce == null) || !m_terminusNonce.trim().isEmpty()); File stagedCatalog = new VoltFile(RealVoltDB.getStagedCatalogPath(m_nodeSettings.getVoltDBRoot().getAbsolutePath())); if (stagedCatalog.exists()){ boolean success = stagedCatalog.delete(); if (success){ hostLog.info("Deleted staged schema and classes because durability is present."); } else { hostLog.warn("Could not delete staged schema and classes. They will be ignored during command log or terminus snapshot recovery."); } } } }

Target:
private void deleteStagedCatalogIfNeeded() { if (((m_commandLog != null) && m_commandLog.isEnabled()) || (m_terminusNonce != null)) { File stagedCatalog = new VoltFile(RealVoltDB.getStagedCatalogPath(getVoltDBRootPath())); if (stagedCatalog.exists()) { if (stagedCatalog.delete()) { hostLog.info("Saved copy of the initialized schema deleted because command logs and/or snapshots are in use."); } else { hostLog.warn("Failed to delete the saved copy of the initialized schema."); } } } }