auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public LogicalSwitch createLogicalSwitch(LogicalSwitch ls) throws Exception { Insert<GenericTableSchema> op = lsTable.insert(ls); try { UUID newId = modify(client, lsTable, op).result(Duration.Inf()); if (newId == null) throw new VtepException(endPoint, "cannot create logical switch: " + ls); Set<LogicalSwitch> lSwitch = retrieveLogicalSwitch( lsTable.getUuidMatcher(newId)); if (lSwitch.isEmpty()) throw new VtepException( endPoint, "cannot retrieve logical switch for id: " + newId); return lSwitch.iterator().next(); } catch (TimeoutException tOut) { throw new VtepException(endPoint, tOut); } }

Target:
public LogicalSwitch createLogicalSwitch(LogicalSwitch ls) throws Exception { Insert<GenericTableSchema> op = lsTable.insert(ls); try { UUID newId = modify(client, lsTable, op).result(Duration.Inf()); if (newId == null) throw new VtepException(endPoint, "cannot create logical switch: " + ls); Set<LogicalSwitch> lSwitch = retrieveLogicalSwitch( lsTable.getUuidMatcher(newId)); if (lSwitch.isEmpty()) throw new VtepRetrievalException("logical switch " + newId); return lSwitch.iterator().next(); } catch (TimeoutException tOut) { throw new VtepException(endPoint, tOut); } }
Source:
private void makeRequestWithAuthCodeAndVerify(String authCode, String expectedLogin) throws IOException, SAXException { WebRequest req = new WebRequest(new URL(j.getURL(),"test")); req.setEncodingType(null); if (authCode!=null) req.setAdditionalHeader("Authorization", authCode); Page p = wc.getPage(req); assertEquals(expectedLogin, p.getWebResponse().getContentAsString().trim()); }

Target:
private void makeRequestWithAuthCodeAndVerify(String authCode, String expectedLogin) throws IOException, SAXException { WebRequest req = new WebRequest(new URL(j.getURL(),"test")); req.setEncodingType(null); if (authCode!=null) req.setAdditionalHeader("Authorization", authCode); Page p = wc.getPage(req); assertEquals(expectedLogin, p.getWebResponse().getContentAsString()); }
Source:
public JiraIssue getIssue(final String id) throws IOException { try { Optional<Issue> issue = issueCache.get(id, () -> { JiraSession session = getSession(null); if (session == null) { return Optional.absent(); } return Optional.fromNullable(session.getIssue(id)); }); if (!issue.isPresent()) { return null; } return new JiraIssue(issue.get()); } catch (ExecutionException e) { throw new IOException(e); } }

Target:
public JiraIssue getIssue(final String id) throws IOException { try { Optional<Issue> issue = issueCache.get(id, () -> { if (this.jiraSession == null) { return Optional.absent(); } return Optional.fromNullable(this.jiraSession.getIssue(id)); }); if (!issue.isPresent()) { return null; } return new JiraIssue(issue.get()); } catch (ExecutionException e) { throw new IOException(e); } }
Source:
public static FilterExpression replaceMilestoneAliases(IModel model, FilterExpression expr) { List<Qualifier> metaQualifiers = expr.find(Qualifier::isMetaQualifier); List<String> repoIds = getReposInMetaQualifiers(metaQualifiers); if (repoIds.isEmpty()) { repoIds.add(model.getDefaultRepo().toLowerCase()); } List<TurboMilestone> allMilestones = model.getMilestones().stream() .filter(ms -> repoIds.contains(ms.getRepoId().toLowerCase())) .collect(Collectors.toList()); Collections.sort(allMilestones, Qualifier::milestoneDueDateComparator); int currentMilestoneIndex = getCurrentMilestoneIndex(allMilestones); FilterExpression exprWithoutMilestones = expr.filter(q -> !Qualifier.isMilestoneQualifier(q)); List<Qualifier> milestoneQualifiers = expr.find(Qualifier::isMilestoneQualifier); List<Qualifier> convertedMilestoneQualifiers = new ArrayList<Qualifier>(); milestoneQualifiers.stream() .filter(msQualifier -> msQualifier.getContent().isPresent()) .forEach(msQualifier -> { convertedMilestoneQualifiers.add( msQualifier.replaceMilestoneAliasQualifier(allMilestones, currentMilestoneIndex) ); }); for (Qualifier msQualifier : convertedMilestoneQualifiers) { exprWithoutMilestones = new Conjunction(msQualifier, exprWithoutMilestones); } return exprWithoutMilestones; }

Target:
public static FilterExpression replaceMilestoneAliases(IModel model, FilterExpression expr) { List<String> repoIds = getContentOfMetaQualifier(expr, REPO).stream() .map(repoId -> repoId.toLowerCase()) .collect(Collectors.toList()); if (repoIds.isEmpty()) { repoIds.add(model.getDefaultRepo().toLowerCase()); } List<TurboMilestone> allMilestones = model.getMilestones().stream() .filter(ms -> repoIds.contains(ms.getRepoId().toLowerCase())) .sorted((a, b) -> { if (!a.getDueDate().isPresent() && !b.getDueDate().isPresent()) { return 0; } else if (!a.getDueDate().isPresent()) { return 1; } else if (!b.getDueDate().isPresent()) { return -1; } else { return getMilestoneDueDateComparator().compare(a, b); } }) .collect(Collectors.toList()); Optional<Integer> currentMilestoneIndex = getCurrentMilestoneIndex(allMilestones); if (!currentMilestoneIndex.isPresent()) { return expr; } expr = expr.map(q -> { if (Qualifier.isMilestoneQualifier(q)) { return q.convertMilestoneAliasQualifier(allMilestones, currentMilestoneIndex.get()); } else { return q; } }); return expr; }
Source:
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof MappingKey)) return false; MappingKey that = (MappingKey) o; return nearEntries == that.nearEntries && nodeId.equals(that.nodeId); }

Target:
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || MappingKey.class != o.getClass()) return false; MappingKey that = (MappingKey) o; return nearEntries == that.nearEntries && nodeId.equals(that.nodeId); }
Source:
static void setCharge(ItemMeta meta, float charge, float capacity) { BigDecimal decimal = BigDecimal.valueOf(charge).setScale(2, RoundingMode.HALF_UP); float value = decimal.floatValue(); if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { meta.getPersistentDataContainer().set(CHARGE_KEY, PersistentDataType.FLOAT, value); } List<String> lore = meta.getLore(); for (int i = 0; i < lore.size(); i++) { String line = lore.get(i); if (line.startsWith(LORE_PREFIX)) { lore.set(i, LORE_PREFIX + value + " / " + capacity + " J"); meta.setLore(lore); return; } } }

