auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getEnrichedHosts() throws Exception { System.out.println(CLASS_NAME + "getEnrichedHosts"); createdHost = facilitiesManagerEntry.addHosts(sess, hosts, facility).get(0); hostsForDeletion.add(hosts.get(0)); Attribute attr = new Attribute(); attr.setNamespace("urn:perun:host:attribute-def:opt"); attr.setFriendlyName("host-test-for-list-of-names-attribute"); attr.setType(String.class.getName()); attr.setValue("HostAttributeForList"); perun.getAttributesManagerBl().createAttribute(sess, attr); perun.getAttributesManagerBl().setAttribute(sess, createdHost, attr); List<String> attrNames = new ArrayList<>(); attrNames.add(attr.getName()); List<Attribute> hostAttributes = new ArrayList<>(); hostAttributes.add(attr); EnrichedHost actualEnrichedHost = new EnrichedHost(createdHost, hostAttributes); List<EnrichedHost> expectedEnrichedHosts = facilitiesManagerEntry.getEnrichedHosts(sess, facility, attrNames); EnrichedHost expectedHost = expectedEnrichedHosts.get(0); assertEquals("Created and returned enrichedHost should be the same", expectedHost, actualEnrichedHost); }

Target:
public void getEnrichedHosts() throws Exception { System.out.println(CLASS_NAME + "getEnrichedHosts"); createdHost = facilitiesManagerEntry.addHosts(sess, hosts, facility).get(0); hostsForDeletion.add(hosts.get(0)); Attribute attr = new Attribute(); attr.setNamespace("urn:perun:host:attribute-def:opt"); attr.setFriendlyName("host-test-for-list-of-names-attribute"); attr.setType(String.class.getName()); attr.setValue("HostAttributeForList"); perun.getAttributesManagerBl().createAttribute(sess, attr); perun.getAttributesManagerBl().setAttribute(sess, createdHost, attr); List<String> attrNames = new ArrayList<>(); attrNames.add(attr.getName()); List<Attribute> hostAttributes = new ArrayList<>(); hostAttributes.add(attr); EnrichedHost actualEnrichedHost = new EnrichedHost(createdHost, hostAttributes); List<EnrichedHost> expectedEnrichedHosts = facilitiesManagerEntry.getEnrichedHosts(sess, facility, attrNames); EnrichedHost expectedEnrichedHost = expectedEnrichedHosts.get(0); assertEquals("Created and returned enrichedHost should be the same", expectedEnrichedHost, actualEnrichedHost); assertEquals("Number of attributes should be same", expectedEnrichedHost.getHostAttributes().size(), actualEnrichedHost.getHostAttributes().size()); assertTrue("Returned enrichedHost should have all the desired attributes", expectedEnrichedHost.getHostAttributes().containsAll(hostAttributes)); }
Source:
public CompletableFuture<String> gets(String row, Column column, String defaultValue) { AsyncGet curAsyncGet = new AsyncGet(row, column, defaultValue); getsQueue.add(curAsyncGet); executorService.submit(() -> { int i = 0; Collection<RowColumn> rowColumns = new HashSet<>(); for (AsyncGet asyncGet : getsQueue) { rowColumns.add(asyncGet.rc); } Map<RowColumn, Bytes> getsMap = tx.get(rowColumns); while (!getsQueue.isEmpty()) { AsyncGet asyncGet = getsQueue.poll(); Bytes bytesRes = getsMap.get(asyncGet.rc); asyncGet.res.complete(bytesRes == null ? defaultValue : bytesRes.toString()); } }); return curAsyncGet.res; }

Target:
public CompletableFuture<String> gets(String row, Column column, String defaultValue) { Bytes defaultValueBytes = defaultValue == null ? new Bytes() : Bytes.of(defaultValue); return get(Bytes.of(row), column, defaultValueBytes).thenApply(b -> b.toString()); }
Source:
private static int addToDatabase(Connection sql, User user, Course course, String title, String description, Date creationDate, String tag, String extension) throws ServiceException { OMUtil.sqlCheck(sql); OMUtil.nullCheck(user); OMUtil.nullCheck(course); OMUtil.nullCheck(title); OMUtil.nullCheck(description); OMUtil.nullCheck(tag); OMUtil.nullCheck(extension); if (title.length() < MIN_TITLE || title.length() > MAX_TITLE) { throw new ServiceException(ServiceStatus.APP_INVALID_TITLE_LENGTH); } if (description.length() < MIN_DESCRIPTION || description.length() > MAX_DESCRIPTION) { throw new ServiceException(ServiceStatus.APP_INVALID_DESCRIPTION_LENGTH); } if (extension.length() < MIN_EXTENSION || extension.length() > MAX_EXTENSION) { throw new ServiceException(ServiceStatus.APP_INVALID_EXTENSION_LENGTH); } return FileMetadataTable.insertFileData(sql, user.getID(), course.getID(), title, description, creationDate, tag, extension); }

Target:
private static int addToDatabase(Connection sql, User user, Course course, String title, String description, Date creationDate, String tag, String extension) throws ServiceException { OMUtil.sqlCheck(sql); OMUtil.nullCheck(user); OMUtil.nullCheck(course); OMUtil.nullCheck(title); OMUtil.nullCheck(description); OMUtil.nullCheck(extension); if (title.length() < MIN_TITLE || title.length() > MAX_TITLE) { throw new ServiceException(ServiceStatus.APP_INVALID_TITLE_LENGTH); } if (description.length() < MIN_DESCRIPTION || description.length() > MAX_DESCRIPTION) { throw new ServiceException(ServiceStatus.APP_INVALID_DESCRIPTION_LENGTH); } if (extension.length() < MIN_EXTENSION || extension.length() > MAX_EXTENSION) { throw new ServiceException(ServiceStatus.APP_INVALID_EXTENSION_LENGTH); } return FileMetadataTable.insertFileData(sql, user.getID(), course.getID(), title, description, creationDate, tag, extension); }
Source:
public String getFileAsString(String filename) throws Exception { File fileToRead = new File(filename); if (!fileToRead.exists()) { LOGGER.finest( "Absolute file " + filename + " does not exist - checking relative to git dir"); fileToRead = repo.getWorkTree(); fileToRead = new File(fileToRead, filename); } LOGGER.finer("Reading commit message from " + fileToRead.getPath()); return Files.toString(fileToRead, Charsets.UTF_8); }

