auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void testRemoveDataSource() throws Exception { cli.sendLine("/subsystem=datasources/data-source=TestDS:remove{allow-resource-service-restart=true}"); cli.sendLine("/:reload"); cli.sendLine("cd /subsystem=datasources/data-source"); cli.sendLine("ls"); String ls = cli.readOutput(); assertFalse(ls.contains("java:jboss/datasources/TestDS")); String jndiClass = JndiServlet.lookup(url.toString(), "java:jboss/datasources/TestDS"); Assert.assertEquals(JndiServlet.NOT_FOUND, jndiClass); }

Target:
private void testRemoveDataSource() throws Exception { cli.sendLine("/subsystem=datasources/data-source=TestDS:remove{allow-resource-service-restart=true}"); cli.sendLine("reload"); cli.sendLine("cd /subsystem=datasources/data-source"); cli.sendLine("ls"); String ls = cli.readOutput(); assertFalse(ls.contains("java:jboss/datasources/TestDS")); String jndiClass = JndiServlet.lookup(url.toString(), "java:jboss/datasources/TestDS"); Assert.assertEquals(JndiServlet.NOT_FOUND, jndiClass); }
Source:
private static Taxonomy buildTaxonomy(IBranchPath branchPath, ICDOCommitChangeSet commitChangeSet, LongCollection conceptIds, SnomedStatementBrowser statementBrowser, final StatementCollectionMode mode) { final IsAStatementWithId[] statements = statementBrowser.getActiveStatements(branchPath, mode); final ISnomedTaxonomyBuilder inferredPreviousBuilder = new SnomedTaxonomyBuilder(conceptIds, statements); final ISnomedTaxonomyBuilder inferredNewBuilder = new SnomedTaxonomyBuilder(conceptIds, statements); inferredPreviousBuilder.build(); new SnomedTaxonomyUpdateRunnable(branchPath, commitChangeSet, inferredNewBuilder, mode.getCharacteristicType()).run(); final Pair<LongSet, LongSet> diff = inferredNewBuilder.difference(inferredPreviousBuilder); return new Taxonomy(inferredNewBuilder, inferredPreviousBuilder, diff); }

Target:
private static Taxonomy buildTaxonomy(IBranchPath branchPath, ICDOCommitChangeSet commitChangeSet, LongCollection conceptIds, SnomedStatementBrowser statementBrowser, final StatementCollectionMode mode) { final IsAStatementWithId[] statements = statementBrowser.getActiveStatements(branchPath, mode); final ISnomedTaxonomyBuilder oldTaxonomy = new SnomedTaxonomyBuilder(conceptIds, statements); final ISnomedTaxonomyBuilder newTaxonomy = new SnomedTaxonomyBuilder(conceptIds, statements); oldTaxonomy.build(); new SnomedTaxonomyUpdateRunnable(branchPath, commitChangeSet, newTaxonomy, mode.getCharacteristicType()).run(); final Pair<LongSet, LongSet> diff = newTaxonomy.difference(oldTaxonomy); return new Taxonomy(newTaxonomy, oldTaxonomy, diff); }
Source:
public boolean onBackPressed() { if (tocHandler != null && tocHandler.isVisible()) { tocHandler.hide(); return true; } if (closeFindInPage()) { return true; } if (pageFragmentLoadState.popBackStack()) { return true; } if (tabsProvider.onBackPressed()) { return true; } if (tabList.size() > 1) { tabList.remove(tabList.size() - 1); tabsProvider.notifyTabClosed(tabList.size() - 1); } return false; }