Target:
static void setCharge(ItemMeta meta, float charge, float capacity) { BigDecimal decimal = BigDecimal.valueOf(charge).setScale(2, RoundingMode.HALF_UP); float value = decimal.floatValue(); if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { meta.getPersistentDataContainer().set(CHARGE_KEY, PersistentDataType.FLOAT, value); } List<String> lore = meta.hasLore() ? meta.getLore() : new ArrayList<>(); for (int i = 0; i < lore.size(); i++) { String line = lore.get(i); if (line.startsWith(LORE_PREFIX)) { lore.set(i, LORE_PREFIX + value + " / " + capacity + " J"); meta.setLore(lore); return; } } lore.add(LORE_PREFIX + value + " / " + capacity + " J"); meta.setLore(lore); }
Source:
public String getOrganizationCode() { String orgCode = getString(ORGANIZATION_CODE, ""); return orgCode.length() > 0 ? orgCode : null; }

Target:
public String getOrganizationCode() { return getString(ORGANIZATION_CODE); }
Source:
public static Object cleanValue(Object rawValue) { if (!(rawValue instanceof String)) { return rawValue; } String value = ((String) rawValue).trim(); String symbolToRemove = ""; FactMappingValueOperator operator = FactMappingValueOperator.findOperator(value); Optional<String> first = operator.getSymbols().stream().filter(value::startsWith).findFirst(); if (first.isPresent()) { symbolToRemove = first.get(); } int index = value.indexOf(symbolToRemove); return value.substring(index + symbolToRemove.length()).trim(); }

Target:
public static Object cleanValue(Object rawValue) { if (!(rawValue instanceof String)) { return rawValue; } String value = ((String) rawValue).trim(); FactMappingValueOperator operator = FactMappingValueOperator.findOperator(value); Optional<String> first = operator.getSymbols().stream().filter(value::startsWith).findFirst(); if (first.isPresent()) { String symbolToRemove = first.get(); int index = value.indexOf(symbolToRemove); value = value.substring(index + symbolToRemove.length()).trim(); } return value.trim(); }
Source:
public static void setUpBeforeClass() throws CoreException { project = TestUtils.createProject("EditorToOutlineAdapterFactoryTest" + System.currentTimeMillis()); testFile = TestUtils.createUniqueTestFile(project, "Hello World !!"); IViewPart viewPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() .findView("org.eclipse.ui.views.ContentOutline"); if (viewPart instanceof ContentOutline) { outline = (ContentOutline) viewPart; } Assert.assertNotNull(outline); }

Target:
public static void setUpBeforeClass() throws CoreException { IViewPart viewPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() .findView("org.eclipse.ui.views.ContentOutline"); if (viewPart instanceof ContentOutline) { outline = (ContentOutline) viewPart; } Assert.assertNotNull(outline); }
Source:
public void addInternalLink(String target, String text) { typeTargetAndText(target, text); addLinkModal.findElement(okButtonBy).click(); }

Target:
public void addInternalLink(String target, String text) { typeTargetAndText(target, text); addLinkModal.findElement(okButtonBy).click(); PageObjectLogging.log("addInternalLink", "internal link " + target + " and text " + text + " added", true); }
Source:
public FbStatus(final Condition<Integer> check, final Fallback fallback) { super( new Fallback() { @Override public Opt<Response> route(final RqFallback req) throws IOException { final Opt<Response> rsp; if (check.fits(req.code())) { rsp = fallback.route(req); } else { rsp = new Opt.Empty<Response>(); } return rsp; } } ); }

Target:
public FbStatus(final Condition<Integer> check, final Fallback fallback) { super( new Fallback() { @Override public Opt<Response> route(final RqFallback req) throws IOException { Opt<Response> rsp = new Opt.Empty<Response>(); if (check.fits(req.code())) { rsp = fallback.route(req); } return rsp; } } ); }
Source:
public int[] getAcceptableTokens() { return new int[] { TokenTypes.VARIABLE_DEF, TokenTypes.PARAMETER_DEF, TokenTypes.METHOD_DEF, TokenTypes.IMPORT, TokenTypes.TYPE_ARGUMENT, TokenTypes.TYPE_UPPER_BOUNDS, }; }

Target:
public int[] getAcceptableTokens() { return new int[] { TokenTypes.VARIABLE_DEF, TokenTypes.PARAMETER_DEF, TokenTypes.METHOD_DEF, TokenTypes.IMPORT, }; }
Source:
public AllureCommandline(final Path installationDirectory, final String version) { this.installationDirectory = installationDirectory; this.version = version; this.serveTimeout = SERVE_DEFAULT_TIMEOUT; }

Target:
public AllureCommandline(final Path installationDirectory, final String version) { this(installationDirectory, version, SERVE_DEFAULT_TIMEOUT); }
Source:
public static LocalDateTime parseDateTime(String s) { for (Map.Entry<String, Integer> entry : FORMAT_TO_LEN.entrySet()) { String f = entry.getKey(); int len = entry.getValue(); DateTimeFormatter fmt = STRING_TO_FORMATTER.get(f); try { if (s.length() < len) { continue; } String datePart = s.substring(0, len); LocalDateTime datetime = LocalDateTime.parse(datePart, fmt); return datetime; } catch (DateTimeParseException e) { continue; } } LOG.warn("Unknown date format in {}", s.length() > 50 ? s.substring(0, 50) : s); return null; }

Target:
public static LocalDateTime parseDateTime(String s) { for (Map.Entry<DateTimeFormatter, Integer> entry : FORMATTERS.entrySet()) { DateTimeFormatter fmt = entry.getKey(); int len = entry.getValue(); try { if (s.length() < len) { continue; } String datePart = s.substring(0, len); LocalDateTime datetime = LocalDateTime.parse(datePart, fmt); return datetime; } catch (DateTimeParseException e) { continue; } } LOG.warn("Unknown date format in {}", s.length() > 50 ? s.substring(0, 50) : s); return null; }
Source:
public void load(String fileName) throws Exception { File fileStream = new File(fileName); FileOutputStream fos = new FileOutputStream(fileStream); this.loadToStream = fos; try { this.load(); this.loadToStream.flush(); } finally { try { this.loadToStream.close(); } catch(Exception e) { } this.loadToStream = null; } this.fileName = fileName; this.content = null; this.contentStream = null; }

