auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public Api(final String domain) { this(domain, true, "/w/api.php", null); }

Target:
public Api(final String domain) { this(domain, true, DEFAULT_ENDPOINT, null); }
Source:
public void nullableStringFromEmptyString() { assertThat(InternalQueries.nullableString("")).isEqualTo(null); }

Target:
public void nullableStringFromEmptyString() { assertThat(InternalQueries.nullableString("")).isNull(); }
Source:
public void preInit(FMLPreInitializationEvent event) { Logger.initiallize(); ConfigurationHandler.init(event.getSuggestedConfigurationFile()); PacketHandler.init(); ItemsAndBlocks.init(); SpecialListMananger.init(); Item dustDiamond = new ItemDust(0x13ECFC).setUnlocalizedName("dustDiamond"); GameRegistry.registerItem(dustDiamond, "dustDiamond"); OreDictionary.registerOre("dustDiamond", dustDiamond); Item dustEmerald = new ItemDust(0x17DD62).setUnlocalizedName("dustEmerald"); GameRegistry.registerItem(dustEmerald, "dustEmerald"); OreDictionary.registerOre("dustEmerald", dustEmerald); BCARecipeManager.duster = new DusterRecipeManager(); BCARecipeManager.duster.addRecipe("oreRedstone", new ItemStack(Items.redstone, 6)); BCARecipeManager.duster.addRecipe("oreCoal", new ItemStack(Items.coal, 2)); BCARecipeManager.duster.addRecipe("oreLapis", new ItemStack(Items.dye, 6, 4)); BCARecipeManager.duster.addRecipe("oreQuartz", new ItemStack(Items.quartz, 2)); BCARecipeManager.duster.addRecipe("stone", new ItemStack(Blocks.gravel)); BCARecipeManager.duster.addRecipe("cobblestone", new ItemStack(Blocks.sand)); BCARecipeManager.duster.addRecipe("oreDiamond", new ItemStack(dustDiamond, 2)); BCARecipeManager.duster.addRecipe("gemDiamond", new ItemStack(dustDiamond)); BCARecipeManager.duster.addRecipe("oreEmerald", new ItemStack(dustEmerald, 2)); BCARecipeManager.duster.addRecipe("gemEmerald", new ItemStack(dustEmerald)); BCARecipeManager.duster.addRecipe(new ItemStack(Items.blaze_rod), new ItemStack(Items.blaze_powder, 4)); }

Target:
public void preInit(FMLPreInitializationEvent event) { Logger.initiallize(); ConfigurationHandler.init(event.getSuggestedConfigurationFile()); PacketHandler.init(); ItemsAndBlocks.init(); SpecialListMananger.init(); Item dustDiamond = new ItemDust(0x13ECFC).setUnlocalizedName("dustDiamond"); GameRegistry.registerItem(dustDiamond, "dustDiamond"); OreDictionary.registerOre("dustDiamond", dustDiamond); BCARecipeManager.duster = new DusterRecipeManager(); BCARecipeManager.duster.addRecipe("oreRedstone", new ItemStack(Items.redstone, 6)); BCARecipeManager.duster.addRecipe("oreCoal", new ItemStack(Items.coal, 2)); BCARecipeManager.duster.addRecipe("oreLapis", new ItemStack(Items.dye, 6, 4)); BCARecipeManager.duster.addRecipe("oreQuartz", new ItemStack(Items.quartz, 2)); BCARecipeManager.duster.addRecipe("stone", new ItemStack(Blocks.gravel)); BCARecipeManager.duster.addRecipe("cobblestone", new ItemStack(Blocks.sand)); BCARecipeManager.duster.addRecipe("oreDiamond", new ItemStack(Items.diamond, 2)); BCARecipeManager.duster.addRecipe("gemDiamond", new ItemStack(dustDiamond)); BCARecipeManager.duster.addRecipe("oreEmerald", new ItemStack(Items.emerald, 2)); BCARecipeManager.duster.addRecipe(new ItemStack(Items.blaze_rod), new ItemStack(Items.blaze_powder, 4)); }
Source:
public PageContainerForm deserialize(final JsonParser jsonParser, final DeserializationContext deserializationContext) throws IOException { final JsonNode jsonNode = jsonParser.readValueAsTree(); if (!jsonNode.elements().hasNext()) { throw new BadRequestException(""); } final List<ContainerEntry> entries = new ArrayList<>(); for (final JsonNode jsonElement : jsonNode) { final String containerId = jsonElement.get(CONTAINER_ID_ATTRIBUTE_NAME).asText(); final String containerUUID = jsonElement.get(CONTAINER_UUID_ATTRIBUTE_NAME).asText(); final ContainerEntry containerEntry = new ContainerEntry(containerId, containerUUID); final JsonNode containerNode = jsonElement.get(CONTAINER_CONTENTLETSID_ATTRIBUTE_NAME); containerNode.forEach((JsonNode contentId) -> containerEntry.addContentId(contentId.textValue())); entries.add(containerEntry); } return new PageContainerForm(entries, jsonNode.toString()); }

Target:
public PageContainerForm deserialize(final JsonParser jsonParser, final DeserializationContext deserializationContext) throws IOException { final JsonNode jsonNode = jsonParser.readValueAsTree(); final List<ContainerEntry> entries = new ArrayList<>(); for (final JsonNode jsonElement : jsonNode) { final JsonNode containerIdNode = jsonElement.get(CONTAINER_ID_ATTRIBUTE_NAME); final JsonNode containerUUIDNode = jsonElement.get(CONTAINER_UUID_ATTRIBUTE_NAME); if (containerIdNode == null || containerUUIDNode == null) { throw new BadRequestException("Container id and uuid are required"); } final String containerId = containerIdNode.asText(); final String containerUUID = containerUUIDNode.asText(); final ContainerEntry containerEntry = new ContainerEntry(containerId, containerUUID); final JsonNode containerNode = jsonElement.get(CONTAINER_CONTENTLETSID_ATTRIBUTE_NAME); containerNode.forEach((JsonNode contentId) -> containerEntry.addContentId(contentId.textValue())); entries.add(containerEntry); } return new PageContainerForm(entries, jsonNode.toString()); }
Source:
public void testExecuteQueryGetUnregisteredTemplate() throws OvfReaderException { setUpTemplate(); setUpQueryEntities(); getQuery().executeQueryCommand(); @SuppressWarnings("unchecked") VmTemplate result = getQuery().getQueryReturnValue().getReturnValue(); assertEquals(VmTemplateReturnForOvf, result, "Wrong Templates entity"); }

