auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void setStrokeUom(Uom u) { if (pointSymbolizer == null) { System.out.println("Null pointSymbolizer"); } if(ps != null){ MarkGraphic mg = (MarkGraphic) pointSymbolizer.getGraphicCollection().getChildren().get(0); mg.getStroke().setUom(u); } else { System.out.println("Null ps. Trying another solution."); Stroke stroke = ((MarkGraphic) pointSymbolizer.getGraphicCollection().getGraphic(0)).getStroke(); if (stroke != null){ stroke.setUom(u); } else { System.out.println("Null stroke"); } } }

Target:
public void setStrokeUom(Uom u) { if(ps != null) { MarkGraphic mg = (MarkGraphic) pointSymbolizer.getGraphicCollection().getChildren().get(0); mg.getStroke().setUom(u); } else { LOGGER.error("Cannot set the stroke UOM because the ps is null."); } }
Source:
public CurrencyAmount recovery01( ResolvedCds cds, CreditRatesProvider ratesProvider, LocalDate referenceDate, ReferenceData refData) { ArgChecker.notNull(cds, "cds"); ArgChecker.notNull(ratesProvider, "ratesProvider"); ArgChecker.notNull(referenceDate, "referenceDate"); ArgChecker.notNull(refData, "refData"); if (!cds.getProtectionEndDate().isAfter(ratesProvider.getValuationDate())) { return CurrencyAmount.of(cds.getCurrency(), 0d); } LocalDate stepinDate = cds.getStepinDateOffset().adjust(ratesProvider.getValuationDate(), refData); LocalDate effectiveStartDate = cds.getEffectiveStartDate(stepinDate); recoveryRate(cds, ratesProvider); Pair<CreditDiscountFactors, LegalEntitySurvivalProbabilities> rates = reduceDiscountFactors(cds, ratesProvider); double protectionFull = protectionFull(cds, rates.getFirst(), rates.getSecond(), referenceDate, effectiveStartDate); return CurrencyAmount.of(cds.getCurrency(), -cds.getBuySell().normalize(cds.getNotional()) * protectionFull); }

Target:
public CurrencyAmount recovery01( ResolvedCds cds, CreditRatesProvider ratesProvider, LocalDate referenceDate, ReferenceData refData) { if (isExpired(cds, ratesProvider)) { return CurrencyAmount.of(cds.getCurrency(), 0d); } LocalDate stepinDate = cds.getStepinDateOffset().adjust(ratesProvider.getValuationDate(), refData); LocalDate effectiveStartDate = cds.calculateEffectiveStartDate(stepinDate); validateRecoveryRates(cds, ratesProvider); Pair<CreditDiscountFactors, LegalEntitySurvivalProbabilities> rates = reduceDiscountFactors(cds, ratesProvider); double protectionFull = protectionFull(cds, rates.getFirst(), rates.getSecond(), referenceDate, effectiveStartDate); return CurrencyAmount.of(cds.getCurrency(), -cds.getBuySell().normalize(cds.getNotional()) * protectionFull); }
Source:
public void verifyEvolveHoppedInSlot(String slotName, String nextProviderSrc) { String nextProviderSlotCSS = String.format("div[id*=\'%s/%s\']", nextProviderSrc, slotName); Assertion.assertTrue(checkIfElementOnPage(nextProviderSlotCSS)); PageObjectLogging.log("Evolve", "Evolve hopped to " + nextProviderSrc, true); }

Target:
public void verifyEvolveHoppedInSlot(String slotName, String nextProviderSrc) { String nextProviderSlotCss = String.format("div[id*=\'%s/%s\']", nextProviderSrc, slotName); Assertion.assertTrue(checkIfElementOnPage(nextProviderSlotCss)); PageObjectLogging.log("Evolve", "Evolve hopped to " + nextProviderSrc, true); }
Source:
private void generateNewJobModel() { List<String> currentProcessors = zkUtils.getSortedActiveProcessors(); String currentJMVersion = zkUtils.getJobModelVersion(); String nextJMVersion; if (currentJMVersion == null) nextJMVersion = "1"; else nextJMVersion = Integer.toString(Integer.valueOf(currentJMVersion) + 1); log.info("pid=" + processorId + "generating new model. Version = " + nextJMVersion); StringBuilder sb = new StringBuilder(); List<Integer> containerIds = new ArrayList<>(); for (String processor : currentProcessors) { String zkProcessorId = keyBuilder.parseIdFromPath(processor); sb.append(zkProcessorId).append(","); containerIds.add(Integer.valueOf(zkProcessorId)); } log.info("generate new job model: processorsIds: " + sb.toString()); jobModelManager = JobModelManager$.MODULE$.getJobCoordinator(this.config, null, null, streamMetadataCache, null, containerIds); JobModel jobModel = jobModelManager.jobModel(); log.info("pid=" + processorId + "Generated jobModel: " + jobModel); zkUtils.publishJobModel(nextJMVersion, jobModel); log.info("pid=" + processorId + "published new JobModel ver=" + nextJMVersion + ";jm=" + jobModel); barrier.start(nextJMVersion, currentProcessors); zkUtils.publishJobModelVersion(currentJMVersion, nextJMVersion); log.info("pid=" + processorId + "published new JobModel ver=" + nextJMVersion); }

Target:
private void generateNewJobModel() { List<String> currentProcessors = zkUtils.getSortedActiveProcessors(); String currentJMVersion = zkUtils.getJobModelVersion(); String nextJMVersion; if (currentJMVersion == null) { log.info("pid=" + processorId + "generating first version of the model"); nextJMVersion = "1"; } else { nextJMVersion = Integer.toString(Integer.valueOf(currentJMVersion) + 1); } log.info("pid=" + processorId + "generating new model. Version = " + nextJMVersion); StringBuilder sb = new StringBuilder(); List<Integer> containerIds = new ArrayList<>(); for (String processor : currentProcessors) { String zkProcessorId = keyBuilder.parseIdFromPath(processor); sb.append(zkProcessorId).append(","); containerIds.add(Integer.valueOf(zkProcessorId)); } log.info("generate new job model: processorsIds: " + sb.toString()); jobModelManager = JobModelManager$.MODULE$.getJobCoordinator(this.config, null, null, streamMetadataCache, null, containerIds); JobModel jobModel = jobModelManager.jobModel(); log.info("pid=" + processorId + "Generated jobModel: " + jobModel); zkUtils.publishJobModel(nextJMVersion, jobModel); log.info("pid=" + processorId + "published new JobModel ver=" + nextJMVersion + ";jm=" + jobModel); barrier.start(nextJMVersion, currentProcessors); zkUtils.publishJobModelVersion(currentJMVersion, nextJMVersion); log.info("pid=" + processorId + "published new JobModel ver=" + nextJMVersion); }
Source:
public void updateMemoryUsage(long deltaUserMemoryInBytes, long deltaTotalMemoryInBytes) { long currentUserMemoryValue = currentUserMemory.addAndGet(deltaUserMemoryInBytes); long currentTotalMemoryValue = currentTotalMemory.addAndGet(deltaTotalMemoryInBytes); peakUserMemory.updateAndGet(currentPeakValue -> Math.max(currentUserMemoryValue, currentPeakValue)); peakTotalMemory.updateAndGet(currentPeakValue -> Math.max(currentTotalMemoryValue, currentPeakValue)); }