Target:
public void load(String fileName) throws Exception { File fileStream = new File(fileName); try { this.loadToStream = new FileOutputStream(fileStream); this.load(); this.loadToStream.flush(); } finally { try { this.loadToStream.close(); } catch(Exception e) { } this.loadToStream = null; } this.fileName = fileName; this.content = null; this.contentStream = null; }
Source:
public void testDuplicatesForOneToManyAssociationWithoutOrderColumn() { Programmer participant0 = new Programmer( PARTICIPANT_0 ); Programmer participant1 = new Programmer( PARTICIPANT_1 ); Programmer participant2 = new Programmer( PARTICIPANT_2 ); Meeting meeting = new Meeting(); meeting.setName( NAME ); meeting.addParticipant( participant0 ); meeting.addParticipant( participant1 ); meeting.addParticipant( participant1 ); meeting.addParticipant( participant2 ); meeting.addParticipant( participant1 ); inTransaction( session -> { persistAll( session, meeting, participant0, participant1, participant2 ); } ); inTransaction( session -> { Meeting load = session.load( Meeting.class, NAME ); assertThat( load.getParticipants() ).containsOnly( participant0, participant1, participant1, participant2, participant1 ); } ); }

Target:
public void testDuplicatesForOneToManyAssociationWithoutOrderColumn() { Programmer participant0 = new Programmer( PARTICIPANT_0 ); Programmer participant1 = new Programmer( PARTICIPANT_1 ); Programmer participant2 = new Programmer( PARTICIPANT_2 ); Meeting meeting = new Meeting(); meeting.setName( NAME ); meeting.addParticipant( participant0 ); meeting.addParticipant( participant1 ); meeting.addParticipant( participant1 ); meeting.addParticipant( participant2 ); meeting.addParticipant( participant1 ); inTransaction( session -> { persistAll( session, meeting, participant0, participant1, participant2 ); } ); inTransaction( session -> { Meeting load = session.load( Meeting.class, NAME ); assertThat( load.getParticipants() ).hasSize( 3 ); assertThat( load.getParticipants() ) .as( "Hibernate OGM does not support duplicates for associations (issue OGM-1537)." + " If you've solved this issue, congratulations!" + " Please, update the jira and this test accordingly, and thanks a lot" ) .containsOnly( participant0, participant1, participant2 ); } ); }
Source:
private HttpResponse executePut(String bucketName, String objectName, Map<String,String> headerMap, Map<String,String> queryParamMap, String region, Object data, int length) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException { if (headerMap != null) { headerMap = amzPrefixHeaderMap(headerMap); } HttpResponse response = execute(Method.PUT, region, bucketName, objectName, headerMap, queryParamMap, data, length); return response; }

Target:
private HttpResponse executePut(String bucketName, String objectName, Map<String,String> headerMap, Map<String,String> queryParamMap, String region, Object data, int length) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException { HttpResponse response = execute(Method.PUT, region, bucketName, objectName, headerMap, queryParamMap, data, length); return response; }
Source:
private List<Artifact> getNewDependencies(List<Dependency> dependencies, List<Dependency> existingDependencies) { List<Artifact> updatedArtifacts = new ArrayList<Artifact>(); for (Dependency dep : dependencies) { boolean newDependency = true; for (Dependency existingDep : existingDependencies) { if (dep.getArtifactId().equals(existingDep.getArtifactId()) && dep.getGroupId().equals(existingDep.getGroupId())) { if ((dep.getVersion() != null && dep.getVersion().equals(existingDep.getVersion())) || (dep.getVersion() == null)) { if ((dep.getType() != null && dep.getType().equals(existingDep.getType()) || (dep.getType() == null && existingDep.getType() == null))) { if ((dep.getScope() != null && dep.getScope().equals(existingDep.getScope()) || (dep.getScope() == null && (existingDep.getScope() == null || existingDep.getScope().equals("compile"))))) { newDependency = false; break; } } } } } if (newDependency) { log.debug("New dependency found: " + dep.getArtifactId()); try { Artifact artifact = getArtifact(dep.getGroupId(), dep.getArtifactId(), dep.getType(), dep.getVersion()); updatedArtifacts.add(artifact); } catch (MojoExecutionException | IllegalArgumentException e) { log.warn(e.getMessage()); } } } return updatedArtifacts; }

Target:
private List<Artifact> getNewDependencies(List<Dependency> dependencies, List<Dependency> existingDependencies) { List<Artifact> updatedArtifacts = new ArrayList<Artifact>(); for (Dependency dep : dependencies) { boolean newDependency = true; try { Artifact artifact = getArtifact(dep.getGroupId(), dep.getArtifactId(), dep.getType(), dep.getVersion()); for (Dependency existingDep : existingDependencies) { if (Objects.equals(artifact.getArtifactId(), existingDep.getArtifactId()) && Objects.equals(artifact.getGroupId(), existingDep.getGroupId()) && Objects.equals(artifact.getVersion(), existingDep.getVersion()) && Objects.equals(artifact.getType(), existingDep.getType())) { newDependency = false; break; } } if (newDependency) { log.debug("New dependency found: " + artifact.toString()); updatedArtifacts.add(artifact); } } catch (MojoExecutionException e) { log.warn(e.getMessage()); } catch (IllegalArgumentException e) { log.warn(dep.toString() + " is not valid: " + e.getMessage()); } } return updatedArtifacts; }
Source:
public void onTestFailure(ITestResult tr) { System.out.println(tr.getName() + "--Test method failed"); }

Target:
public void onTestFailure(ITestResult tr) { LOG.info ("[%s] -- Test method failed", tr.getName()); }
Source:
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if("tag".equals(qName)) { String tagName = attributes.getValue("name"); Tag tag = tagService.getOrCreateTag(tagName); if ("true".equals(attributes.getValue("root"))) tag.setIsRoot(true); if ("true".equals(attributes.getValue("pseudo"))) tag.setPseudo(true); final String color = attributes.getValue("color"); if (color != null) { if (color.matches("#\\p{XDigit}{6}")) tag.setColor(color); else log.fine("Invalid color, not matching #\\p{XDigit}{6}: " + color); } if(!stack.empty()) stack.peek().addContainedTag(tag); stack.push(tag); String[] containedBy = StringUtils.split( StringUtils.defaultString(attributes.getValue("parents")), " ,"); for (String containingTagName : containedBy) { Tag containingTag = tagService.getOrCreateTag(containingTagName); tag.addContainingTag(containingTag); } } }