Target:
public void testExecuteQueryGetUnregisteredTemplate() throws OvfReaderException { setUpTemplate(); setUpQueryEntities(); getQuery().executeQueryCommand(); @SuppressWarnings("unchecked") VmTemplate result = getQuery().getQueryReturnValue().getReturnValue(); assertEquals(VmTemplateReturnForOvf, result, "Wrong Template entity"); }
Source:
public RecordCursor cursor(ConnectorTransactionHandle transactionHandle, ConnectorSession session, TupleDomain<Integer> constraint) { Builder table = InMemoryRecordSet.builder(transactionsTable); for (TransactionInfo info : transactionManager.getAllTransactionInfos()) { table.addRow( info.getTransactionId().toString(), info.getIsolationLevel().toString(), info.isReadOnly(), info.isAutoCommitContext(), info.getCreateTimeMillis(), (long) info.getIdleTime().getValue(TimeUnit.SECONDS), info.getWrittenConnectorId().map(ConnectorId::getCatalogName).orElse(null), createStringsBlock(info.getConnectorIds())); } return table.build().cursor(); }

Target:
public RecordCursor cursor(ConnectorTransactionHandle transactionHandle, ConnectorSession session, TupleDomain<Integer> constraint) { Builder table = InMemoryRecordSet.builder(transactionsTable); for (TransactionInfo info : transactionManager.getAllTransactionInfos()) { table.addRow( info.getTransactionId().toString(), info.getIsolationLevel().toString(), info.isReadOnly(), info.isAutoCommitContext(), info.getCreateTime().getMillis(), (long) info.getIdleTime().getValue(TimeUnit.SECONDS), info.getWrittenConnectorId().map(ConnectorId::getCatalogName).orElse(null), createStringsBlock(info.getConnectorIds())); } return table.build().cursor(); }
Source:
public int hashCode() { if (service==null && parentService==null) { return 0; } if (service==null) { return parentService.hashCode(); } if (parentService==null) { return service.hashCode(); } return 997 * ((int)service.hashCode()) ^ 991 * ((int)parentService.hashCode()); }

Target:
public int hashCode() { if (service==null && parentService==null) { return 0; } if (service==null) { return parentService.hashCode(); } if (parentService==null) { return service.hashCode(); } return 997 * (service.hashCode()) ^ 991 * (parentService.hashCode()); }
Source:
public CPPASTLiteralExpression(int kind, char[] value, char[] numericCompilerSuffixes) { fKind = kind; fSuffix = getSuffix(kind, value, fSuffix); fLiteral = getLiteral(value, fSuffix); fNumericCompilerSuffixes = (numericCompilerSuffixes == null) ? CharArrayUtils.EMPTY : numericCompilerSuffixes; }

Target:
public CPPASTLiteralExpression(int kind, char[] value, char[] numericCompilerSuffixes) { fKind = kind; fSuffix = getSuffix(kind, value, CharArrayUtils.EMPTY); fLiteral = getLiteral(value, fSuffix); fNumericCompilerSuffixes = (numericCompilerSuffixes == null) ? CharArrayUtils.EMPTY : numericCompilerSuffixes; fStringLiteralSize = -1; }
Source:
private ComparableMethodId(@Nonnull JMethodId methodId) { this.methodId = methodId; int sum = methodId.getName().hashCode(); for (JType type : methodId.getParamTypes()) { sum ^= type.hashCode(); } hashCode = sum; }

Target:
private ComparableMethodId(@Nonnull JMethodId methodId) { this.methodId = methodId; int code = methodId.getName().hashCode(); for (JType type : methodId.getParamTypes()) { code ^= type.hashCode(); } hashCode = code; }
Source:
public void testExportWithStorageDomainName() throws Exception { setUpEntityQueryExpectations(VdcQueryType.GetAllStorageDomains, VdcQueryParametersBase.class, new String[] {}, new Object[] {}, Collections.singletonList(getStorageDomain(2))); StorageDomain storageDomain = new StorageDomain(); storageDomain.setName(NAMES[2]); doTestExport(storageDomain, false, false); }

Target:
public void testExportWithStorageDomainName() throws Exception { setUpGetEntityExpectations("Storage: name=" + NAMES[2], SearchType.StorageDomain, getStorageDomain(2)); StorageDomain storageDomain = new StorageDomain(); storageDomain.setName(NAMES[2]); doTestExport(storageDomain, false, false); }
Source:
protected void beforeSendDeviceInfo(final Context context) { try { Class.forName( "com.amazon.device.messaging.ADM" ); } catch (ClassNotFoundException e) { SwrveLogger.e(LOG_TAG, "ADM message class not found.", e); return; } try { final ADM adm = new ADM(context); String newRegistrationId = adm.getRegistrationId(); if (SwrveHelper.isNullOrEmpty(newRegistrationId)) { SwrveLogger.i(LOG_TAG, "adm.getRegistrationId() returned null. Will call adm.startRegister()."); adm.startRegister(); } else { SwrveLogger.i(LOG_TAG, "adm.getRegistrationId() returned: " + newRegistrationId); registrationId = newRegistrationId; } } catch (Throwable exp) { SwrveLogger.e(LOG_TAG, "Couldn't obtain the registration key for the device.", exp); } }

Target:
protected void beforeSendDeviceInfo(final Context context) { try { Class.forName( "com.amazon.device.messaging.ADM" ); } catch (ClassNotFoundException e) { SwrveLogger.e(LOG_TAG, "ADM message class not found.", e); return; } try { final ADM adm = new ADM(context); String newRegistrationId = adm.getRegistrationId(); if (SwrveHelper.isNullOrEmpty(newRegistrationId)) { SwrveLogger.i(LOG_TAG, "adm.getRegistrationId() returned null. Will call adm.startRegister()."); adm.startRegister(); } else { SwrveLogger.i(LOG_TAG, "adm.getRegistrationId() returned: " + newRegistrationId); registrationId = newRegistrationId; } } catch (Exception exp) { SwrveLogger.e(LOG_TAG, "Exception when trying to obtain the registration key for the device.", exp); } }
Source:
public SliceDirectSelectiveStreamReader(StreamDescriptor streamDescriptor, Optional<TupleDomainFilter> filter, Optional<Type> outputType, LocalMemoryContext newLocalMemoryContext) { this.streamDescriptor = streamDescriptor; this.filter = filter.isPresent() ? filter.get() : null; this.systemMemoryContext = newLocalMemoryContext; this.nonDeterministicFilter = this.filter != null && !this.filter.isDeterministic(); this.nullsAllowed = this.filter == null || nonDeterministicFilter || this.filter.testNull(); this.outputRequired = outputType.isPresent(); this.outputType = requireNonNull(outputType, "outputType is null").orElse(null); }

