auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testBlockAndGetWithTimeoutsAndListenableFuture() throws InterruptedException { Task<String> t = sleep(Duration.millis(100), "x"); Assert.assertFalse(t.blockUntilEnded(Duration.millis(1))); Assert.assertFalse(t.blockUntilEnded(Duration.ZERO)); boolean didNotThrow = false; try { t.getUnchecked(Duration.millis(1)); didNotThrow = true; } catch (Exception e) { } Assert.assertFalse(didNotThrow); try { t.getUnchecked(Duration.ZERO); didNotThrow = true; } catch (Exception e) { } Assert.assertFalse(didNotThrow); addFutureListener(t, "before"); ec.submit(t); Assert.assertFalse(t.blockUntilEnded(Duration.millis(1))); Assert.assertFalse(t.blockUntilEnded(Duration.ZERO)); try { t.getUnchecked(Duration.millis(1)); didNotThrow = true; } catch (Exception e) { } Assert.assertFalse(didNotThrow); try { t.getUnchecked(Duration.ZERO); didNotThrow = true; } catch (Exception e) { } Assert.assertFalse(didNotThrow); addFutureListener(t, "during"); synchronized (data) { Assert.assertTrue(t.blockUntilEnded(Duration.TEN_SECONDS)); Assert.assertEquals(t.getUnchecked(Duration.millis(1)), "x"); Assert.assertEquals(t.getUnchecked(Duration.ZERO), "x"); Assert.assertNull(data.get("before")); Assert.assertNull(data.get("during")); assertSoonGetsData("before"); assertSoonGetsData("during"); } synchronized (data) { addFutureListener(t, "after"); Assert.assertNull(data.get("after")); assertSoonGetsData("after"); } }

Target:
public void testBlockAndGetWithTimeoutsAndListenableFuture() throws InterruptedException { Task<String> t = waitForSemaphore(Duration.FIVE_SECONDS, true, "x"); Assert.assertFalse(t.blockUntilEnded(Duration.millis(1))); Assert.assertFalse(t.blockUntilEnded(Duration.ZERO)); boolean didNotThrow = false; try { t.getUnchecked(Duration.millis(1)); didNotThrow = true; } catch (Exception e) { } Assert.assertFalse(didNotThrow); try { t.getUnchecked(Duration.ZERO); didNotThrow = true; } catch (Exception e) { } Assert.assertFalse(didNotThrow); addFutureListener(t, "before"); ec.submit(t); Assert.assertFalse(t.blockUntilEnded(Duration.millis(1))); Assert.assertFalse(t.blockUntilEnded(Duration.ZERO)); try { t.getUnchecked(Duration.millis(1)); didNotThrow = true; } catch (Exception e) { } Assert.assertFalse(didNotThrow); try { t.getUnchecked(Duration.ZERO); didNotThrow = true; } catch (Exception e) { } Assert.assertFalse(didNotThrow); addFutureListener(t, "during"); synchronized (data) { waitInTask.release(); Assert.assertTrue(t.blockUntilEnded(Duration.TEN_SECONDS)); Assert.assertEquals(t.getUnchecked(Duration.millis(1)), "x"); Assert.assertEquals(t.getUnchecked(Duration.ZERO), "x"); Assert.assertNull(data.get("before")); Assert.assertNull(data.get("during")); assertSoonGetsData("before"); assertSoonGetsData("during"); } synchronized (data) { addFutureListener(t, "after"); Assert.assertNull(data.get("after")); assertSoonGetsData("after"); } }
Source:
public List<ResourceEntry> reserveScalarResource(ResourceType resourceType, ScalarResourceEntry requiredValue) throws ResourceNotAvailabeException { if (totalAvailableResource <= requiredValue.getValue()) { throw new ResourceNotAvailabeException(String.format("resourceType: is not available. Requested Available {}", resourceType, requiredValue, totalAvailableResource)); } return removeAndGet(requiredValue); }

Target:
public List<ResourceEntry> reserveScalarResource(ResourceType resourceType, ScalarResourceEntry requiredValue) throws ResourceNotAvailableException { if (totalAvailableResource < requiredValue.getValue()) { throw new ResourceNotAvailableException(String.format("resourceType: is not available. Requested Available {}", resourceType, requiredValue, totalAvailableResource)); } return removeAndGet(requiredValue); }
Source:
@Nullable ImageDecoder getImageDecoderForSource(BufferedSource source) { for (ImageDecoder decoder : decoders) { if (decoder.canHandleSource(source)) { return decoder; } } return null; }

Target:
@Nullable ImageDecoder getImageDecoderForSource(BufferedSource source) { for (int i = 0, n = decoders.size(); i < n; i++) { ImageDecoder decoder = decoders.get(i); if (decoder.canHandleSource(source.peek())) { return decoder; } } return null; }
Source:
public synchronized void stop() throws Throwable { stopped = true; if ( currentJob != null ) { currentJob.stop(); } if ( jobHandle != null ) { jobHandle.cancel( false ); try { jobHandle.waitTermination(); } catch ( CancellationException ignored ) { } } }

Target:
public synchronized void stop() throws Throwable { stopped = true; if ( currentJob != null ) { currentJob.stop(); } }
Source:
public synchronized DataCenter getDataCenterById(String id) { DataCenter dataCenter = null; if (dataCenterMap.containsKey(id)) { return dataCenterMap.get(id); } try { dataCenter = loadObject(DataCenter.class, id) != null ? (DataCenter) loadObject(DataCenter.class, id) : reInitializeDataCenter(id); } catch (NullPointerException e) { log.error("failed to fetch datacenter by id, rewrite caches for DC {}", id); } finally { log.info("about to store DC: id object {}", id, dataCenter); dataCenterMap.put(id, dataCenter); } return dataCenter; }

Target:
public synchronized DataCenter getDataCenterById(String id) { DataCenter dataCenter = null; if (dataCenterMap.containsKey(id)) { return dataCenterMap.get(id); } dataCenter = (DataCenter) loadObject(DataCenter.class, id); if (dataCenter == null){ dataCenter = reInitializeDataCenter(id); } return dataCenter; }
Source:
public static void initializeTests() throws Exception { Properties serverSSLProps; File trustStoreFile = File.createTempFile("truststore", ".jks"); Properties clientSSLProps = new Properties(); TestSSLUtils.addSSLProperties(clientSSLProps, "DC1,DC2,DC3", SSLFactory.Mode.CLIENT, trustStoreFile, "http2-client"); TestSSLUtils.addHttp2Properties(clientSSLProps, SSLFactory.Mode.CLIENT, false); clientSSLConfig = new SSLConfig(new VerifiableProperties(clientSSLProps)); eventLoopGroup = new NioEventLoopGroup(); eventLoopGroup = Epoll.isAvailable() ? new EpollEventLoopGroup() : new NioEventLoopGroup(); serverSSLProps = new Properties(); TestSSLUtils.addSSLProperties(serverSSLProps, "DC1,DC2,DC3", SSLFactory.Mode.SERVER, trustStoreFile, "http2-server"); TestSSLUtils.addHttp2Properties(serverSSLProps, SSLFactory.Mode.SERVER, false); http2Cluster = new MockCluster(serverSSLProps, false, SystemTime.getInstance(), 2, 1, 2); notificationSystem = new MockNotificationSystem(http2Cluster.getClusterMap()); http2Cluster.initializeServers(notificationSystem); http2Cluster.startServers(); }