Target:
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if("tag".equals(qName)) { String tagName = attributes.getValue("name"); Tag tag = tagService.getOrCreateTag(tagName); if ("true".equals(attributes.getValue("root"))) tag.setIsRoot(true); if ("true".equals(attributes.getValue("pseudo"))) tag.setPseudo(true); tag.setTitle(attributes.getValue("title")); final String color = attributes.getValue("color"); if (color != null) { if (color.matches("#\\p{XDigit}{6}")) tag.setColor(color); else log.fine("Invalid color, not matching #\\p{XDigit}{6}: " + color); } if(!stack.empty()) stack.peek().addContainedTag(tag); stack.push(tag); String[] containedBy = StringUtils.split( StringUtils.defaultString(attributes.getValue("parents")), " ,"); for (String containingTagName : containedBy) { Tag containingTag = tagService.getOrCreateTag(containingTagName); tag.addContainingTag(containingTag); } } }
Source:
public ChannelFuture dispose() { if (preparedFuture == null) { disposedFuture.setSuccess(); } else if (!disposedFuture.isDone()) { ChannelFuture future = abort(); future.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { serverChannels.close().addListener(new ChannelGroupFutureListener() { @Override public void operationComplete(ChannelGroupFuture future) throws Exception { clientChannels.close(); try { bootstrapFactory.shutdown(); bootstrapFactory.releaseExternalResources(); } catch (Exception e) { if (LOGGER.isDebugEnabled()) { LOGGER.error("Caught exception releasing resources", e); } } finally { disposedFuture.setSuccess(); } } }); } }); } return disposedFuture; }

Target:
public ChannelFuture dispose() { if (preparedFuture == null) { disposedFuture.setSuccess(); } else if (!disposedFuture.isDone()) { ChannelFuture future = abort(); future.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { for (AutoCloseable resource : configuration.getResources()) { try { resource.close(); } catch (Exception e) { } } serverChannels.close().addListener(new ChannelGroupFutureListener() { @Override public void operationComplete(ChannelGroupFuture future) throws Exception { clientChannels.close(); try { bootstrapFactory.shutdown(); bootstrapFactory.releaseExternalResources(); } catch (Exception e) { if (LOGGER.isDebugEnabled()) { LOGGER.error("Caught exception releasing resources", e); } } finally { disposedFuture .setFailure(new Throwable("Disposed due to shutdown of channel, not due to command")); } } }); } }); } return disposedFuture; }
Source:
public void onNewJobModelAvailable(final String version) { debounceTimer.scheduleAfterDebounceTime(ScheduleAfterDebounceTime.JOB_MODEL_VERSION_CHANGE, 0, () -> { LOGGER.info("pid=" + processorId + "new JobModel available"); if (coordinatorListener != null) { coordinatorListener.onJobModelExpired(); } LOGGER.info("pid=" + processorId + "new JobModel available.Container stopped."); newJobModel = zkUtils.getJobModel(version); LOGGER.info("pid=" + processorId + ": new JobModel available. ver=" + version + "; jm = " + newJobModel); ZkBarrierForVersionUpgrade barrier = (ZkBarrierForVersionUpgrade) coordinationUtils.getBarrier(JOB_MODEL_UPGRADE_BARRIER); barrier.waitForBarrier(version, processorId, () -> onNewJobModelConfirmed(version)); }); }

Target:
public void onNewJobModelAvailable(final String version) { debounceTimer.scheduleAfterDebounceTime(ScheduleAfterDebounceTime.JOB_MODEL_VERSION_CHANGE, 0, () -> { LOG.info("pid=" + processorId + "new JobModel available"); if (coordinatorListener != null) { coordinatorListener.onJobModelExpired(); } LOG.info("pid=" + processorId + "new JobModel available.Container stopped."); newJobModel = zkUtils.getJobModel(version); LOG.info("pid=" + processorId + ": new JobModel available. ver=" + version + "; jm = " + newJobModel); ZkBarrierForVersionUpgrade barrier = (ZkBarrierForVersionUpgrade) coordinationUtils.getBarrier(JOB_MODEL_UPGRADE_BARRIER); barrier.waitForBarrier(version, processorId, () -> onNewJobModelConfirmed(version)); }); }
Source:
public ObjectStream<LemmaSample> create(String[] args) { Parameters params = ArgumentParser.parse(args, Parameters.class); ConlluTagset tagset; if ("u".equals(params.getTagset())) { tagset = ConlluTagset.U; } else if ("x".equals(params.getTagset())) { tagset = ConlluTagset.X; } else { throw new TerminateToolException(-1, "Unkown tagset parameter: " + params.getTagset()); } InputStreamFactory inFactory = CmdLineUtil.createInputStreamFactory(params.getData()); try { return new ConlluLemmaSampleStream(new ConlluStream(inFactory), tagset); } catch (IOException e) { CmdLineUtil.handleCreateObjectStreamError(e); return null; } }

Target:
public ObjectStream<LemmaSample> create(String[] args) { Parameters params = ArgumentParser.parse(args, Parameters.class); ConlluTagset tagset; switch (params.getTagset()) { case "u": tagset = ConlluTagset.U; break; case "x": tagset = ConlluTagset.X; break; default: throw new TerminateToolException(-1, "Unkown tagset parameter: " + params.getTagset()); } InputStreamFactory inFactory = CmdLineUtil.createInputStreamFactory(params.getData()); try { return new ConlluLemmaSampleStream(new ConlluStream(inFactory), tagset); } catch (IOException e) { CmdLineUtil.handleCreateObjectStreamError(e); } return null; }
Source:
public URI getSkillifierUrl(String addition) { if (!addition.isEmpty()) { return URI.create("<LINK_0>" + addition); } return URI.create("<LINK_0>"); }