Target:
public void updateMemoryUsage(long deltaUserMemoryInBytes, long deltaTotalMemoryInBytes) { currentUserMemory.addAndGet(deltaUserMemoryInBytes); currentTotalMemory.addAndGet(deltaTotalMemoryInBytes); peakUserMemory.updateAndGet(currentPeakValue -> Math.max(currentUserMemory.get(), currentPeakValue)); peakTotalMemory.updateAndGet(currentPeakValue -> Math.max(currentTotalMemory.get(), currentPeakValue)); }
Source:
public void registerAllMenuMusic() { Set<ResourceUrn> configUrnList = Assets.getAssetHelper().list(Json.class, "[a-zA-Z]*:musicConfig"); for (ResourceUrn configUrn : configUrnList) { String urn = configUrn.toString(); Json musicJson = Assets.getJson(urn); JSONObject musicNode = musicJson.getJsonValue(); for (Object o : musicNode.getJSONArray("menuMusic")) { if (!(o instanceof String)) break; String music = (String) o; registerMusic(MENU_MUSIC_SET, urn.split(":")[0] + ":" + music); } } }

Target:
public void registerAllMenuMusic() { Set<ResourceUrn> configUrnList = Assets.getAssetHelper().list(Json.class, "[a-zA-Z]*:musicConfig"); for (ResourceUrn configUrn : configUrnList) { String urnString = configUrn.toString(); Json musicJson = Assets.getJson(urnString); JSONObject musicNode = musicJson.getJsonValue(); for (Object musicFileName : musicNode.getJSONArray("menuMusic")) { if (!(musicFileName instanceof String)) break; String music = (String) musicFileName; registerMusic(MENU_MUSIC_SET, urnString.split(":")[0] + ":" + music); } } }
Source:
public boolean initialize() { return initHelper(rootFile); }

Target:
public void initialize() throws IllegalStateException { initChildEntries(rootFile); serializer.store(rootFile.getName(), rootFile); }
Source:
private ClusterNetworkModel getGlusterNetwork() { if (!isMultiCluster()) { for (ClusterNetworkModel clusterNetworkManageModel : getItems()) { if (clusterNetworkManageModel.isGlusterNetwork()) { return clusterNetworkManageModel; } } } return null; }

Target:
private ClusterNetworkModel getGlusterNetwork() { return glusterNetwork; }
Source:
private String modelToString(Model model, RDFFormat format, Context context) { ByteArrayOutputStream o = new ByteArrayOutputStream(); RDFWriter.create().source(baseTestData).format(format).base(base).context(context).output(o); String result = Bytes.bytes2string(o.toByteArray()); return result; }

Target:
private String modelToString(Model model, RDFFormat format, Context context) { try(ByteArrayOutputStream o = new ByteArrayOutputStream()) { RDFWriter.create().source(baseTestData).format(format).base(base).context(context).output(o); String result = Bytes.bytes2string(o.toByteArray()); return result; } catch (IOException ex) { IO.exception(ex); return null;} }
Source:
public boolean asBoolean() { if (length != 1) notBoolean(); return bytes[offset] == 'Y'; }

Target:
public boolean asBoolean() { if (length != 1) notBoolean(); return bytes[offset] == YES; }
Source:
public void testOldXSDNaming() { testOldXSDNaming.expectMessage(Matchers.containsString("Found v5 XSD: '<LINK_1>'. Expected v6 XSD: '<LINK_0>'")); testOldXSDNaming.expect(MappingException.class); DozerBeanMapper mapper = new DozerBeanMapper(Arrays.asList("non-strict/v5-xsd.xml")); mapper.getMappingMetadata(); }

Target:
public void testOldXSDNaming() { testOldXSDNaming.expectMessage(Matchers.containsString(message)); testOldXSDNaming.expect(MappingException.class); DozerBeanMapper mapper = new DozerBeanMapper(Arrays.asList("non-strict/v5-xsd.xml")); mapper.getMappingMetadata(); }
Source:
public boolean apply(String serverId) { checkNotNull(serverId, "serverId"); logger.trace("looking for state on Server %s", serverId); final Server server = api.getServer(serverId); if (server == null) { throw new IllegalStateException(MessageFormat.format("Server {0} is not found", serverId)); } return server.guest().vmTools().runningStatus().equals(VmTools.RunningStatus.RUNNING); }

Target:
public boolean apply(String serverId) { checkNotNull(serverId, "serverId"); logger.trace("looking for state on Server %s", serverId); final Server server = api.getServer(serverId); if (server == null) { throw new IllegalStateException(MessageFormat.format("Server {0} is not found", serverId)); } final VmTools vmTools = server.guest().vmTools(); return vmTools != null && vmTools.runningStatus().equals(VmTools.RunningStatus.RUNNING); }
Source:
private void processDirective(final Gff3Directive directive, final Object decodedResult) { switch (directive) { case VERSION3_DIRECTIVE: break; case SEQUENCE_REGION_DIRECTIVE: final SequenceRegion newRegion = (SequenceRegion) decodedResult; if (sequenceRegionMap.containsKey(newRegion.getContig())) { throw new TribbleException("directive for sequence-region " + newRegion.getContig() + " included more than once."); } sequenceRegionMap.put(newRegion.getContig(), newRegion); break; case FLUSH_DIRECTIVE: prepareToFlushFeatures(); break; case FASTA_DIRECTIVE: reachedFasta = true; break; default: throw new IllegalArgumentException( "directive " + directive + " not handled by parser."); } }