Target:
public static void initializeTests() throws Exception { Properties serverSSLProps; File trustStoreFile = File.createTempFile("truststore", ".jks"); Properties clientSSLProps = new Properties(); TestSSLUtils.addSSLProperties(clientSSLProps, "DC1,DC2,DC3", SSLFactory.Mode.CLIENT, trustStoreFile, "http2-client"); TestSSLUtils.addHttp2Properties(clientSSLProps, SSLFactory.Mode.CLIENT, false); clientSSLConfig = new SSLConfig(new VerifiableProperties(clientSSLProps)); eventLoopGroup = Epoll.isAvailable() ? new EpollEventLoopGroup() : new NioEventLoopGroup(); serverSSLProps = new Properties(); TestSSLUtils.addSSLProperties(serverSSLProps, "DC1,DC2,DC3", SSLFactory.Mode.SERVER, trustStoreFile, "http2-server"); TestSSLUtils.addHttp2Properties(serverSSLProps, SSLFactory.Mode.SERVER, false); http2Cluster = new MockCluster(serverSSLProps, false, SystemTime.getInstance(), 2, 1, 2); notificationSystem = new MockNotificationSystem(http2Cluster.getClusterMap()); http2Cluster.initializeServers(notificationSystem); http2Cluster.startServers(); }
Source:
public String getCsvForSubQuestion(int subQuestion) { StringBuilder csv = new StringBuilder(100); String alphabeticalIndex = StringHelper.integerToLowerCaseAlphabeticalIndex(subQuestion + 1); String subQuestionString = SanitizationHelper.sanitizeForCsv(alphabeticalIndex + ") " + getRubricSubQuestions().get(subQuestion)); DecimalFormat df = new DecimalFormat("0.00"); DecimalFormat dfWeight = new DecimalFormat("#.##"); csv.append(recipientTeam).append(',') .append(recipientName).append(',') .append(recipientEmail).append(',') .append(subQuestionString); for (int i = 0; i < getNumOfRubricChoices(); i++) { csv.append(',').append(Integer.toString(numOfResponsesPerSubQuestionPerChoice[subQuestion][i])) .append(" [" + dfWeight.format(rubricWeightsForEachCell.get(subQuestion).get(i)) + "]"); } csv.append(',').append(df.format(totalPerSubQuestion[subQuestion])).append(',') .append(respondentsPerSubQuestion[subQuestion] == 0 ? "0.00" : df.format(totalPerSubQuestion[subQuestion] / respondentsPerSubQuestion[subQuestion])) .append(System.lineSeparator()); return csv.toString(); }

Target:
public String getCsvForSubQuestion(int subQuestion) { StringBuilder csv = new StringBuilder(100); String alphabeticalIndex = StringHelper.integerToLowerCaseAlphabeticalIndex(subQuestion + 1); String subQuestionString = SanitizationHelper.sanitizeForCsv(alphabeticalIndex + ") " + getRubricSubQuestions().get(subQuestion)); DecimalFormat df = new DecimalFormat("0.00"); DecimalFormat dfWeight = new DecimalFormat("#.##"); csv.append(recipientTeam).append(',') .append(recipientName).append(',') .append(recipientEmail).append(',') .append(subQuestionString); for (int i = 0; i < getNumOfRubricChoices(); i++) { csv.append(',').append(Integer.toString(numOfResponsesPerSubQuestionPerChoice[subQuestion][i])) .append(" [" + dfWeight.format(weights.get(subQuestion).get(i)) + "]"); } csv.append(',').append(df.format(totalPerSubQuestion[subQuestion])).append(',') .append(respondentsPerSubQuestion[subQuestion] == 0 ? "0.00" : df.format(totalPerSubQuestion[subQuestion] / respondentsPerSubQuestion[subQuestion])) .append(System.lineSeparator()); return csv.toString(); }
Source:
public void calculateDerivedFields() { biSiteHeterogeneityRate = nDifferentAllelesBiDups / (double) (nDifferentAllelesBiDups + nAlternateAllelesBiDups + nReferenceAllelesBiDups); biSiteHomogeneityRate = 1 - biSiteHeterogeneityRate; this.biologicalDuplicateRateFromBiDups = 2 * biSiteHeterogeneityRate; triSiteHeterogeneityRate = nDifferentAllelesTriDups / (double) (nDifferentAllelesTriDups + nAlternateAllelesTriDups + nReferenceAllelesTriDups); triSiteHomogeneityRate = 1 - triSiteHeterogeneityRate; biologicalDuplicateRateFromTriDups = 2 * (1 - Math.sqrt(triSiteHomogeneityRate)); pSameUmiInBiologicalBiDup = nMatchingUMIsInDiffBiDups / (double) (nMismatchingUMIsInDiffBiDups + nMatchingUMIsInDiffBiDups); pSameAlleleWhenMismatchingUmi = nMismatchingUMIsInSameBiDups / (double) (nMismatchingUMIsInSameBiDups + nMismatchingUMIsInDiffBiDups); biologicalDuplicateRateFromUmi = (nMismatchingUMIsInDiffBiDups + nMismatchingUMIsInSameBiDups) / (double) nExactlyDouble; final int numberOfBigSets = nDuplicateSets - nExactlyDouble - nExactlyDouble; duplicationRateFromDuplicateSets = (nExactlyDouble + nExactlyTriple * 2 + nReadsInBigSets - numberOfBigSets) / (double) nTotalReads; }