Target:
public boolean onBackPressed() { if (tocHandler != null && tocHandler.isVisible()) { tocHandler.hide(); return true; } if (closeFindInPage()) { return true; } if (pageFragmentLoadState.popBackStack()) { return true; } if (tabsProvider.onBackPressed()) { return true; } if (tabList.size() > 1) { tabList.remove(tabList.size() - 1); tabsProvider.notifyTabClosed(tabList.size()); } return false; }
Source:
private static void parseFile(String projectKey, Path projectDirPath, Map<String, ExpectedIssues> expectedIssuesByRule, Path file) { String ruleKey = file.toFile().getName().split("\\.")[0]; String fileKey = projectKey + ":" + projectDirPath.relativize(file).toString().replaceAll(Pattern.quote(File.separator), "/"); List<String> lines = getLines(file); for (int lineNumber = 1; lineNumber <= lines.size(); lineNumber++) { String currentLine = lines.get(lineNumber - 1); if (!NON_COMPLIANT_PATTERN.matcher(currentLine).find() || currentLine.trim().startsWith(" continue; } addLineWithIssue(expectedIssuesByRule, ruleKey, fileKey, lineNumber); } }

Target:
private static void parseFile(String projectKey, Path projectDirPath, Map<String, ExpectedIssues> expectedIssuesByRule, Path file) { String ruleKey = file.toFile().getName().split("\\.")[0]; String fileKey = projectKey + ":" + projectDirPath.relativize(file).toString().replaceAll(Pattern.quote(File.separator), "/"); List<String> lines = getLines(file); for (int lineNumber = 1; lineNumber <= lines.size(); lineNumber++) { String currentLine = lines.get(lineNumber - 1); if (NON_COMPLIANT_PATTERN.matcher(currentLine).find() && !currentLine.trim().startsWith(" addLineWithIssue(expectedIssuesByRule, ruleKey, fileKey, lineNumber); } } }
Source:
public String getToolTipText(Object element) { TaskReview review = (TaskReview) element; StringBuilder sb = new StringBuilder(); sb.append("Description: "); sb.append(review.getSummary()); sb.append("\n"); sb.append("Verified: "); if (review.getVerifiedScore() >= 1) { sb.append("YES"); } else { sb.append("NO"); } sb.append("\n"); sb.append("Code Review: "); sb.append(review.getCodeReviewScore()); return sb.toString(); }

Target:
public String getToolTipText(Object element) { TaskReview review = (TaskReview) element; StringBuilder sb = new StringBuilder(); sb.append("Description: "); sb.append(review.getSummary()); sb.append(System.getProperty("line.separator")); sb.append("Verified: "); if (review.getVerifiedScore() >= 1) { sb.append("YES"); } else { sb.append("NO"); } sb.append(System.getProperty("line.separator")); sb.append("Code Review: "); sb.append(review.getCodeReviewScore()); return sb.toString(); }
Source:
private void initialize(CatalogContext catalogContext, List<Integer> partitions, boolean isRejoin) { try { if (!hasEnabledConnectors(catalogContext)) { return; } exportLog.info("Creating connector " + m_loaderClass); ExportDataProcessor newProcessor = getNewProcessorWithProcessConfigSet(m_processorConfig); m_processor.set(newProcessor); ExportGeneration generation = initializePersistedGenerations(); generation.initializeGenerationFromCatalog(catalogContext, getConnectors(catalogContext), m_hostId, m_messenger, partitions); m_generation.set(generation); newProcessor.setExportGeneration(generation); newProcessor.readyForData(true); } catch (final ClassNotFoundException e) { exportLog.l7dlog( Level.ERROR, LogKeys.export_ExportManager_NoLoaderExtensions.name(), e); Throwables.propagate(e); } catch (final Exception e) { Throwables.propagate(e); } }

Target:
private void initialize(CatalogContext catalogContext, List<Integer> partitions, boolean isRejoin) { try { CatalogMap<Connector> connectors = getConnectors(catalogContext); if (!hasEnabledConnectors(connectors)) { return; } exportLog.info("Creating connector " + m_loaderClass); ExportDataProcessor newProcessor = getNewProcessorWithProcessConfigSet(m_processorConfig); m_processor.set(newProcessor); ExportGeneration generation = initializePersistedGenerations(); generation.initializeGenerationFromCatalog(catalogContext, connectors, m_hostId, m_messenger, partitions); m_generation.set(generation); newProcessor.setExportGeneration(generation); newProcessor.readyForData(true); } catch (final ClassNotFoundException e) { exportLog.l7dlog( Level.ERROR, LogKeys.export_ExportManager_NoLoaderExtensions.name(), e); Throwables.propagate(e); } catch (final Exception e) { Throwables.propagate(e); } }
Source:
public synchronized List<ConnectorTableLayoutResult> getTableLayouts( ConnectorSession session, ConnectorTableHandle handle, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns) { requireNonNull(handle, "handle is null"); checkArgument(handle instanceof MemoryTableHandle); MemoryTableHandle memoryTableHandle = (MemoryTableHandle) handle; MemoryTableLayoutHandle layoutHandle = new MemoryTableLayoutHandle( memoryTableHandle, ImmutableMap.copyOf(hostsPerTable.get((memoryTableHandle).getTableId()))); return ImmutableList.of(new ConnectorTableLayoutResult(getTableLayout(session, layoutHandle), constraint.getSummary())); }

Target:
public synchronized List<ConnectorTableLayoutResult> getTableLayouts( ConnectorSession session, ConnectorTableHandle handle, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns) { requireNonNull(handle, "handle is null"); checkArgument(handle instanceof MemoryTableHandle); MemoryTableHandle memoryTableHandle = (MemoryTableHandle) handle; checkState( tableDataFragments.containsKey(memoryTableHandle.getTableId()), "Inconsistent state for the table [%s.%s]", memoryTableHandle.getSchemaName(), memoryTableHandle.getTableName()); List<MemoryDataFragment> expectedFragments = ImmutableList.copyOf( tableDataFragments.get(memoryTableHandle.getTableId()).values()); MemoryTableLayoutHandle layoutHandle = new MemoryTableLayoutHandle(memoryTableHandle, expectedFragments); return ImmutableList.of(new ConnectorTableLayoutResult(getTableLayout(session, layoutHandle), constraint.getSummary())); }
Source:
private void expandTreeNode(TreeNode parentNode) { parentNode.getTreeItem().setState(true); if (parentNode.getParentName() != null) { final TreeNode parent = treeNodesMap.get(parentNode.getProjectId()); expandTreeNode(parent); } }

Target:
private void expandTreeNode(TreeNode parentNode) { parentNode.getTreeItem().setState(true); if (parentNode.getParentName() != null) { final TreeNode parent = treeNodesMap.get(parentNode.getParentId()); expandTreeNode(parent); } }
Source:
public void testInstrumentCodeByLine() { args.add("--instrument_code=LINE"); test( "function foo(){ const answerToAll = 42; }", "self.window||(self.window=self,self.window.top=self);var __jscov=window.top.__jscov||" + "(window.top.__jscov={fileNames:[],instrumentedLines:[],executedLines:[]})," + "JSCompiler_lcov_data_input0=[];" + "__jscov.executedLines.push(JSCompiler_lcov_data_input0);" + "__jscov.instrumentedLines.push(\"01\");" + "__jscov.fileNames.push(\"input0\");" + "function foo(){JSCompiler_lcov_data_input0[0]=!0}"); }

Target:
public void testInstrumentCodeByLine() { args.add("--instrument_code=LINE"); test( "function foo(){ const answerToAll = 42; }", lines( "self.window||(self.window=self,self.window.top=self);var __jscov=window.top.__jscov||", "(window.top.__jscov={fileNames:[],instrumentedLines:[],executedLines:[]}),", "JSCompiler_lcov_data_input0=[];", "__jscov.executedLines.push(JSCompiler_lcov_data_input0);", "__jscov.instrumentedLines.push(\"01\");", "__jscov.fileNames.push(\"input0\");", "function foo(){JSCompiler_lcov_data_input0[0]=!0}")); }
Source:
public void start() { if (!_resource.start()) { s_logger.error("Unable to start the resource: " + _resource.getName()); throw new CloudRuntimeException("Unable to start the resource: " + _resource.getName()); } _keystoreSetupPath = Script.findScript("scripts/util/", KeyStoreUtils.KS_SETUP_SCRIPT); if (_keystoreSetupPath == null) { throw new CloudRuntimeException(String.format("Unable to find the '%s' script", KeyStoreUtils.KS_SETUP_SCRIPT)); } _keystoreCertImportPath = Script.findScript("scripts/util/", KeyStoreUtils.KS_IMPORT_SCRIPT); if (_keystoreCertImportPath == null) { throw new CloudRuntimeException(String.format("Unable to find the '%s' script", KeyStoreUtils.KS_IMPORT_SCRIPT)); } try { _connection.start(); } catch (final NioConnectionException e) { s_logger.warn("NIO Connection Exception " + e); s_logger.info("Attempted to connect to the server, but received an unexpected exception, trying again..."); } while (!_connection.isStartup()) { final String host = _shell.getNextHost(); _shell.getBackoffAlgorithm().waitBeforeRetry(); _connection = new NioClient("Agent", host, _shell.getPort(), _shell.getWorkers(), this); s_logger.info("Connecting to host:" + host); try { _connection.start(); } catch (final NioConnectionException e) { s_logger.warn("NIO Connection Exception " + e); s_logger.info("Attempted to connect to the server, but received an unexpected exception, trying again..."); } } _shell.updateConnectedHost(); _executor.submit(new Runnable() { @Override public void run() { try { Thread.sleep(2000L); } catch (final InterruptedException ignored) { } finally { System.gc(); } } }); }

Target:
public void start() { if (!_resource.start()) { s_logger.error("Unable to start the resource: " + _resource.getName()); throw new CloudRuntimeException("Unable to start the resource: " + _resource.getName()); } _keystoreSetupPath = Script.findScript("scripts/util/", KeyStoreUtils.KS_SETUP_SCRIPT); if (_keystoreSetupPath == null) { throw new CloudRuntimeException(String.format("Unable to find the '%s' script", KeyStoreUtils.KS_SETUP_SCRIPT)); } _keystoreCertImportPath = Script.findScript("scripts/util/", KeyStoreUtils.KS_IMPORT_SCRIPT); if (_keystoreCertImportPath == null) { throw new CloudRuntimeException(String.format("Unable to find the '%s' script", KeyStoreUtils.KS_IMPORT_SCRIPT)); } try { _connection.start(); } catch (final NioConnectionException e) { s_logger.warn("NIO Connection Exception " + e); s_logger.info("Attempted to connect to the server, but received an unexpected exception, trying again..."); } while (!_connection.isStartup()) { final String host = _shell.getNextHost(); _shell.getBackoffAlgorithm().waitBeforeRetry(); _connection = new NioClient("Agent", host, _shell.getPort(), _shell.getWorkers(), this); s_logger.info("Connecting to host:" + host); try { _connection.start(); } catch (final NioConnectionException e) { s_logger.warn("NIO Connection Exception " + e); s_logger.info("Attempted to connect to the server, but received an unexpected exception, trying again..."); } } _shell.updateConnectedHost(); scavengeOldAgentObjects(); }
Source:
public byte[] getValueArray() { return CellUtils.getValue(this, this.valueArray); }

Target:
public byte[] getValueArray() { return this.valueArray; }
Source:
private boolean loadDataFromSession() { HttpSession session = getHttpSession(); Object data = session.getAttribute(SESSION_KEY); if (data == null) { return false; } else { ReportSessionData reportSessionData = null; try { reportSessionData = (ReportSessionData) data; } catch (ClassCastException e) { return false; } currentUser = reportSessionData.currentUser; dateFrom = reportSessionData.dateFrom; dateFromFormated = DateTimeConverterUtil.dateToString(dateFrom); dateTo = reportSessionData.dateTo; dateToFormated = DateTimeConverterUtil.dateToString(dateTo); return true; } }

Target:
private boolean loadDataFromSession() { HttpSession session = getHttpSession(); Object data = session.getAttribute(SESSION_KEY); if (!(data instanceof ReportSessionData)) { return false; } ReportSessionData reportSessionData = (ReportSessionData) data; currentUser = reportSessionData.currentUser; dateFrom = reportSessionData.dateFrom; dateFromFormated = DateTimeConverterUtil.dateToString(dateFrom); dateTo = reportSessionData.dateTo; dateToFormated = DateTimeConverterUtil.dateToString(dateTo); return true; }
Source:
public IScheduler getSchedulerInstance(Config config, Config runtime) throws SchedulerException { String schedulerClass = Context.schedulerClass(config); IScheduler scheduler; try { scheduler = ReflectionUtils.newInstance(schedulerClass); } catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) { String errMsg = String.format("Failed to instantiate scheduler using class '%s'", schedulerClass); throw new SchedulerException(errMsg); } scheduler.initialize(config, runtime); return scheduler; }

Target:
public IScheduler getSchedulerInstance(Config config, Config runtime) throws SchedulerException { String schedulerClass = Context.schedulerClass(config); IScheduler scheduler; try { scheduler = ReflectionUtils.newInstance(schedulerClass); } catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) { throw new SchedulerException(String.format("Failed to instantiate scheduler using class '%s'", schedulerClass)); } scheduler.initialize(config, runtime); return scheduler; }
Source:
public Long[] getByteRange() { return MantaUtils.parseSingleRange(getRange()); }

Target:
public Long[] getByteRange() { final String rangeString = getRange(); Validate.notNull(rangeString, "Range value must not be null"); String[] rangeValuesStrings = StringUtils.split(rangeString, "bytes="); Validate.isTrue(rangeValuesStrings.length == 1, "Range header value doesn't begin with string: bytes="); final String byteRange = rangeValuesStrings[0]; Validate.isTrue(StringUtils.split(byteRange, ",").length == 1, "Multi-range requests are not supported"); String[] rangeParts = StringUtils.split(byteRange, "-"); Validate.isTrue(StringUtils.countMatches(byteRange, "-") < 2, "Cannot end or start with a negative number"); Long startPos = null; Long endPos = null; if (StringUtils.startsWith(byteRange, "-")) { endPos = Long.parseLong(byteRange); } else if (StringUtils.endsWith(byteRange, "-")) { startPos = Long.parseLong(byteRange.split("-")[0]); } else if (rangeParts.length == 2) { startPos = Long.parseUnsignedLong(rangeParts[0]); endPos = Long.parseUnsignedLong(rangeParts[1]); } else { throw new IllegalArgumentException("range must exist with - separator"); } return new Long[] {startPos, endPos}; }
Source:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); if (null == mDisplayState) { cleanUp(); } else { mInAppView = inflater.inflate(R.layout.com_mixpanel_android_activity_notification_mini, container, false); final TextView titleView = (TextView) mInAppView.findViewById(R.id.com_mixpanel_android_notification_title); final ImageView notifImage = (ImageView) mInAppView.findViewById(R.id.com_mixpanel_android_notification_image); InAppNotification inApp = mDisplayState.getInAppNotification(); titleView.setText(inApp.getTitle()); notifImage.setImageBitmap(inApp.getImage()); mHandler.postDelayed(mRemover, MINI_REMOVE_TIME); if (inApp.getStyle().equals("light")) showLightStyle(); } return mInAppView; }

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); if (null == mDisplayState) { cleanUp(); } else { mInAppView = inflater.inflate(R.layout.com_mixpanel_android_activity_notification_mini, container, false); final TextView titleView = (TextView) mInAppView.findViewById(R.id.com_mixpanel_android_notification_title); final ImageView notifImage = (ImageView) mInAppView.findViewById(R.id.com_mixpanel_android_notification_image); InAppNotification inApp = mDisplayState.getInAppNotification(); titleView.setText(inApp.getTitle()); notifImage.setImageBitmap(inApp.getImage()); mHandler.postDelayed(mRemover, MINI_REMOVE_TIME); if (InAppNotification.Style.LIGHT.equalsName(inApp.getStyle())) { showLightStyle(); } } return mInAppView; }
Source:
public void testMultipleClients() throws Exception { Subscriber client1 = createSubscriber(new String[] { "refs/heads/*:refs/remotes/origin/*", "refs/tags/*:refs/tags/*" }); Subscriber client2 = createSubscriber(new String[] { "refs/heads/master:refs/remotes/origin/master" }); Thread.sleep(1000); Repository r1 = client1.getRepository("testrepository").getRepository(); Repository r2 = client2.getRepository("testrepository").getRepository(); Ref ref = r1.getRef("refs/pubsub/origin/heads/master"); assertNotNull(ref); ObjectId master = triggerUpdate("refs/heads/master"); ObjectId branch1 = createRef( "refs/heads/master", "refs/heads/branch1"); branch1 = triggerUpdate("refs/heads/branch1"); master = triggerUpdate("refs/heads/master"); ObjectId tag1 = createRef("refs/heads/branch1", "refs/tags/tag1"); Thread.sleep(1000); ref = r1.getRef("refs/pubsub/origin/heads/master"); assertEquals(master, ref.getObjectId()); ref = r1.getRef("refs/pubsub/origin/heads/branch1"); assertEquals(branch1, ref.getObjectId()); ref = r1.getRef("refs/pubsub/origin/tags/tag1"); assertEquals(tag1, ref.getObjectId()); ref = r2.getRef("refs/pubsub/origin/heads/master"); assertEquals(master, ref.getObjectId()); ref = r2.getRef("refs/pubsub/origin/heads/branch1"); assertNull(ref); ref = r2.getRef("refs/pubsub/origin/tags/tag1"); assertNull(ref); }

Target:
public void testMultipleClients() throws Exception { setUpPublisher(2); TestSubscriber client1 = createSubscriber(new String[] { "refs/heads/*:refs/remotes/origin/*", "refs/tags/*:refs/tags/*" }, 6); TestSubscriber client2 = createSubscriber(new String[] { "refs/heads/master:refs/remotes/origin/master" }, 3); connectLatch.await(); ObjectId master = triggerUpdate("refs/heads/master"); ObjectId branch1 = createBranch( "refs/heads/master", "refs/heads/branch1"); branch1 = triggerUpdate("refs/heads/branch1"); master = triggerUpdate("refs/heads/master"); ObjectId tag1 = createTag("refs/heads/branch1", "refs/tags/tag1"); client1.await(); client2.await(); Repository r1 = client1.getRepository("testrepository").getRepository(); Repository r2 = client2.getRepository("testrepository").getRepository(); Ref ref = r1.getRef("refs/pubsub/origin/heads/master"); assertEquals(master, ref.getObjectId()); ref = r1.getRef("refs/pubsub/origin/heads/branch1"); assertEquals(branch1, ref.getObjectId()); ref = r1.getRef("refs/pubsub/origin/tags/tag1"); assertEquals(tag1, ref.getObjectId()); ref = r2.getRef("refs/pubsub/origin/heads/master"); assertEquals(master, ref.getObjectId()); ref = r2.getRef("refs/pubsub/origin/heads/branch1"); assertNull(ref); ref = r2.getRef("refs/pubsub/origin/tags/tag1"); assertNull(ref); }
Source:
private CoordinatorStats assign( final Set<ServerHolder> serverHolders, final DataSegment segment ) { final CoordinatorStats stats = new CoordinatorStats(); stats.addToGlobalStat(LoadRule.ASSIGNED_COUNT, 0); for (ServerHolder holder : serverHolders) { if (segment.getSize() > holder.getAvailableSize()) { log.makeAlert("Failed to broadcast segment for [%s]", segment.getDataSource()) .addData("segmentId", segment.getIdentifier()) .addData("segmentSize", segment.getSize()) .addData("hostName", holder.getServer().getHost()) .addData("availableSize", holder.getAvailableSize()) .emit(); } else { holder.getPeon().loadSegment( segment, null ); stats.addToGlobalStat(LoadRule.ASSIGNED_COUNT, 1); } } return stats; }

Target:
private CoordinatorStats assign( final Set<ServerHolder> serverHolders, final DataSegment segment ) { final CoordinatorStats stats = new CoordinatorStats(); stats.addToGlobalStat(LoadRule.ASSIGNED_COUNT, 0); for (ServerHolder holder : serverHolders) { if (segment.getSize() > holder.getAvailableSize()) { log.makeAlert("Failed to broadcast segment for [%s]", segment.getDataSource()) .addData("segmentId", segment.getIdentifier()) .addData("segmentSize", segment.getSize()) .addData("hostName", holder.getServer().getHost()) .addData("availableSize", holder.getAvailableSize()) .emit(); } else { if (!holder.isLoadingSegment(segment)) { holder.getPeon().loadSegment( segment, null ); stats.addToGlobalStat(LoadRule.ASSIGNED_COUNT, 1); } } } return stats; }
Source:
public String getAssociatedArticleImageSrc() { waitForElementByElement(associatedArticleImage); String imageSrc = articleImageUrl.getAttribute("src"); return imageSrc; }

Target:
public String getAssociatedArticleImageSrc() { waitForElementByElement(associatedArticleImage); return articleImageUrl.getAttribute("src"); }
Source:
public Updater(){ Config con = Node.getInstance().getConfig(); updateInterval = (long) con.get("node_update_interval"); PARALLELISM = (int) con.get("node_update_parallelism"); running = true; strikeList = new ConcurrentHashMap<L3Address, Integer>(); }

Target:
public Updater(){ running = true; strikeList = new ConcurrentHashMap<L3Address, Integer>(); }
Source:
public void testSymlinkWithEncodingDifference() throws Exception { try (Repository testRepo = FileRepositoryBuilder.create(testRepoDir)) { File workingTree = testRepo.getWorkTree(); File symLink = new File(new File(workingTree, TESTFOLDER), TESTLINK); Path linkTarget = Files.readSymbolicLink(symLink.toPath()); assertEquals("Unexpected link target", TESTTARGET, linkTarget.toString()); byte[] raw = rawPath(linkTarget); assertNotNull("Cannot get raw path", raw); assertArrayEquals("Expected an NFC link target", NFC, raw); assertTrue("Could not delete symlink", symLink.delete()); Files.createSymbolicLink(symLink.toPath(), Paths.get(TESTTARGET)); linkTarget = Files.readSymbolicLink(symLink.toPath()); assertEquals("Unexpected link target", TESTTARGET, linkTarget.toString()); raw = rawPath(linkTarget); assertNotNull("Cannot get raw path", raw); assertArrayEquals("Expected an NFD link target", NFD, raw); WorkingTreeIterator iterator = new FileTreeIterator(testRepo); IndexDiff diff = new IndexDiff(testRepo, Constants.HEAD, iterator); diff.setFilter(PathFilterGroup.createFromStrings( Collections.singleton(TESTFOLDER + '/' + TESTLINK))); diff.diff(); } }

Target:
public void testSymlinkWithEncodingDifference() throws Exception { try (Repository testRepo = FileRepositoryBuilder.create(testRepoDir)) { File workingTree = testRepo.getWorkTree(); File symLink = new File(new File(workingTree, TESTFOLDER), TESTLINK); Path linkTarget = Files.readSymbolicLink(symLink.toPath()); assertEquals("Unexpected link target", TESTTARGET, linkTarget.toString()); byte[] raw = rawPath(linkTarget); if (raw != null) { assertArrayEquals("Expected an NFC link target", NFC, raw); } assertTrue("Could not delete symlink", symLink.delete()); Files.createSymbolicLink(symLink.toPath(), Paths.get(TESTTARGET)); linkTarget = Files.readSymbolicLink(symLink.toPath()); assertEquals("Unexpected link target", TESTTARGET, linkTarget.toString()); raw = rawPath(linkTarget); if (raw != null) { assertArrayEquals("Expected an NFD link target", NFD, raw); } WorkingTreeIterator iterator = new FileTreeIterator(testRepo); IndexDiff diff = new IndexDiff(testRepo, Constants.HEAD, iterator); diff.setFilter(PathFilterGroup.createFromStrings( Collections.singleton(TESTFOLDER + '/' + TESTLINK))); diff.diff(); } }
Source:
public void start(JobTicket ticket) { if ( threadPool != null ) { logger.warn("startJob called more than once"); return; } if ( getBatchSize() <= 0 ) { withBatchSize(1); logger.warn("batchSize should be 1 or greater--setting batchSize to 1"); } jobTicket = ticket; getRowCount(); jobStartTime = Calendar.getInstance(); started.set(true); }

Target:
public synchronized void start(JobTicket ticket) { if(this.batchPlanImpl.getView() == null) throw new InternalError("Plan must be supplied before starting the job"); if ( threadPool != null ) { logger.warn("startJob called more than once"); return; } params.add("schema", batchPlanImpl.getSchema()); params.add("view", batchPlanImpl.getView()); if ( super.getBatchSize() <= 0 ) { withBatchSize(1); logger.warn("batchSize should be 1 or greater--setting batchSize to 1"); } this.threadPool = new BatchThreadPoolExecutor(super.getThreadCount()); getRowCount(); for(int i=0; i<super.getThreadCount(); i++) { RowBatchCallable rowBatchCallable = new RowBatchCallable(this); rowBatchCallable.call(); } jobTicket = ticket; jobStartTime = Calendar.getInstance(); started.set(true); }
Source:
private UrlUtil() { throw new UnsupportedOperationException("No instances allowed"); }

Target:
private UrlUtil() { }
Source:
public void setUp() { queryBuilder = new MISTQueryBuilder(); windowSize = 5000; windowEmissionInterval = 1000; mappedStream = queryBuilder.socketTextStream(APITestParameters.LOCAL_TEXT_SOCKET_SOURCE_CONF) .map(s -> new Tuple2<>(s, 1)); timeWindowedStream = (WindowOperatorStream)mappedStream .window(new TimeWindowInformation(windowSize, windowEmissionInterval)); firstInputStream = queryBuilder.socketTextStream(APITestParameters.LOCAL_TEXT_SOCKET_SOURCE_CONF); secondInputStream = queryBuilder.socketTextStream(APITestParameters.LOCAL_TEXT_SOCKET_SOURCE_CONF); joinBiPred = (string1, string2) -> string1.equals(string2); }

Target:
public void setUp() { queryBuilder = new MISTQueryBuilder(); windowSize = 5000; windowEmissionInterval = 1000; mappedStream = queryBuilder.socketTextStream(APITestParameters.LOCAL_TEXT_SOCKET_SOURCE_CONF) .map(s -> new Tuple2<>(s, 1)); timeWindowedStream = mappedStream .window(new TimeWindowInformation(windowSize, windowEmissionInterval)); firstInputStream = queryBuilder.socketTextStream(APITestParameters.LOCAL_TEXT_SOCKET_SOURCE_CONF); secondInputStream = queryBuilder.socketTextStream(APITestParameters.LOCAL_TEXT_SOCKET_SOURCE_CONF); joinBiPred = (string1, string2) -> string1.equals(string2); }
Source:
private TreeSet<Entry<String, Path>> jarsFirstSortedPluginsSet( Map<String, Path> activePlugins) { TreeSet<Entry<String, Path>> sortedPlugins = Sets.newTreeSet(new Comparator<Entry<String, Path>>() { @Override public int compare(Entry<String, Path> e1, Entry<String, Path> e2) { Path n1 = e1.getValue().getFileName(); Path n2 = e2.getValue().getFileName(); return ComparisonChain.start() .compareTrueFirst(n1.toString().endsWith(".jar"), n2.toString().endsWith(".jar")) .compare(n1, n2) .result(); } }); addAllEntries(activePlugins, sortedPlugins); return sortedPlugins; }

Target:
private TreeSet<Entry<String, Path>> jarsFirstSortedPluginsSet( Map<String, Path> activePlugins) { TreeSet<Entry<String, Path>> sortedPlugins = Sets.newTreeSet(new Comparator<Entry<String, Path>>() { @Override public int compare(Entry<String, Path> e1, Entry<String, Path> e2) { Path n1 = e1.getValue().getFileName(); Path n2 = e2.getValue().getFileName(); return ComparisonChain.start() .compareTrueFirst(isJar(n1), isJar(n2)) .compare(n1, n2) .result(); } private boolean isJar(Path n1) { return n1.toString().endsWith(".jar"); } }); addAllEntries(activePlugins, sortedPlugins); return sortedPlugins; }
Source:
public void setReleasePartialSequences(boolean releasePartialSequences) { if (!this.releaseStrategySet) { setReleaseStrategy(new SequenceSizeReleaseStrategy()); } this.releasePartialSequences = releasePartialSequences; }

Target:
public void setReleasePartialSequences(boolean releasePartialSequences) { if (!this.releaseStrategySet && releasePartialSequences) { setReleaseStrategy(new SequenceSizeReleaseStrategy()); } this.releasePartialSequences = releasePartialSequences; }
Source:
public CompletableFuture<List<TableDescriptor>> listTableDescriptors(List<TableName> tableNames) { Preconditions.checkNotNull(tableNames, "tableNames is null"); if (tableNames.isEmpty()) { return CompletableFuture.completedFuture(Collections.emptyList()); } return toCompletableFuture(bigtableTableAdminClient.listTablesAsync()) .thenApply( t -> tableNames.stream() .filter(in -> t.contains(in.getNameAsString())) .map(tbName -> getDescriptor(tbName).join()) .collect(Collectors.toList())); }

Target:
public CompletableFuture<List<TableDescriptor>> listTableDescriptors(List<TableName> tableNames) { Preconditions.checkNotNull(tableNames, "tableNames is null"); if (tableNames.isEmpty()) { return CompletableFuture.completedFuture(Collections.emptyList()); } return toCompletableFuture(bigtableTableAdminClient.listTablesAsync()) .thenApply( t -> tableNames.stream() .filter(inputTableName -> t.contains(inputTableName.getNameAsString())) .map( tbName -> { try { return getDescriptor(tbName).join(); } catch (CompletionException ex) { if (ex.getCause() instanceof TableNotFoundException) { return null; } throw ex; } }) .filter(Objects::nonNull) .collect(Collectors.toList())); }
Source:
public SlotRequest(String filename, long size, String contentType) { super(ELEMENT, NAMESPACE); this.filename = filename; this.size = size; this.contentType = contentType; setType(Type.get); }

Target:
public SlotRequest(String filename, long size, String contentType) { super(ELEMENT, NAMESPACE); if (size <= 0) { throw new IllegalArgumentException("File fileSize must be greater than zero."); } this.filename = filename; this.size = size; this.contentType = contentType; setType(Type.get); }
Source:
protected Collection<S3Object> initObjects() throws IOException { if (!uris.isEmpty()) { return uris.stream() .map( uri -> { final String s3Bucket = uri.getAuthority(); final S3Object s3Object = new S3Object(extractS3Key(uri)); s3Object.setBucketName(s3Bucket); return s3Object; } ) .collect(Collectors.toList()); } else { final List<S3Object> objects = new ArrayList<>(); for (URI uri : prefixes) { final String bucket = uri.getAuthority(); final String prefix = extractS3Key(uri); try { final S3Object[] listed = s3Client.listObjects(bucket, prefix, null); objects.addAll(Arrays.asList(listed)); } catch (S3ServiceException e) { throw new IOException(e); } } return objects; } }

Target:
protected Collection<S3Object> initObjects() throws IOException { if (!uris.isEmpty()) { return uris.stream() .map( uri -> { final String s3Bucket = uri.getAuthority(); final S3Object s3Object = new S3Object(extractS3Key(uri)); s3Object.setBucketName(s3Bucket); return s3Object; } ) .collect(Collectors.toList()); } else { final List<S3Object> objects = new ArrayList<>(); for (URI uri : prefixes) { final String bucket = uri.getAuthority(); final String prefix = extractS3Key(uri); try { String lastKey = null; StorageObjectsChunk objectsChunk; do { objectsChunk = s3Client.listObjectsChunked( bucket, prefix, null, MAX_LISTING_LENGTH, lastKey ); Arrays.stream(objectsChunk.getObjects()).forEach(storageObject -> objects.add((S3Object) storageObject)); lastKey = objectsChunk.getPriorLastKey(); } while (!objectsChunk.isListingComplete()); } catch (ServiceException e) { throw new IOException(e); } } return objects; } }
Source:
static void assertCRAM(File outputFile) { try (InputStream in = new FileInputStream(outputFile)) { Assert.assertEquals(0x43, in.read(), "File is not CRAM"); Assert.assertEquals(0x52, in.read(), "File is not CRAM"); Assert.assertEquals(0x41, in.read(), "File is not CRAM"); Assert.assertEquals(0x4d, in.read(), "File is not CRAM"); } catch (IOException e) { e.printStackTrace(); } }

Target:
static void assertCRAM(File outputFile) { try (InputStream in = new FileInputStream(outputFile)) { Assert.assertTrue(SamStreams.isCRAMFile(new BufferedInputStream(in)), "File is not a CRAM."); } catch (IOException e) { e.printStackTrace(); } }
Source:
public Resource makeFeatureInfoRequest(ConveyorTile tile, BoundingBox bbox, int height, int width, int x, int y) throws GeoWebCacheException { WMSLayer layer = (WMSLayer) tile.getLayer(); GridSubset gridSubset = tile.getGridSubset(); Map<String, String> wmsParams = layer.getWMSRequestTemplate(tile.getMimeType(), WMSLayer.RequestType.FEATUREINFO); wmsParams.put("INFO_FORMAT", tile.getMimeType().getFormat()); wmsParams.put("FORMAT", layer.getDefaultMimeType().getMimeType()); wmsParams.put("SRS", layer.backendSRSOverride(gridSubset.getSRS())); wmsParams.put("HEIGHT", String.valueOf(height)); wmsParams.put("WIDTH", String.valueOf(width)); wmsParams.put("BBOX", bbox.toString()); Map<String, String> fullParameters = tile.getFilteringParameters(); if (fullParameters.isEmpty()) { fullParameters = layer.getDefaultParameterFilters(); } wmsParams.putAll(fullParameters); wmsParams.put("X", String.valueOf(x)); wmsParams.put("Y", String.valueOf(y)); String featureCount; { Map<String, String> values = ServletUtils.selectedStringsFromMap( tile.servletReq.getParameterMap(), tile.servletReq.getCharacterEncoding(), "feature_count"); featureCount = values.get("feature_count"); } if(featureCount != null){ wmsParams.put("FEATURE_COUNT", featureCount); } MimeType mimeType = tile.getMimeType(); Resource target = new ByteArrayResource(2048); makeRequest(tile, layer, wmsParams, mimeType, target); return target; }

Target:
public Resource makeFeatureInfoRequest(ConveyorTile tile, BoundingBox bbox, int height, int width, int x, int y) throws GeoWebCacheException { WMSLayer layer = (WMSLayer) tile.getLayer(); GridSubset gridSubset = tile.getGridSubset(); Map<String, String> wmsParams = layer.getWMSRequestTemplate(tile.getMimeType(), WMSLayer.RequestType.FEATUREINFO); wmsParams.put("INFO_FORMAT", tile.getMimeType().getFormat()); wmsParams.put("FORMAT", layer.getDefaultMimeType().getMimeType()); wmsParams.put("SRS", layer.backendSRSOverride(gridSubset.getSRS())); wmsParams.put("HEIGHT", String.valueOf(height)); wmsParams.put("WIDTH", String.valueOf(width)); wmsParams.put("BBOX", bbox.toString()); Map<String, String> filteringParameters = tile.getFilteringParameters(); if (filteringParameters.isEmpty()) { filteringParameters = layer.getDefaultParameterFilters(); } wmsParams.putAll(filteringParameters); wmsParams.put("X", String.valueOf(x)); wmsParams.put("Y", String.valueOf(y)); String featureCount; { Map<String, String> values = ServletUtils.selectedStringsFromMap( tile.servletReq.getParameterMap(), tile.servletReq.getCharacterEncoding(), "feature_count"); featureCount = values.get("feature_count"); } if(featureCount != null){ wmsParams.put("FEATURE_COUNT", featureCount); } MimeType mimeType = tile.getMimeType(); Resource target = new ByteArrayResource(2048); makeRequest(tile, layer, wmsParams, mimeType, target); return target; }
Source:
static boolean isECKeyWithFieldSize(Key key, int fieldSize) { return ("ECDSA".equals(key.getAlgorithm()) || "EC".equals(key.getAlgorithm())) && fieldSizeFromKey((ECKey) key) == fieldSize; }

Target:
static boolean isECKeyWithFieldSize(Key key, int fieldSize) { return (KeyAlgorithm.ECDSA.equals(key.getAlgorithm()) || KeyAlgorithm.EC_KEYSTORE.equals(key.getAlgorithm())) && fieldSizeFromKey((ECKey) key) == fieldSize; }
Source:
private synchronized static SslContext createSslContext() throws SSLException { if (sslBuilder == null) { sslBuilder = GrpcSslContexts.forClient().ciphers(null); if (OpenSsl.isAvailable()) { LOG.info("gRPC is using the OpenSSL provider (tcnactive jar - Open Ssl version: {})", OpenSsl.versionString()); } else { if (OpenSsl.isAlpnSupported()) { LOG.info("gRPC is using the JDK provider (alpn-boot jar)"); } else { LOG.info("gRPC can't be configured"); } } } return sslBuilder.build(); }

Target:
private synchronized static SslContext createSslContext() throws SSLException { if (sslBuilder == null) { sslBuilder = GrpcSslContexts.forClient().ciphers(null); if (OpenSsl.isAlpnSupported()) { LOG.info("gRPC is using the OpenSSL provider (tcnactive jar - Open Ssl version: %s)", OpenSsl.versionString()); } else { if (isJettyAlpnConfigured()) { LOG.info("gRPC is using the JDK provider (alpn-boot jar)"); } else { LOG.info("gRPC cannot be configured. Neither OpenSsl nor Alpn are available."); } } } return sslBuilder.build(); }
Source:
public KeyAwareLockPromise lockAll(Collection<?> keys, Object lockOwner, long time, TimeUnit unit) { Objects.requireNonNull(keys, "Keys must be non null"); Objects.requireNonNull(lockOwner, "Lock owner must be non null"); Objects.requireNonNull(unit, "Time unit must be non null"); if (keys.isEmpty()) { if (trace) { log.tracef("Lock all: no keys found for owner=%s", lockOwner); } return KeyAwareLockPromise.NO_OP; } else if (keys.size() == 1) { return lock(keys.iterator().next(), lockOwner, time, unit); } final Set<Object> uniqueKeys = filterDistinctKeys(keys); if (uniqueKeys.isEmpty()) { if (trace) { log.tracef("Lock all: no keys found for owner=%s", lockOwner); } return KeyAwareLockPromise.NO_OP; } else if (uniqueKeys.size() == 1) { return lock(uniqueKeys.iterator().next(), lockOwner, time, unit); } if (trace) { log.tracef("Lock all keys=%s for owner=%s. timeout=%s (%s)", uniqueKeys, lockOwner, time, unit); } final CompositeLockPromise compositeLockPromise = new CompositeLockPromise(uniqueKeys.size()); synchronized (this) { for (Object key : uniqueKeys) { compositeLockPromise.addLock(new KeyAwareExtendedLockPromise(lockContainer.acquire(key, lockOwner, time, unit), key, unit.toMillis(time))); } } compositeLockPromise.markListAsFinal(); scheduleLockPromise(compositeLockPromise, time, unit); return compositeLockPromise; }

Target:
public KeyAwareLockPromise lockAll(Collection<?> keys, Object lockOwner, long time, TimeUnit unit) { Objects.requireNonNull(keys, "Keys must be non null"); Objects.requireNonNull(lockOwner, "Lock owner must be non null"); Objects.requireNonNull(unit, "Time unit must be non null"); if (keys.isEmpty()) { if (trace) { log.tracef("Lock all: no keys found for owner=%s", lockOwner); } return KeyAwareLockPromise.NO_OP; } else if (keys.size() == 1) { return lock(keys.iterator().next(), lockOwner, time, unit); } final Set<Object> uniqueKeys = filterDistinctKeys(keys); if (uniqueKeys.size() == 1) { return lock(uniqueKeys.iterator().next(), lockOwner, time, unit); } if (trace) { log.tracef("Lock all keys=%s for owner=%s. timeout=%s (%s)", uniqueKeys, lockOwner, time, unit); } final CompositeLockPromise compositeLockPromise = new CompositeLockPromise(uniqueKeys.size()); synchronized (this) { for (Object key : uniqueKeys) { compositeLockPromise.addLock(new KeyAwareExtendedLockPromise(lockContainer.acquire(key, lockOwner, time, unit), key, unit.toMillis(time))); } } compositeLockPromise.markListAsFinal(); return compositeLockPromise.scheduleLockTimeoutTask(scheduler, time, unit); }
Source:
void handleChunk(Buffer data) { this.bytesRead += data.length(); if (paused) { if (pausedChunks == null) { pausedChunks = new ArrayDeque<>(); } pausedChunks.add(data); } else { request.dataReceived(); if (dataHandler != null) { dataHandler.handle(data); } } }

Target:
void handleChunk(Buffer data) { if (conn.metrics.isEnabled()) { this.bytesRead += data.length(); } if (paused) { if (pausedChunks == null) { pausedChunks = new ArrayDeque<>(); } pausedChunks.add(data); } else { request.dataReceived(); if (dataHandler != null) { dataHandler.handle(data); } } }
Source:
private String buildDVExplanation(RecurringDisbursementVoucherDocument recurringDV) { String dvExplanation = CuFPConstants.RecurringDisbursementVoucherDocumentConstants.RECURRING_DV_EXPLANATION_TO_DV_NOTE_STARTER + recurringDV.getDocumentNumber() + KFSConstants.DELIMITER + KFSConstants.BLANK_SPACE + recurringDV.getDocumentHeader().getExplanation(); return truncateExplanationToMaxLength(dvExplanation); }

Target:
private String buildDVExplanation(RecurringDisbursementVoucherDocument recurringDV) { StringBuilder dvExplanation = new StringBuilder(); dvExplanation.append(CuFPConstants.RecurringDisbursementVoucherDocumentConstants.RECURRING_DV_EXPLANATION_TO_DV_NOTE_STARTER).append(recurringDV.getDocumentNumber()); String rcdvExplanation = recurringDV.getDocumentHeader().getExplanation(); if(StringUtils.isNotBlank(rcdvExplanation)) { dvExplanation.append(KFSConstants.DELIMITER).append(KFSConstants.BLANK_SPACE).append(rcdvExplanation); } return truncateExplanationToMaxLength(dvExplanation.toString()); }
Source:
public void questionComplete(Bundle data) { if (data != null) { mValue = data.getString(ConstantUtil.CADDISFLY_RESPONSE); caddisflyTestResults = caddisflyJsonMapper.transform(mValue); String image = data.getString(ConstantUtil.CADDISFLY_IMAGE); Timber.d("caddisflyTestComplete - Response: %s . Image: %s", mValue, image); File src = !TextUtils.isEmpty(image) ? new File(image) : null; if (src != null && src.exists()) { presenter.onImageReady(src); } else { captureResponse(); } displayResponseView(); } else { captureResponse(); } }

Target:
public void questionComplete(Bundle data) { if (data != null) { mValue = data.getString(ConstantUtil.CADDISFLY_RESPONSE); caddisflyTestResults = caddisflyJsonMapper.transform(mValue); String image = data.getString(ConstantUtil.CADDISFLY_IMAGE); Timber.d("caddisflyTestComplete - Response: %s . Image: %s", mValue, image); File src = !TextUtils.isEmpty(image) ? new File(image) : null; if (src != null && src.exists()) { presenter.onImageReady(src); } else { captureResponse(); } displayResponseView(); } }
Source:
public boolean applyTo(Project project) throws FileNotFoundException { final Module[] modules = ModuleManager.getInstance(project).getModules(); for (Module module : modules) { ModuleData data = myData.get(module.getName()); if (data == null) { return false; } AndroidFacet androidFacet = AndroidFacet.getInstance(module); VirtualFile moduleFile = module.getModuleFile(); if (androidFacet != null && moduleFile != null && moduleFile.exists()) { File moduleFilePath = new File(FileUtil.toSystemDependentName(moduleFile.getPath())); File moduleRootDirPath = moduleFilePath.getParentFile(); if (moduleRootDirPath == null) { throw new FileNotFoundException("Unable to reconstruct the module root directory."); } IdeaAndroidProject ideaAndroidProject = new IdeaAndroidProject(module.getName(), moduleRootDirPath, data.myAndroidProject, data.mySelectedVariant); androidFacet.setIdeaAndroidProject(ideaAndroidProject); } AndroidGradleFacet gradleFacet = AndroidGradleFacet.getInstance(module); if (gradleFacet != null) { gradleFacet.setGradleProject(data.myIdeaGradleProject); } JavaGradleFacet javaFacet = JavaGradleFacet.getInstance(module); if (javaFacet != null && data.myJavaModel != null) { javaFacet.setJavaModel(data.myJavaModel); } } GradleSyncState syncState = GradleSyncState.getInstance(project); syncState.setLastGradleSyncTimestamp(myLastGradleSyncTimestamp); return true; }

Target:
public boolean applyTo(Project project) throws FileNotFoundException { final Module[] modules = ModuleManager.getInstance(project).getModules(); for (Module module : modules) { ModuleData data = myData.get(module.getName()); if (data == null) { return false; } AndroidFacet androidFacet = AndroidFacet.getInstance(module); VirtualFile moduleFile = module.getModuleFile(); if (androidFacet != null) { if (moduleFile != null && moduleFile.exists()) { assert moduleFile.getParent() != null : moduleFile.getPath(); File moduleRootDirPath = VfsUtilCore.virtualToIoFile(moduleFile.getParent()); IdeaAndroidProject ideaAndroidProject = new IdeaAndroidProject(module.getName(), moduleRootDirPath, data.myAndroidProject, data.mySelectedVariant); androidFacet.setIdeaAndroidProject(ideaAndroidProject); } else { return false; } } AndroidGradleFacet gradleFacet = AndroidGradleFacet.getInstance(module); if (gradleFacet != null) { gradleFacet.setGradleProject(data.myIdeaGradleProject); } JavaGradleFacet javaFacet = JavaGradleFacet.getInstance(module); if (javaFacet != null && data.myJavaModel != null) { javaFacet.setJavaModel(data.myJavaModel); } } GradleSyncState syncState = GradleSyncState.getInstance(project); syncState.setLastGradleSyncTimestamp(myLastGradleSyncTimestamp); return true; }
Source:
private void setUp() throws CTFReaderException { assumeTrue(testTrace.exists()); fixture = new Metadata(testTrace.getTrace()); }

Target:
public void setUp() throws CTFReaderException { assumeTrue(testTrace.exists()); fixture = new Metadata(testTrace.getTrace()); }
Source:
private static void setOxfordNanoporeRunValues(@Nonnull OxfordNanoporeNotificationDto from, @Nonnull OxfordNanoporeRun to){ String[] softwareVersions = from.getSoftware().split("\\ \\+\\ "); to.setMinKnowVersion(softwareVersions[0]); to.setProtocolVersion(softwareVersions[1]); }

Target:
private static void setOxfordNanoporeRunValues(@Nonnull OxfordNanoporeNotificationDto from, @Nonnull OxfordNanoporeRun to){ to.setMinKnowVersion(from.getSoftware()); to.setProtocolVersion(from.getProtocolVersion()); }