Target:
public SliceDirectSelectiveStreamReader(StreamDescriptor streamDescriptor, Optional<TupleDomainFilter> filter, Optional<Type> outputType, LocalMemoryContext newLocalMemoryContext) { this.streamDescriptor = requireNonNull(streamDescriptor, "streamDescriptor is null"); this.filter = requireNonNull(filter, "filter is null").orElse(null); this.systemMemoryContext = newLocalMemoryContext; this.nonDeterministicFilter = this.filter != null && !this.filter.isDeterministic(); this.nullsAllowed = this.filter == null || nonDeterministicFilter || this.filter.testNull(); this.outputType = requireNonNull(outputType, "outputType is null").orElse(null); this.outputRequired = outputType.isPresent(); this.isCharType = streamDescriptor.getOrcType().getOrcTypeKind() == OrcType.OrcTypeKind.CHAR; this.maxCodePointCount = streamDescriptor.getOrcType().getLength().orElse(-1); checkArgument(filter.isPresent() || outputRequired, "filter must be present if outputRequired is false"); }
Source:
public static ConnectionManagerAwareDbKvs create(DbKeyValueServiceConfig config) { return create(config, false); }

Target:
public static ConnectionManagerAwareDbKvs create(DbKeyValueServiceConfig config) { return create(config, AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC); }
Source:
public ChangeDetailX getChangeDetail(int reviewId, IProgressMonitor monitor) throws GerritException { final Change.Id id = new Change.Id(reviewId); ChangeDetailX changeDetail = execute(monitor, new Operation<ChangeDetailX>() { @Override public void execute(IProgressMonitor monitor) throws GerritException { getChangeDetailService(monitor).changeDetailX(id, this); } }); if (isVersion26OrLater(monitor)) { if (changeDetail.getApprovals() == null) { ChangeInfo changeInfo = getChangeInfo(reviewId, monitor); changeDetail.setApprovals(changeInfo.convertToApprovalDetails()); changeDetail.setApprovalTypes(changeInfo.convertToApprovalTypes()); } List<ReviewerInfo> reviewers = listReviewers(reviewId, monitor); if (!hasAllReviewers(changeDetail.getAccounts(), reviewers)) { merge(changeDetail.getAccounts(), reviewers); } } else if (changeDetail.getApprovalTypes() == null) { changeDetail.convertSubmitRecordsToApprovalTypes(getGerritConfig().getApprovalTypes()); } return changeDetail; }

Target:
public ChangeDetailX getChangeDetail(int reviewId, IProgressMonitor monitor) throws GerritException { final Change.Id id = new Change.Id(reviewId); ChangeDetailX changeDetail = execute(monitor, new Operation<ChangeDetailX>() { @Override public void execute(IProgressMonitor monitor) throws GerritException { getChangeDetailService(monitor).changeDetailX(id, this); } }); if (isVersion26OrLater(monitor)) { if (changeDetail.getApprovals() == null) { ChangeInfo changeInfo = getChangeInfo(reviewId, monitor); changeDetail.setApprovals(changeInfo.convertToApprovalDetails()); changeDetail.setApprovalTypes(changeInfo.convertToApprovalTypes()); } List<ReviewerInfo> reviewers = listReviewers(reviewId, monitor); if (!hasAllReviewers(changeDetail.getAccounts(), reviewers)) { merge(changeDetail.getAccounts(), reviewers); } } else if (changeDetail.getApprovalTypes() == null && getGerritConfig() != null) { changeDetail.convertSubmitRecordsToApprovalTypes(getGerritConfig().getApprovalTypes()); } return changeDetail; }
Source:
protected List<File> scanPaths() { final List<File> allFiles = new ArrayList<>(); for (int i = 0; i < paths.size(); i++) { final Path currentPath = paths.get(i); final List<File> pathFiles = scanPath(currentPath, i + 1); allFiles.addAll(pathFiles); } return allFiles; }

Target:
private List<File> scanPaths() { final List<File> allFiles = new ArrayList<>(); for (int i = 0; i < paths.size(); i++) { final Path currentPath = paths.get(i); final List<File> pathFiles = scanPath(currentPath, i + 1); allFiles.addAll(pathFiles); } return allFiles; }
Source:
public void actionPerformed(ActionEvent event) { try { Case.getCurrentCaseThrows().getSleuthkitCase().deleteDataSource(selectDataSource); } catch (NoCurrentCaseException | TskCoreException e) { String msg = MessageFormat.format(Bundle.ErrorDeletingDataSource_name_text(), selectDataSource); logger.log(Level.WARNING, msg, e); } }

Target:
public void actionPerformed(ActionEvent event) { try { Case.getCurrentCaseThrows().getSleuthkitCase().deleteDataSource(selectedDataSource); } catch (NoCurrentCaseException | TskCoreException e) { logger.log(Level.WARNING, "Error Deleting Data source " + selectedDataSource, e); } }
Source:
public void workingWithServers() { dashboardWorkspace.selectTabInWorspaceMenu(TabNames.SERVERS); dashboardWorkspace.selectMachine("Servers", "db"); dashboardWorkspace.clickOnAddServerButton(); dashboardWorkspace.waitAddServerDialogIsOpen(); dashboardWorkspace.enterReference("agen"); dashboardWorkspace.enterPort("8080"); dashboardWorkspace.enterProtocol("https"); dashboardWorkspace.clickOnAddDialogButton(); dashboardWorkspace.checkServerExists("agen", "8080"); clickOnSaveButton(); dashboardWorkspace.clickOnEditServerButton("agen"); dashboardWorkspace.enterReference("agent"); dashboardWorkspace.enterPort("80"); dashboardWorkspace.enterProtocol("http"); dashboardWorkspace.clickOnUpdateDialogButton(); dashboardWorkspace.checkServerExists("agent", "80"); dashboardWorkspace.clickOnDeleteServerButton("agent"); dashboardWorkspace.clickOnDeleteDialogButton(); clickOnSaveButton(); }