Target:
private void processDirective(final Gff3Directive directive, final Object decodedResult) { switch (directive) { case VERSION3_DIRECTIVE: break; case SEQUENCE_REGION_DIRECTIVE: final SequenceRegion newRegion = (SequenceRegion) decodedResult; if (sequenceRegionMap.containsKey(newRegion.getContig())) { throw new TribbleException("directive for sequence-region " + newRegion.getContig() + " included more than once."); } sequenceRegionMap.put(newRegion.getContig(), newRegion); break; case FLUSH_DIRECTIVE: prepareToFlushFeatures(); break; case FASTA_DIRECTIVE: reachedFasta = true; break; default: throw new IllegalArgumentException( "Directive " + directive + " has been added to Gff3Directive, but is not being handled by Gff3Codec::processDirective. This is a BUG."); } }
Source:
public @Nullable String getRemoteBranchName() { return remoteBranchName; }

Target:
public String getRemoteBranchName() { return remoteBranchName; }
Source:
protected void initChannel(SocketChannel channel) throws Exception { channel.attr(Message.CODEC_REGISTRY_ATTRIBUTE_KEY).set(codecRegistry); ChannelPipeline pipeline = channel.pipeline(); if (sslOptions != null) { InetSocketAddress addr = new InetSocketAddress(connection.address.getAddress(), connection.address.getPort()); pipeline.addLast("ssl", sslOptions.newSSLHandler(channel, addr)); } pipeline.addLast("frameDecoder", new Frame.Decoder()); pipeline.addLast("frameEncoder", frameEncoder); if (compressor != null) { pipeline.addLast("frameDecompressor", new Frame.Decompressor(compressor)); pipeline.addLast("frameCompressor", new Frame.Compressor(compressor)); } pipeline.addLast("messageDecoder", messageDecoder); pipeline.addLast("messageEncoder", messageEncoderFor(protocolVersion)); pipeline.addLast("idleStateHandler", idleStateHandler); pipeline.addLast("dispatcher", connection.dispatcher); nettyOptions.afterChannelInitialized(channel); }

Target:
protected void initChannel(SocketChannel channel) throws Exception { channel.attr(Message.CODEC_REGISTRY_ATTRIBUTE_KEY).set(codecRegistry); ChannelPipeline pipeline = channel.pipeline(); if (sslOptions != null) { if (sslOptions instanceof AddressAwareSSLOptions) { pipeline.addLast("ssl", ((AddressAwareSSLOptions)sslOptions).newSSLHandler(channel, connection.address)); } else { pipeline.addLast("ssl", sslOptions.newSSLHandler(channel)); } } pipeline.addLast("frameDecoder", new Frame.Decoder()); pipeline.addLast("frameEncoder", frameEncoder); if (compressor != null) { pipeline.addLast("frameDecompressor", new Frame.Decompressor(compressor)); pipeline.addLast("frameCompressor", new Frame.Compressor(compressor)); } pipeline.addLast("messageDecoder", messageDecoder); pipeline.addLast("messageEncoder", messageEncoderFor(protocolVersion)); pipeline.addLast("idleStateHandler", idleStateHandler); pipeline.addLast("dispatcher", connection.dispatcher); nettyOptions.afterChannelInitialized(channel); }
Source:
public Response getConfigStatus(@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) String language, @PathParam("thingUID") @ApiParam(value = "thing") String thingUID) throws IOException { ThingUID thingUIDObject = new ThingUID(thingUID); Thing thing = thingRegistry.get(thingUIDObject); if (null == thing) { logger.info("Received HTTP PUT request for thing config status at '{}' for the unknown thing '{}'.", uriInfo.getPath(), thingUID); return getThingNotFoundResponse(thingUID); } ConfigStatusInfo info = configStatusService.getConfigStatus(thingUID, LocaleUtil.getLocale(language)); if (info != null) { return Response.ok().entity(info.getConfigStatusMessages()).build(); } return Response.ok().entity(Collections.EMPTY_SET).build(); }

Target:
public Response getConfigStatus(@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) String language, @PathParam("thingUID") @ApiParam(value = "thing") String thingUID) throws IOException { ThingUID thingUIDObject = new ThingUID(thingUID); Thing thing = thingRegistry.get(thingUIDObject); if (null == thing) { logger.info("Received HTTP GET request for thing config status at '{}' for the unknown thing '{}'.", uriInfo.getPath(), thingUID); return getThingNotFoundResponse(thingUID); } ConfigStatusInfo info = configStatusService.getConfigStatus(thingUID, LocaleUtil.getLocale(language)); if (info != null) { return Response.ok().entity(info.getConfigStatusMessages()).build(); } return Response.ok().entity(Collections.EMPTY_SET).build(); }
Source:
public RealmEventStreamAsyncTask<DocumentT> watchAsync(final BsonValue... ids) { return new RealmEventStreamAsyncTaskImpl<>(getNamespace().getFullName(), new RealmEventStreamAsyncTaskImpl.Executor<DocumentT>() { @Override public EventStream<DocumentT> run() throws IOException { return osMongoCollection.watch(ids); } }); }

Target:
public RealmEventStreamAsyncTask<DocumentT> watchAsync(final BsonValue... ids) { return new RealmEventStreamAsyncTaskImpl<>(getNamespace().getFullName(), new RealmEventStreamAsyncTaskImpl.Executor<DocumentT>() { @Override public EventStream<DocumentT> run() throws IOException { return osMongoCollection.watch(Arrays.asList(ids)); } }); }
Source:
public void generateTempWpaSupplicantConf() throws KuraException { try { String fileAsString = readResource("/src/main/resources/wifi/wpasupplicant.conf"); File outputFile = new File(TMP_WPA_CONFIG_FILE); copyFile(fileAsString, outputFile); } catch (Exception e) { throw KuraException.internalError("Failed to generate wpa_supplicant.conf"); } }

Target:
public void generateTempWpaSupplicantConf() throws KuraException { try { String fileAsString = readResource(WPA_SUPPLICANT_CONF_RESOURCE); File outputFile = new File(TMP_WPA_CONFIG_FILE); copyFile(fileAsString, outputFile); } catch (Exception e) { throw KuraException.internalError("Failed to generate wpa_supplicant.conf"); } }
Source:
public static boolean isTestModeEnabled(Context context, Network network) { ConnectivityManager connectManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkCapabilities networkCapabilities = connectManager.getNetworkCapabilities(network); return networkCapabilities.hasCapability(NETWORK_CAPABILITY_TRANSPORT_TEST); }

Target:
public static boolean isTestModeEnabled(Context context, Network network) { ConnectivityManager connectManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkCapabilities networkCapabilities = connectManager.getNetworkCapabilities(network); if (networkCapabilities == null) { return false; } return networkCapabilities.hasCapability(NETWORK_CAPABILITY_TRANSPORT_TEST); }
Source:
public void write(JsonGenerator jg, DocumentModel enriched) throws IOException { jg.writeStringField("shouldnot", "bethere"); throw new IOException("Simulated exception for test purpose"); }