Target:
public void calculateDerivedFields() { biSiteHeterogeneityRate = nDifferentAllelesBiDups / (double) (nDifferentAllelesBiDups + nAlternateAllelesBiDups + nReferenceAllelesBiDups); biSiteHomogeneityRate = 1 - biSiteHeterogeneityRate; this.independentReplicationRateFromBiDups = 2 * biSiteHeterogeneityRate; triSiteHeterogeneityRate = nDifferentAllelesTriDups / (double) (nDifferentAllelesTriDups + nAlternateAllelesTriDups + nReferenceAllelesTriDups); triSiteHomogeneityRate = 1 - triSiteHeterogeneityRate; independentReplicationRateFromTriDups = 2 * (1 - Math.sqrt(triSiteHomogeneityRate)); pSameUmiInIndependentBiDup = nMatchingUMIsInDiffBiDups / (double) (nMismatchingUMIsInDiffBiDups + nMatchingUMIsInDiffBiDups); pSameAlleleWhenMismatchingUmi = nMismatchingUMIsInSameBiDups / (double) (nMismatchingUMIsInSameBiDups + nMismatchingUMIsInDiffBiDups); independentReplicationRateFromUmi = (nMismatchingUMIsInDiffBiDups + nMismatchingUMIsInSameBiDups) / (double) nExactlyDouble; final int numberOfBigSets = nDuplicateSets - nExactlyDouble - nExactlyDouble; replicationRateFromReplicateSets = (nExactlyDouble + nExactlyTriple * 2 + nReadsInBigSets - numberOfBigSets) / (double) nTotalReads; }
Source:
public FlinkPod decorateFlinkPod(FlinkPod flinkPod) { final Container mainContainerWithStartCmd = new ContainerBuilder(flinkPod.getMainContainer()) .withCommand(kubernetesTaskManagerParameters.getContainerEntrypoint()) .withArgs(KubernetesUtils.getStartCommandWithBashWrapper(getTaskManagerStartCommand())) .build(); return new FlinkPod.Builder(flinkPod) .withMainContainer(mainContainerWithStartCmd) .build(); }

Target:
public FlinkPod decorateFlinkPod(FlinkPod flinkPod) { final Container mainContainerWithStartCmd = new ContainerBuilder(flinkPod.getMainContainer()) .withCommand(kubernetesTaskManagerParameters.getContainerEntrypoint()) .withArgs(getTaskManagerStartCommand()) .build(); return new FlinkPod.Builder(flinkPod) .withMainContainer(mainContainerWithStartCmd) .build(); }
Source:
public Plugin convert(String s) { String[] details = s.split("="); assert details.length == 2; return new Plugin(details[0], new VersionNumber(details[1])); }

Target:
public PCTPlugin convert(String s) { String[] details = s.split("="); return new PCTPlugin(details[0], new VersionNumber(details[1])); }
Source:
protected static AudienceRestrictionType locateAudienceRestriction(ResponseType response) { try { return response.getAssertions().get(0).getAssertion().getConditions().getConditions() .stream() .filter(c -> c instanceof AudienceRestrictionType) .map(c -> (AudienceRestrictionType) c) .findFirst().orElse(null); } catch (NullPointerException | IndexOutOfBoundsException e) { logger.warnf("Invalid SAML ResponseType to add the audience restriction", e); return null; } }

Target:
protected static AudienceRestrictionType locateAudienceRestriction(ResponseType response) { try { return response.getAssertions().get(0).getAssertion().getConditions().getConditions() .stream() .filter(AudienceRestrictionType.class::isInstance) .map(AudienceRestrictionType.class::cast) .findFirst().orElse(null); } catch (NullPointerException | IndexOutOfBoundsException e) { logger.warn("Invalid SAML ResponseType to add the audience restriction", e); return null; } }
Source:
public void testPartitionedWithFilter() { assertNotFallback("select * from P1 where i = 1"); assertNotFallback("select * from P1 where 1 = i"); assertFallback("select * from P1 where i > 10"); assertFallback("select * from P1 where i <> 10"); assertNotFallback("select si, v from P1 where 7=si and i=2"); assertNotFallback("select si, v from P1 where 7>si and i=2 and ti<3"); assertFallback("select si, v from P1 where 7=si or i=2"); assertFallback("select si, v from P1 where 7=si or i=2 or ti=3"); assertFallback("select si, v from P1 where 7>si or (i=2 and ti<3)"); assertNotFallback("select si, v from P1 where 7>si and (i=2 and ti<3)"); assertNotFallback("select si, v from P1 where (7>si or ti=2) and i=2"); assertFallback("select si, v from P1 where (7>si or ti=2) or i=2"); assertNotFallback("select si, v from P1 where (7=si and i=2) and 1=1"); assertFallback("select si, v from P1 where (7=si and i=2) or 1=1"); assertNotFallback("select si, v from P1 where (7=si and i=2) and 1=2"); }

Target:
public void testPartitionedWithFilter() { m_tester.sql("select * from P1 where i = 1").test(); m_tester.sql("select * from P1 where 1 = i").test(); m_tester.sql("select * from P1 where i > 10").testFail(); m_tester.sql("select * from P1 where i <> 10").testFail(); m_tester.sql("select si, v from P1 where 7=si and i=2").test(); m_tester.sql("select si, v from P1 where 7>si and i=2 and ti<3").test(); m_tester.sql("SELECT si + 1 FROM P1 WHERE 7 = i").test(); m_tester.sql("SELECT max(v) FROM P1 WHERE 7 = i").test(); m_tester.sql("select si, v from P1 where 7=si or i=2").testFail(); m_tester.sql("select si, v from P1 where 7>si or (i=2 and ti<3)").testFail(); m_tester.sql("select si, v from P1 where 7>si and (i=2 and ti<3)").test(); m_tester.sql("select si, v from P1 where (7>si or ti=2) and i=2").test(); m_tester.sql("select si, v from P1 where (7>si or ti=2) or i=2").testFail(); m_tester.sql("select si, v from P1 where (7=si and i=2) and 1=1").test(); m_tester.sql("select si, v from P1 where (7=si and i=2) and true").test(); m_tester.sql("select si, v from P1 where (7=si and i=2) or 1=1").testFail(); m_tester.sql("select si, v from P1 where (7=si and i=2) and 1=2").test(); m_tester.sql("select si, v from P1 where (7=si and i=2) or 1=2").test(); }
Source:
public List<@NonNull Integer> getQuarks(String... pattern) { List<@NonNull Integer> quarks = new LinkedList<>(); List<String> prefix = new LinkedList<>(); List<String> suffix = new LinkedList<>(); boolean split = false; String[] prefixStr; String[] suffixStr; List<Integer> directChildren; int startingAttribute; for (String entry : pattern) { if (entry.equals("*")) { if (split) { return quarks; } split = true; continue; } if (split) { suffix.add(entry); } else { prefix.add(entry); } } prefixStr = prefix.toArray(new String[prefix.size()]); suffixStr = suffix.toArray(new String[suffix.size()]); if (!split) { int quark; try { quark = getQuarkAbsolute(prefixStr); } catch (AttributeNotFoundException e) { return quarks; } quarks.add(quark); return quarks; } if (prefix.size() == 0) { startingAttribute = ROOT; } else { startingAttribute = optQuarkAbsolute(prefixStr); if (startingAttribute == INVALID) { return quarks; } } try { directChildren = getSubAttributes(startingAttribute, false); } catch (AttributeNotFoundException e) { throw new IllegalStateException(); } for (int childQuark : directChildren) { int matchingQuark = optQuarkRelative(childQuark, suffixStr); if (matchingQuark != INVALID) { quarks.add(matchingQuark); } } return quarks; }