Target:
public void workingWithServers() { dashboardWorkspace.selectTabInWorspaceMenu(TabNames.SERVERS); dashboardWorkspace.selectMachine("Servers", "db"); dashboardWorkspace.clickOnAddServerButton(); dashboardWorkspace.waitAddServerDialogIsOpen(); dashboardWorkspace.enterReference("agen"); dashboardWorkspace.enterPort("8080"); dashboardWorkspace.enterProtocol("https"); dashboardWorkspace.clickOnAddDialogButton(); clickOnSaveButton(); dashboardWorkspace.checkServerExists("agen", "8080"); dashboardWorkspace.clickOnEditServerButton("agen"); dashboardWorkspace.enterReference("agent"); dashboardWorkspace.enterPort("80"); dashboardWorkspace.enterProtocol("http"); dashboardWorkspace.clickOnUpdateDialogButton(); dashboardWorkspace.checkServerExists("agent", "80"); dashboardWorkspace.clickOnDeleteServerButton("agent"); dashboardWorkspace.clickOnDeleteDialogButton(); clickOnSaveButton(); dashboardWorkspace.checkServerIsNotExists("agent", "80"); }
Source:
private void getNodesAndReleaseThem(int number, TopologyDescriptor descriptor, int expectedReceived, int expectedExtraNodesSize) { NodeSet ns = resourceManager.getAtMostNodes(number, descriptor, null, null); Assert.assertEquals(expectedReceived, ns.size()); Collection<Node> extra = ns.getExtraNodes(); if (expectedExtraNodesSize == 0) { Assert.assertNull(extra); } else { Assert.assertEquals(expectedExtraNodesSize, extra.size()); } resourceManager.releaseNodes(ns).getBooleanValue(); }

Target:
private void getNodesAndReleaseThem(int number, TopologyDescriptor descriptor, int expectedReceived, int expectedExtraNodesSize) { Criteria c = new Criteria(number); c.setTopology(descriptor); NodeSet ns = resourceManager.getNodes(c); Assert.assertEquals(expectedReceived, ns.size()); Collection<Node> extra = ns.getExtraNodes(); if (expectedExtraNodesSize == 0) { Assert.assertNull(extra); } else { Assert.assertEquals(expectedExtraNodesSize, extra.size()); } resourceManager.releaseNodes(ns).getBooleanValue(); }
Source:
public static String argToString(final Arguments arg) { switch (arg.getType().toLowerCase()) { case "boolean": case "void": return "null"; case "string": return capFirst(arg.getName()); case "double": case "integer": case "int": case "long": return capFirst(arg.getName()) + ".ToString()"; default: return uncapFirst(arg.getName()) + ".toString()"; } }

Target:
public static String argToString(final Arguments arg) { switch (arg.getType().toLowerCase()) { case "boolean": case "void": return "null"; case "string": return capFirst(arg.getName()); case "double": case "integer": case "int": case "long": return capFirst(arg.getName()) + ".ToString()"; default: return uncapFirst(arg.getName()) + ".ToString()"; } }
Source:
public void setCurrentRefreshRate(int newRefreshRate) { saveRefreshRate(newRefreshRate); getModelTimer().setRefreshRate(readRefreshRate()); updateController(); }

Target:
public void setCurrentRefreshRate(int newRefreshRate) { saveRefreshRate(newRefreshRate); getModelTimer().setRefreshRate(readRefreshRate()); updateTimer(); }
Source:
public void shouldNotGenerateUpdateForMultipleExistingPropertiesAndLabels() { NodeUpdates updates = NodeUpdates.forNode( nodeId, labels ) .existing( propertyKeyId1, Values.of( "Neo" ) ) .existing( propertyKeyId2, Values.of( 100L ) ) .existing( propertyKeyId3, Values.of( Values.pointValue( CoordinateReferenceSystem.WGS84, 12.3, 45.6 ) ) ) .build(); assertThat( updates.forIndexKeys( indexes, assertNoLoading() ), emptyIterable() ); }

Target:
public void shouldNotGenerateUpdateForMultipleExistingPropertiesAndLabels() { NodeUpdates updates = NodeUpdates.forNode( nodeId, labels ) .existing( propertyKeyId1, Values.of( "Neo" ) ) .existing( propertyKeyId2, Values.of( 100L ) ) .existing( propertyKeyId3, Values.pointValue( CoordinateReferenceSystem.WGS84, 12.3, 45.6 ) ) .build(); assertThat( updates.forIndexKeys( indexes, assertNoLoading() ), emptyIterable() ); }
Source:
public static Number translateStringToNumber(String val) { try { val = val.replaceAll(" ", ""); if (val.matches("\\d*\\.\\d*")) { return (float)Float.parseFloat(val); } else { return new BigInteger(val); } } catch (Exception e) { logger.info("Unable to parse int/float number from value " + val); } return 0; }

Target:
public static Number translateStringToNumber(String val) { try { val = val.replaceAll(" ", ""); if (val.matches("\\d*\\.\\d*")) { return (float)Float.parseFloat(val); } else { return new BigInteger(val); } } catch (Exception e) { logger.severe("Unable to parse int/float number from value " + val); } return 0; }
Source:
ExecutionPath addEdge(ExplodedGraph.Edge edge) { ImmutableList.Builder<JavaFileScannerContext.Location> flowBuilder = ImmutableList.builder(); flowBuilder.addAll(flow); Symbol newTrackSymbol = addFlowFromLearnedAssociations(edge, flowBuilder); Stream<Constraint> constraintStream = addFlowFromLearnedConstraints(edge, flowBuilder); boolean finished = edge.parent.edges().stream().noneMatch(this::notVisited) || constraintStream.anyMatch(terminateTraversal); return new ExecutionPath(edge, visited.add(edge), newTrackSymbol, flowBuilder.build(), finished); }

Target:
ExecutionPath addEdge(ExplodedGraph.Edge edge) { ImmutableList.Builder<JavaFileScannerContext.Location> flowBuilder = ImmutableList.builder(); flowBuilder.addAll(flow); Symbol newTrackSymbol = addFlowFromLearnedAssociations(edge, flowBuilder); Stream<Constraint> constraintStream = addFlowFromLearnedConstraints(edge, flowBuilder); return new ExecutionPath(edge, visited.add(edge), newTrackSymbol, flowBuilder.build(), visitedAllParents(edge) || constraintStream.anyMatch(terminateTraversal)); }
Source:
float getGrowthFactor(int size) { if (CURRENT_GROWTH_RATE >= MINIMUM_GROWTH_FACTOR) { float val = (float) (1 / (1 + Math.pow(Math.E, (-1) * (((double) size / MAX_SIZE) * 12.0 - 6.0)))); CURRENT_GROWTH_RATE = INITIAL_GROWTH_FACTOR - DIFF_GROWTH_FACTOR * val; } return CURRENT_GROWTH_RATE; }

Target:
float getGrowthFactor(int size) { if (currentGrowthRate >= MINIMUM_GROWTH_FACTOR) { float val = (float) (1 / (1 + Math.pow(Math.E, (-1) * (((double) size / MAX_SIZE) * 12.0 - 6.0)))); currentGrowthRate = INITIAL_GROWTH_FACTOR - DIFF_GROWTH_FACTOR * val; } return currentGrowthRate; }
Source:
public KeyValue next() throws IOException { ByteArrayOutputStream messageBuffer = new ByteArrayOutputStream(); int nextByte; while ((nextByte = mReader.read()) != DELIMITER) { if (nextByte == -1) { if (messageBuffer.size() == 0) { return null; } else { throw new EOFException( "Non-empty message without delimiter"); } } messageBuffer.write(nextByte); } return new KeyValue(this.mOffset++, messageBuffer.toByteArray()); }