Target:
public void write(JsonGenerator jg, DocumentModel enriched) throws IOException { jg.writeFieldName("justAFieldName"); jg.flush(); throw new IOException("Simulated exception for test purpose"); }
Source:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (!(request instanceof HttpServletRequest)) { chain.doFilter(request, response); return; } final HttpServletRequest httpRequest = (HttpServletRequest) request; final boolean esSync = Boolean.parseBoolean(httpRequest.getHeader(ES_SYNC_FLAG)) || Boolean.parseBoolean(httpRequest.getHeader(ES_SYNC_FLAG.replace("-", "_"))); if (!esSync) { chain.doFilter(request, response); return; } ElasticSearchInlineListener.useSyncIndexing.set(true); try { chain.doFilter(request, response); } finally { ElasticSearchInlineListener.useSyncIndexing.set(false); } }

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (!(request instanceof HttpServletRequest)) { chain.doFilter(request, response); return; } final HttpServletRequest httpRequest = (HttpServletRequest) request; final boolean esSync = Boolean.parseBoolean(httpRequest.getHeader(ES_SYNC_FLAG)) || Boolean.parseBoolean(httpRequest.getHeader(ES_SYNC_FLAG_COMPAT)); if (!esSync) { chain.doFilter(request, response); return; } ElasticSearchInlineListener.useSyncIndexing.set(true); try { chain.doFilter(request, response); } finally { ElasticSearchInlineListener.useSyncIndexing.set(false); } }
Source:
public void dump() { log.info("Start of enabled extensions list"); for (ExtensionEntry entry: loadedEntries.values()) { if (entry.extension != null) { Map<ExtensionProperties, Object> context = entry.extension.getContext(); log.info(String.format( "Instance name: '%1$s', Extension name: '%2$s', Version: '%3$s', License: '%4$s', Home: '%5$s', Author '%6$s', File: '%7$s'", emptyIfNull(context.get(ExtensionProperties.NAME)), emptyIfNull(context.get(ExtensionProperties.EXTENSION_NAME)), emptyIfNull(context.get(ExtensionProperties.VERSION)), emptyIfNull(context.get(ExtensionProperties.LICENSE)), emptyIfNull(context.get(ExtensionProperties.HOME)), emptyIfNull(context.get(ExtensionProperties.AUTHOR)), emptyIfNull(entry.file) ) ); } } log.info("End of enabled extensions list"); }

Target:
public void dump() { log.info("Start of enabled extensions list"); for (ExtensionEntry entry : activatedEntries.values()) { if (entry.extension != null) { Map<ExtensionProperties, Object> context = entry.extension.getContext(); log.info(String.format( "Instance name: '%1$s', Extension name: '%2$s', Version: '%3$s', License: '%4$s', Home: '%5$s', Author '%6$s', File: '%7$s'", emptyIfNull(context.get(ExtensionProperties.NAME)), emptyIfNull(context.get(ExtensionProperties.EXTENSION_NAME)), emptyIfNull(context.get(ExtensionProperties.VERSION)), emptyIfNull(context.get(ExtensionProperties.LICENSE)), emptyIfNull(context.get(ExtensionProperties.HOME)), emptyIfNull(context.get(ExtensionProperties.AUTHOR)), emptyIfNull(getFileName(entry.file)) ) ); } } log.info("End of enabled extensions list"); }
Source:
public TableMetadata toTableMetadata() { Preconditions.checkState(!rowNameComponents.isEmpty(), "No row name components defined."); if (explicitCompressionRequested && explicitCompressionBlockSizeKB == 0) { if (rangeScanAllowed) { explicitCompressionBlockSizeKB = AtlasDbConstants.DEFAULT_TABLE_WITH_RANGESCANS_COMPRESSION_BLOCK_SIZE_KB; } else { explicitCompressionBlockSizeKB = AtlasDbConstants.DEFAULT_TABLE_COMPRESSION_BLOCK_SIZE_KB; } } return new TableMetadata( NameMetadataDescription.create(rowNameComponents, hashFirstRowComponent), getColumnMetadataDescription(), conflictHandler, cachePriority, partitionStrategy, rangeScanAllowed, explicitCompressionBlockSizeKB, negativeLookups, sweepStrategy, expirationStrategy, appendHeavyAndReadLight, tableNameSafety.isSafeForLogging()); }

Target:
public TableMetadata toTableMetadata() { Preconditions.checkState(!rowNameComponents.isEmpty(), "No row name components defined."); if (explicitCompressionRequested && explicitCompressionBlockSizeKB == 0) { if (rangeScanAllowed) { explicitCompressionBlockSizeKB = AtlasDbConstants.DEFAULT_TABLE_WITH_RANGESCANS_COMPRESSION_BLOCK_SIZE_KB; } else { explicitCompressionBlockSizeKB = AtlasDbConstants.DEFAULT_TABLE_COMPRESSION_BLOCK_SIZE_KB; } } return new TableMetadata( NameMetadataDescription.create(rowNameComponents, hashFirstRowComponent), getColumnMetadataDescription(), conflictHandler, cachePriority, partitionStrategy, rangeScanAllowed, explicitCompressionBlockSizeKB, negativeLookups, sweepStrategy, expirationStrategy, appendHeavyAndReadLight, tableNameSafety); }
Source:
public void testCopyFileReadException(final Path file) throws IOException { final Path outFile = Files.createTempFile("tmp", ".tmp"); outFile.toFile().deleteOnExit(); file.toFile().setReadable(false); try { IOUtil.copyFile(file.toFile(), outFile.toFile()); } catch (SAMException e) { file.toFile().setReadable(true); throw e; } }

Target:
public void testCopyFileReadException(final Path file) throws IOException { final Path outFile = Files.createTempFile("tmp", ".tmp"); outFile.toFile().deleteOnExit(); file.toFile().setReadable(false); try { IOUtil.copyFile(file.toFile(), outFile.toFile()); } finally { file.toFile().setReadable(true); } }
Source:
public static void invokeWithRetry(int maxRetries, long wait, Runnable runnable) throws Exception { Throwable last = null; for (int i=0; i<maxRetries; i++) { try { SwingUtilities.invokeAndWait(runnable); return; } catch (Exception | AssertionError e) { last = e; Thread.sleep(wait); } } throw new RuntimeException("Giving up invoke and retry", last); }