Target:
public List<@NonNull Integer> getQuarks(String... pattern) { List<@NonNull Integer> quarks = new LinkedList<>(); List<String> prefix = new LinkedList<>(); List<String> suffix = new LinkedList<>(); boolean split = false; String[] prefixStr; String[] suffixStr; List<Integer> directChildren; int startingAttribute; for (String entry : pattern) { if (entry.equals("*")) { if (split) { return quarks; } split = true; continue; } if (split) { suffix.add(entry); } else { prefix.add(entry); } } prefixStr = prefix.toArray(new String[prefix.size()]); suffixStr = suffix.toArray(new String[suffix.size()]); if (!split) { int quark; try { quark = getQuarkAbsolute(prefixStr); } catch (AttributeNotFoundException e) { return quarks; } quarks.add(quark); return quarks; } if (prefix.isEmpty()) { startingAttribute = ROOT; } else { startingAttribute = optQuarkAbsolute(prefixStr); if (startingAttribute == INVALID) { return quarks; } } try { directChildren = getSubAttributes(startingAttribute, false); } catch (AttributeNotFoundException e) { throw new IllegalStateException(); } for (int childQuark : directChildren) { int matchingQuark = optQuarkRelative(childQuark, suffixStr); if (matchingQuark != INVALID) { quarks.add(matchingQuark); } } return quarks; }
Source:
private void sync() throws IOException { packDigest.update(buf, 0, bOffset); if (expectDataAfterPackFooter) { if (bAvail > 0) { in.reset(); IO.skipFully(in, bOffset); } in.mark(buf.length); } onStoreStream(buf, 0, bOffset); if (bAvail > 0) System.arraycopy(buf, bOffset, buf, 0, bAvail); bBase += bOffset; bOffset = 0; }

Target:
private void sync() throws IOException { packDigest.update(buf, 0, bOffset); onStoreStream(buf, 0, bOffset); if (expectDataAfterPackFooter) { if (bAvail > 0) { in.reset(); IO.skipFully(in, bOffset); bAvail = 0; } in.mark(buf.length); } else if (bAvail > 0) System.arraycopy(buf, bOffset, buf, 0, bAvail); bBase += bOffset; bOffset = 0; }
Source:
public void testGetVdsCapabilities() throws InterruptedException, ExecutionException, ClientConnectionException { JsonRpcClient client = JsonRpcUtils.createStompClient(HOST_ADDRESS, PORT, TIMEOUT, 0, TIMEOUT, TIMEOUT, true, "TLS"); final JsonRpcRequest request = new RequestBuilder("Host.getCapabilities").build(); Map<String, Object> map = new FutureMap(client, request); assertTrue(map.isEmpty()); }

Target:
public void testGetVdsCapabilities() throws InterruptedException, ExecutionException, ClientConnectionException { JsonRpcClient client = JsonRpcUtils.createStompClient(HOST_ADDRESS, PORT, TIMEOUT, 0, TIMEOUT, TIMEOUT, true, "TLSv1"); final JsonRpcRequest request = new RequestBuilder("Host.getCapabilities").build(); Map<String, Object> map = new FutureMap(client, request); assertTrue(map.isEmpty()); }
Source:
public void processPresign( Response response, AuthnRequest authnRequest, List<String> spMetadata, Set<Binding> supportedBindings) { final DateTime notOnOrAfter = DateTime.now().plusMinutes(30); String acsUrl = getAssertionConsumerServiceURL(authnRequest, spMetadata, supportedBindings); for (Assertion assertion : response.getAssertions()) { assertion .getSubject() .getSubjectConfirmations() .forEach(sc -> setConfirmationData(sc, notOnOrAfter, acsUrl)); } }

Target:
public void processPresign( Response response, AuthnRequest authnRequest, List<String> spMetadata, Set<Binding> supportedBindings) { String inResponseTo = response.getInResponseTo(); String acsUrl = getAssertionConsumerServiceURL(authnRequest, spMetadata, supportedBindings); for (Assertion assertion : response.getAssertions()) { DateTime notOnOrAfter = assertion.getConditions().getNotOnOrAfter(); assertion .getSubject() .getSubjectConfirmations() .forEach(sc -> setConfirmationData(sc, notOnOrAfter, acsUrl, inResponseTo)); } addAudiences(authnRequest, response, spMetadata, supportedBindings); }
Source:
private JCQueue createQueue(String name, int batchSize, int queueSize) { return new JCQueue(name, null, queueSize, 0, batchSize, waitStrategy, "test", "test", Collections.singletonList(1000), 1000, new StormMetricRegistry()); }

Target:
private JCQueue createQueue(String name, int batchSize, int queueSize) { return new JCQueue(name, name, queueSize, 0, batchSize, waitStrategy, "test", "test", Collections.singletonList(1000), 1000, new StormMetricRegistry()); }
Source:
public void close() { Set<RequestMetadata> requestMetadataToRelease = new HashSet<>(); if (pendingRequests != null) { requestMetadataToRelease.addAll(pendingRequests); } if (connectionIdToRequestInFlight != null) { requestMetadataToRelease.addAll(connectionIdToRequestInFlight.values()); } if (pendingConnectionsToAssociatedRequests != null) { requestMetadataToRelease.addAll(pendingConnectionsToAssociatedRequests.values()); } requestMetadataToRelease.stream().forEach(requestMetadata -> requestMetadata.requestInfo.getRequest().release()); logger.trace("Closing the SocketNetworkClient"); selector.close(); closed = true; }

Target:
public void close() { Set<RequestMetadata> requestMetadataToRelease = new HashSet<>(); if (pendingRequests != null) { requestMetadataToRelease.addAll(pendingRequests); } if (connectionIdToRequestInFlight != null) { requestMetadataToRelease.addAll(connectionIdToRequestInFlight.values()); } if (pendingConnectionsToAssociatedRequests != null) { requestMetadataToRelease.addAll(pendingConnectionsToAssociatedRequests.values()); } requestMetadataToRelease.forEach(requestMetadata -> requestMetadata.requestInfo.getRequest().release()); logger.trace("Closing the SocketNetworkClient"); selector.close(); closed = true; }
Source:
public void scan() throws IOException { if (!rowGroupOpen) { openRowGroup(); } beginScan(presentStream, null); QualifyingSet input = inputQualifyingSet; QualifyingSet output = outputQualifyingSet; int end = input.getEnd(); int rowsInRange = end - posInRowGroup; int valuesSize = end; int[] inputPositions = input.getPositions(); if (filter != null) { output.reset(rowsInRange); } if (values == null || values.length < valuesSize) { values = new byte[valuesSize]; } if (dataStream == null) { processAllNulls(); endScan(presentStream); return; } int nextActive = inputPositions[0]; int activeIdx = 0; int toSkip = 0; for (int i = 0; i < rowsInRange; i++) { if (i + posInRowGroup == nextActive) { if (nextActive == truncationRow) { break; } if (presentStream != null && !present[i]) { if (filter == null || filter.testNull()) { if (filter != null) { output.append(i + posInRowGroup, activeIdx); } addNullResult(); } } else { if (toSkip > 0) { dataStream.skip(toSkip); } boolean value = dataStream.nextBit(); if (filter != null) { if (filter.testBoolean(value)) { output.append(i + posInRowGroup, activeIdx); addResult(value); } } else { addResult(value); } } if (++activeIdx == input.getPositionCount()) { toSkip = countPresent(i + 1, end - posInRowGroup); break; } nextActive = inputPositions[activeIdx]; if (outputChannel != -1 && numResults > resultSizeBudget) { truncationRow = inputQualifyingSet.truncateAndReturnTruncationRow(activeIdx); } continue; } else { if (presentStream == null || present[i]) { toSkip++; } } } if (toSkip > 0) { dataStream.skip(toSkip); } endScan(presentStream); }