Target:
public KeyValue next() throws IOException { ByteArrayOutputStream messageBuffer = new ByteArrayOutputStream(); int nextByte; while ((nextByte = mReader.read()) != mDelimiter) { if (nextByte == -1) { if (messageBuffer.size() == 0) { return null; } else { throw new EOFException( "Non-empty message without delimiter"); } } messageBuffer.write(nextByte); } return new KeyValue(this.mOffset++, messageBuffer.toByteArray()); }
Source:
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable { if (command.hasFlag(Flag.PUT_FOR_EXTERNAL_READ)) { return handleNonTxWriteCommand(ctx, command); } try { return handleTxWriteCommand(ctx, command, new SingleKeyRecipientGenerator(command.getKey()), command.hasFlag(Flag.PUT_FOR_STATE_TRANSFER)); } finally { if (ctx.isOriginLocal()) { command.setValueMatcher(command.isSuccessful() ? ValueMatcher.MATCH_ALWAYS : ValueMatcher.MATCH_NEVER); } } }

Target:
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable { if (command.hasFlag(Flag.PUT_FOR_EXTERNAL_READ)) { return handleNonTxWriteCommand(ctx, command); } try { return handleTxWriteCommand(ctx, command, command.getKey(), command.hasFlag(Flag.PUT_FOR_STATE_TRANSFER)); } finally { if (ctx.isOriginLocal()) { command.setValueMatcher(command.isSuccessful() ? ValueMatcher.MATCH_ALWAYS : ValueMatcher.MATCH_NEVER); } } }
Source:
public void setup(Context.OperatorContext context) { super.setup(context); if (basePath != null) { ((ReaderContext.FixedBytesReaderContext)this.readerContext).setLength((int)fs.getDefaultBlockSize(new Path(basePath))); } }

Target:
public void setup(Context.OperatorContext context) { super.setup(context); if (basePath != null && this.readerContext instanceof ReaderContext.FixedBytesReaderContext) { ((ReaderContext.FixedBytesReaderContext)this.readerContext).setLength((int)fs.getDefaultBlockSize(new Path(basePath))); } }
Source:
public synchronized boolean remove(Object o) { boolean removed = removeComponent(legacyInstances, o); if(extensions!=null) { List<ExtensionComponent<T>> r = new ArrayList<ExtensionComponent<T>>(extensions); removed |= removeComponent(r,o); extensions = sort(r); fireOnChangeListeners(); } return removed; }

Target:
public boolean remove(Object o) { try { return removeSync(o); } finally { if(extensions!=null) { fireOnChangeListeners(); } } }
Source:
@Override public Map<String, BatchHandler> getSupportedHandlers() { return Collections.unmodifiableMap(handlers); }

Target:
public Set<String> getSupportedHandlers() { return Collections.unmodifiableSet(handlers.keySet()); }
Source:
public static String getMissingDependenciesErrorMessage(Map<String, Collection<String>> missingDependencies) { Function<Collection<String>, String> toStringList = new Function<Collection<String>, String>() { @Override public String apply(java.util.Collection<String> from) { return Joiner.on(", ").join(from); } }; StringBuilder sb = new StringBuilder(Messages.ViewpointSelection_missingDependencies_header).append("\n"); for (Map.Entry<String, Collection<String>> entry : missingDependencies.entrySet()) { sb.append("- ").append(MessageFormat.format(Messages.ViewpointSelection_missingDependencies_requirements, entry.getKey(), toStringList.apply(entry.getValue()))).append("\n"); } return sb.toString(); }

Target:
public static String getMissingDependenciesErrorMessage(Map<String, Collection<String>> missingDependencies) { Function<Collection<String>, String> toStringList = new Function<Collection<String>, String>() { @Override public String apply(java.util.Collection<String> from) { return Joiner.on(", ").join(from); } }; StringBuilder sb = new StringBuilder(Messages.ViewpointSelection_missingDependencies_header).append("\n"); List<String> lines = Lists.newArrayList(); for (Map.Entry<String, Collection<String>> entry : missingDependencies.entrySet()) { lines.add("- " + MessageFormat.format(Messages.ViewpointSelection_missingDependencies_requirements, entry.getKey(), toStringList.apply(entry.getValue()))); } sb.append(Joiner.on("\n").join(lines)); return sb.toString(); }
Source:
public Long getSum(@Nullable Object worker) { Long sum = 0L; for (Long duration : fWorkerStats.get(worker)) { sum += duration; } return sum; }

Target:
public Long getSum(@Nullable Object worker) { long sum = 0L; synchronized (fWorkerStats) { for (long duration : fWorkerStats.get(worker)) { sum += duration; } } return sum; }
Source:
public static AdminRequest readFrom(DataInputStream stream, ClusterMap clusterMap) throws IOException { Short versionId = stream.readShort(); if (!versionId.equals(ADMIN_REQUEST_VERSION_V2)) { throw new IllegalStateException("Unrecognized version for AdminRequest: " + ADMIN_REQUEST_VERSION_V2); } int correlationId = stream.readInt(); String clientId = Utils.readIntString(stream); AdminRequestOrResponseType type = AdminRequestOrResponseType.values()[stream.readShort()]; PartitionId id = null; if (stream.readByte() == 1){ id = clusterMap.getPartitionIdFromStream(stream); } return new AdminRequest(type, id, correlationId, clientId); }

Target:
public static AdminRequest readFrom(DataInputStream stream, ClusterMap clusterMap) throws IOException { Short versionId = stream.readShort(); if (!versionId.equals(ADMIN_REQUEST_VERSION_V2)) { throw new IllegalStateException("Unrecognized version for AdminRequest: " + versionId); } int correlationId = stream.readInt(); String clientId = Utils.readIntString(stream); AdminRequestOrResponseType type = AdminRequestOrResponseType.values()[stream.readShort()]; PartitionId id = null; if (stream.readByte() == 1) { id = clusterMap.getPartitionIdFromStream(stream); } return new AdminRequest(type, id, correlationId, clientId); }
Source:
protected void setupAccessors() { Pattern pattern = Pattern.compile(ConfigProperties.OAUTH_CONSUMER_REGEX); Matcher matcher; for (String key : this.config.getKeys()) { matcher = pattern.matcher(key); if (matcher.matches() && matcher.groupCount() >= 1) { String consumer = matcher.group(1); String secret = this.config.getProperty(key); OAuthAccessor accessor = new OAuthAccessor(new OAuthConsumer("", consumer, secret, null)); log.debug(String.format("Creating OAuth consumer \"%s\"", consumer)); this.accessors.put(consumer, accessor); } } }