Target:
public static void invokeWithRetry(int maxRetries, long wait, Runnable runnable) throws Exception { Exception last = null; for (int i=0; i<maxRetries; i++) { try { SwingUtilities.invokeAndWait(runnable); return; } catch (Exception e) { last = e; Thread.sleep(wait); } catch (AssertionError e) { last = new RuntimeException(e); Thread.sleep(wait); } } throw last; }
Source:
private void parseModuleName() throws IOException { Pattern regexPattern = Pattern.compile("module \"?([\\w\\.@:%_\\+-.~#?&]+/?.+\\w)"); Path modPath = Paths.get(path.toString(), "go.mod"); Stream<String> stream = Files.lines(modPath, StandardCharsets.UTF_8); stream.forEach(line -> { if (regexPattern.matcher(line).matches()) { moduleName = line; } }); moduleName = StringUtils.split(moduleName, " ")[1]; }

Target:
private void parseModuleName() throws IOException { Path modPath = Paths.get(path.toString(), LOCAL_GO_MOD_FILENAME); Stream<String> stream = Files.lines(modPath, StandardCharsets.UTF_8); stream.forEach(line -> { if (MODULE_NAME_REGEX_PATTERN.matcher(line).matches()) { moduleName = line; } }); moduleName = StringUtils.split(moduleName, " ")[1]; }
Source:
private void addOutputNodes(RenderGraph renderGraph) { Node outputToVRFrameBufferNode = new OutputToHMDNode(context); renderGraph.addNode(outputToVRFrameBufferNode, "outputToVRFrameBufferNode"); Node outputToScreenNode = new OutputToScreenNode(context); renderGraph.addNode(outputToScreenNode, "outputToScreenNode"); Node finalPostProcessingNode = renderGraph.findNode(new SimpleUri("engine:finalPostProcessingNode")); renderGraph.connect(finalPostProcessingNode, outputToVRFrameBufferNode); renderGraph.connect(outputToVRFrameBufferNode, outputToScreenNode); }

Target:
private void addOutputNodes(RenderGraph renderGraph) { Node finalPostProcessingNode = renderGraph.findNode("engine:finalPostProcessingNode"); Node outputToVRFrameBufferNode = new OutputToHMDNode(context); renderGraph.addNode(outputToVRFrameBufferNode, "outputToVRFrameBufferNode"); renderGraph.connect(finalPostProcessingNode, outputToVRFrameBufferNode); Node outputToScreenNode = new OutputToScreenNode(context); renderGraph.addNode(outputToScreenNode, "outputToScreenNode"); renderGraph.connect(finalPostProcessingNode, outputToScreenNode); }
Source:
private static Expression extractJoinPredicate(JoinNode joinNode) { ImmutableList.Builder<Expression> builder = ImmutableList.builder(); for (JoinNode.EquiJoinClause equiJoinClause : joinNode.getCriteria()) { builder.add(JoinNodeUtil.toExpression(equiJoinClause)); } joinNode.getFilter().ifPresent(builder::add); return combineConjuncts(builder.build()); }

Target:
private static Expression extractJoinPredicate(JoinNode joinNode) { ImmutableList.Builder<Expression> builder = ImmutableList.builder(); for (JoinNode.EquiJoinClause equiJoinClause : joinNode.getCriteria()) { builder.add(JoinNodeUtils.toExpression(equiJoinClause)); } joinNode.getFilter().map(OriginalExpressionUtils::castToExpression).ifPresent(builder::add); return combineConjuncts(builder.build()); }
Source:
public void visit(LayerGroupInfo layerGroup) { if (layerGroup.getWorkspace() != null) { layerGroup.setWorkspace( getById(layerGroup.getWorkspace().getId(), WorkspaceInfo.class)); } for (int i = 0; i < layerGroup.getLayers().size(); i++) { if (layerGroup.getLayers().get(i) != null) { layerGroup .getLayers() .set( i, getById( layerGroup.getLayers().get(i).getId(), PublishedInfo.class)); } } }

Target:
public void visit(LayerGroupInfo layerGroup) { if (layerGroup.getWorkspace() != null) { layerGroup.setWorkspace( getById(layerGroup.getWorkspace().getId(), WorkspaceInfo.class)); } for (int i = 0; i < layerGroup.getLayers().size(); i++) { if (layerGroup.getLayers().get(i) != null) { layerGroup .getLayers() .set( i, getById( layerGroup.getLayers().get(i).getId(), PublishedInfo.class)); } } if (layerGroup.getRootLayer() != null) { layerGroup.setRootLayer( getById(layerGroup.getRootLayer().getId(), LayerInfo.class)); } if (layerGroup.getRootLayerStyle() != null) { layerGroup.setRootLayerStyle( getById(layerGroup.getRootLayerStyle().getId(), StyleInfo.class)); } for (int i = 0; i < layerGroup.getStyles().size(); i++) { if (layerGroup.getStyles().get(i) != null) { layerGroup .getStyles() .set( i, getById( layerGroup.getStyles().get(i).getId(), StyleInfo.class)); } } }
Source:
public void startSignIn(@NonNull PhoneAuthCredential credential, @NonNull final IdpResponse response) { if (!response.isSuccessful()) { setResult(Resource.<IdpResponse>forFailure(response.getError())); return; } if (!response.getProviderType().equals(PhoneAuthProvider.PROVIDER_ID)) { throw new IllegalStateException( "This handler cannot be used without a phone response."); } setResult(Resource.<IdpResponse>forLoading()); AnonymousUpgradeUtils.signInAndLinkWithPhoneNumber(getAuth(), getArguments(), credential) .addOnSuccessListener(new OnSuccessListener<AuthResult>() { @Override public void onSuccess(AuthResult result) { handleSuccess(response, result); } }) .addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { if (e instanceof FirebaseAuthUserCollisionException) { handleMergeFailure(((FirebaseAuthUserCollisionException) e).getUpdatedCredential()); } else { setResult(Resource.<IdpResponse>forFailure(e)); } } }); }

Target:
public void startSignIn(@NonNull PhoneAuthCredential credential, @NonNull final IdpResponse response) { if (!response.isSuccessful()) { setResult(Resource.<IdpResponse>forFailure(response.getError())); return; } if (!response.getProviderType().equals(PhoneAuthProvider.PROVIDER_ID)) { throw new IllegalStateException( "This handler cannot be used without a phone response."); } setResult(Resource.<IdpResponse>forLoading()); AuthOperationManager.getInstance() .signInAndLinkWithCredential(getAuth(), getArguments(), credential) .addOnSuccessListener(new OnSuccessListener<AuthResult>() { @Override public void onSuccess(AuthResult result) { handleSuccess(response, result); } }) .addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { if (e instanceof FirebaseAuthUserCollisionException) { handleMergeFailure(((FirebaseAuthUserCollisionException) e).getUpdatedCredential()); } else { setResult(Resource.<IdpResponse>forFailure(e)); } } }); }
Source:
public void jobUpdate(final JobEntity jobEntity) { final JobStatus currentState = jobEntity.getStatus(); final JobStatus previouslyNotifiedState = jobEntity.getNotifiedJobStatus(); final String jobId = jobEntity.getUniqueId(); if (currentState != previouslyNotifiedState) { log.info( "Detected state change for job: from: to: {}", jobId, previouslyNotifiedState, currentState ); if (this.persistedJobStatusObserver != null) { this.persistedJobStatusObserver.notify(jobId, previouslyNotifiedState, currentState); } jobEntity.setNotifiedJobStatus(currentState); } }