Target:
public String getFileAsString(String filename) throws Exception { File fileToRead = new File(filename); if (!fileToRead.exists()) { LOGGER.finest( "Absolute file " + filename + " does not exist - checking relative to git dir"); fileToRead = repo.getWorkTree(); fileToRead = new File(fileToRead, filename); } LOGGER.log(Level.FINER, "Reading commit message from {0}", fileToRead.getPath()); return Files.toString(fileToRead, Charsets.UTF_8); }
Source:
public LatLng getGoogleMapsLocation() { ParseGeoPoint pGP = (ParseGeoPoint) getClient().get("location"); return new LatLng(pGP.getLatitude(), pGP.getLongitude()); }

Target:
public LatLng getGoogleMapsLocation() { return getClient().getGoogleMapsLocation(); }
Source:
public void read(InputStream input, Schema inputSchema, InputBuilder messageBuilder) throws ReaderException { this.messageBuilder = messageBuilder; this.inputSchema = inputSchema; OMXMLParserWrapper parserWrapper = OMXMLBuilderFactory.createOMBuilder(input); OMElement root = parserWrapper.getDocumentElement(); this.jsonSchema = getInputSchema().getSchemaMap(); try { XMLTraverse(root, null, jsonSchema); jsonBuilder.writeEndObject(); writeTerminateElement(); } catch (IOException e) { throw new ReaderException("IO Error while parsing xml input stream. " + e.getMessage()); } catch (JSException e) { throw new ReaderException("JSException while parsing xml input stream. " + e.getMessage()); } catch (SchemaException e) { throw new ReaderException("SchemaException while parsing xml input stream. " + e.getMessage()); } catch (InvalidPayloadException e) { throw new ReaderException("InvalidPayLoad while parsing xml input stream. " + e.getMessage()); } }

Target:
public void read(InputStream input, Schema inputSchema, InputBuilder messageBuilder) throws ReaderException { this.messageBuilder = messageBuilder; this.inputSchema = inputSchema; OMXMLParserWrapper parserWrapper = OMXMLBuilderFactory.createOMBuilder(input); OMElement root = parserWrapper.getDocumentElement(); this.jsonSchema = getInputSchema().getSchemaMap(); try { XMLTraverse(root, null, jsonSchema); jsonBuilder.writeEndObject(); writeTerminateElement(); } catch (IOException | JSException | SchemaException | InvalidPayloadException e) { throw new ReaderException("Error while parsing XML input stream. " + e.getMessage()); } }
Source:
public void testIntervals() throws Exception { final File inputSam = new File("testdata/picard/sam/viewsam_intervals_test.sam"); final File inputIntervalsFile = new File("testdata/picard/sam/viewsam_intervals_test.interval_list"); final File viewSamOutputFile = File.createTempFile("ViewSamTest.output.", ".sam"); viewSamOutputFile.deleteOnExit(); final String[] args = new String[] { "INPUT=" + inputSam.getAbsolutePath(), "INTERVAL_LIST=" + inputIntervalsFile.getAbsolutePath(), }; final PrintStream viewSamPrintStream = new PrintStream(viewSamOutputFile); Assert.assertEquals(runViewSamAsCmdLine(viewSamPrintStream, args), 0); viewSamPrintStream.close(); final IntervalList inputIntervalsList = IntervalList.fromFile(inputIntervalsFile); final List<Interval> intervals = inputIntervalsList.uniqued().getIntervals(); final SamReader samReader = SamReaderFactory.makeDefault().open(viewSamOutputFile); boolean foundMatches = false; for (SAMRecord samRecord : samReader) { Interval samRecordInterval = new Interval(samRecord.getContig(), samRecord.getStart(), samRecord.getEnd()); boolean samRecordIntervalOverlaps = false; for (Interval interval : intervals) { if (interval.intersects(samRecordInterval)) { samRecordIntervalOverlaps = true; foundMatches = true; break; } } Assert.assertTrue(samRecordIntervalOverlaps, "SAM record written out was not overlapped by an interval."); } Assert.assertTrue(foundMatches, "No SAM records overlapped the given intervals."); }

Target:
public void testIntervals() throws Exception { final File inputSam = new File("testdata/picard/sam/viewsam_intervals_test.sam"); final File inputIntervalsFile = new File("testdata/picard/sam/viewsam_intervals_test.interval_list"); final File viewSamOutputFile = File.createTempFile("ViewSamTest.output.", ".sam"); viewSamOutputFile.deleteOnExit(); final ViewSam viewSam = new ViewSam(); viewSam.INPUT = inputSam.getAbsolutePath(); viewSam.INTERVAL_LIST = inputIntervalsFile; final PrintStream viewSamPrintStream = new PrintStream(viewSamOutputFile); Assert.assertEquals(viewSam.writeSamText(viewSamPrintStream), 0); viewSamPrintStream.close(); final IntervalList inputIntervalsList = IntervalList.fromFile(inputIntervalsFile); final List<Interval> intervals = inputIntervalsList.uniqued().getIntervals(); final SamReader samReader = SamReaderFactory.makeDefault().open(viewSamOutputFile); boolean foundMatches = false; for (final SAMRecord samRecord : samReader) { final Interval samRecordInterval = new Interval(samRecord.getContig(), samRecord.getStart(), samRecord.getEnd()); boolean samRecordIntervalOverlaps = false; for (final Interval interval : intervals) { if (interval.intersects(samRecordInterval)) { samRecordIntervalOverlaps = true; foundMatches = true; break; } } Assert.assertTrue(samRecordIntervalOverlaps, "SAM record written out was not overlapped by an interval."); } Assert.assertTrue(foundMatches, "No SAM records overlapped the given intervals."); }
Source:
private Map<Thread.State, Integer> getThreadStateCountMap() { ThreadInfo[] allThreads = threadBean.getThreadInfo(threadBean.getAllThreadIds(), StackTraceDepth); HashMap<Thread.State, Integer> threadCounts = new HashMap<Thread.State, Integer>(); for (ThreadInfo curThread : allThreads) { if (curThread != null) { Thread.State threadState = curThread.getThreadState(); if (threadCounts.containsKey(threadState)) { threadCounts.put(threadState, threadCounts.get(threadState) + 1); } else { threadCounts.put(threadState, 1); } } } return threadCounts; }