Target:
protected void setupAccessors() { Pattern pattern = Pattern.compile(ConfigProperties.OAUTH_CONSUMER_REGEX); Matcher matcher; for (String key : this.config.getKeys()) { matcher = pattern.matcher(key); if (matcher.matches() && matcher.groupCount() >= 1) { String consumer = matcher.group(1); String secret = this.config.getProperty(key); OAuthAccessor accessor = new OAuthAccessor(new OAuthConsumer("", consumer, secret, null)); log.debug(String.format("Creating OAuth consumer \"%s\"", consumer)); this.accessors.put(consumer, accessor); } } if (this.accessors.size() < 1) { log.warn("OAuth is enabled, but no OAuth consumers are defined."); } }
Source:
public static void broadcastEvictAll(AdvancedCache cache) { final RpcManager rpcManager = cache.getRpcManager(); if ( rpcManager != null ) { final EvictAllCommand cmd = new EvictAllCommand(ByteString.fromString(cache.getName())); final RpcOptions options = isSynchronousCache(cache) ? rpcManager.getSyncRpcOptions() : new RpcOptions(DeliverOrder.PER_SENDER, cache.getCacheConfiguration().clustering().remoteTimeout(), TimeUnit.MILLISECONDS); CompletionStages.join(rpcManager.invokeCommandOnAll(cmd, VoidResponseCollector.validOnly(), options)); } }

Target:
public static void broadcastEvictAll(AdvancedCache cache) { final RpcManager rpcManager = cache.getRpcManager(); if (rpcManager != null) { final EvictAllCommand cmd = new EvictAllCommand(ByteString.fromString(cache.getName())); if (isSynchronousCache(cache)) { rpcManager.blocking(rpcManager.invokeCommandOnAll(cmd, VoidResponseCollector.validOnly(), rpcManager.getSyncRpcOptions())); } else { rpcManager.sendToAll(cmd, DeliverOrder.PER_SENDER); } } }
Source:
void unassignTask(DatastreamTask task) { boolean taskPresent = _tasks.remove(task); if (taskPresent) { shutdownProducer(); } }

Target:
void unassignTask(DatastreamTask task) { unassignTasks(Collections.singletonList(task)); }
Source:
protected void verifyColumn(Type columnType, Map<String, ElementValue> elements) { if (verifyColumnType(columnType) && !elements.containsKey("length")) { BugInstance bug = new BugInstance(this, "IMPLICIT_LENGTH", HIGH_PRIORITY); if (visitingMethod()) { bug.addMethod(this); } getBugReporter().reportBug(bug); } }

Target:
protected void verifyColumn(Type columnType, Map<String, ElementValue> elements) { if (! isTarget(columnType)) { return; } if (! elements.containsKey("length")) { BugInstance bug = new BugInstance(this, "IMPLICIT_LENGTH", HIGH_PRIORITY); if (visitingMethod()) { bug.addMethod(this); } getBugReporter().reportBug(bug); } else { ElementValue value = elements.get("length"); int lengthValue = Integer.parseInt(value.stringifyValue()); if (lengthValue <= 0) { reportIllegalLength(lengthValue); } else if (MAX_LENGTH_OF_VARCHAR < lengthValue && !isVisitingLob()) { reportIllegalLength(lengthValue); } } }
Source:
private static boolean processClass(String name, byte[] bytes) { if (! args.coreLibrary) { checkClassName(name); } if (args.parallelParse) { Future<DirectClassFile> dcff = classParserPool.submit( new ClassParserTask(name, bytes)); Future<Boolean> cdiStatus = directClassFileConsumer.submit( new DirectClassFileConsumer(name, bytes, dcff)); } else { try { new DirectClassFileConsumer(name, bytes, null).call( new ClassParserTask(name, bytes).call()); } catch(Exception ex) { throw new RuntimeException("Exception parsing classes", ex); } } return true; }

Target:
private static boolean processClass(String name, byte[] bytes) { if (! args.coreLibrary) { checkClassName(name); } try { new DirectClassFileConsumer(name, bytes, null).call( new ClassParserTask(name, bytes).call()); } catch(Exception ex) { throw new RuntimeException("Exception parsing classes", ex); } return true; }
Source:
public static void verifyAggregations( List<AggregatorFactory> aggFactories, List<PostAggregator> postAggs ) { Preconditions.checkNotNull(aggFactories, "aggregations cannot be null"); Preconditions.checkArgument(aggFactories.size() > 0, "Must have at least one AggregatorFactory"); if (postAggs != null && !postAggs.isEmpty()) { Set<String> combinedAggNames = Sets.newHashSet( Lists.transform( aggFactories, new Function<AggregatorFactory, String>() { @Override public String apply(AggregatorFactory input) { return input.getName(); } } ) ); for (PostAggregator postAgg : postAggs) { Set<String> dependencies = postAgg.getDependentFields(); Set<String> missing = Sets.difference(dependencies, combinedAggNames); Preconditions.checkArgument( missing.isEmpty(), "Missing fields [%s] for postAggregator [%s]", missing, postAgg.getName() ); combinedAggNames.add(postAgg.getName()); } final Collection<String> aggAndPostAgg = Sets.intersection( Sets.<String>newHashSet( Collections2.transform( aggFactories, new Function<AggregatorFactory, String>() { @Override public String apply(AggregatorFactory input) { return input.getName(); } } ) ), Sets.<String>newHashSet( Collections2.transform( postAggs, new Function<PostAggregator, String>() { @Override public String apply(PostAggregator input) { return input.getName(); } } ) ) ); Preconditions.checkArgument( aggAndPostAgg.isEmpty(), "%s cannot be both aggregators and post aggregators", Arrays.toString(aggAndPostAgg.toArray()) ); } }