Target:
public void scan() throws IOException { if (!rowGroupOpen) { openRowGroup(); } beginScan(presentStream, null); QualifyingSet input = inputQualifyingSet; QualifyingSet output = outputQualifyingSet; int end = input.getEnd(); int rowsInRange = end - posInRowGroup; int[] inputPositions = input.getPositions(); if (filter != null) { output.reset(rowsInRange); } ensureValuesCapacity(end, false); if (dataStream == null) { processAllNulls(); endScan(presentStream); return; } int nextActive = inputPositions[0]; int activeIdx = 0; int toSkip = 0; for (int i = 0; i < rowsInRange; i++) { if (i + posInRowGroup == nextActive) { if (nextActive == truncationRow) { break; } if (presentStream != null && !present[i]) { if (filter == null || filter.testNull()) { if (filter != null) { output.append(i + posInRowGroup, activeIdx); } addNullResult(); } } else { if (toSkip > 0) { dataStream.skip(toSkip); } boolean value = dataStream.nextBit(); if (filter != null) { if (filter.testBoolean(value)) { output.append(i + posInRowGroup, activeIdx); addResult(value); } } else { addResult(value); } } if (++activeIdx == input.getPositionCount()) { toSkip = countPresent(i + 1, end - posInRowGroup); break; } nextActive = inputPositions[activeIdx]; if (outputChannelSet && numResults > resultSizeBudget) { truncationRow = inputQualifyingSet.truncateAndReturnTruncationRow(activeIdx); } continue; } else { if (presentStream == null || present[i]) { toSkip++; } } } if (toSkip > 0) { dataStream.skip(toSkip); } endScan(presentStream); }
Source:
public boolean isEmpty() { return this.itemType == ItemTypes.AIR || this.count <= 0; }

Target:
public boolean isEmpty() { return this.privateStack.isEmpty(); }
Source:
protected void executeVmCommand() { VmHandler.warnMemorySizeLegal(getParameters().getVm().getStaticData(), getEffectiveCompatibilityVersion()); ArrayList<String> errorMessages = new ArrayList<>(); if (!canAddVm(errorMessages, destStorages.values())) { log.error("Failed to add VM. The reasons are: {}", StringUtils.join(errorMessages, ',')); return; } TransactionSupport.executeInNewTransaction(() -> { addVmStatic(); addVmDynamic(); addVmNetwork(); addVmNumaNodes(); addVmStatistics(); addActiveSnapshot(); addVmPermission(); addVmInit(); addVmRngDevice(); getCompensationContext().stateChanged(); return null; }); if (addVmImages()) { TransactionSupport.executeInNewTransaction(() -> { copyVmDevices(); addDiskPermissions(); addVmPayload(); updateSmartCardDevices(); addVmWatchdog(); addGraphicsDevice(); setActionReturnValue(getVm().getId()); setSucceeded(true); return null; }); } if (getParameters().getPoolId() != null) { addVmToPool(); } }

Target:
protected void executeVmCommand() { VmHandler.warnMemorySizeLegal(getParameters().getVm().getStaticData(), getEffectiveCompatibilityVersion()); List<String> errorMessages = new ArrayList<>(); if (!canAddVm(errorMessages, destStorages.values())) { log.error("Failed to add VM. The reasons are: {}", String.join(",", errorMessages)); return; } TransactionSupport.executeInNewTransaction(() -> { addVmStatic(); addVmDynamic(); addVmNetwork(); addVmNumaNodes(); addVmStatistics(); addActiveSnapshot(); addVmPermission(); addVmInit(); addVmRngDevice(); getCompensationContext().stateChanged(); return null; }); if (addVmImages()) { TransactionSupport.executeInNewTransaction(() -> { copyVmDevices(); addDiskPermissions(); addVmPayload(); updateSmartCardDevices(); addVmWatchdog(); addGraphicsDevice(); setActionReturnValue(getVm().getId()); setSucceeded(true); return null; }); } if (getParameters().getPoolId() != null) { addVmToPool(); } }
Source:
private void onEndOfStream(MessageCollector collector, TaskCoordinator coordinator) { if (inputStreams.stream().allMatch(input -> eosStates.isEndOfStream(input))) { handleEndOfStream(collector, coordinator); this.registeredOperators.forEach(op -> op.onEndOfStream(collector, coordinator)); } }

Target:
private final void onEndOfStream(MessageCollector collector, TaskCoordinator coordinator) { if (inputStreams.stream().allMatch(input -> eosStates.isEndOfStream(input))) { handleEndOfStream(collector, coordinator); this.registeredOperators.forEach(op -> op.onEndOfStream(collector, coordinator)); } }
Source:
public void canConstructFromString() throws UnsupportedEncodingException { final String test = "Hello こんにちは Привет"; final Utf8String str = new Utf8String(test); MatcherAssert.assertThat(str.asString(), Matchers.equalTo(test)); MatcherAssert.assertThat( str.asBytes(), Matchers.equalTo(test.getBytes(Utf8StringTest.ENCODING)) ); }

Target:
public void canConstructFromString() throws UnsupportedEncodingException { final String test = "Hello こんにちは Привет"; final Utf8String str = new Utf8String(test); MatcherAssert.assertThat(str.asString(), new IsEqual<>(test)); MatcherAssert.assertThat( str.asBytes(), new IsEqual<>(test.getBytes(Utf8StringTest.ENCODING)) ); }
Source:
private static String[] getTypes(ICompareInput input) { ITypedElement ancestor= input.getAncestor(); ITypedElement left= input.getLeft(); ITypedElement right= input.getRight(); ArrayList<String> tmp= new ArrayList<String>(); if (ancestor != null) { String type= ancestor.getType(); if (type != null) tmp.add(normalizeCase(type)); } if (left != null) { String type= left.getType(); if (type != null) tmp.add(normalizeCase(type)); } if (right != null) { String type= right.getType(); if (type != null) tmp.add(normalizeCase(type)); } return tmp.toArray(new String[tmp.size()]); }