Target:
private Map<Thread.State, Integer> getThreadStateCountMap() { ThreadInfo[] allThreads = threadBean.getThreadInfo(threadBean.getAllThreadIds(), 0); HashMap<Thread.State, Integer> threadCounts = new HashMap<Thread.State, Integer>(); for (Thread.State state : Thread.State.values()) { threadCounts.put(state, 0); } for (ThreadInfo curThread : allThreads) { if (curThread != null) { Thread.State threadState = curThread.getThreadState(); threadCounts.put(threadState, threadCounts.get(threadState) + 1); } } return threadCounts; }
Source:
public void onComplete(Exception e) { logger.trace("Firing onComplete() for listeners"); synchronized (listeners) { exception = e; if (operationComplete.compareAndSet(false, true)) { for (RestRequestInfoEventListener listener : listeners) { try { listener.onHandlingComplete(this, e); } catch (Exception ee) { logger.error("Swallowing onComplete listener exception", ee); } } } else { logger.error("onComplete for RestRequestInfo has already been fired. Ignoring current invocation"); } } }

Target:
public void onComplete(Exception e) { if (operationComplete.compareAndSet(false, true)) { logger.trace("Firing onComplete() for listeners"); exception = e; synchronized (listeners) { for (RestRequestInfoEventListener listener : listeners) { try { listener.onHandlingComplete(this, e); } catch (Exception ee) { logger.error("Swallowing onComplete listener exception", ee); } } } } else { logger.error("onComplete for RestRequestInfo has already been fired. Ignoring current invocation"); } }
Source:
private void removeDomainModelChangeListener(T rule) { final Set<VDomainModelReference> dmrs = new LinkedHashSet<VDomainModelReference>(dmrsToRules.keySet()); for (final VDomainModelReference dmr : dmrs) { dmrsToRules.get(dmr).remove(rule); } }

Target:
private void removeDomainModelChangeListener(T rule) { final Set<VDomainModelReference> dmrs = new LinkedHashSet<VDomainModelReference>(dmrsToRules.keySet()); for (final VDomainModelReference dmr : dmrs) { final Set<T> rules = dmrsToRules.get(dmr); if (rules != null) { rules.remove(rule); } } }
Source:
public String toString() { return String.format("raw type (%s): %d bytes", (mimeType != null) ? mimeType : "unknown", bytes.length); }

Target:
public String toString() { return String.format("raw type (%s): %d bytes", mimeType, bytes.length); }
Source:
protected KafkaLogTailer(Codec<M> codec, KafkaNamespace ns, String group, Properties consumerProps) { if (codec == null) { this.codec = new SerializableCodec<>(); } else { this.codec = codec; } Objects.requireNonNull(group); this.ns = ns; this.group = group; consumerProps.put(ConsumerConfig.GROUP_ID_CONFIG, ns.getKafkaGroup(group)); this.consumer = new KafkaConsumer<>(consumerProps); }

Target:
protected KafkaLogTailer(Codec<M> codec, KafkaNamespace ns, String group, Properties consumerProps) { this.codec = codec; if (NO_CODEC.equals(codec)) { this.decodeCodec = new SerializableCodec<>(); } else { this.decodeCodec = codec; } Objects.requireNonNull(group); this.ns = ns; this.group = group; consumerProps.put(ConsumerConfig.GROUP_ID_CONFIG, ns.getKafkaGroup(group)); this.consumer = new KafkaConsumer<>(consumerProps); }
Source:
public MVCCEntry wrapEntryForPut(InvocationContext ctx, Object key, InternalCacheEntry icEntry, boolean undeleteIfNeeded, FlagAffectedCommand cmd, boolean skipRead) { if (icEntry != null) { throw new IllegalArgumentException("Only addMissingValue can handle external entries"); } MVCCEntry mvccEntry = wrapEntryForWriting(ctx, key, Wrap.WRAP_ALL, skipRead, false); if (trace) { log.tracef("Wrap %s for put. Entry=%s", key, mvccEntry); } return mvccEntry; }

Target:
public MVCCEntry wrapEntryForPut(InvocationContext ctx, Object key, InternalCacheEntry icEntry, boolean undeleteIfNeeded, FlagAffectedCommand cmd, boolean skipRead) { if (icEntry != null) { throw new IllegalArgumentException("Only addMissingValue can handle external entries"); } return wrapEntryForWriting(ctx, key, Wrap.WRAP_ALL, skipRead, false); }
Source:
public Response logout() { JsonResponse response; Subject currentUser = org.apache.shiro.SecurityUtils.getSubject(); currentUser.logout(); Map<String, String> data = new HashMap<>(); data.put("principal", "anonymous"); data.put("roles", ""); data.put("ticket", "anonymous"); data.put("WWW-Authenticate", "Basic realm=\"Login required\""); response = new JsonResponse(Response.Status.UNAUTHORIZED, "", data); LOG.warn(response.toString()); return response.build(); }

Target:
public Response logout() { JsonResponse response; Subject currentUser = org.apache.shiro.SecurityUtils.getSubject(); currentUser.logout(); response = new JsonResponse(Response.Status.UNAUTHORIZED, "", ""); LOG.warn(response.toString()); return response.build(); }
Source:
public byte[] call(final byte[] memento) throws Exception { final PerOpTimeInEpoch perOpTimeInEpoch = new PerOpTimeInEpoch(); LOG.log(Level.INFO, "{0} starting...", taskId); trainingDataProvider.loadData(); trainer.initGlobalSettings(); workerGlobalBarrier.await(); for (int epochIdx = 0; epochIdx < maxNumEpochs; ++epochIdx) { LOG.log(Level.INFO, "Starting epoch {0}", epochIdx); final long epochStartTime = System.currentTimeMillis(); trainingDataProvider.prepareDataForEpoch(); final Collection<V> epochData = new LinkedList<>(); int miniBatchIdx = 0; while (true) { final Collection<V> miniBatchData = trainingDataProvider.getNextBatchData().values(); if (miniBatchData.isEmpty()) { break; } final long miniBatchStartTime = System.currentTimeMillis(); final MiniBatchResult miniBatchResult = trainer.runMiniBatch(miniBatchData); final double miniBatchElapsedTime = (System.currentTimeMillis() - miniBatchStartTime) / 1000.0D; sendBatchMetrics(miniBatchResult, epochIdx, miniBatchIdx, miniBatchData.size(), miniBatchElapsedTime, perOpTimeInEpoch); epochData.addAll(miniBatchData); miniBatchIdx++; } final EpochResult epochResult = trainer.onEpochFinished(epochData, epochIdx); final double epochElapsedTime = (System.currentTimeMillis() - epochStartTime) / 1000.0D; sendEpochMetrics(epochResult, epochIdx, miniBatchIdx, epochData.size(), epochElapsedTime, perOpTimeInEpoch); } workerGlobalBarrier.await(); trainer.cleanup(); return null; }