Target:
public void jobUpdate(final JobEntity jobEntity) { final JobStatus currentState = jobEntity.getStatus(); final JobStatus previouslyNotifiedState = jobEntity.getNotifiedJobStatus(); final String jobId = jobEntity.getUniqueId(); if (currentState != previouslyNotifiedState) { log.info( "Detected state change for job: from: to: {}", jobId, previouslyNotifiedState, currentState ); this.persistedJobStatusObserver.notify(jobId, previouslyNotifiedState, currentState); jobEntity.setNotifiedJobStatus(currentState); } }
Source:
@Test public void testCopyCorrelVariable() { final RelDataTypeFactory typeFactory = new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT); final RexBuilder builder = new RexBuilder(typeFactory); final RelDataType type = typeFactory.createSqlType(SqlTypeName.INTEGER); final RexCorrelVariable node = (RexCorrelVariable) builder.makeCorrel(type, new CorrelationId(0)); final RexNode copy = builder.copy(node); assertTrue(copy instanceof RexCorrelVariable); final RexCorrelVariable result = (RexCorrelVariable) copy; assertThat(result.id, is(node.id)); assertThat(result.getType(), is(node.getType())); }

Target:
@Test public void testCopyCorrelVariable() { final RelDataTypeFactory sourceTypeFactory = new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT); RelDataType type = sourceTypeFactory.createSqlType(SqlTypeName.VARCHAR, 65536); final RelDataTypeFactory targetTypeFactory = new MySqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT); final RexBuilder builder = new RexBuilder(targetTypeFactory); final RexCorrelVariable node = (RexCorrelVariable) builder.makeCorrel(type, new CorrelationId(0)); final RexNode copy = builder.copy(node); assertTrue(copy instanceof RexCorrelVariable); final RexCorrelVariable result = (RexCorrelVariable) copy; assertThat(result.id, is(node.id)); assertThat(result.getType().getSqlTypeName(), is(SqlTypeName.VARCHAR)); assertThat(result.getType().getPrecision(), is(PRECISION)); }
Source:
private String getAbsoluteConfDirPath(String dir, YamlConfig config) { String result = null, response = null; if (dir == null || dir.trim().isEmpty() || !dir.contains("/")) { throw new IllegalArgumentException(error_message); } response = RemotingUtil.executeCommand(config, LS_PREFIX_PART + dir + LS_CDH_POSTFIX_PART); if (response != null && !response.isEmpty() && response.indexOf(">")!=-1) { result = response.substring((response.indexOf(">") + 1), response.length()); result = result.endsWith(File.separator)?result:result.trim()+File.separator; } LOGGER.debug("Found linked Hadoop conf path:"+result); if(result!=null){ String recursiveResponse = getAbsoluteConfDirPath(result, config); if(recursiveResponse!=null){ result = recursiveResponse; } } return result; }

Target:
private String getAbsoluteConfDirPath(String dir, YamlConfig config) { String result = null, response = null; if (dir == null || dir.trim().isEmpty() || !dir.contains("/")) { throw new IllegalArgumentException(error_message); } response = RemotingUtil.executeCommand(config, LS_PREFIX_PART + dir + LS_CDH_POSTFIX_PART); int responseIndex=response.indexOf(">"); if (response != null && !response.isEmpty() && responseIndex!=-1) { result = response.substring((responseIndex + 1), response.length()); result = result.endsWith(File.separator)?result:result.trim()+File.separator; } LOGGER.debug("Found linked Hadoop conf path:"+result); if(result!=null){ String recursiveResponse = getAbsoluteConfDirPath(result, config); if(recursiveResponse!=null){ result = recursiveResponse; } } return result; }
Source:
public static ImmutableWorkerInfo selectWorker( final Task task, final Map<String, ImmutableWorkerInfo> allWorkers, final WorkerTaskRunnerConfig workerTaskRunnerConfig, @Nullable final WorkerCategorySpec workerCategorySpec, final Function<ImmutableMap<String, ImmutableWorkerInfo>, ImmutableWorkerInfo> workerSelector ) { final Map<String, ImmutableWorkerInfo> runnableWorkers = getRunnableWorkers( task, allWorkers, workerTaskRunnerConfig ); if (workerCategorySpec != null) { String preferredCategory = getTaskCategory(task, workerCategorySpec, null); if (preferredCategory != null) { final ImmutableMap<String, ImmutableWorkerInfo> categoryWorkers = getCategoryWorkers( preferredCategory, runnableWorkers ); final ImmutableWorkerInfo selected = workerSelector.apply(categoryWorkers); if (selected != null) { return selected; } else if (workerCategorySpec.isStrong()) { return null; } } } return workerSelector.apply(ImmutableMap.copyOf(runnableWorkers)); }

Target:
public static ImmutableWorkerInfo selectWorker( final Task task, final Map<String, ImmutableWorkerInfo> allWorkers, final WorkerTaskRunnerConfig workerTaskRunnerConfig, @Nullable final WorkerCategorySpec workerCategorySpec, final Function<ImmutableMap<String, ImmutableWorkerInfo>, ImmutableWorkerInfo> workerSelector ) { final Map<String, ImmutableWorkerInfo> runnableWorkers = getRunnableWorkers( task, allWorkers, workerTaskRunnerConfig ); String preferredCategory = getTaskCategory(task, workerCategorySpec, null); if (preferredCategory != null) { final ImmutableMap<String, ImmutableWorkerInfo> categoryWorkers = getCategoryWorkers( preferredCategory, runnableWorkers ); final ImmutableWorkerInfo selected = workerSelector.apply(categoryWorkers); if (selected != null) { return selected; } else if (workerCategorySpec.isStrong()) { return null; } } return workerSelector.apply(ImmutableMap.copyOf(runnableWorkers)); }
Source:
public LongDictionaryStreamReader(Type type, StreamDescriptor streamDescriptor, LocalMemoryContext systemMemoryContext) throws OrcCorruptionException { requireNonNull(type, "type is null"); verifyStreamType(streamDescriptor, type, t -> t instanceof BigintType || t instanceof IntegerType || t instanceof SmallintType || t instanceof DateType || t instanceof TimeType || t instanceof TimestampType); this.type = type; this.streamDescriptor = requireNonNull(streamDescriptor, "stream is null"); this.systemMemoryContext = requireNonNull(systemMemoryContext, "systemMemoryContext is null"); }