Target:
public URI getSkillifierUrl(String addition) { return URI.create("<LINK_0>" + addition); }
Source:
private void initWebViewListeners() { webView.addOnUpOrCancelMotionEventListener(() -> { app.getSessionFunnel().touchSession(); }); webView.addOnScrollChangeListener((int oldScrollY, int scrollY, boolean isHumanScroll) -> { if (pageScrollFunnel != null) { pageScrollFunnel.onPageScrolled(oldScrollY, scrollY, isHumanScroll); } }); webView.addOnContentHeightChangedListener(scrollTriggerListener); webView.setWebViewClient(new OkHttpWebViewClient() { @NonNull @Override public PageViewModel getModel() { return model; } @Override public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); if (!isAdded()) { return; } pageFragmentLoadState.onPageFinished(); updateProgressBar(false, true, 0); webView.setVisibility(View.VISIBLE); bridge.execute(JavaScriptActionHandler.setTopMargin(leadImagesHandler.getPaddingTop())); onPageLoadComplete(); } @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { onPageLoadError(new Throwable()); } }); }

Target:
private void initWebViewListeners() { webView.addOnUpOrCancelMotionEventListener(() -> { app.getSessionFunnel().touchSession(); }); webView.addOnScrollChangeListener((int oldScrollY, int scrollY, boolean isHumanScroll) -> { if (pageScrollFunnel != null) { pageScrollFunnel.onPageScrolled(oldScrollY, scrollY, isHumanScroll); } }); webView.addOnContentHeightChangedListener(scrollTriggerListener); webView.setWebViewClient(new OkHttpWebViewClient() { @NonNull @Override public PageViewModel getModel() { return model; } @Override public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); if (!isAdded()) { return; } pageFragmentLoadState.onPageFinished(); updateProgressBar(false, true, 0); webView.setVisibility(View.VISIBLE); onPageLoadComplete(); } @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { onPageLoadError(new Throwable()); } }); }
Source:
public void onMessageReceived(RemoteMessage message){ Log.d(LOG_TAG, "onMessage - from: " + message.getFrom()); Bundle extras = new Bundle(); if (message.getNotification()!=null) { extras.putString(TITLE,message.getNotification().getTitle()); extras.putString(MESSAGE,message.getNotification().getBody()); } for (Map.Entry<String, String> entry : message.getData().entrySet()) { extras.putString(entry.getKey(), entry.getValue()); } if (extras != null) { SharedPreferences prefs = getApplicationContext().getSharedPreferences(PushPlugin.COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE); boolean forceShow = prefs.getBoolean(FORCE_SHOW, false); extras = normalizeExtras(extras); if (!forceShow && PushPlugin.isInForeground()) { Log.d(LOG_TAG, "foreground"); extras.putBoolean(FOREGROUND, true); PushPlugin.sendExtras(extras); } else if (forceShow && PushPlugin.isInForeground()) { Log.d(LOG_TAG, "foreground force"); extras.putBoolean(FOREGROUND, true); showNotificationIfPossible(getApplicationContext(), extras); } else { Log.d(LOG_TAG, "background"); extras.putBoolean(FOREGROUND, false); showNotificationIfPossible(getApplicationContext(), extras); } } }

Target:
public void onMessageReceived(RemoteMessage message){ Log.d(LOG_TAG, "onMessage - from: " + message.getFrom()); Bundle extras = new Bundle(); if (message.getNotification()!=null) { extras.putString(TITLE,message.getNotification().getTitle()); extras.putString(MESSAGE,message.getNotification().getBody()); } for (Map.Entry<String, String> entry : message.getData().entrySet()) { extras.putString(entry.getKey(), entry.getValue()); } if (extras != null) { SharedPreferences prefs = getApplicationContext().getSharedPreferences(PushPlugin.COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE); boolean forceShow = prefs.getBoolean(FORCE_SHOW, false); extras = normalizeExtras(extras); if (!forceShow && PushPlugin.isInForeground()) { Log.d(LOG_TAG, "foreground"); extras.putBoolean(FOREGROUND, true); extras.putBoolean(COLDSTART, false); PushPlugin.sendExtras(extras); } else if (forceShow && PushPlugin.isInForeground()) { Log.d(LOG_TAG, "foreground force"); extras.putBoolean(FOREGROUND, true); extras.putBoolean(COLDSTART, false); showNotificationIfPossible(getApplicationContext(), extras); } else { Log.d(LOG_TAG, "background"); extras.putBoolean(FOREGROUND, false); extras.putBoolean(COLDSTART, PushPlugin.isActive()); showNotificationIfPossible(getApplicationContext(), extras); } } }
Source:
public void enableWikiaTracker() { appendToUrl("&log_level=info"); }

Target:
public void enableWikiaTracker() { if (driver.getCurrentUrl().contains("?")) { appendToUrl("&log_level=info"); } else { appendToUrl("?log_level=info"); } }
Source:
public void afterDelivery() throws ApplicationServerInternalException, UnavailableException { switch (state) { case RELEASED: throw new IllegalStateException("Message endpoint factory has been released"); case NONE: throw new IllegalStateException("afterDelivery may only be called if message delivery began with a beforeDelivery call"); } boolean exceptionThrown = false; try { container.afterDelivery(instance); } catch (final SystemException se) { exceptionThrown = true; final Throwable throwable = se.getRootCause() != null ? se.getRootCause() : se; throwable.printStackTrace(); throw new ApplicationServerInternalException(throwable); } finally { if (state == State.SYSTEM_EXCEPTION) { } state = State.NONE; } }

Target:
public void afterDelivery() throws ApplicationServerInternalException, UnavailableException { switch (state) { case RELEASED: throw new IllegalStateException("Message endpoint factory has been released"); case NONE: throw new IllegalStateException("afterDelivery may only be called if message delivery began with a beforeDelivery call"); } try { container.afterDelivery(instance); } catch (final SystemException se) { final Throwable throwable = se.getRootCause() != null ? se.getRootCause() : se; throw new ApplicationServerInternalException(throwable); } finally { state = State.NONE; this.instance = null; } }
Source:
public RuleAutomatonDisjunction(List<Pair<Term, BitSet>> children, TermContext context) { super(Kind.KITEM); this.kItemDisjunctionsArray = new Pair[KLabelConstant.cacheSize()]; children.stream() .filter(p -> p.getLeft() instanceof KItem) .forEach(p -> { this.kItemDisjunctionsArray[((KLabelConstant) ((KItem) p.getLeft()).kLabel()).ordinal()] = (Pair<KItem, BitSet>) (Object) p; }); synchronized (Sort.cache) { this.variableDisjunctionsArray = new List[Sort.cache.size()]; } context.definition().allSorts().forEach(s -> { this.variableDisjunctionsArray[s.ordinal()] = new ArrayList<>((Set<Pair<Variable, BitSet>>) (Object) children.stream() .filter(p -> p.getLeft() instanceof Variable && context.definition().subsorts().isSubsortedEq(p.getLeft().sort(), s)) .collect(Collectors.toSet())); }); this.tokenDisjunctions = children.stream() .filter(p -> p.getLeft() instanceof Token) .collect(Collectors.toMap(p -> (Token) p.getLeft(), p -> (Pair<Token, BitSet>) (Object) p)); }