Target:
private static String[] getTypes(ICompareInput input) { ITypedElement ancestor= input.getAncestor(); ITypedElement left= input.getLeft(); ITypedElement right= input.getRight(); ArrayList<String> tmp= new ArrayList<>(); if (ancestor != null) { String type= ancestor.getType(); if (type != null) tmp.add(normalizeCase(type)); } if (left != null) { String type= left.getType(); if (type != null) tmp.add(normalizeCase(type)); } if (right != null) { String type= right.getType(); if (type != null) tmp.add(normalizeCase(type)); } return tmp.toArray(new String[tmp.size()]); }
Source:
private Attribute getNamedAttribute(String name) { Attribute result = null; InvokableMBeanAttributeInfo i = atts.get(name); if (i == null && name.length() > 0) { char firstChar = name.charAt(0); if (Character.isUpperCase(firstChar)) { char[] nameChars = name.toCharArray(); nameChars[0] = Character.toLowerCase(firstChar); name = new String(nameChars); i = atts.get(name); } } if (i != null) { try { result = new Attribute(name, i.invoke(null)); if (trace) log.tracef("Attribute %s has r=%b,w=%b,is=%b and value %s", name, i.getMBeanAttributeInfo().isReadable(), i.getMBeanAttributeInfo().isWritable(), i.getMBeanAttributeInfo().isIs(), result.getValue()); } catch (Exception e) { log.debugf(e, "Exception while reading value of attribute %s", name); } } else { log.queriedAttributeNotFound(name); } return result; }

Target:
private Attribute getNamedAttribute(String name) { Attribute result = null; InvokableMBeanAttributeInfo i = atts.get(name); if (i == null && name.length() > 0) { char firstChar = name.charAt(0); if (Character.isUpperCase(firstChar)) { name = Character.toLowerCase(firstChar) + name.substring(1); i = atts.get(name); } } if (i != null) { try { result = new Attribute(name, i.invoke(null)); if (trace) log.tracef("Attribute %s has r=%b,w=%b,is=%b and value %s", name, i.getMBeanAttributeInfo().isReadable(), i.getMBeanAttributeInfo().isWritable(), i.getMBeanAttributeInfo().isIs(), result.getValue()); } catch (Exception e) { log.debugf(e, "Exception while reading value of attribute %s", name); } } else { log.queriedAttributeNotFound(name); } return result; }
Source:
public void shouldIterateOverCreatedParts() throws Exception { TemporalIndexCache<String, Exception> cache = new TemporalIndexCache<>( new StringFactory() ); cache.dateTime(); cache.dateTimeZoned(); assertEquals( Iterables.count( cache ), 2 ); }

Target:
public void shouldIterateOverCreatedParts() throws Exception { TemporalIndexCache<String, Exception> cache = new TemporalIndexCache<>( new StringFactory() ); assertEquals( Iterables.count( cache ), 0 ); cache.localDateTime(); cache.zonedTime(); assertThat( cache, containsInAnyOrder( "LocalDateTime", "ZonedTime" ) ); cache.date(); cache.localTime(); cache.localDateTime(); cache.zonedTime(); cache.zonedDateTime(); cache.duration(); assertThat( cache, containsInAnyOrder( "Date", "LocalDateTime", "ZonedDateTime", "LocalTime", "ZonedTime", "Duration" ) ); }
Source:
Tuple2<T, Q> dequeue() { if (isEmpty()) { throw new NoSuchElementException("dequeue of empty " + getClass().getSimpleName()); } else { return Tuple.of(head(), tail()); } }

Target:
public Tuple2<T, Q> dequeue() { if (isEmpty()) { throw new NoSuchElementException("dequeue of empty " + getClass().getSimpleName()); } else { return Tuple.of(head(), tail()); } }
Source:
default List<String> getClaimAsStringList(String claim) { if (!containsClaim(claim)) { return null; } Object claimValue = getClaims().get(claim); List<String> convertedValue = ObjectConverters.listStringConverter().convert(claimValue); if (convertedValue == null) { throw new IllegalArgumentException("Unable to convert claim '" + claim + "' of type '" + claimValue.getClass() + "' to List."); } return convertedValue; }

Target:
default List<String> getClaimAsStringList(String claim) { if (!containsClaim(claim)) { return null; } final TypeDescriptor sourceDescriptor = TypeDescriptor.valueOf(Object.class); final TypeDescriptor targetDescriptor = TypeDescriptor.collection( List.class, TypeDescriptor.valueOf(String.class)); Object claimValue = getClaims().get(claim); List<String> convertedValue = (List<String>) ClaimConversionService.getSharedInstance().convert( claimValue, sourceDescriptor, targetDescriptor); if (convertedValue == null) { throw new IllegalArgumentException("Unable to convert claim '" + claim + "' of type '" + claimValue.getClass() + "' to List."); } return convertedValue; }
Source:
if (Boolean.getBoolean("io.reactivesocket.fragmentation.enable")) { int mtu = Integer.getInteger("io.reactivesocket.fragmentation.mtu", 1024); if (Plugins.DUPLEX_CONNECTION_INTERCEPTOR == null) { Plugins.DUPLEX_CONNECTION_INTERCEPTOR = (type, connection) -> { if (type == Plugins.DuplexConnectionInterceptor.Type.SOURCE) { return new FragmentionDuplexConnection(connection, mtu); } else { return connection; } }; } else { Plugins.DuplexConnectionInterceptor original = Plugins.DUPLEX_CONNECTION_INTERCEPTOR; Plugins.DUPLEX_CONNECTION_INTERCEPTOR = (type, connection) -> { if (type == Plugins.DuplexConnectionInterceptor.Type.SOURCE) { return original.apply(type, new FragmentionDuplexConnection(connection, mtu)); } else { return original.apply(type, connection); } }; } }

Target:
if (Boolean.getBoolean("io.reactivesocket.fragmentation.enable")) { int mtu = Integer.getInteger("io.reactivesocket.fragmentation.mtu", 1024); if (Plugins.DUPLEX_CONNECTION_INTERCEPTOR == null) { Plugins.DUPLEX_CONNECTION_INTERCEPTOR = (type, connection) -> { if (type == Plugins.DuplexConnectionInterceptor.Type.SOURCE) { return new FragmentationDuplexConnection(connection, mtu); } else { return connection; } }; } else { Plugins.DuplexConnectionInterceptor original = Plugins.DUPLEX_CONNECTION_INTERCEPTOR; Plugins.DUPLEX_CONNECTION_INTERCEPTOR = (type, connection) -> { if (type == Plugins.DuplexConnectionInterceptor.Type.SOURCE) { return original.apply(type, new FragmentationDuplexConnection(connection, mtu)); } else { return original.apply(type, connection); } }; } }
Source:
private void executePrecode(Connection connection) throws SQLException { String precode = getProperty(ZEPPELIN_JDBC_PRECODE_KEY); if (StringUtils.isNotEmpty(precode)) { logger.info("Run SQL precode '{}'", precode); try (Statement statement = connection.createStatement()) { statement.execute(precode); if (!connection.getAutoCommit()) { connection.commit(); } } } }