Target:
public byte[] call(final byte[] memento) throws Exception { LOG.log(Level.INFO, "{0} starting...", taskId); trainingDataProvider.loadData(); trainer.initGlobalSettings(); workerGlobalBarrier.await(); for (int epochIdx = 0; epochIdx < maxNumEpochs; ++epochIdx) { LOG.log(Level.INFO, "Starting epoch {0}", epochIdx); final long epochStartTime = System.currentTimeMillis(); final PerOpTimeInEpoch perOpTimeInEpoch = new PerOpTimeInEpoch(); trainingDataProvider.prepareDataForEpoch(); final Collection<V> epochData = new LinkedList<>(); int miniBatchIdx = 0; while (true) { final Collection<V> miniBatchData = trainingDataProvider.getNextBatchData().values(); if (miniBatchData.isEmpty()) { break; } final long miniBatchStartTime = System.currentTimeMillis(); final MiniBatchResult miniBatchResult = trainer.runMiniBatch(miniBatchData); final double miniBatchElapsedTime = (System.currentTimeMillis() - miniBatchStartTime) / 1000.0D; sendBatchMetrics(miniBatchResult, epochIdx, miniBatchIdx, miniBatchData.size(), miniBatchElapsedTime); perOpTimeInEpoch.accumulate(miniBatchResult.getComputeTime(), miniBatchResult.getAvgPullTime(), miniBatchResult.getAvgPushTime()); epochData.addAll(miniBatchData); miniBatchIdx++; } final EpochResult epochResult = trainer.onEpochFinished(epochData, epochIdx); final double epochElapsedTime = (System.currentTimeMillis() - epochStartTime) / 1000.0D; sendEpochMetrics(epochResult, epochIdx, miniBatchIdx, epochData.size(), epochElapsedTime, perOpTimeInEpoch); } workerGlobalBarrier.await(); trainer.cleanup(); return null; }
Source:
public Message getCommittedMessage(TopicPartition topicPartition) throws Exception { SimpleConsumer consumer = null; try { long committedOffset = mZookeeperConnector.getCommittedOffsetCount(topicPartition) - 1; if (committedOffset < 0) { return null; } consumer = createConsumer(topicPartition); return getMessage(topicPartition, committedOffset, consumer); } catch (MessageDoesNotExistException e) { return null; } finally { if (consumer != null) { consumer.close(); } } }

Target:
public Message getCommittedMessage(TopicPartition topicPartition) throws Exception { SimpleConsumer consumer = null; try { long committedOffset = mZookeeperConnector.getCommittedOffsetCount(topicPartition) - 1; if (committedOffset < 0) { return null; } consumer = createConsumer(topicPartition); return getMessage(topicPartition, committedOffset, consumer); } catch (MessageDoesNotExistException e) { LOG.warn("no committed message for topic partition {}", topicPartition.getTopic(), topicPartition.getPartition()); return null; } finally { if (consumer != null) { consumer.close(); } } }
Source:
public BufferedRestClient(Settings settings) { this.settings = settings; this.client = new RestClient(settings); String tempIndex = settings.getTargetResource(); if (tempIndex == null) { tempIndex = ""; } this.index = tempIndex; this.resource = new Resource(index); if (this.settings.getParentIdPath() != null) enableParentChildIndex = true; else enableParentChildIndex = false; trace = log.isTraceEnabled(); }

Target:
public BufferedRestClient(Settings settings) { this.settings = settings; this.client = new RestClient(settings); String tempIndex = settings.getTargetResource(); if (tempIndex == null) { tempIndex = ""; } this.index = tempIndex; this.resource = new Resource(index); enableParentChildIndex = (this.settings.getParentIdPath() != null); trace = log.isTraceEnabled(); }
Source:
public CjkBigramTokenFilter setIgnoreScripts(CjkBigramTokenFilterScripts... ignoreScripts) { this.ignoreScripts = Arrays.asList(ignoreScripts); return this; }

Target:
public CjkBigramTokenFilter setIgnoreScripts(CjkBigramTokenFilterScripts... ignoreScripts) { this.ignoreScripts = (ignoreScripts == null) ? null : Arrays.asList(ignoreScripts); return this; }
Source:
public void parseAssociatedNames(Job<?, ?> job, Collection<GitHubRepositoryName> result) { ParameterizedJobMixIn.ParameterizedJob p = (ParameterizedJobMixIn.ParameterizedJob) job; for (GitHubTrigger ght : Util.filter(p.getTriggers().values(),GitHubTrigger.class)) { result.addAll(ght.getGitHubRepositories()); } }