Target:
public LongDictionaryStreamReader(Type type, StreamDescriptor streamDescriptor, LocalMemoryContext systemMemoryContext) throws OrcCorruptionException { requireNonNull(type, "type is null"); verifyStreamType(streamDescriptor, type, t -> t instanceof BigintType || t instanceof IntegerType || t instanceof SmallintType || t instanceof DateType); this.type = type; this.streamDescriptor = requireNonNull(streamDescriptor, "stream is null"); this.systemMemoryContext = requireNonNull(systemMemoryContext, "systemMemoryContext is null"); }
Source:
DialogueAdaptingMultiClientConjureTimelockService getMultiClientConjureTimelockService() { MultiClientConjureTimelockServiceBlocking blockingService = dialogueClientFactory.get(MultiClientConjureTimelockServiceBlocking.class, TIMELOCK_SHORT_TIMEOUT); MultiClientConjureTimelockServiceBlocking instrumentedService = AtlasDbMetrics.instrumentWithTaggedMetrics( taggedMetricRegistry, MultiClientConjureTimelockServiceBlocking.class, FastFailoverProxy.newProxyInstance( MultiClientConjureTimelockServiceBlocking.class, () -> blockingService)); return new DialogueAdaptingMultiClientConjureTimelockService(instrumentedService); }

Target:
MultiClientConjureTimelockServiceBlocking getMultiClientConjureTimelockService() { MultiClientConjureTimelockServiceBlocking blockingService = dialogueClientFactory.get(MultiClientConjureTimelockServiceBlocking.class, TIMELOCK_SHORT_TIMEOUT); return AtlasDbMetrics.instrumentWithTaggedMetrics( taggedMetricRegistry, MultiClientConjureTimelockServiceBlocking.class, FastFailoverProxy.newProxyInstance( MultiClientConjureTimelockServiceBlocking.class, () -> blockingService)); }
Source:
public void registerModule(IAnalysisModule module) { if (module == null) { throw new IllegalArgumentException(); } ITmfTrace selectedTrace = TmfTraceManager.getInstance().getActiveTrace(); if (selectedTrace == null) { fModule = module; return; } @SuppressWarnings("resource") IAnalysisModule selectedModule = selectedTrace.getAnalysisModule(module.getId()); if (selectedModule == module) { fModule = module; } }

Target:
public void registerModule(IAnalysisModule module) { if (module == null) { throw new IllegalArgumentException(); } ITmfTrace selectedTrace = TmfTraceManager.getInstance().getActiveTrace(); if (selectedTrace == null) { fModule = module; return; } IAnalysisModule selectedModule = selectedTrace.getAnalysisModule(module.getId()); if (selectedModule == module) { fModule = module; } }
Source:
public static DatanodeDetails readDatanodeIdFile(File path) throws IOException { Preconditions.checkNotNull(path); DatanodeDetails datanodeDetails; try (FileInputStream inputFileStream = new FileInputStream(path)) { Yaml yaml = new Yaml(); DatanodeDetailsYaml datanodeDetailsYaml; try { datanodeDetailsYaml = yaml.loadAs(inputFileStream, DatanodeDetailsYaml.class); } catch (Exception e) { throw new IOException("Unable to parse yaml file.", e); } DatanodeDetails.Builder builder = DatanodeDetails.newBuilder(); builder.setUuid(datanodeDetailsYaml.getUuid().toString()) .setIpAddress(datanodeDetailsYaml.getIpAddress()) .setHostName(datanodeDetailsYaml.getHostName()) .setCertSerialId(datanodeDetailsYaml.getCertSerialId()); if (!MapUtils.isEmpty(datanodeDetailsYaml.getPortDetails())) { for (Map.Entry<String, Integer> portEntry : datanodeDetailsYaml.getPortDetails().entrySet()) { builder.addPort(DatanodeDetails.newPort( DatanodeDetails.Port.Name.valueOf(portEntry.getKey()), portEntry.getValue())); } } datanodeDetails = builder.build(); } return datanodeDetails; }

Target:
public static DatanodeDetails readDatanodeIdFile(File path) throws IOException { DatanodeDetails datanodeDetails; try (FileInputStream inputFileStream = new FileInputStream(path)) { Yaml yaml = new Yaml(); DatanodeDetailsYaml datanodeDetailsYaml; try { datanodeDetailsYaml = yaml.loadAs(inputFileStream, DatanodeDetailsYaml.class); } catch (Exception e) { throw new IOException("Unable to parse yaml file.", e); } DatanodeDetails.Builder builder = DatanodeDetails.newBuilder(); builder.setUuid(datanodeDetailsYaml.getUuid()) .setIpAddress(datanodeDetailsYaml.getIpAddress()) .setHostName(datanodeDetailsYaml.getHostName()) .setCertSerialId(datanodeDetailsYaml.getCertSerialId()); if (!MapUtils.isEmpty(datanodeDetailsYaml.getPortDetails())) { for (Map.Entry<String, Integer> portEntry : datanodeDetailsYaml.getPortDetails().entrySet()) { builder.addPort(DatanodeDetails.newPort( DatanodeDetails.Port.Name.valueOf(portEntry.getKey()), portEntry.getValue())); } } datanodeDetails = builder.build(); } return datanodeDetails; }
Source:
public final Response createType(@Context final HttpServletRequest req, final ContentTypeForm form) throws DotDataException, DotSecurityException { final InitDataObject initData = this.webResource.init(null, true, req, true, null); final User user = initData.getUser(); Response response = null; try { Iterable<ContentTypeForm.ContentTypeFormEntry> typesToSave = form.getIterable(); final List<ContentType> retTypes = new ArrayList<>(); for (ContentTypeForm.ContentTypeFormEntry entry : typesToSave) { ContentType type = entry.contentType; List<String> workflowsIds = entry.workflowsIds; if (UtilMethods.isSet(type.id()) && !UUIDUtil.isUUID(type.id())) { return ExceptionMapperUtil.createResponse(null, "ContentType 'id' if set, should be a uuid"); } ContentType contentTypeSaved = APILocator.getContentTypeAPI(user, true).save(type); retTypes.add(contentTypeSaved); this.workflowHelper.saveSchemesByContentType(contentTypeSaved.inode(), user, workflowsIds); } response = Response.ok(new ResponseEntityView(new JsonContentTypeTransformer(retTypes).mapList())).build(); } catch (DotStateException e) { response = ExceptionMapperUtil.createResponse(null, "Content-type is not valid ("+ e.getMessage() +")"); } catch (DotDataException e) { response = ExceptionMapperUtil.createResponse(null, "Content-type is not valid ("+ e.getMessage() +")"); } catch (Exception e) { response = ExceptionMapperUtil.createResponse(e, Response.Status.INTERNAL_SERVER_ERROR); } return response; }