Target:
public RuleAutomatonDisjunction(List<Pair<Term, BitSet>> children, TermContext context) { super(Kind.KITEM); disjunctions = Collections.unmodifiableList(children); this.kItemDisjunctionsArray = new Pair[KLabelConstant.maxOrdinal.get()]; children.stream() .filter(p -> p.getLeft() instanceof KItem) .forEach(p -> { this.kItemDisjunctionsArray[((KLabelConstant) ((KItem) p.getLeft()).kLabel()).ordinal()] = (Pair<KItem, BitSet>) (Object) p; }); this.variableDisjunctionsArray = new List[Sort.maxOrdinal.get()]; context.definition().allSorts().forEach(s -> { this.variableDisjunctionsArray[s.ordinal()] = new ArrayList<>((Set<Pair<Variable, BitSet>>) (Object) children.stream() .filter(p -> p.getLeft() instanceof Variable && context.definition().subsorts().isSubsortedEq(p.getLeft().sort(), s)) .collect(Collectors.toSet())); }); this.tokenDisjunctions = children.stream() .filter(p -> p.getLeft() instanceof Token) .collect(Collectors.toMap(p -> (Token) p.getLeft(), p -> p.getRight())); }
Source:
private void handleUsernameAvailabilityEvent(OnAvailabilityChecked event) { endProgress(); if (event.type != IsAvailable.USERNAME ) { return; } if (!event.isAvailable) { mUsername = isAvailableUsername; mUsernameEditText.setText(isAvailableUsername); showPasswordFieldAndFocus(); } else { showUsernameError(R.string.username_invalid); } isAvailableUsername = ""; }

Target:
private void handleUsernameAvailabilityEvent(OnAvailabilityChecked event) { endProgress(); if (event.type != IsAvailable.USERNAME ) { return; } if (event.isAvailable) { showUsernameError(R.string.username_invalid); return; } mUsername = event.value; mUsernameEditText.setText(event.value); showPasswordFieldAndFocus(); }
Source:
private void checkCapacityAndUpdateWriteStatusDelegate(long totalCapacity, long usedCapacity) { if (writeStatusDelegate != null) { logger.debug( "Checking current used capacity: Bytes of store with High threshold: Bytes and Low threshold: Bytes", index.getLogUsedCapacity(), replicaId.getPartitionId(), thresholdBytesHigh, thresholdBytesLow); if (index.getLogUsedCapacity() > thresholdBytesHigh && !replicaId.isSealed()) { if (!writeStatusDelegate.seal(replicaId)) { metrics.sealSetError.inc(); logger.error("Could not set the partition as read-only status on {}", replicaId); } else { logger.debug("Store is successfully sealed for partition : {}", replicaId.getPartitionId()); } } else if (index.getLogUsedCapacity() <= thresholdBytesLow && replicaId.isSealed()) { if (!writeStatusDelegate.unseal(replicaId)) { metrics.unsealSetError.inc(); logger.error("Could not set the partition as read-write status on {}", replicaId); } else { logger.debug("Store is successfully unsealed for partition : {}", replicaId.getPartitionId()); } } } else { logger.debug("The WriteStatusDelegate is not instantiated"); } }

Target:
private void checkCapacityAndUpdateWriteStatusDelegate(long totalCapacity, long usedCapacity) { if (writeStatusDelegate != null) { logger.debug("The current used capacity is bytes on store {}", index.getLogUsedCapacity(), replicaId.getPartitionId()); if (index.getLogUsedCapacity() > thresholdBytesHigh && !replicaId.isSealed()) { if (!writeStatusDelegate.seal(replicaId)) { metrics.sealSetError.inc(); logger.warn("Could not set the partition as read-only status on {}", replicaId); } else { metrics.sealDoneCount.inc(); logger.info( "Store is successfully sealed for partition : because current used capacity : bytes exceeds ReadOnly threshold : bytes", replicaId.getPartitionId(), index.getLogUsedCapacity(), thresholdBytesHigh); } } else if (index.getLogUsedCapacity() <= thresholdBytesLow && replicaId.isSealed()) { if (!writeStatusDelegate.unseal(replicaId)) { metrics.unsealSetError.inc(); logger.warn("Could not set the partition as read-write status on {}", replicaId); } else { metrics.unsealDoneCount.inc(); logger.info( "Store is successfully unsealed for partition : because current used capacity : bytes is below ReadWrite threshold : bytes", replicaId.getPartitionId(), index.getLogUsedCapacity(), thresholdBytesLow); } } } else { logger.debug("The WriteStatusDelegate is not instantiated"); } }
Source:
@Override public Request transformRequest(Request request) { if (request.resourceId != 0) { return request; } Uri uri = request.uri; String scheme = uri.getScheme(); if (!"https".equals(scheme) && !"http".equals(scheme)) { return request; } if (!request.hasSize()) { return request; } if (request.centerCrop) { return request; } Request.Builder newRequest = request.buildUpon(); Thumbor thumbor; if (key != null) { thumbor = Thumbor.create(host, key); } else { thumbor = Thumbor.create(host); } ThumborUrlBuilder urlBuilder = thumbor.buildImage(uri.toString()); urlBuilder.resize(request.targetWidth, request.targetHeight); newRequest.clearResize(); if (request.centerInside) { urlBuilder.fitIn(); newRequest.clearCenterInside(); } newRequest.setUri(Uri.parse(urlBuilder.toUrl())); return newRequest.build(); }