Target:
public static void verifyAggregations( List<AggregatorFactory> aggFactories, List<PostAggregator> postAggs ) { Preconditions.checkNotNull(aggFactories, "aggregations cannot be null"); Preconditions.checkArgument(aggFactories.size() > 0, "Must have at least one AggregatorFactory"); final Set<String> aggNames = Sets.newHashSet(); for (AggregatorFactory aggFactory : aggFactories) { Preconditions.checkArgument(aggNames.add(aggFactory.getName()), "[%s] already defined", aggFactory.getName()); } if (postAggs != null && !postAggs.isEmpty()) { final Set<String> combinedAggNames = Sets.newHashSet(aggNames); for (PostAggregator postAgg : postAggs) { final Set<String> dependencies = postAgg.getDependentFields(); final Set<String> missing = Sets.difference(dependencies, combinedAggNames); Preconditions.checkArgument( missing.isEmpty(), "Missing fields [%s] for postAggregator [%s]", missing, postAgg.getName() ); Preconditions.checkArgument(combinedAggNames.add(postAgg.getName()), "[%s] already defined"); } } }
Source:
public final <T> Set<ConstraintViolation<T>> validate(T object, Class<?>... groups) { Contracts.assertNotNull( object, MESSAGES.validatedObjectMustNotBeNull() ); sanityCheckGroups( groups ); BaseBeanValidationContext<T> validationContext = getValidationContextBuilder().forValidate( object ); if ( !validationContext.getRootBeanMetaData().hasConstraints() ) { return Collections.emptySet(); } ValidationOrder validationOrder = determineGroupValidationOrder( groups ); BeanValueContext<?, Object> valueContext = ValueContexts.getLocalExecutionContextForBean( validatorScopedContext.getParameterNameProvider(), object, validationContext.getRootBeanMetaData(), validationContext.getRootBeanMetaData(), PathImpl.createRootPath() ); return validateInContext( validationContext, valueContext, validationOrder ); }

Target:
public final <T> Set<ConstraintViolation<T>> validate(T object, Class<?>... groups) { Contracts.assertNotNull( object, MESSAGES.validatedObjectMustNotBeNull() ); sanityCheckGroups( groups ); BaseBeanValidationContext<T> validationContext = getValidationContextBuilder().forValidate( object ); if ( !validationContext.getRootBeanMetaData().hasConstraints() ) { return Collections.emptySet(); } ValidationOrder validationOrder = determineGroupValidationOrder( groups ); BeanValueContext<?, Object> valueContext = ValueContexts.getLocalExecutionContextForBean( validatorScopedContext.getParameterNameProvider(), object, validationContext.getRootBeanMetaData(), PathImpl.createRootPath() ); return validateInContext( validationContext, valueContext, validationOrder ); }
Source:
public Observable<List<ShippingRate>> getShippingRates(final String checkoutToken) { if (checkoutToken == null) { throw new NullPointerException("checkoutToken cannot be null"); } int[] successCodes = {HTTP_OK}; return retrofitService .getShippingRates(checkoutToken) .retryWhen(networkRetryPolicyProvider.provide()) .doOnNext(new RetrofitSuccessHttpStatusCodeHandler<>(successCodes)) .retryWhen(pollingRetryPolicyProvider.provide()) .compose(new UnwrapRetrofitBodyTransformer<ShippingRatesWrapper, List<ShippingRate>>()) .observeOn(callbackScheduler) .doOnError(new Action1<Throwable>() { @Override public void call(Throwable throwable) { System.out.println(throwable); } }); }

Target:
public Observable<List<ShippingRate>> getShippingRates(final String checkoutToken) { if (checkoutToken == null) { throw new NullPointerException("checkoutToken cannot be null"); } int[] successCodes = {HTTP_OK}; return retrofitService .getShippingRates(checkoutToken) .retryWhen(networkRetryPolicyProvider.provide()) .doOnNext(new RetrofitSuccessHttpStatusCodeHandler<>(successCodes)) .retryWhen(pollingRetryPolicyProvider.provide()) .compose(new UnwrapRetrofitBodyTransformer<ShippingRatesWrapper, List<ShippingRate>>()) .observeOn(callbackScheduler); }
Source:
PagedFluxBase<SuggestResult, SuggestPagedResponse> suggest(String searchText, String suggesterName, SuggestOptions suggestOptions, RequestOptions requestOptions, Context context) { SuggestRequest suggestRequest = this.createSuggestRequest(searchText, suggesterName, SuggestOptionsHandler.ensureSuggestOptions(suggestOptions)); return new PagedFluxBase<>( () -> this.suggestFirst(requestOptions, suggestRequest, context), nextLink -> Mono.empty()); }

Target:
PagedFluxBase<SuggestResult, SuggestPagedResponse> suggest(String searchText, String suggesterName, SuggestOptions suggestOptions, RequestOptions requestOptions, Context context) { SuggestRequest suggestRequest = this.createSuggestRequest(searchText, suggesterName, SuggestOptionsHandler.ensureSuggestOptions(suggestOptions)); return new PagedFluxBase<>( () -> this.suggestFirst(requestOptions, suggestRequest, context)); }
Source:
public String getViewLabelPrefix() { if (!fType.equals(XmlAnalysisModuleType.PATTERN)) { return TmfXmlStrings.EMPTY_STRING; } String viewLabel = TmfXmlStrings.EMPTY_STRING; List<Element> head = TmfXmlUtils.getChildElements(fSourceElement, TmfXmlStrings.HEAD); if (head.size() == 1) { List<Element> labels = TmfXmlUtils.getChildElements(head.get(0), TmfXmlStrings.VIEW_LABEL_PREFIX); if (!labels.isEmpty()) { viewLabel = labels.get(0).getAttribute(TmfXmlStrings.VALUE); } } return viewLabel; }

Target:
public String getViewLabelPrefix() { if (!fType.equals(XmlAnalysisModuleType.PATTERN)) { return null; } String viewLabel = TmfXmlStrings.EMPTY_STRING; List<Element> head = TmfXmlUtils.getChildElements(fSourceElement, TmfXmlStrings.HEAD); if (head.size() == 1) { List<Element> labels = TmfXmlUtils.getChildElements(head.get(0), TmfXmlStrings.VIEW_LABEL_PREFIX); if (!labels.isEmpty()) { viewLabel = labels.get(0).getAttribute(TmfXmlStrings.VALUE); } } return viewLabel.equals(TmfXmlStrings.EMPTY_STRING) ? null : viewLabel; }
Source:
public List<IntegrityMessage> check(BibDatabase database) { ObservableList<BibEntry> bibEntries = database.getEntries(); BiMap<DOI, List<BibEntry>> duplicateMap = HashBiMap.create(bibEntries.size()); for (BibEntry bibEntry : bibEntries) { bibEntry.getDOI().ifPresent(doi -> duplicateMap.computeIfAbsent(doi, absentDoi -> new ArrayList<>()).add(bibEntry)); } return duplicateMap.inverse().keySet().stream() .filter(list -> list.size() > 1) .flatMap(list -> list.stream()) .map(item -> new IntegrityMessage(Localization.lang("Unique DOI used in multiple entries"), item, StandardField.DOI)) .collect(Collectors.toList()); }