Target:
private void executePrecode(Connection connection) throws SQLException { String precode = getProperty(ZEPPELIN_JDBC_PRECODE_KEY); if (StringUtils.isNotBlank(precode)) { precode = StringUtils.trim(precode); logger.info("Run SQL precode '{}'", precode); try (Statement statement = connection.createStatement()) { statement.execute(precode); if (!connection.getAutoCommit()) { connection.commit(); } } } }
Source:
public String toString() { return "OptimizedEvaluator{" + "id='" + id + '\'' + ", dataAllocated=" + dataAllocated + ", dataRequested=" + dataRequested + ", dstTransferSteps=" + dstTransferSteps + '}'; }

Target:
public String toString() { final StringBuilder sb = new StringBuilder("OptimizedEvaluator{"); sb.append("id='").append(id).append('\''); sb.append(", dataType='").append(dataType).append('\''); sb.append(", dstTransferSteps=").append(dstTransferSteps); sb.append(", dataAllocated=").append(dataAllocated); sb.append(", dataRequested=").append(dataRequested); sb.append('}'); return sb.toString(); }
Source:
public EndPoint mockEndpointSelection(Type vmType, State volumeState, SecondaryStorageVmVO ... ssvmVOs) { VolumeInfo volume = mock(VolumeInfo.class); VirtualMachine vm = mock(VirtualMachine.class); Long zoneId = 1l; when(vm.getType()).thenReturn(vmType); when(vm.getState()).thenReturn(volumeState); when(volume.getAttachedVM()).thenReturn(vm); when(volume.getDataCenterId()).thenReturn(zoneId); List<SecondaryStorageVmVO> ssvmList = new ArrayList<>(); if (ssvmVOs != null) { for (SecondaryStorageVmVO ssvm : ssvmVOs) { ssvmList.add(ssvm); } } when(_ssvmDao.listByZoneId(eq(SecondaryStorageVm.Role.templateProcessor), eq(zoneId))) .thenReturn(ssvmList); PowerMockito.mockStatic(ComponentContext.class); when(ComponentContext.inject(DummyEndpoint.class)).thenReturn(dummyEndpoint); doReturn(selectMethodEndpoint).when(selector).select(any(DataObject.class)); return selector.select(volume, StorageAction.DELETEVOLUME); }

Target:
private EndPoint mockEndpointSelection(Type vmType, State volumeState, SecondaryStorageVmVO ... ssvmVOs) { VolumeInfo volume = mock(VolumeInfo.class); VirtualMachine vm = mock(VirtualMachine.class); Long zoneId = 1l; when(vm.getType()).thenReturn(vmType); when(vm.getState()).thenReturn(volumeState); when(volume.getAttachedVM()).thenReturn(vm); when(volume.getDataCenterId()).thenReturn(zoneId); List<SecondaryStorageVmVO> ssvmList = new ArrayList<>(); if (ssvmVOs != null) { for (SecondaryStorageVmVO ssvm : ssvmVOs) { ssvmList.add(ssvm); } } when(_ssvmDao.listByZoneId(eq(SecondaryStorageVm.Role.templateProcessor), eq(zoneId))) .thenReturn(ssvmList); PowerMockito.mockStatic(ComponentContext.class); when(ComponentContext.inject(DummyEndpoint.class)).thenReturn(dummyEndpoint); doReturn(selectMethodEndpoint).when(selector).select(any(DataObject.class)); return selector.select(volume, StorageAction.DELETEVOLUME); }
Source:
public Construct exec(Target t, Environment environment, Construct... args) throws ConfigRuntimeException { MCLivingEntity e = Static.getLivingEntity(args[0], t); boolean glide = Static.getBoolean(args[1]); if (e.isOnGround()) { throw new CREException("The specified entity cannot glide right now", t); } e.setGliding(glide); return CVoid.VOID; }

Target:
public Construct exec(Target t, Environment environment, Construct... args) throws ConfigRuntimeException { MCLivingEntity e = Static.getLivingEntity(args[0], t); boolean glide = Static.getBoolean(args[1]); e.setGliding(glide); return CVoid.VOID; }
Source:
public void handle(GlowSession session, AdvancementTabMessage message) { if (message.getAction() == AdvancementTabMessage.ACTION_CLOSE) { GlowServer.logger.log(Level.SEVERE, "Received AdvancementTabHandler (close)"); } else { GlowServer.logger.log(Level.SEVERE, "Received AdvancementTabHandler (open:" + message.getTabId() + ")"); } }

Target:
public void handle(GlowSession session, AdvancementTabMessage message) { if (message.getAction() == AdvancementTabMessage.ACTION_CLOSE) { GlowServer.logger.log(Level.FINE, "Received AdvancementTabHandler (close)"); } else { GlowServer.logger.log(Level.FINE, "Received AdvancementTabHandler (open:" + message.getTabId() + ")"); } }
Source:
public IFUComponent(final String prefix, final double radius, final Boolean isIfu2) { super(ITCConstants.LIB + "/" + Gmos.INSTR_DIR + "/" + prefix + "ifu_trans" + Instrument.DATA_SUFFIX); Log.fine("Calculating IFU elements to sum within " + radius + " arcsec of center (IFU2 = " + isIfu2 + ")"); IFUApertures = new ApertureComposite(); IFUOffsets = new ArrayList<>(); int numY = 25; int numX = 20; if (isIfu2) numX = 40; int Nelements = 0; for (int i = 0; i < numX; i++) { double x = (i - (numX/2.)) * ((Math.sqrt(3)/2.)*IFU_DIAMETER + IFU_SPACING); for (int j = 0; j < numY; j++) { double y = (2*j - (numY - Math.abs(i)%2 + 1)) * (IFU_DIAMETER/2. + IFU_SPACING); double r = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); if (r < radius) { IFUApertures.addAperture(new HexagonalAperture(x, y, IFU_DIAMETER)); IFUOffsets.add(r); Nelements++; } } } Log.fine("-> will sum " + Nelements + " IFU elements"); }