Target:
@Override public Request transformRequest(Request request) { if (request.resourceId != 0) { return request; } Uri uri = request.uri; String scheme = uri.getScheme(); if (!"https".equals(scheme) && !"http".equals(scheme)) { return request; } if (!request.hasSize()) { return request; } if (request.centerCrop) { return request; } Request.Builder newRequest = request.buildUpon(); ThumborUrlBuilder urlBuilder = thumbor.buildImage(uri.toString()); urlBuilder.resize(request.targetWidth, request.targetHeight); newRequest.clearResize(); if (request.centerInside) { urlBuilder.fitIn(); newRequest.clearCenterInside(); } newRequest.setUri(Uri.parse(urlBuilder.toUrl())); return newRequest.build(); }
Source:
public void process(Exchange exchange) throws Exception { final Message in = exchange.getIn(); String fcrepoUri = (String) in.getHeader(FCREPO_URI); String editThumbnail = (String) in.getHeader(CdrEditThumbnail); List<PID> targetPids = new ArrayList<>(); PID targetPid = PIDs.get(fcrepoUri); String resourceTypes = (String) in.getHeader(FCREPO_RESOURCE_TYPE); if (!Boolean.parseBoolean(editThumbnail) && resourceTypes != null && resourceTypes.contains(Fcrepo4Repository.Binary.getURI())) { targetPid = PIDs.get(targetPid.getId()); FileObject parentFile = repoObjLoader.getFileObject(targetPid); RepositoryObject grandParent = parentFile.getParent(); if (grandParent instanceof WorkObject) { targetPids.add(grandParent.getPid()); } } targetPids.add(targetPid); log.debug("Indexing objects {}", targetPids); for (PID pid: targetPids) { SolrUpdateRequest updateRequest = new SolrUpdateRequest( pid.getRepositoryPath(), IndexingActionType.ADD); DocumentIndexingPackage dip = factory.createDip(pid); updateRequest.setDocumentIndexingPackage(dip); pipeline.process(dip); solrUpdateDriver.addDocument(dip.getDocument()); } }

Target:
public void process(Exchange exchange) throws Exception { final Message in = exchange.getIn(); String fcrepoUri = (String) in.getHeader(FCREPO_URI); List<PID> targetPids = new ArrayList<>(); PID targetPid = PIDs.get(fcrepoUri); String resourceTypes = (String) in.getHeader(FCREPO_RESOURCE_TYPE); if (resourceTypes != null && resourceTypes.contains(Fcrepo4Repository.Binary.getURI())) { targetPid = PIDs.get(targetPid.getId()); FileObject parentFile = repoObjLoader.getFileObject(targetPid); RepositoryObject grandParent = parentFile.getParent(); if (grandParent instanceof WorkObject) { targetPids.add(grandParent.getPid()); } } targetPids.add(targetPid); log.debug("Indexing objects {}", targetPids); for (PID pid: targetPids) { SolrUpdateRequest updateRequest = new SolrUpdateRequest( pid.getRepositoryPath(), IndexingActionType.ADD); DocumentIndexingPackage dip = factory.createDip(pid); updateRequest.setDocumentIndexingPackage(dip); pipeline.process(dip); solrUpdateDriver.addDocument(dip.getDocument()); } }
Source:
public void testChunkStore() throws Exception { File file1 = new File(temporary, "file1"); Files.write("hello world", file1, UTF_8); long id1 = nextChunkId.getAndIncrement(); assertFalse(store.chunkExists(id1)); store.putChunk(id1, file1); assertTrue(store.chunkExists(id1)); File file2 = new File(temporary, "file2"); Files.write("bye bye", file2, UTF_8); long id2 = nextChunkId.getAndIncrement(); assertFalse(store.chunkExists(id2)); store.putChunk(id2, file2); assertTrue(store.chunkExists(id2)); File restore1 = new File(temporary, "restore1"); store.getChunk(id1, restore1); assertEquals(readAllBytes(file1.toPath()), readAllBytes(restore1.toPath())); File restore2 = new File(temporary, "restore2"); store.getChunk(id2, restore2); assertEquals(readAllBytes(file2.toPath()), readAllBytes(restore2.toPath())); assertFalse(store.chunkExists(nextChunkId.getAndIncrement())); assertTrue(store.chunkExists(id1)); assertTrue(store.chunkExists(id2)); assertTrue(store.deleteChunk(id1)); assertFalse(store.deleteChunk(id1)); assertFalse(store.chunkExists(id1)); assertTrue(store.chunkExists(id2)); assertFalse(store.deleteChunk(nextChunkId.getAndIncrement())); }

Target:
public void testChunkStore() throws Exception { File file1 = new File(temporary, "file1"); byte[] data1 = "hello world".getBytes(UTF_8); write(file1.toPath(), data1); long id1 = nextChunkId.getAndIncrement(); assertFalse(store.chunkExists(id1)); store.putChunk(id1, file1); assertTrue(store.chunkExists(id1)); File file2 = new File(temporary, "file2"); byte[] data2 = "bye bye".getBytes(UTF_8); write(file2.toPath(), data2); long id2 = nextChunkId.getAndIncrement(); assertFalse(store.chunkExists(id2)); store.putChunk(id2, file2); assertTrue(store.chunkExists(id2)); File restore1 = new File(temporary, "restore1"); store.getChunk(id1, restore1); assertEquals(readAllBytes(restore1.toPath()), data1); File restore2 = new File(temporary, "restore2"); store.getChunk(id2, restore2); assertEquals(readAllBytes(restore2.toPath()), data2); assertFalse(store.chunkExists(nextChunkId.getAndIncrement())); assertTrue(store.chunkExists(id1)); assertTrue(store.chunkExists(id2)); assertTrue(store.deleteChunk(id1)); assertFalse(store.deleteChunk(id1)); assertFalse(store.chunkExists(id1)); assertTrue(store.chunkExists(id2)); assertFalse(store.deleteChunk(nextChunkId.getAndIncrement())); }
Source:
private void addNotifications(boolean archived) { Timber.d("Add notifications"); if (mNotificationWorkerFragment == null) { Observable.fromCallable(() -> { progressBar.setVisibility(View.VISIBLE); return controller.getNotifications(archived); }) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(notificationList -> { Collections.reverse(notificationList); Timber.d("Number of notifications is %d", notificationList.size()); this.notificationList = notificationList; if (notificationList.size()==0){ if (archived) { nonotificationtext.setText(R.string.no_archived_notification); isarchivedvisible = true; }else { nonotificationtext.setText(R.string.no_notification); isarchivedvisible = false; } relativeLayout.setVisibility(View.GONE); no_notification.setVisibility(View.VISIBLE); } else { setAdapter(notificationList); } if (notificationmenuitem != null) { if (archived) { notificationmenuitem.setTitle(R.string.menu_option_unread); }else { notificationmenuitem.setTitle(R.string.menu_option_archived); } } progressBar.setVisibility(View.GONE); }, throwable -> { Timber.e(throwable, "Error occurred while loading notifications"); ViewUtil.showShortSnackbar(relativeLayout, R.string.error_notifications); progressBar.setVisibility(View.GONE); }); } else { notificationList = mNotificationWorkerFragment.getNotificationList(); setAdapter(notificationList); } }