Target:
public List<IntegrityMessage> check(BibDatabase database) { ObservableList<BibEntry> bibEntries = database.getEntries(); BiMap<DOI, List<BibEntry>> duplicateMap = HashBiMap.create(bibEntries.size()); for (BibEntry bibEntry : bibEntries) { bibEntry.getDOI().ifPresent(doi -> duplicateMap.computeIfAbsent(doi, absentDoi -> new ArrayList<>()).add(bibEntry)); } return duplicateMap.inverse().keySet().stream() .filter(list -> list.size() > 1) .flatMap(list -> list.stream()) .map(item -> new IntegrityMessage(Localization.lang("Same DOI used in multiple entries"), item, StandardField.DOI)) .collect(Collectors.toList()); }
Source:
public void testBuildWithWorkflowProjects() throws Exception { Project<?, ?> masterProject = createFreeStyleProject("project"); WorkflowJob workflowProject = (WorkflowJob) Jenkins.getInstance().createProject(WorkflowJob.class, "workflowproject"); workflowProject.setDefinition(new CpsFlowDefinition("node { echo myParam; }")); String projectToTrigger = "subproject1, workflowproject"; List<AbstractBuildParameters> buildParameters = new ArrayList<AbstractBuildParameters>(); buildParameters.add(new CurrentBuildParameters()); PredefinedBuildParameters customParams = new PredefinedBuildParameters("myParam=GOOBER"); buildParameters.add(customParams); BlockingBehaviour neverFail = new BlockingBehaviour("never", "never", "never"); BlockableBuildTriggerConfig masterConfig = new BlockableBuildTriggerConfig(projectToTrigger, neverFail, buildParameters); addParameterizedTrigger(masterProject, masterConfig); Project subProject1 = createFreeStyleProject("subproject1"); subProject1.setQuietPeriod(0); masterProject.scheduleBuild2(0, new Cause.UserCause()).get(); assertEquals(1, workflowProject.getBuilds().size()); assertEquals(1, subProject1.getBuilds().size()); WorkflowRun workflowRun = workflowProject.getBuilds().get(0); assertEquals(Result.SUCCESS.ordinal, workflowRun.getResult().ordinal); assertTrue("Parameter was not passed correctly to workflow job!", workflowRun.getLog(100).contains("GOOBER")); }

Target:
public void testBuildWithWorkflowProjects() throws Exception { Project<?, ?> masterProject = createFreeStyleProject("project"); WorkflowJob workflowProject = Jenkins.getInstance().createProject(WorkflowJob.class, "workflowproject"); workflowProject.setDefinition(new CpsFlowDefinition("node { echo myParam; }")); String projectToTrigger = "subproject1, workflowproject"; List<AbstractBuildParameters> buildParameters = new ArrayList<AbstractBuildParameters>(); buildParameters.add(new CurrentBuildParameters()); PredefinedBuildParameters customParams = new PredefinedBuildParameters("myParam=GOOBER"); buildParameters.add(customParams); BlockingBehaviour neverFail = new BlockingBehaviour("never", "never", "never"); BlockableBuildTriggerConfig masterConfig = new BlockableBuildTriggerConfig(projectToTrigger, neverFail, buildParameters); addParameterizedTrigger(masterProject, masterConfig); Project subProject1 = createFreeStyleProject("subproject1"); subProject1.setQuietPeriod(0); masterProject.scheduleBuild2(0, new Cause.UserCause()).get(); assertEquals(1, workflowProject.getBuilds().size()); assertEquals(1, subProject1.getBuilds().size()); WorkflowRun workflowRun = workflowProject.getBuilds().get(0); assertBuildStatusSuccess(workflowRun); assertLogContains("GOOBER", workflowRun); }
Source:
public Task<Status> signOut() { final TaskCompletionSource<Status> statusTask = new TaskCompletionSource<>(); getConnectedApiTask().addOnSuccessListener(new OnSuccessListener<Bundle>() { @Override public void onSuccess(Bundle bundle) { Auth.GoogleSignInApi.signOut(mClient) .setResultCallback(new TaskResultCaptor<>(statusTask)); } }); return statusTask.getTask(); }

Target:
public Task<Status> signOut() { final TaskCompletionSource<Status> statusTask = new TaskCompletionSource<>(); getConnectedApiTask().addOnCompleteListener(new ExceptionForwarder<>( statusTask, new OnSuccessListener<Bundle>() { @Override public void onSuccess(Bundle status) { Auth.GoogleSignInApi.signOut(mClient) .setResultCallback(new TaskResultCaptor<>(statusTask)); } })); return statusTask.getTask(); }
Source:
static InternationalFixedDate ofYearDay(final int prolepticYear, final int dayOfYear) { InternationalFixedChronology.YEAR_RANGE.checkValidValue(prolepticYear, ChronoField.YEAR_OF_ERA); InternationalFixedChronology.DAY_OF_YEAR_RANGE.checkValidValue(dayOfYear, ChronoField.DAY_OF_YEAR); if (dayOfYear == InternationalFixedChronology.DAYS_IN_YEAR + 1 && !InternationalFixedChronology.INSTANCE.isLeapYear(prolepticYear)) { throw new DateTimeException("Invalid Year Day: " + prolepticYear + '/' + dayOfYear); } return new InternationalFixedDate(prolepticYear, dayOfYear); }

Target:
static InternationalFixedDate ofYearDay(final int prolepticYear, final int dayOfYear) { YEAR_RANGE.checkValidValue(prolepticYear, ChronoField.YEAR_OF_ERA); ChronoField.DAY_OF_YEAR.checkValidValue(dayOfYear); if (dayOfYear == DAYS_IN_YEAR + 1 && !INSTANCE.isLeapYear(prolepticYear)) { throw new DateTimeException("Invalid date 'DayOfYear 366' as '" + prolepticYear + "' is not a leap year"); } boolean isLeapYear = INSTANCE.isLeapYear(prolepticYear); boolean isYearDay = dayOfYear == DAYS_IN_YEAR + (isLeapYear ? 1 : 0); boolean isLeapDay = isLeapYear && dayOfYear == LEAP_DAY_AS_DAY_OF_YEAR; int doy = isLeapYear && dayOfYear > LEAP_DAY_AS_DAY_OF_YEAR ? dayOfYear - 1 : dayOfYear; int month = isYearDay ? 0 : isLeapDay ? -1 : 1 + ((doy - 1) / DAYS_IN_MONTH); int day = isYearDay ? 0 : isLeapDay ? -1 : 1 + ((doy - 1) % DAYS_IN_MONTH); return new InternationalFixedDate(prolepticYear, month, day); }
Source:
@Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, String arg) throws IgniteException { return Collections.singletonMap(new Job(arg), subgrid.stream().filter(ClusterNode::isLocal).findFirst().get()); }

Target:
@Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, String arg) throws IgniteException { return Collections.singletonMap(new Job(arg), F.find(subgrid, null, (IgnitePredicate<? super ClusterNode>)ClusterNode::isLocal)); }