Target:
public IFUComponent(final String prefix, final double radius, final Boolean isIfu2) { super(ITCConstants.LIB + "/" + Gmos.INSTR_DIR + "/" + prefix + "ifu_trans" + Instrument.DATA_SUFFIX); Log.fine("Calculating IFU elements to sum within " + radius + " arcsec of center (IFU2 = " + isIfu2 + ")"); IFUApertures = new ApertureComposite(); IFUOffsets = new ArrayList<>(); int numY = 25; int numX = 20; if (isIfu2) numX = 40; int Nelements = 0; double distX = (Math.sqrt(3)/2.0)*IFU_DIAMETER + IFU_SPACING; double distY = (IFU_DIAMETER + IFU_SPACING)/2.0; for (int i = 0; i < numX; i++) { double x = (i - (numX/2.0)) * distX; for (int j = 0; j < numY; j++) { double y = (2*j - (numY - Math.abs(i)%2 + 1)) * distY; double r = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); if (r < radius) { IFUApertures.addAperture(new HexagonalAperture(x, y, IFU_DIAMETER)); IFUOffsets.add(r); Nelements++; } } } Log.fine("-> will sum " + Nelements + " IFU elements"); }
Source:
public MetadataValue getMinimum(Context context, int metadataFieldId) throws SQLException { String queryString; if(DatabaseUtils.getDbType().equals(DatabaseUtils.DBMS_ORACLE)){ queryString = "SELECT m FROM MetadataValue m JOIN FETCH m.metadataField WHERE m.metadataField.id = :metadata_field_id ORDER BY DBMS_LOB.substr(text_value , 4000 , 1)"; }else{ queryString = "SELECT m FROM MetadataValue m JOIN FETCH m.metadataField WHERE m.metadataField.id = :metadata_field_id ORDER BY text_value"; } Query query = createQuery(context, queryString); query.setParameter("metadata_field_id", metadataFieldId); query.setMaxResults(1); return (MetadataValue) query.uniqueResult(); }

Target:
public MetadataValue getMinimum(Context context, int metadataFieldId) throws SQLException { String queryString; if(context.getDbType().equals(DatabaseUtils.DBMS_ORACLE)){ queryString = "SELECT m FROM MetadataValue m JOIN FETCH m.metadataField WHERE m.metadataField.id = :metadata_field_id ORDER BY DBMS_LOB.substr(text_value , 4000 , 1)"; }else{ queryString = "SELECT m FROM MetadataValue m JOIN FETCH m.metadataField WHERE m.metadataField.id = :metadata_field_id ORDER BY text_value"; } Query query = createQuery(context, queryString); query.setParameter("metadata_field_id", metadataFieldId); query.setMaxResults(1); return (MetadataValue) query.uniqueResult(); }
Source:
public PhysicalOperation visitProject(ProjectNode node, LocalExecutionPlanContext context) { PlanNode sourceNode; Optional<Expression> filterExpression = Optional.empty(); Optional<Expression> filterExpressionWithoutTupleDomain = Optional.empty(); if (node.getSource() instanceof FilterNode) { FilterNode filterNode = (FilterNode) node.getSource(); sourceNode = filterNode.getSource(); filterExpression = Optional.of(filterNode.getPredicate()); Expression temp = filterNode.getPredicateWithoutTupleDomain(); if (temp != null && !temp.equals(TRUE_LITERAL)) { filterExpressionWithoutTupleDomain = Optional.of(temp); } } else { sourceNode = node.getSource(); } List<Symbol> outputSymbols = node.getOutputSymbols(); return visitScanFilterAndProject(context, node.getId(), sourceNode, filterExpression, filterExpressionWithoutTupleDomain, node.getAssignments(), outputSymbols); }

Target:
public PhysicalOperation visitProject(ProjectNode node, LocalExecutionPlanContext context) { PlanNode sourceNode; Optional<Expression> filterExpression = Optional.empty(); Optional<Expression> filterExpressionWithoutTupleDomain = Optional.empty(); if (node.getSource() instanceof FilterNode) { FilterNode filterNode = (FilterNode) node.getSource(); sourceNode = filterNode.getSource(); filterExpression = Optional.of(filterNode.getPredicate()); Expression temp = filterNode.getPredicateWithoutTupleDomain(); if (!TRUE_LITERAL.equals(temp)) { filterExpressionWithoutTupleDomain = Optional.ofNullable(temp); } } else { sourceNode = node.getSource(); } List<Symbol> outputSymbols = node.getOutputSymbols(); return visitScanFilterAndProject(context, node.getId(), sourceNode, filterExpression, filterExpressionWithoutTupleDomain, node.getAssignments(), outputSymbols); }
Source:
public String joinCategory() { logger.debug("joinCategory"); getFileDescriptions(); fetchMetadataEdit(); return super.joinCategory(); }

Target:
public String joinCategory() { logger.debug("JoinCategory in multiple resource action for id {}", this.getResourceId()); getFileDescriptions(); fetchMetadataEdit(); return super.joinCategory(); }
Source:
private void updateLabelList() { AsyncDataProvider.getInstance().getLabelList(new AsyncQuery<>(allLabels -> { boolean isExistingVmBehavior = getBehavior() instanceof ExistingVmModelBehavior; if (isExistingVmBehavior) { Guid vmId = ((ExistingVmModelBehavior) getBehavior()).getVm().getId(); AsyncDataProvider.getInstance().getLabelListByEntityId(new AsyncQuery<>(vmLabelsList -> { labelList.setItems(allLabels); labelList.setSelectedItems(vmLabelsList); }), vmId); } else { labelList.setItems(allLabels); labelList.setSelectedItems(new ArrayList<>()); } })); }

Target:
private void updateLabelList() { AsyncDataProvider.getInstance().getLabelList(new AsyncQuery<>(allLabels -> { boolean isExistingVmBehavior = getBehavior() instanceof ExistingVmModelBehavior; if (isExistingVmBehavior) { Guid vmId = ((ExistingVmModelBehavior) getBehavior()).getVm().getId(); AsyncDataProvider.getInstance().getLabelListByEntityId(new AsyncQuery<>(vmLabelsList -> { labelList.setItems(allLabels); labelList.setSelectedItems(vmLabelsList); }), vmId); } else { labelList.setItems(allLabels); labelList.setSelectedItems(Collections.EMPTY_LIST); } })); }
Source:
private void noSubmitWholeTopicAssertions(Map<String, ActionInfo> actions) { ActionInfo info = actions.get("submit"); assertThat(info.enabled).isEqualTo(true); assertThat(info.label).isEqualTo("Submit"); assertThat(info.method).isEqualTo("POST"); assertThat(info.title).isEqualTo("Submit patch set 1 into master"); }

Target:
private void noSubmitWholeTopicAssertions(Map<String, ActionInfo> actions) { ActionInfo info = actions.get("submit"); assertThat(info.enabled).isTrue(); assertThat(info.label).isEqualTo("Submit"); assertThat(info.method).isEqualTo("POST"); assertThat(info.title).isEqualTo("Submit patch set 1 into master"); }
Source:
public String convertTasksToWorkflow(String tasks) { currentTasks = tasks; PrimeFaces.current().executeScript("PF('confirmWorkflowPopup').show();"); return this.stayOnCurrentPage; }

Target:
public void convertTasksToWorkflow(String tasks) { currentTasks = tasks; PrimeFaces.current().executeScript("PF('confirmWorkflowPopup').show();"); }