Target:
private void addNotifications(boolean archived) { Timber.d("Add notifications"); if (mNotificationWorkerFragment == null) { Observable.fromCallable(() -> { progressBar.setVisibility(View.VISIBLE); return controller.getNotifications(archived); }) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(notificationList -> { Collections.reverse(notificationList); Timber.d("Number of notifications is %d", notificationList.size()); this.notificationList = notificationList; if (notificationList.size()==0){ setEmptyView(); relativeLayout.setVisibility(View.GONE); no_notification.setVisibility(View.VISIBLE); } else { setAdapter(notificationList); } if (notificationmenuitem != null) { } progressBar.setVisibility(View.GONE); }, throwable -> { Timber.e(throwable, "Error occurred while loading notifications"); ViewUtil.showShortSnackbar(relativeLayout, R.string.error_notifications); progressBar.setVisibility(View.GONE); }); } else { notificationList = mNotificationWorkerFragment.getNotificationList(); setAdapter(notificationList); } }
Source:
public void setCreatedAt(Date newDate) { this.createdAt = newDate; this.updatedAt = newDate; }

Target:
public void setCreatedAt(Date newDate) { this.createdAt = newDate; setLastUpdate(newDate); }
Source:
H2Sql() throws IOException { final File tmp = File.createTempFile("netbout-", ".h2"); tmp.deleteOnExit(); this.file = tmp.getAbsolutePath(); final String[] stmts = { "CREATE TABLE alias (name VARCHAR, urn VARCHAR, photo VARCHAR, locale VARCHAR, email VARCHAR)", "CREATE TABLE bout (number BIGINT AUTO_INCREMENT, title VARCHAR, date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, subscription INTEGER)", "CREATE TABLE message (number BIGINT AUTO_INCREMENT, bout BIGINT, text VARCHAR, author VARCHAR, date TIMESTAMP DEFAULT CURRENT_TIMESTAMP)", "CREATE TABLE attachment (name VARCHAR, bout BIGINT, data VARCHAR, author VARCHAR, ctype VARCHAR, etag VARCHAR)", "CREATE TABLE friend (alias VARCHAR, bout BIGINT)", }; final JdbcSession session = new JdbcSession(this.source()); for (final String stmt : stmts) { try { session.sql(stmt).execute(); } catch (final SQLException ex) { throw new IOException(ex); } } }

Target:
H2Sql() throws IOException { final File tmp = File.createTempFile("netbout-", ".h2"); tmp.deleteOnExit(); this.file = tmp.getAbsolutePath(); final String[] stmts = { "CREATE TABLE alias (name VARCHAR, urn VARCHAR, photo VARCHAR, locale VARCHAR, email VARCHAR)", "CREATE TABLE bout (number BIGINT AUTO_INCREMENT, title VARCHAR, date TIMESTAMP DEFAULT CURRENT_TIMESTAMP)", "CREATE TABLE message (number BIGINT AUTO_INCREMENT, bout BIGINT, text VARCHAR, author VARCHAR, date TIMESTAMP DEFAULT CURRENT_TIMESTAMP)", "CREATE TABLE attachment (name VARCHAR, bout BIGINT, data VARCHAR, author VARCHAR, ctype VARCHAR, etag VARCHAR)", "CREATE TABLE friend (alias VARCHAR, bout BIGINT, subscription INTEGER )", }; final JdbcSession session = new JdbcSession(this.source()); for (final String stmt : stmts) { try { session.sql(stmt).execute(); } catch (final SQLException ex) { throw new IOException(ex); } } }
Source:
private static byte[] base64Decode(String base64) { return Base64.getMimeDecoder().decode(base64.getBytes(US_ASCII)); }

Target:
private static byte[] base64Decode(String base64) { return getMimeDecoder().decode(base64.getBytes(US_ASCII)); }
Source:
private boolean addVUSMutation(Alteration alteration){ if (AlterationUtils.getVUS(alteration).contains(alteration)) return true; return false; }

Target:
private boolean addVUSMutation(Alteration alteration){ return AlterationUtils.getVUS(alteration).contains(alteration); }
Source:
public void open(ExecutionContext executionContext) throws ItemStreamException { checkResourceIsProvided(); String resourcePath = getResourcePath(); pedigreeReader = new PedigreePedReader(resourcePath); doOpen(resourcePath); }

Target:
public void open(ExecutionContext executionContext) throws ItemStreamException { readAlreadyDone = false; checkResourceIsProvided(); String resourcePath = getResourcePath(); pedigreeReader = new PedigreePedReader(resourcePath); doOpen(resourcePath); }
Source:
public void close() { currentByte = 0; currentBytePosition = 0; finished = false; try { baos.close(); } catch (IOException e) { throw new ParquetRuntimeException("Error closing output stream.", e){}; } }

Target:
public void close() { currentByte = 0; currentBytePosition = 0; finished = false; baos.close(); }
Source:
protected List<CassandraRawCellValue> computeNext() { while (true) { if (queuedTasks.isEmpty()) { if (nextRow == null) { return endOfData(); } else { fetchNextRange(); } } else if (queuedTasks.peek().hasNext()) { return queuedTasks.peek().next(); } else { queuedTasks.poll(); } } }

Target:
protected List<CassandraRawCellValue> computeNext() { while (true) { if (cellsToReturn.isEmpty()) { if (nextRow == null) { return endOfData(); } else { fetchNextRange(); } } else if (cellsToReturn.peek().hasNext()) { return cellsToReturn.peek().next(); } else { cellsToReturn.poll(); } } }