Target:
public void parseAssociatedNames(Job<?, ?> job, Collection<GitHubRepositoryName> result) { if (job instanceof ParameterizedJobMixIn.ParameterizedJob) { ParameterizedJobMixIn.ParameterizedJob p = (ParameterizedJobMixIn.ParameterizedJob) job; for (GitHubTrigger ght : Util.filter(p.getTriggers().values(),GitHubTrigger.class)) { result.addAll(ght.getGitHubRepositories()); } } }
Source:
protected static List<WebElement> findByKeyAttrs(WebDriver webDriver, FindByCoordinates findByCoordinates) { KeyAttrs keyAttrs = KeyAttrs.DEFAULT; if (findByCoordinates.tag != null) { try { keyAttrs = KeyAttrs.valueOf(findByCoordinates.tag.trim().toUpperCase()); } catch (IllegalArgumentException e) { } } String xpathCriteria = Element.escapeXpathValue(findByCoordinates.criteria); String xpathTag = findByCoordinates.tag; if (findByCoordinates.tag == null) { xpathTag = "*"; } List<String> xpathConstraints = new ArrayList<>(); if (findByCoordinates.constraints != null) { for (Entry<String, String> entry : findByCoordinates.constraints.entrySet()) { for (String value : entry.getValue().split(",")) { xpathConstraints.add(String.format("@%s='%s'", entry.getKey(), value)); } } } List<String> xpathSearchers = new ArrayList<>(); for (String attr : keyAttrs.getKeyAttrs()) { xpathSearchers.add(String.format("%s=%s", attr, xpathCriteria)); } xpathSearchers.addAll(getAttrsWithUrl(webDriver, keyAttrs, findByCoordinates.criteria)); String xpath = String.format(" xpathTag, (xpathConstraints.size() > 0 ? "("+StringUtils.join(xpathConstraints, " or ")+")" : ""), (xpathConstraints.size() > 0 ? " and " : ""), StringUtils.join(xpathSearchers, " or ")); return webDriver.findElements(By.xpath(xpath)); }

Target:
protected static List<WebElement> findByKeyAttrs(WebDriver webDriver, FindByCoordinates findByCoordinates) { KeyAttrs keyAttrs = KeyAttrs.DEFAULT; if (findByCoordinates.tag != null) { try { keyAttrs = KeyAttrs.valueOf(findByCoordinates.tag.trim().toUpperCase()); } catch (IllegalArgumentException e) { } } String xpathCriteria = Element.escapeXpathValue(findByCoordinates.criteria); String xpathTag = findByCoordinates.tag; if (findByCoordinates.tag == null) { xpathTag = "*"; } List<String> xpathConstraints = new ArrayList<>(); if (findByCoordinates.constraints != null) { for (Entry<String, String> entry : findByCoordinates.constraints.entrySet()) { for (String value : entry.getValue().split(",")) { xpathConstraints.add(String.format("@%s='%s'", entry.getKey(), value)); } } } List<String> xpathSearchers = new ArrayList<>(); for (String attr : keyAttrs.getKeyAttrs()) { xpathSearchers.add(String.format("%s=%s", attr, xpathCriteria)); } xpathSearchers.addAll(getAttrsWithUrl(webDriver, keyAttrs, findByCoordinates.criteria)); String xpath = String.format(" xpathTag, (xpathConstraints.size() > 0 ? String.format("(%s) and ",StringUtils.join(xpathConstraints, " or ")) : ""), StringUtils.join(xpathSearchers, " or ")); return webDriver.findElements(By.xpath(xpath)); }
Source:
public static <M extends Message, B extends Message.Builder> Collection<M> applyMask(@SuppressWarnings("TypeMayBeWeakened") FieldMask mask, Collection<M> entities, TypeUrl typeUrl) { final List<M> filtered = new ArrayList<>(); final ProtocolStringList filter = mask.getPathsList(); final Class<B> builderClass = getBuilderForType(typeUrl); if (filter.isEmpty() || builderClass == null) { return Collections.unmodifiableCollection(entities); } try { final Constructor<B> builderConstructor = builderClass.getDeclaredConstructor(); builderConstructor.setAccessible(true); for (Message wholeMessage : entities) { final B builder = builderConstructor.newInstance(); for (Descriptors.FieldDescriptor field : wholeMessage.getDescriptorForType().getFields()) { if (filter.contains(field.getFullName())) { builder.setField(field, wholeMessage.getField(field)); } } filtered.add((M) builder.build()); } } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) { return Collections.unmodifiableCollection(entities); } return Collections.unmodifiableList(filtered); }

Target:
public static <M extends Message, B extends Message.Builder> Collection<M> applyMask(@SuppressWarnings("TypeMayBeWeakened") FieldMask mask, Collection<M> entities, TypeUrl typeUrl) { final List<M> filtered = new LinkedList<>(); final ProtocolStringList filter = mask.getPathsList(); final Class<B> builderClass = getBuilderForType(typeUrl); if (filter.isEmpty() || builderClass == null) { return Collections.unmodifiableCollection(entities); } try { final Constructor<B> builderConstructor = builderClass.getDeclaredConstructor(); builderConstructor.setAccessible(true); for (Message wholeMessage : entities) { final B builder = builderConstructor.newInstance(); for (Descriptors.FieldDescriptor field : wholeMessage.getDescriptorForType().getFields()) { if (filter.contains(field.getFullName())) { builder.setField(field, wholeMessage.getField(field)); } } filtered.add((M) builder.build()); } } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) { return Collections.unmodifiableCollection(entities); } return Collections.unmodifiableList(filtered); }
Source:
public void placeBlock(GlowPlayer player, GlowBlockState state, BlockFace face, ItemStack holding, Vector clickedLoc) { BlockFace direction; double rot = player.getLocation().getYaw() % 360; if (rot < 0) { rot += 360.0; } if (0 <= rot && rot < 45) { direction = BlockFace.SOUTH; } else if (45 <= rot && rot < 135) { direction = BlockFace.WEST; } else if (135 <= rot && rot < 225) { direction = BlockFace.NORTH; } else if (225 <= rot && rot < 315) { direction = BlockFace.EAST; } else if (315 <= rot && rot < 360.0) { direction = BlockFace.SOUTH; } else { direction = BlockFace.EAST; } if (state.getBlock().getRelative(direction).getType() == Material.AIR && state.getBlock().getRelative(direction).getRelative(BlockFace.DOWN).getType().isSolid()) { super.placeBlock(player, state, face, holding, clickedLoc); final MaterialData data = state.getData(); if (data instanceof Bed) { ((Bed) data).setFacingDirection(direction); state.setData(data); } else { GlowServer.logger.warning("Placing " + getMaterial().name() + ": MaterialData was of wrong type (" + data.getClass().getName() + ")"); } } }

Target:
public void placeBlock(GlowPlayer player, GlowBlockState state, BlockFace face, ItemStack holding, Vector clickedLoc) { BlockFace direction; double rot = player.getLocation().getYaw(); if (rot < 0) { rot += 360.0; } if (0 <= rot && rot < 45) { direction = BlockFace.SOUTH; } else if (45 <= rot && rot < 135) { direction = BlockFace.WEST; } else if (135 <= rot && rot < 225) { direction = BlockFace.NORTH; } else if (225 <= rot && rot < 315) { direction = BlockFace.EAST; } else if (315 <= rot && rot < 360.0) { direction = BlockFace.SOUTH; } else { direction = BlockFace.EAST; } if (state.getBlock().getRelative(direction).getType() == Material.AIR && state.getBlock().getRelative(direction).getRelative(BlockFace.DOWN).getType().isSolid()) { super.placeBlock(player, state, face, holding, clickedLoc); final MaterialData data = state.getData(); if (data instanceof Bed) { ((Bed) data).setFacingDirection(direction); state.setData(data); } else { GlowServer.logger.warning("Placing " + getMaterial().name() + ": MaterialData was of wrong type (" + data.getClass().getName() + ")"); } } }
Source:
protected static void setUpBeforeClass(String params, String projectRoot, boolean isDevMode) throws IOException, InterruptedException, FileNotFoundException { basicDevProj = new File(projectRoot); String os = System.getProperty("os.name"); if (os != null && os.toLowerCase().startsWith("windows")) { isWindows = true; } if (!isWindows) { tempProj = Files.createTempDirectory("temp").toFile(); assertTrue(tempProj.exists()); assertTrue(basicDevProj.exists()); FileUtils.copyDirectoryStructure(basicDevProj, tempProj); assertTrue(tempProj.listFiles().length > 0); logFile = new File(basicDevProj, "logFile.txt"); assertTrue(logFile.createNewFile()); pom = new File(tempProj, "pom.xml"); assertTrue(pom.exists()); replaceVersion(); startProcess(params, isDevMode); } }

Target:
protected static void setUpBeforeClass(String params, String projectRoot, boolean isDevMode) throws IOException, InterruptedException, FileNotFoundException { basicDevProj = new File(projectRoot); tempProj = Files.createTempDirectory("temp").toFile(); assertTrue(tempProj.exists()); assertTrue(basicDevProj.exists()); FileUtils.copyDirectoryStructure(basicDevProj, tempProj); assertTrue(tempProj.listFiles().length > 0); logFile = new File(basicDevProj, "logFile.txt"); assertTrue(logFile.createNewFile()); pom = new File(tempProj, "pom.xml"); assertTrue(pom.exists()); replaceVersion(); startProcess(params, isDevMode); }
Source:
private boolean syncAcl(ACLDocumentOperation operation) { for (int n : new int {1 , 1 , 2 , 3 , 5 , 8}) { if(trySyncAcl(operation)) { return true; } try { if(LOGGER.isTraceEnabled()) { LOGGER.trace("Sleeping for {}(s)", n * 1000); } Thread.sleep(n * 1000); } catch (InterruptedException e) { LOGGER.error("There was an error while trying the sleep the syncACL operation", e); } } return false; }

Target:
private boolean syncAcl(ACLDocumentOperation operation) { for (int n : new int {1 , 1 , 2 , 3 , 5 , 8}) { if(trySyncAcl(operation)) { return true; } try { if(LOGGER.isTraceEnabled()) { LOGGER.trace("Sleeping for {}(s)", n); } Thread.sleep(n * 1000); } catch (InterruptedException e) { LOGGER.error("There was an error while trying the sleep the syncACL operation", e); } } return false; }
Source:
public ActionResult execute() { String instructorEmail = getNonNullRequestParamValue(Const.ParamsNames.INSTRUCTOR_EMAIL).trim(); AccountCreateRequest createRequest = getAndValidateRequestBody(AccountCreateRequest.class); String instructorName = createRequest.getInstructorName(); String courseId = null; try { courseId = importDemoData(instructorEmail, instructorName); } catch (InvalidParametersException | EntityDoesNotExistException e) { return new JsonResult(e.getMessage(), HttpStatus.SC_BAD_REQUEST); } String instructorInstitution = createRequest.getInstructorInstitution(); List<InstructorAttributes> instructorList = logic.getInstructorsForCourse(courseId); String joinLink = Config.getFrontEndAppUrl(Const.WebPageURIs.JOIN_PAGE) .withRegistrationKey(StringHelper.encrypt(instructorList.get(0).key)) .withInstructorInstitution(instructorInstitution) .withParam(Const.ParamsNames.ENTITY_TYPE, Const.EntityType.INSTRUCTOR) .toAbsoluteString(); EmailWrapper email = emailGenerator.generateNewInstructorAccountJoinEmail( instructorList.get(0).email, instructorName, joinLink); emailSender.sendEmail(email); JoinLinkData output = new JoinLinkData(joinLink); return new JsonResult(output); }

Target:
public ActionResult execute() { AccountCreateRequest createRequest = getAndValidateRequestBody(AccountCreateRequest.class); String instructorName = createRequest.getInstructorName().trim(); String instructorEmail = createRequest.getInstructorEmail().trim(); String courseId = null; try { courseId = importDemoData(instructorEmail, instructorName); } catch (InvalidParametersException | EntityDoesNotExistException e) { return new JsonResult(e.getMessage(), HttpStatus.SC_BAD_REQUEST); } String instructorInstitution = createRequest.getInstructorInstitution().trim(); List<InstructorAttributes> instructorList = logic.getInstructorsForCourse(courseId); String joinLink = Config.getFrontEndAppUrl(Const.WebPageURIs.JOIN_PAGE) .withRegistrationKey(StringHelper.encrypt(instructorList.get(0).key)) .withInstructorInstitution(instructorInstitution) .withParam(Const.ParamsNames.ENTITY_TYPE, Const.EntityType.INSTRUCTOR) .toAbsoluteString(); EmailWrapper email = emailGenerator.generateNewInstructorAccountJoinEmail( instructorList.get(0).email, instructorName, joinLink); emailSender.sendEmail(email); JoinLinkData output = new JoinLinkData(joinLink); return new JsonResult(output); }
Source:
public SpongePaginationService() { Sponge.getGame().getCommandDispatcher().register(Sponge.getPlugin(), CommandSpec.builder() .description(t("Helper command for paginations occurring")) .arguments(new ActivePaginationCommandElement(t("pagination-id"))) .child(CommandSpec.builder() .description(t("Go to the next page")) .executor(new CommandExecutor() { @Override public CommandResult execute(CommandSource src, CommandContext args) throws CommandException { args.<ActivePagination>getOne("pagination-id").get().nextPage(); return CommandResult.success(); } }).build(), "next", "n") .child(CommandSpec.builder() .description(t("Go to the previous page")) .executor(new CommandExecutor() { @Override public CommandResult execute(CommandSource src, CommandContext args) throws CommandException { args.<ActivePagination>getOne("pagination-id").get().previousPage(); return CommandResult.success(); } }).build(), "previous", "prev", "p") .child(CommandSpec.builder() .description(t("Go to a specific page")) .arguments(integer(t("page"))) .executor(new CommandExecutor() { @Override public CommandResult execute(CommandSource src, CommandContext args) throws CommandException { args.<ActivePagination>getOne("pagination-id").get().specificPage(args.<Integer>getOne("page").get()); return CommandResult.success(); } }).build(), "page") .build(), "pagination", "page"); registerDefaultPaginationCalculators(); }

Target:
public SpongePaginationService() { registerDefaultPaginationCalculators(); }
Source:
public final Collection<GrantedAuthority> getGrantedAuthorities( final DirContextOperations user, final String username, final String password) { final String userDn = user.getNameInNamespace(); if (logger.isDebugEnabled()) { logger.debug("Getting authorities for user " + userDn); } final List<GrantedAuthority> result = new ArrayList<GrantedAuthority>(); if (password != null) { Supplier<DirContext> ctxSupplier = () -> ldapTemplate.getContextSource().getContext(userDn, password); ldapTemplate.authenticate( DistinguishedName.EMPTY_PATH, userDn, password, new AuthenticatedLdapEntryContextCallback() { @Override public void executeWithContext( DirContext ctx, LdapEntryIdentification ldapEntryIdentification) { getAllRoles(user, userDn, result, username, ctxSupplier); } }); } else { getAllRoles(user, userDn, result, username, null); } return result; }

Target:
public final Collection<GrantedAuthority> getGrantedAuthorities( final DirContextOperations user, final String username, final String password) { final String userDn = user.getNameInNamespace(); if (logger.isDebugEnabled()) { logger.debug("Getting authorities for user " + userDn); } final List<GrantedAuthority> result = new ArrayList<GrantedAuthority>(); if (password != null) { Consumer<Consumer<DirContext>> ctxConsumer = (ctxFunc) -> { ldapTemplate.authenticate( LdapUtils.emptyLdapName(), userDn, password, new AuthenticatedLdapEntryContextCallback() { @Override public void executeWithContext( DirContext ctx, LdapEntryIdentification ldapEntryIdentification) { ctxFunc.accept(ctx); } }); }; ldapTemplate.authenticate( LdapUtils.emptyLdapName(), userDn, password, new AuthenticatedLdapEntryContextCallback() { @Override public void executeWithContext( DirContext ctx, LdapEntryIdentification ldapEntryIdentification) { getAllRoles(user, userDn, result, username, ctxConsumer); } }); } else { getAllRoles(user, userDn, result, username, (func) -> func.accept(null)); } return result; }
Source:
public void handle(Message<T> message) { Handler<Message<T>> theHandler; synchronized (this) { if (paused) { if (pending.size() < maxBufferedMessages) { pending.add(message); } else { if (discardHandler != null) { discardHandler.handle(message); } else { log.warn("Discarding message as more than " + maxBufferedMessages + " buffered in paused consumer (address {0})", address); } } return; } else { if (pending.size() > 0) { pending.add(message); message = pending.poll(); } theHandler = handler; } } deliver(theHandler, message); }

Target:
public void handle(Message<T> message) { Handler<Message<T>> theHandler; synchronized (this) { if (paused) { if (pending.size() < maxBufferedMessages) { pending.add(message); } else { if (discardHandler != null) { discardHandler.handle(message); } else { log.warn("Discarding message as more than " + maxBufferedMessages + " buffered in paused consumer. address: " + address); } } return; } else { if (pending.size() > 0) { pending.add(message); message = pending.poll(); } theHandler = handler; } } deliver(theHandler, message); }
Source:
public WorkspaceDto update( @ApiParam("The workspace id") @PathParam("id") String id, @ApiParam(value = "The workspace update", required = true) WorkspaceDto update) throws BadRequestException, ServerException, ForbiddenException, NotFoundException, ConflictException { if (update.getDevfile() != null) { update.setConfig(null); } relativizeRecipeLinks(update.getConfig()); return asDtoWithLinksAndToken(doUpdate(id, update)); }

Target:
public WorkspaceDto update( @ApiParam("The workspace id") @PathParam("id") String id, @ApiParam(value = "The workspace update", required = true) WorkspaceDto update) throws BadRequestException, ServerException, ForbiddenException, NotFoundException, ConflictException { checkArgument( update.getConfig() != null || update.getDevfile() != null, "Required non-null workspace configuration or devfile update"); if (update.getDevfile() != null) { update.setConfig(null); } relativizeRecipeLinks(update.getConfig()); return asDtoWithLinksAndToken(doUpdate(id, update)); }
Source:
private static SSLFactory getSSLFactoryIfRequired(VerifiableProperties verifiableProperties) throws Exception { if (new ClusterMapConfig(verifiableProperties).clusterMapHttp2Enable) { return new NettySslHttp2Factory(new SSLConfig(verifiableProperties)); } boolean sslRequired = new NettyConfig(verifiableProperties).nettyServerEnableSSL || new ClusterMapConfig(verifiableProperties).clusterMapSslEnabledDatacenters.length() > 0; return sslRequired ? SSLFactory.getNewInstance(new SSLConfig(verifiableProperties)) : null; }

Target:
private static SSLFactory getSSLFactoryIfRequired(VerifiableProperties verifiableProperties) throws Exception { ClusterMapConfig clusterMapConfig = new ClusterMapConfig(verifiableProperties); if (clusterMapConfig.clusterMapHttp2NetworkClientEnabled) { return new NettySslHttp2Factory(new SSLConfig(verifiableProperties)); } boolean sslRequired = new NettyConfig(verifiableProperties).nettyServerEnableSSL || clusterMapConfig.clusterMapSslEnabledDatacenters.length() > 0; return sslRequired ? SSLFactory.getNewInstance(new SSLConfig(verifiableProperties)) : null; }
Source:
private void setIsSuicide(final Boolean s) { setIsSuicideOnAttack(s); setIsSuicideOnDefense(s && !Properties.getDefendingSuicideAndMunitionUnitsDoNotFire(getData())); setIsFirstStrike(s); }

Target:
private void setIsSuicide(final Boolean s) { setIsSuicideOnAttack(s); setIsSuicideOnDefense(s && !Properties.getDefendingSuicideAndMunitionUnitsDoNotFire(getData())); setIsFirstStrike(s); if (s) { canNotTarget = null; } else { resetCanNotTarget(); } }
Source:
public synchronized void startForMaintenance(ServiceProvider<MaintainableService> serviceProvider) { if (rootDirectory == null) { return; } internalStart(); }

Target:
public synchronized void startForMaintenance(ServiceProvider<MaintainableService> serviceProvider) { internalStart(); }
Source:
public void updateAccounts(Collection<Account> accounts) throws AccountServiceException { primaryAccountService.updateAccounts(accounts); try { secondaryAccountService.updateAccounts(accounts); } catch (Exception e) { logger.error("Update accounts failed for secondary source", e); accountServiceMetrics.updateAccountInconsistencyCount.inc(); } }

Target:
public void updateAccounts(Collection<Account> accounts) throws AccountServiceException { primaryAccountService.updateAccounts(accounts); secondaryAccountService.updateAccounts(accounts); }
Source:
public void checkin(CriticalComponent criticalService) { for (CriticalComponentImpl csi : this.criticalServiceList) { if (criticalService.equals(csi.getCriticalComponent())) { csi.update(); } } }

Target:
public void checkin(CriticalComponent criticalService) { for (CriticalComponentImpl csi : this.criticalComponentList) { if (criticalService.equals(csi.getCriticalComponent())) { csi.update(); break; } } }
Source:
public void deleteHealthCheck(String healthCheckName) { log.info("Deleting Health Check: " + healthCheckName); try { Operation operation = compute.httpHealthChecks().delete(PROJECT_ID, healthCheckName).execute(); waitForGlobalOperationCompletion(operation.getName()); } catch (Exception e) { log.warn("Could not get delete health check " + healthCheckName + " " + e); } log.info("Health check: " + healthCheckName + " was deleted"); }

Target:
public void deleteHealthCheck(String healthCheckName) { log.info("Deleting Health Check: " + healthCheckName); try { Operation operation = compute.httpHealthChecks().delete(PROJECT_ID, healthCheckName).execute(); waitForGlobalOperationCompletion(operation.getName()); log.info("Health check: " + healthCheckName + " was deleted"); } catch (Exception e) { log.error("Could not get delete health check " + healthCheckName, e); } }
Source:
private void removeGlusterVolumesFromDb() { List<GlusterVolumeEntity> volumes = getGlusterVolumeDao().getByClusterId(getVdsGroupId()); if (volumes.size() > 0) { for (GlusterVolumeEntity volume : volumes) { getGlusterVolumeDao().remove(volume.getId()); } } }

Target:
private void removeGlusterVolumesFromDb() { List<GlusterVolumeEntity> volumes = getGlusterVolumeDao().getByClusterId(getVdsGroupId()); if (volumes.size() > 0) { getGlusterVolumeDao().removeByClusterId(getVdsGroupId()); } }
Source:
private static String removeBranchFromKey(String componentKey) { return StringUtils.substringBeforeLast(componentKey, ":BRANCH:"); }

Target:
private static String removeBranchFromKey(String componentKey) { return StringUtils.substringBeforeLast(componentKey, ComponentDto.BRANCH_KEY_SEPARATOR); }
Source:
public String getHostName(String host) { String hostname = getInformation(host, SshToken.HOSTNAME); if (hostname != null) { return hostname; } else { return "localhost"; } }

Target:
public String getHostName(String host) { String hostName = getInformation(host, SshToken.HOSTNAME); if (hostName != null) { return hostName; } else { return host; } }
Source:
public void start() { Thread t = new Thread(this); t.setDaemon(true); LOG.info("Starting FileWatcher on {}", watchedFile); t.start(); }

Target:
public void start() { Thread t = new Thread(this, "FileWatcher-" + watchedFile.getFileName()); t.setDaemon(true); LOG.info("Starting FileWatcher on {}", watchedFile); t.start(); }
Source:
private BufferingPrologControl newEmptyMachine(ClassLoader cl) { BufferingPrologControl ctl = new BufferingPrologControl(); ctl.setMaxArity(PrologEnvironment.MAX_ARITY); ctl.setMaxDatabaseSize(DB_MAX); ctl.setPrologClassLoader(new PrologClassLoader(new PredicateClassLoader( predicateProviders, cl))); ctl.setEnabled(EnumSet.allOf(Prolog.Feature.class), false); List<String> packages = new LinkedList<String>(PACKAGE_LIST); for (PredicateProvider predicateProvider : predicateProviders) { packages.addAll(predicateProvider.getPackages()); } ctl.initialize(packages.toArray(new String[packages.size()])); return ctl; }

Target:
private BufferingPrologControl newEmptyMachine(ClassLoader cl) { BufferingPrologControl ctl = new BufferingPrologControl(); ctl.setMaxArity(PrologEnvironment.MAX_ARITY); ctl.setMaxDatabaseSize(DB_MAX); ctl.setPrologClassLoader(new PrologClassLoader(new PredicateClassLoader( predicateProviders, cl))); ctl.setEnabled(EnumSet.allOf(Prolog.Feature.class), false); List<String> packages = Lists.newArrayList(); packages.addAll(PACKAGE_LIST); for (PredicateProvider predicateProvider : predicateProviders) { packages.addAll(predicateProvider.getPackages()); } ctl.initialize(packages.toArray(new String[packages.size()])); return ctl; }
Source:
public Path generate(String id, String version, String... dependencyList) throws IOException, NoSuchAlgorithmException, JAXBException, NugetFormatException { NugetArtifactCoordinates nac = new NugetArtifactCoordinates(id, version, "nupkg"); Path basePath = Paths.get(getBasedir()).normalize().toAbsolutePath(); Path nupkgPath = basePath.resolve(nac.toPath()).normalize().toAbsolutePath(); Files.createDirectories(nupkgPath.getParent()); SemanticVersion semanticVersion = SemanticVersion.parse(version); logger.debug("Version of the nupkg package: {}", semanticVersion.toString()); generate(nupkgPath, id, semanticVersion, dependencyList); return nupkgPath; }

Target:
public Path generate(String id, String version, String... dependencyList) throws IOException, NoSuchAlgorithmException, JAXBException, NugetFormatException { NugetArtifactCoordinates nac = new NugetArtifactCoordinates(id, version, "nupkg"); Path nupkgPath = basedir.resolve(nac.toPath()).normalize().toAbsolutePath(); Files.createDirectories(nupkgPath.getParent()); SemanticVersion semanticVersion = SemanticVersion.parse(version); logger.debug("Version of the nupkg package: {}", semanticVersion.toString()); generate(nupkgPath, id, semanticVersion, dependencyList); return nupkgPath; }