Target:
public final Response createType(@Context final HttpServletRequest req, final ContentTypeForm form) throws DotDataException, DotSecurityException { final InitDataObject initData = this.webResource.init(null, true, req, true, null); final User user = initData.getUser(); Response response = null; try { Logger.debug(this, String.format("Saving new content type", form.getRequestJson())); final Iterable<ContentTypeForm.ContentTypeFormEntry> typesToSave = form.getIterable(); final List<ContentType> retTypes = new ArrayList<>(); for (final ContentTypeForm.ContentTypeFormEntry entry : typesToSave) { final ContentType type = entry.contentType; final List<String> workflowsIds = entry.workflowsIds; if (UtilMethods.isSet(type.id()) && !UUIDUtil.isUUID(type.id())) { return ExceptionMapperUtil.createResponse(null, "ContentType 'id' if set, should be a uuid"); } final ContentType contentTypeSaved = APILocator.getContentTypeAPI(user, true).save(type); retTypes.add(contentTypeSaved); this.workflowHelper.saveSchemesByContentType(contentTypeSaved.inode(), user, workflowsIds); } response = Response.ok(new ResponseEntityView(new JsonContentTypeTransformer(retTypes).mapList())).build(); } catch (DotStateException | DotDataException e) { response = ExceptionMapperUtil.createResponse(null, "Content-type is not valid ("+ e.getMessage() +")"); } catch (Exception e) { response = ExceptionMapperUtil.createResponse(e, Response.Status.INTERNAL_SERVER_ERROR); } return response; }
Source:
private static TimeLockDialogueServiceProvider createTimeLockDialogueServiceProvider( MetricsManager metricsManager, TimeLockInstallConfiguration install, UserAgent userAgent) { DialogueClients.ReloadingFactory baseFactory = DialogueClients.create( Refreshable.only(ServicesConfigBlock.builder().build())); ServerListConfig timeLockServerListConfig = ImmutableServerListConfig.builder() .addAllServers(PaxosRemotingUtils.getRemoteServerPaths(install)) .sslConfiguration(install.cluster().cluster().security()) .proxyConfiguration(install.cluster().cluster().proxyConfiguration()) .build(); return TimeLockDialogueServiceProvider.create( metricsManager.getTaggedRegistry(), baseFactory, timeLockServerListConfig, AuxiliaryRemotingParameters.builder() .userAgent(userAgent) .shouldLimitPayload(false) .shouldRetry(false) .remotingClientConfig(() -> RemotingClientConfigs.DEFAULT) .shouldUseExtendedTimeout(false) .build()); }

Target:
private static TimeLockDialogueServiceProvider createTimeLockDialogueServiceProvider( MetricsManager metricsManager, TimeLockInstallConfiguration install, UserAgent userAgent) { DialogueClients.ReloadingFactory baseFactory = DialogueClients.create( Refreshable.only(ServicesConfigBlock.builder().build())); ServerListConfig timeLockServerListConfig = ImmutableServerListConfig.builder() .addAllServers(PaxosRemotingUtils.getRemoteServerPaths(install)) .sslConfiguration(install.cluster().cluster().security()) .proxyConfiguration(install.cluster().cluster().proxyConfiguration()) .build(); return TimeLockDialogueServiceProvider.create( metricsManager.getTaggedRegistry(), baseFactory, timeLockServerListConfig, AuxiliaryRemotingParameters.builder() .userAgent(userAgent) .shouldLimitPayload(false) .remotingClientConfig(() -> RemotingClientConfigs.DEFAULT) .shouldUseExtendedTimeout(false) .build()); }
Source:
static void copyErrors(PipelineConfig from, PipelineConfig to) { copy(from, to); copyCollectionErrors(from.materialConfigs(), to.materialConfigs()); copyCollectionErrors(from.getVariables(), to.getVariables()); copyCollectionErrors(from.getParams(), to.getParams()); copy(from.getTrackingTool(), to.getTrackingTool()); for (StageConfig fromStage : from.getStages()) { StageConfig toStage = to.findBy(fromStage.name()); copy(fromStage, toStage); copyCollectionErrors(fromStage.getVariables(), toStage.getVariables()); for (JobConfig fromJob : fromStage.getJobs()) { JobConfig toJob = toStage.jobConfigByConfigName(fromJob.name()); copy(fromJob, toJob); copyCollectionErrors(fromJob.getTasks(), toJob.getTasks()); copyCollectionErrors(fromJob.artifactPlans(), toJob.artifactPlans()); copyCollectionErrors(fromJob.getTabs(), toJob.getTabs()); copyCollectionErrors(fromJob.getProperties(), toJob.getProperties()); copyCollectionErrors(fromJob.getVariables(), toJob.getVariables()); } } }

Target:
static void copyErrors(PipelineConfig from, PipelineConfig to) { copy(from, to); copyCollectionErrors(from.materialConfigs(), to.materialConfigs()); copyCollectionErrors(from.getVariables(), to.getVariables()); copyCollectionErrors(from.getParams(), to.getParams()); copy(from.getTrackingTool(), to.getTrackingTool()); for (StageConfig toStage : to.getStages()) { StageConfig fromStage = from.findBy(toStage.name()); copy(fromStage, toStage); copyCollectionErrors(fromStage.getVariables(), toStage.getVariables()); for (JobConfig toJob : toStage.getJobs()) { JobConfig fromJob = fromStage.jobConfigByConfigName(toJob.name()); copy(toJob, fromJob); copyCollectionErrors(fromJob.getTasks(), toJob.getTasks()); copyCollectionErrors(fromJob.artifactPlans(), toJob.artifactPlans()); copyCollectionErrors(fromJob.getTabs(), toJob.getTabs()); copyCollectionErrors(fromJob.getProperties(), toJob.getProperties()); copyCollectionErrors(fromJob.getVariables(), toJob.getVariables()); } } }
Source:
GHMarketplaceListAccountBuilder(GitHub root, long planId) { this.root = root; this.builder = new Requester(root); this.planId = planId; }

Target:
GHMarketplaceListAccountBuilder(GitHub root, long planId) { this.root = root; this.builder = root.createRequest(); this.planId = planId; }