auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void checkWebElementVisibilityAtPreviewPage(By webElement) { String currentWindow = seleniumWebDriver.getWindowHandle(); waitPreviewUrlIsPresent(); waitPreviewUrlIsResponsive(10); WaitUtils.sleepQuietly(2); clickOnPreviewUrl(); seleniumWebDriverHelper.switchToNextWindow(currentWindow); try { seleniumWebDriverHelper.waitVisibility(webElement, LOADER_TIMEOUT_SEC); } catch (TimeoutException ex) { seleniumWebDriver.close(); seleniumWebDriver.switchTo().window(currentWindow); seleniumWebDriverHelper.switchToIdeFrameAndWaitAvailability(); } seleniumWebDriver.close(); seleniumWebDriver.switchTo().window(currentWindow); seleniumWebDriverHelper.switchToIdeFrameAndWaitAvailability(); }

Target:
public void checkWebElementVisibilityAtPreviewPage(By webElement) { String currentWindow = seleniumWebDriver.getWindowHandle(); waitPreviewUrlIsPresent(); waitPreviewUrlIsResponsive(10); WaitUtils.sleepQuietly(5); clickOnPreviewUrl(); seleniumWebDriverHelper.switchToNextWindow(currentWindow); try { seleniumWebDriverHelper.waitVisibility(webElement, LOADER_TIMEOUT_SEC); } finally { seleniumWebDriver.close(); seleniumWebDriver.switchTo().window(currentWindow); seleniumWebDriverHelper.switchToIdeFrameAndWaitAvailability(); } }
Source:
protected void handleAdditionalRecords(SAMRecord currentRecord, Map<SAMReadGroupRecord, List<FastqWriter>> tagWriters, SAMRecord read1, SAMRecord read2) { if (currentRecord.isSecondaryOrSupplementary() && !INCLUDE_NON_PRIMARY_ALIGNMENTS) return; if (currentRecord.getReadFailsVendorQualityCheckFlag() && !INCLUDE_NON_PF_READS) return; final List<FastqWriter> rgTagWriters = tagWriters.get(currentRecord.getReadGroup()); if (currentRecord.getReadPairedFlag()) { if (read1 != null && read2 !=null){ writeTagRecords(read1, 1, rgTagWriters); writeTagRecords(read2, 2, rgTagWriters); } } else { writeTagRecords(currentRecord, null, rgTagWriters); } }

Target:
protected void handleAdditionalRecords(SAMRecord currentRecord, Map<SAMReadGroupRecord, List<FastqWriter>> tagWriters, SAMRecord read1, SAMRecord read2) { final List<FastqWriter> rgTagWriters = tagWriters.get(currentRecord.getReadGroup()); if (currentRecord.getReadPairedFlag()) { if (read1 != null && read2 !=null) { writeTagRecords(read1, 1, rgTagWriters); writeTagRecords(read2, 2, rgTagWriters); } } else { writeTagRecords(currentRecord, null, rgTagWriters); } }
Source:
public static Bitmap roundedCorners(@NonNull BitmapPool pool, @NonNull Bitmap inBitmap, int width, int height, int roundingRadius) { Preconditions.checkArgument(width > 0, "width must be greater than 0."); Preconditions.checkArgument(height > 0, "height must be greater than 0."); Preconditions.checkArgument(roundingRadius > 0, "roundingRadius must be greater than 0."); Bitmap toTransform = getAlphaSafeBitmap(pool, inBitmap); Bitmap result = pool.get(width, height, Bitmap.Config.ARGB_8888); setAlphaIfAvailable(result, true ); BitmapShader shader = new BitmapShader(toTransform, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); Paint paint = new Paint(); paint.setAntiAlias(true); paint.setShader(shader); RectF rect = new RectF(0, 0, result.getWidth(), result.getHeight()); TransformationUtils.getBitmapDrawableLock().lock(); try { Canvas canvas = new Canvas(result); canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR); canvas.drawRoundRect(rect, roundingRadius, roundingRadius, paint); clear(canvas); } finally { TransformationUtils.getBitmapDrawableLock().unlock(); } if (!toTransform.equals(inBitmap)) { pool.put(toTransform); } return result; }

Target:
public static Bitmap roundedCorners(@NonNull BitmapPool pool, @NonNull Bitmap inBitmap, int width, int height, int roundingRadius) { Preconditions.checkArgument(width > 0, "width must be greater than 0."); Preconditions.checkArgument(height > 0, "height must be greater than 0."); Preconditions.checkArgument(roundingRadius > 0, "roundingRadius must be greater than 0."); Bitmap toTransform = getAlphaSafeBitmap(pool, inBitmap); Bitmap result = pool.get(width, height, Bitmap.Config.ARGB_8888); setAlphaIfAvailable(result, true ); BitmapShader shader = new BitmapShader(toTransform, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); Paint paint = new Paint(); paint.setAntiAlias(true); paint.setShader(shader); RectF rect = new RectF(0, 0, result.getWidth(), result.getHeight()); BITMAP_DRAWABLE_LOCK.lock(); try { Canvas canvas = new Canvas(result); canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR); canvas.drawRoundRect(rect, roundingRadius, roundingRadius, paint); clear(canvas); } finally { BITMAP_DRAWABLE_LOCK.unlock(); } if (!toTransform.equals(inBitmap)) { pool.put(toTransform); } return result; }
Source:
public void shouldThrowException_whenPrivateKeyIsInvalid() { when(mockApplePayConfig.getPrivateKey()).thenReturn("nope".getBytes()); applePayDecrypter = new ApplePayDecrypter(mockConfig, objectMapper); applePayDecrypter.performDecryptOperation( data, ephemeralKey ); }

Target:
public void shouldThrowException_whenPrivateKeyIsInvalid() { when(mockApplePayConfig.getPrivateKey()).thenReturn("nope".getBytes(UTF_8)); applePayDecrypter = new ApplePayDecrypter(mockConfig, objectMapper); applePayDecrypter.performDecryptOperation( DATA, EPHEMERAL_KEY ); }
Source:
public List<String> getExamples() { return Lists.newArrayList( "# Print every column size in byte and percentage for a Parquet file", "sample.parquet", "sample.parquet col_1 col_2", "sample.parquet col_1 col_2.sub_col_a" ); }

Target:
public List<String> getExamples() { return Lists.newArrayList( "# Print every column size in byte and ratio for a Parquet file", "sample.parquet", "sample.parquet -c col_1", "sample.parquet --column col_2", "sample.parquet --columns col_1 col_2", "sample.parquet --columns col_1 col_2.sub_col_a" ); }
Source:
public boolean select(Viewer viewer, Object parentElement, Object element) { DRepresentation representation = null; if (element instanceof DRepresentation) { representation = (DRepresentation) element; } else if (element instanceof DRepresentationDescriptor) { DRepresentationDescriptor repDesc = (DRepresentationDescriptor) element; representation = repDesc.isLoadedRepresentation() ? repDesc.getRepresentation() : null; } else if (element instanceof RepresentationItemImpl) { DRepresentationDescriptor repDesc = ((RepresentationItemImpl) element).getDRepresentationDescriptor(); if (repDesc != null) { representation = repDesc.isLoadedRepresentation() ? repDesc.getRepresentation() : null; } } if (representation != null) { return !new DRepresentationQuery(representation).isDanglingRepresentation(); } return true; }

Target:
public boolean select(Viewer viewer, Object parentElement, Object element) { boolean select = true; DRepresentationDescriptor repDesc = null; if (element instanceof DRepresentation) { select = !new DRepresentationQuery((DRepresentation) element).isDanglingRepresentation(); } else if (element instanceof DRepresentationDescriptor) { repDesc = (DRepresentationDescriptor) element; } else if (element instanceof RepresentationItemImpl) { repDesc = ((RepresentationItemImpl) element).getDRepresentationDescriptor(); } if (repDesc != null) { select = !new DRepresentationDescriptorQuery(repDesc).isDangling(); } return select; }
Source:
public void setFocus() { }

Target:
public void setFocus() { if (fTableViewer != null) { fTableViewer.getTableViewer().getControl().setFocus(); } }
Source:
protected static void createStableBranch(Repository myRepository) throws IOException { String newRefName = "refs/heads/stable"; RefUpdate updateRef = myRepository.updateRef(newRefName); Ref sourceBranch = myRepository.findRef("refs/heads/master"); ObjectId startAt = sourceBranch.getObjectId(); String startBranch = Repository.shortenRefName(sourceBranch.getName()); updateRef.setNewObjectId(startAt); updateRef .setRefLogMessage("branch: Created from " + startBranch, false); updateRef.update(); }

Target:
protected static void createStableBranch(Repository myRepository) throws IOException { String newRefName = "refs/heads/stable"; RefUpdate updateRef = myRepository.updateRef(newRefName); Ref sourceBranch = myRepository.exactRef("refs/heads/master"); ObjectId startAt = sourceBranch.getObjectId(); String startBranch = Repository.shortenRefName(sourceBranch.getName()); updateRef.setNewObjectId(startAt); updateRef .setRefLogMessage("branch: Created from " + startBranch, false); updateRef.update(); }
Source:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { log.debug("Entered SsoPostLoginFilter"); HttpServletRequest req = (HttpServletRequest) request; try { String engineSessionId = (String) req.getAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY); if (StringUtils.isEmpty(engineSessionId) && req.getSession(false) != null) { engineSessionId = (String) req.getSession(false). getAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY); } if (StringUtils.isNotEmpty(engineSessionId)) { InitialContext ctx = new InitialContext(); try { String ssoToken = (String) runQuery(VdcQueryType.GetEngineSessionIdToken, engineSessionId, ctx); log.debug("Adding userInfo to session"); DbUser loggedInUser = (DbUser) runQuery(VdcQueryType.GetUserBySessionId, engineSessionId, ctx); req.getSession(true).setAttribute(ATTR_USER_INFO, getUserInfoObject(loggedInUser, ssoToken)); chain.doFilter(request, response); } finally { ctx.close(); } } else { log.warn("Missing sessionId in either request or session scope. " + "Please configure SSO properly with SsoPostLoginServlet."); } } catch (Exception ex) { log.error("Unable to get token for engine session {}", ex.getMessage()); } log.debug("Exiting SsoPostLoginFilter"); }

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { log.debug("Entered SsoPostLoginFilter"); HttpServletRequest req = (HttpServletRequest) request; try { String engineSessionId = (String) req.getAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY); if (StringUtils.isEmpty(engineSessionId) && req.getSession(false) != null) { engineSessionId = (String) req.getSession(false). getAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY); } if (StringUtils.isNotEmpty(engineSessionId)) { InitialContext ctx = new InitialContext(); try { String ssoToken = (String) runQuery(VdcQueryType.GetEngineSessionIdToken, engineSessionId, ctx); log.debug("Adding userInfo to session"); DbUser loggedInUser = (DbUser) runQuery(VdcQueryType.GetUserBySessionId, engineSessionId, ctx); req.getSession(true).setAttribute(ATTR_USER_INFO, getUserInfoObject(loggedInUser, ssoToken)); chain.doFilter(request, response); } finally { ctx.close(); } } else { log.warn("Missing sessionId in either request or session scope. " + "Please configure SSO properly with SsoPostLoginServlet."); } } catch (Exception ex) { log.error("Unable to get token for engine session {}", ex.getMessage()); log.debug("Exception", ex); } log.debug("Exiting SsoPostLoginFilter"); }
Source:
public void setContext(Token token, final EndpointContext ctx) { if (token != null && ctx != null) { Observation obs = map.get(token); if (obs != null) { map.put(token, new Observation(obs.getRequest(), ctx)); } } }

Target:
public void setContext(Token token, final EndpointContext ctx) { if (token != null && ctx != null) { Observation obs = map.get(token); if (obs != null) { map.replace(token, obs, new Observation(obs.getRequest(), ctx)); } } }
Source:
List<OCSPResp> sendOcspRequests(X509Certificate cert, OCSPReq ocspRequest) { Set<String> urlsToCheck = new HashSet<>(); if (ocspServerUrls != null) { urlsToCheck.addAll(ocspServerUrls); } urlsToCheck.addAll(getOcspUrlsFromCert(cert)); List<OCSPResp> ocspResponses = new ArrayList<>(); for (String ocspServerUrl : urlsToCheck) { if (isNotBlank(ocspServerUrl)) { try { SecureCxfClientFactory cxfClientFactory = factory.getSecureCxfClientFactory(ocspServerUrl, WebClient.class); WebClient client = cxfClientFactory .getWebClient() .accept("application/ocsp-response") .type("application/ocsp-request"); Response response = client.post(ocspRequest.getEncoded()); ocspResponses.add(createOcspResponse(response)); continue; } catch (IOException | OcspCheckerException | ProcessingException ignore) { } } ocspResponses.add(null); } return ocspResponses; }

Target:
Map<String, CertificateStatus> sendOcspRequests(X509Certificate cert, OCSPReq ocspRequest) { Set<String> urlsToCheck = new HashSet<>(); if (ocspServerUrls != null) { urlsToCheck.addAll(ocspServerUrls); } urlsToCheck.addAll(getOcspUrlsFromCert(cert)); Map<String, CertificateStatus> ocspStatuses = new HashMap<>(); for (String ocspServerUrl : urlsToCheck) { if (isNotBlank(ocspServerUrl)) { try { SecureCxfClientFactory cxfClientFactory = factory.getSecureCxfClientFactory(ocspServerUrl, WebClient.class); WebClient client = cxfClientFactory .getWebClient() .accept("application/ocsp-response") .type("application/ocsp-request"); Response response = client.post(ocspRequest.getEncoded()); OCSPResp ocspResponse = createOcspResponse(response); ocspStatuses.put(ocspServerUrl, getStatusFromOcspResponse(ocspResponse)); continue; } catch (IOException | OcspCheckerException | ProcessingException e) { LOGGER.debug( "Problem with the response from the OCSP Server at URL {}." + CONTINUING_MSG, ocspServerUrl, e); } } ocspStatuses.put( ocspServerUrl, new UnknownStatus()); } return ocspStatuses; }
Source:
public void resetLogLevel() throws Exception { Logger root = LogManager.getRootLogger(); Level initialLevel = root.getLevel(); assertNotEquals( initialLevel, Level.ALL ); root.setLevel( Level.ALL ); assertEquals( Level.ALL, root.getLevel() ); Response res = target.resetLogLevel(); assertNotEquals( Level.ALL, LogManager.getRootLogger().getLevel() ); assertEquals( "Done", res.getEntity().toString() ); }

Target:
public void resetLogLevel() throws Exception { Logger root = LogManager.getRootLogger(); Level initialLevel = root.getLevel(); assertNotEquals( initialLevel, Level.ALL ); root.setLevel( Level.ALL ); assertEquals( Level.ALL, root.getLevel() ); Response res = target.reloadConfiguration(); assertNotEquals( Level.ALL, LogManager.getRootLogger().getLevel() ); assertEquals( "Done", res.getEntity().toString() ); }
Source:
public void assignOperators(ID roamingGroupID, List<ID> ids) { List<Object> operatorIDs = Lists.newArrayList(); for (ID id : ids) { operatorIDs.add(id.value); } List<OperatorEntity> entities = datastore.findAllObjectsByFilter(OperatorEntity.class, Filter.where("_id").in(operatorIDs).and("state").is(OperatorState.ACTIVE.name())); datastore.update(RoamingGroupEntity.class, Filter.where("_id").is(roamingGroupID.value), UpdateStatement.addToSet("operatorIDs").append(getIDOfOperators(entities))); }

Target:
public void assignOperators(ID roamingGroupID, List<ID> ids) { RoamingGroupEntity entity = datastore.findById(RoamingGroupEntity.class, roamingGroupID.value); if (entity == null) { throw new NotFoundException("Roaming group is unknown!"); } List<Object> activeOperatorIDs = getActiveOperatorIDs(entity, ids); datastore.update(RoamingGroupEntity.class, Filter.where("_id").is(roamingGroupID.value), UpdateStatement.update("operatorIDs").toBe(activeOperatorIDs)); }
Source:
public void testList_NoOptionSingleContainer() throws IOException { blobStore.createContainerInLocation(null, CONTAINER_NAME); checkForContainerContent(CONTAINER_NAME, null); Set<String> blobsExpected = TestUtils.createBlobsInContainer(CONTAINER_NAME, "bbb" + "/" + "ccc" + "/" + "ddd" + "/" + "1234.jpg", "4rrr.jpg", "rrr" + "/" + "sss" + "/" + "788.jpg", "xdc" + "/" + "wert.kpg"); checkForContainerContent(CONTAINER_NAME, blobsExpected); }

Target:
public void testList_NoOptionSingleContainer() throws IOException { blobStore.createContainerInLocation(null, CONTAINER_NAME); checkForContainerContent(CONTAINER_NAME, null); Set<String> blobsExpected = TestUtils.createBlobsInContainer(CONTAINER_NAME, "bbb/ccc/ddd/1234.jpg", "4rrr.jpg", "rrr/sss/788.jpg", "xdc/wert.kpg"); checkForContainerContent(CONTAINER_NAME, blobsExpected); }
Source:
private Map.Entry<String, Object> metacardEntryToJsonEntry( final Map.Entry<String, Object> entry) { return transformations .stream() .filter(transformation -> entry.getKey().equals(transformation.getMetacardKey())) .findAny() .map( transformation -> { if (transformation.getExpectedMetacardType().isInstance(entry.getValue())) { final String newKey = transformation.getJsonKey(); return new AbstractMap.SimpleEntry<>( newKey, transformation.metacardValueToJsonValue( this, transformation.getExpectedMetacardType().cast(entry.getValue()))); } else { LOGGER.warn( "A workspace transformation expected a value of type for key \"{}\", but instead found a value of type {}!", transformation.getExpectedMetacardType().getName(), entry.getKey(), entry.getValue().getClass().getName()); return (Map.Entry<String, Object>) null; } }) .orElse(entry); }

Target:
private Optional<Map.Entry<String, Object>> metacardEntryToJsonEntry( final Map.Entry<String, Object> entry) { return transformations .stream() .filter(transformation -> entry.getKey().equals(transformation.getMetacardKey())) .findAny() .map(transformation -> metacardEntryToJsonEntry(entry, transformation)) .orElse(Optional.of(entry)); }
Source:
public static void assertEquals(String message, CharSequence expected, CharSequence actual) { Assert.assertEquals(message, expected, actual); }

Target:
protected static void assertEquals(String message, CharSequence expected, CharSequence actual) { Assert.assertEquals(message, expected.toString(), actual.toString()); }
Source:
public Metadata updateMetadata(Metadata metadata) { this.getMetadata(metadata.getKey()).setDescription(metadata.getDescription()); this.getMetadata(metadata.getKey()).setValue(metadata.getValue()); return this.getMetadata(metadata.getKey()); }

Target:
public void updateMetadata(Metadata metadata) throws EntityNotFoundException { if (metadata.getDescription() != null) { this.getMetadata(metadata.getKey()).setDescription(metadata.getDescription()); } this.getMetadata(metadata.getKey()).setValue(metadata.getValue()); }
Source:
void createSafeSpace(SafeSpaceIdentifier safeSpaceId) throws CachePersistenceException; FileBasedPersistenceContext createContextWithin(SafeSpaceIdentifier safeSpaceId, String name) throws CachePersistenceException; void destroySafeSpace(SafeSpaceIdentifier safeSpaceId, boolean verbose); void destroyAll(String owner); void destroySafeSpace(String owner, String name, boolean verbose); interface SafeSpaceIdentifier

Target:
void createSafeSpace(SafeSpaceIdentifier safeSpaceId) throws CachePersistenceException; void destroySafeSpace(SafeSpaceIdentifier safeSpaceId, boolean verbose); void destroyAll(String owner); interface SafeSpaceIdentifier { File getRoot(); }
Source:
private void copyQuotaPermissions() { if (!getParameters().isCopyPermissions()) { return; } UniquePermissionsSet permissionsToAdd = new UniquePermissionsSet(); List<permissions> vmPermissions = getDbFacade().getPermissionDao().getAllForEntity(getParameters().getQuotaId(), getCurrentUser().getUserId(), false); for (permissions vmPermission : vmPermissions) { permissionsToAdd.addPermission(vmPermission.getad_element_id(), vmPermission.getrole_id(), getQuotaId(), VdcObjectType.Quota); } if (!permissionsToAdd.isEmpty()) { List<permissions> permissionsList = permissionsToAdd.asPermissionList(); MultiLevelAdministrationHandler.addPermission(permissionsList.toArray(new permissions[permissionsList.size()])); } }

Target:
private void copyQuotaPermissions() { UniquePermissionsSet permissionsToAdd = new UniquePermissionsSet(); List<permissions> vmPermissions = getDbFacade().getPermissionDao().getAllForEntity(getParameters().getQuotaId(), getCurrentUser().getId(), false); for (permissions vmPermission : vmPermissions) { permissionsToAdd.addPermission(vmPermission.getad_element_id(), vmPermission.getrole_id(), getQuotaId(), vmPermission.getObjectType()); } if (!permissionsToAdd.isEmpty()) { List<permissions> permissionsList = permissionsToAdd.asPermissionList(); MultiLevelAdministrationHandler.addPermission(permissionsList.toArray(new permissions[permissionsList.size()])); } }
Source:
public void testInvalidExtensionPoint() throws Exception { ComponentWithXPoint co = (ComponentWithXPoint) Framework.getRuntime().getComponent(ComponentWithXPoint.NAME); DummyContribution[] contribs = co.getContributions(); assertEquals(0, contribs.length); List<String> warnings = Framework.getRuntime().getWarnings(); assertEquals(1, warnings.size()); assertEquals("Failed to load contributions for component service:OverridingXPoint-witherror", warnings.get(0)); assertEquals(1, loggingEvents.size()); LoggingEvent event = loggingEvents.get(0); assertEquals("ERROR", event.getLevel().toString()); assertEquals("Failed to load contributions for component service:OverridingXPoint-witherror", event.getRenderedMessage()); Throwable t = event.getThrowableInformation().getThrowable(); assertEquals(RuntimeException.class, t.getClass()); assertEquals("Cannot load class: this-is-not-a-class while processing component: OverridingXPoint-witherror", t.getMessage()); }

Target:
public void testInvalidExtensionPoint() throws Exception { ComponentWithXPoint co = (ComponentWithXPoint) Framework.getRuntime().getComponent(ComponentWithXPoint.NAME); DummyContribution[] contribs = co.getContributions(); assertEquals(0, contribs.length); List<String> warnings = Framework.getRuntime().getWarnings(); assertEquals(1, warnings.size()); assertEquals("Failed to load contributions for component service:OverridingXPoint-witherror", warnings.get(0)); assertEquals(1, loggingEvents.size()); LoggingEvent event = loggingEvents.get(0); assertEquals(Level.ERROR, event.getLevel()); assertEquals("Failed to load contributions for component service:OverridingXPoint-witherror", event.getRenderedMessage()); Throwable t = event.getThrowableInformation().getThrowable(); assertEquals(RuntimeException.class, t.getClass()); assertEquals("Cannot load class: this-is-not-a-class while processing component: OverridingXPoint-witherror", t.getMessage()); }
Source:
public int add(InputRow row, Supplier<Committer> committerSupplier) throws IndexSizeExceededException { if (row == null) { return -1; } Sink sink = getSink(row.getTimestampFromEpoch()); if (sink == null) { return -1; } final int numRows = sink.add(row); if (!sink.canAppendRow()) { persist(committerSupplier.get()); } return numRows; }

Target:
public int add(InputRow row, Supplier<Committer> committerSupplier) throws IndexSizeExceededException { if (row == null) { return -1; } Sink sink = getSink(row.getTimestampFromEpoch()); if (sink == null) { return -1; } return sink.add(row); }
Source:
public void initialize(Context context) { context.registerSyntaxNodeConsumer(Tree.Kind.FUNCDEF, ctx -> { FunctionDef functionDef = (FunctionDef) ctx.syntaxNode(); ControlFlowGraph cfg = ControlFlowGraph.build(functionDef, ctx.pythonFile()); if (cfg == null) { return; } LiveVariablesAnalysis lva = LiveVariablesAnalysis.analyze(cfg); Set<CfgBlock> unreachableBlocks = unreachableBlocks(cfg); cfg.blocks().forEach(block -> { List<DeadStoreUtils.UnnecessaryAssignment> unnecessaryAssignments = DeadStoreUtils.findUnnecessaryAssignments(block, lva.getLiveVariables(block), functionDef); unnecessaryAssignments.stream() .filter(assignment -> assignment.symbol.usages().stream().filter(Usage::isBindingUsage).count() > 1) .filter(assignment -> unreachableBlocks.stream().noneMatch(unreachableBlock -> lva.getLiveVariables(unreachableBlock).usedSymbols().contains(assignment.symbol))) .filter((assignment -> isParameter(assignment.element))) .forEach(assignment -> ctx.addIssue(assignment.element, String.format(MESSAGE_TEMPLATE, assignment.symbol.name()))); }); }); }

Target:
public void initialize(Context context) { context.registerSyntaxNodeConsumer(Tree.Kind.FUNCDEF, ctx -> { FunctionDef functionDef = (FunctionDef) ctx.syntaxNode(); ControlFlowGraph cfg = ControlFlowGraph.build(functionDef, ctx.pythonFile()); if (cfg == null) { return; } LiveVariablesAnalysis lva = LiveVariablesAnalysis.analyze(cfg); Set<CfgBlock> unreachableBlocks = unreachableBlocks(cfg); cfg.blocks().forEach(block -> { List<DeadStoreUtils.UnnecessaryAssignment> unnecessaryAssignments = DeadStoreUtils.findUnnecessaryAssignments(block, lva.getLiveVariables(block), functionDef); unnecessaryAssignments.stream() .filter((assignment -> isParameter(assignment.element))) .filter(assignment -> assignment.symbol.usages().stream().filter(Usage::isBindingUsage).count() > 1) .filter(assignment -> !isSymbolUsedInUnreachableBlocks(lva, unreachableBlocks, assignment.symbol)) .forEach(assignment -> ctx.addIssue(assignment.element, String.format(MESSAGE_TEMPLATE, assignment.symbol.name()))); }); }); }
Source:
protected void doTest(@NotNull String codeBefore, @NotNull String expectedCodeAfter, @NotNull String surrounderDescription, boolean apply) { PsiFile file = myFixture.configureByText("a.go", normalizeCode(codeBefore)); ApplicationManager.getApplication().runWriteAction(new Runnable() { @Override public void run() { CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() { @Override public void run() { if (!CodeInsightUtilBase.prepareEditorForWrite(myFixture.getEditor())) return; List<AnAction> applicable = SurroundWithHandler.buildSurroundActions(myFixture.getProject(), myFixture.getEditor(), file, null); if (applicable == null) return; String suffix = ". " + surrounderDescription; for (AnAction action : applicable) { String actionPresentation = action.getTemplatePresentation().getText(); if (actionPresentation != null && StringUtil.endsWith(actionPresentation, suffix)) { assert apply; myFixture.testAction(action); return; } } } }, "Surround action", null); } }); if (apply) { myFixture.checkResult(normalizeCode(expectedCodeAfter), true); } }

Target:
protected void doTest(@NotNull String codeBefore, @NotNull String expectedCodeAfter, @NotNull String surrounderDescription, boolean apply) { PsiFile file = myFixture.configureByText("a.go", normalizeCode(codeBefore)); List<AnAction> applicable = SurroundWithHandler.buildSurroundActions(myFixture.getProject(), myFixture.getEditor(), file, null); if (applicable == null) { assertFalse(apply); return; } String suffix = ". " + surrounderDescription; for (AnAction action : applicable) { String actionPresentation = action.getTemplatePresentation().getText(); if (actionPresentation != null && StringUtil.endsWith(actionPresentation, suffix)) { assertTrue(apply); myFixture.testAction(action); return; } } if (apply) { myFixture.checkResult(normalizeCode(expectedCodeAfter), true); } }
Source:
protected ValidationResult validateRemovedUnmanagedNetworks( Collection<String> removedUnmanagedNetworks, Collection<VdsNetworkInterface> existingInterfaces, BusinessEntityMap<Network> networkBusinessEntityMap) { for (String removedUnmanagedNetworkName : removedUnmanagedNetworks){ Network network = networkBusinessEntityMap.get(removedUnmanagedNetworkName); if (network != null){ return new ValidationResult(EngineMessage.REMOVED_UNMANAGED_NETWORK_IS_A_CLUSTER_NETWORK, ReplacementUtils.createSetVariableString(NETWORK, removedUnmanagedNetworkName)); } ValidationResult result = validateNetworkIsAnUnmanagedNetworkOnHost(removedUnmanagedNetworkName, existingInterfaces); if (!result.isValid()){ return result; } } return ValidationResult.VALID; }

Target:
protected ValidationResult validateRemovedUnmanagedNetworks( Collection<String> removedUnmanagedNetworks, Collection<VdsNetworkInterface> existingInterfaces, BusinessEntityMap<Network> networkBusinessEntityMap) { for (String removedUnmanagedNetworkName : removedUnmanagedNetworks){ Network network = networkBusinessEntityMap.get(removedUnmanagedNetworkName); if (network != null){ EngineMessage engineMessage = EngineMessage.REMOVED_UNMANAGED_NETWORK_IS_A_CLUSTER_NETWORK; return new ValidationResult(engineMessage, ReplacementUtils.getVariableAssignmentString(engineMessage, removedUnmanagedNetworkName)); } ValidationResult result = validateNetworkIsAnUnmanagedNetworkOnHost(removedUnmanagedNetworkName, existingInterfaces); if (!result.isValid()){ return result; } } return ValidationResult.VALID; }
Source:
public List<Suggestion> enhanceResults(List<Suggestion> results, String query) { LiteralSuggestion literal = getLatLonSuggestions(query); if (literal != null && literal.hasGeo()) { results.add(0, literal); } return results; }

Target:
public void enhanceResults(List<Suggestion> results, String query) { final LiteralSuggestion literal = getLatLonSuggestions(query); if (literal != null && literal.hasGeo()) { LOGGER.trace("Adding the Lat/Lon suggestion to results [{}]", literal); results.add(0, literal); } }
Source:
public void testCreateZipMultipleResourceTypes() throws Exception { Map result = cloudinary.uploader().createZip(ObjectUtils.asMap("fully_qualified_public_ids",(new String[]{SRC_FULLY_QUALIFIED_IMAGE,SRC_FULLY_QUALIFIED_VIDEO}))); assertEquals(2, result.get("file_count")); cloudinary.api().deleteResources(Arrays.asList(result.get("public_id").toString()), asMap("resource_type", "raw")); }

Target:
public void testCreateZipMultipleResourceTypes() throws Exception { Map result = cloudinary.uploader().createZip(ObjectUtils.asMap("fully_qualified_public_ids",(new String[]{SRC_FULLY_QUALIFIED_IMAGE,SRC_FULLY_QUALIFIED_VIDEO}),"resource_type","auto")); assertEquals(2, result.get("file_count")); cloudinary.api().deleteResources(Arrays.asList(result.get("public_id").toString()), asMap("resource_type", "raw")); }
Source:
public boolean clientTunneledAuthenticationInProgress() { if (!isSASLConfigured) { return false; } try { if ((clientConfig.getJaasConfKey() != null) || ((Configuration.getConfiguration() != null) && (Configuration.getConfiguration().getAppConfigurationEntry(clientConfig.getProperty(ZKClientConfig.LOGIN_CONTEXT_NAME_KEY, ZKClientConfig.LOGIN_CONTEXT_NAME_KEY_DEFAULT)) != null))) { if (!isComplete() && !isFailed()) { return true; } return !gotLastPacket; } return false; } catch (SecurityException e) { LOG.debug("Could not retrieve login configuration", e); return false; } }

Target:
public boolean clientTunneledAuthenticationInProgress() { if (!isSASLConfigured) { return false; } try { if ((clientConfig.getJaasConfKey() != null) || ((Configuration.getConfiguration() != null) && (Configuration.getConfiguration().getAppConfigurationEntry( clientConfig.getProperty( ZKClientConfig.LOGIN_CONTEXT_NAME_KEY, ZKClientConfig.LOGIN_CONTEXT_NAME_KEY_DEFAULT)) != null))) { if (!isComplete() && !isFailed()) { return true; } if (!gotLastPacket) { return true; } } return false; } catch (SecurityException e) { LOG.debug("Could not retrieve login configuration", e); return false; } }
Source:
public EjectedCrew(Aero originalRide, int escapedThisRound) { super(); setCrew(new Crew(CrewType.CREW)); setChassis(SPACE_EJECT_NAME); setModel(originalRide.getDisplayName()); StringBuffer newName = new StringBuffer(getDisplayName()); newName.append(" of ").append(originalRide.getDisplayName()); displayName = newName.toString(); initializeInternal(escapedThisRound, Infantry.LOC_INFANTRY); setOriginalRideId(originalRide.getId()); setOriginalRideExternalId(originalRide.getExternalIdAsString()); }

Target:
public EjectedCrew(Aero originalRide, int escapedThisRound) { super(); setCrew(new Crew(CrewType.CREW)); setChassis(SPACE_EJECT_NAME); setModel(originalRide.getDisplayName()); String newName = new String(getDisplayName() + " of " + originalRide.getDisplayName()); displayName = newName; initializeInternal(escapedThisRound, Infantry.LOC_INFANTRY); setOriginalRideId(originalRide.getId()); setOriginalRideExternalId(originalRide.getExternalIdAsString()); }
Source:
public void publish(@NotNull Review review) { long numFilesWithComments = review.getFiles().stream().filter(files -> !files.getComments().isEmpty()).count(); if (numFilesWithComments == 0) { info("No sputnik comments"); return; } for (String message : review.getMessages()) { warn(message); } for (ReviewFile file : review.getFiles()) { if (file.getComments().isEmpty()) { continue; } warn(""); warn(String.format("%d comment(s) on %s", file.getComments().size(), file.getReviewFilename())); for (Comment comment : file.getComments()) { warn(String.format("Line %d: %s", comment.getLine(), comment.getMessage())); } } }

Target:
public void publish(@NotNull Review review) { long numFilesWithComments = review.getFiles().stream().filter(files -> !files.getComments().isEmpty()).count(); if (numFilesWithComments == 0) { output.info("No sputnik comments"); return; } for (String message : review.getMessages()) { output.warn(message); } for (ReviewFile file : review.getFiles()) { if (file.getComments().isEmpty()) { continue; } output.warn(""); output.warn("{} comment(s) on {}", file.getComments().size(), file.getReviewFilename()); for (Comment comment : file.getComments()) { output.warn("Line {}: {}", comment.getLine(), comment.getMessage()); } } }
Source:
public static File getChromeDriver() { Path resultPath; Platform current = getCurrent(); if (current.is(WINDOWS)) { resultPath = ROOT_TEST_PATH.resolve("chromedriver.exe"); } else if (current.is(MAC)) { resultPath = ROOT_TEST_PATH.resolve("chromedriver_mac"); } else { resultPath = ROOT_TEST_PATH.resolve("chromedriver_linux"); } return resultPath.toFile(); }

Target:
public static File getChromeDriver() { Platform current = getCurrent(); if (current.is(WINDOWS)) { return ROOT_TEST_PATH.resolve("chromedriver.exe").toFile(); } else if (current.is(MAC)) { return ROOT_TEST_PATH.resolve("chromedriver_mac").toFile(); } return ROOT_TEST_PATH.resolve("chromedriver_linux").toFile(); }
Source:
private void attemptOnePassEncoding() { try { triggerFullWrite(); } catch (IOException e) { throw new SearchException( e ); } if ( nextBodyToEncodeIndex == bodyParts.size() ) { hintContentLength( writer.buffer.contentSize() ); } }

Target:
private void attemptOnePassEncoding() { try { triggerFullWrite(); } catch (IOException e) { throw new SearchException( e ); } if ( nextBodyToEncodeIndex == bodyParts.size() ) { hintContentLength( writer.bufferedContentSize() ); } }
Source:
public boolean equals(Object o) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } Schema schema = (Schema)o; return pathRegex.equals(schema.pathRegex); }

Target:
public boolean equals(Object o) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } Schema schema = (Schema)o; if ( !pathRegex.equals(schema.pathRegex) ) { return false; } return path.equals(schema.path); }
Source:
default void inputDetail() { optional(cluster()); optional(clone()); optional(exclusive()); optional(vm().name()); or(optional(storageDomain().id()), optional(storageDomain().name())); optional(vm().diskAttachments()[COLLECTION].disk().format()); optional(vm().diskAttachments()[COLLECTION].id()); optional(vm().diskAttachments()[COLLECTION].disk().sparse()); }

Target:
default void inputDetail() { or(optional(cluster().id()), optional(cluster().name())); optional(clone()); optional(exclusive()); optional(vm().name()); or(optional(storageDomain().id()), optional(storageDomain().name())); optional(vm().diskAttachments()[COLLECTION].disk().format()); optional(vm().diskAttachments()[COLLECTION].id()); optional(vm().diskAttachments()[COLLECTION].disk().sparse()); }
Source:
private static void appendBodyColorsRule(StringBuilder buffer, RGB fgRGB, RGB bgRGB) { StringBuilder fg= new StringBuilder(); appendColor(fg, fgRGB); StringBuilder bg= new StringBuilder(); appendColor(bg, bgRGB); buffer.append("body {color:" + fg.toString() + "; background-color:" + bg.toString() + ";}"); }

Target:
private static void appendBodyColorsRule(StringBuilder buffer, RGB fgRGB, RGB bgRGB) { StringBuilder fg= new StringBuilder(); appendColor(fg, fgRGB); StringBuilder bg= new StringBuilder(); appendColor(bg, bgRGB); buffer.append("body {color:"); appendColor(buffer, fgRGB); buffer.append("; background-color:"); appendColor(buffer, bgRGB); buffer.append(";}"); }
Source:
private boolean isDuplicate(IndexEntry copyCandidate, FileSpan duplicateSearchSpan, Offset indexSegmentStartOffset, boolean checkAlreadyCopied) { try { boolean isDuplicate = false; IndexValue copyCandidateValue = copyCandidate.getValue(); if (duplicateSearchSpan != null && alreadyExists(srcIndex, duplicateSearchSpan, copyCandidate.getKey(), copyCandidateValue)) { logger.trace("Skipping the copying of in segment with start offset in - it already exists", copyCandidate, indexSegmentStartOffset, storeId); isDuplicate = true; } else if (checkAlreadyCopied && alreadyExists(tgtIndex, null, copyCandidate.getKey(), copyCandidateValue)) { logger.trace("Skipping the copying of in segment with start offset in - it has already been copied", copyCandidate, indexSegmentStartOffset, storeId); isDuplicate = true; } else { logger.trace( "Adding index entry in index segment with start offset in because it does not already exist", copyCandidate, indexSegmentStartOffset, storeId); } return isDuplicate; } catch (StoreException e) { throw new IllegalStateException(e); } }

Target:
private boolean isDuplicate(IndexEntry copyCandidate, FileSpan duplicateSearchSpan, Offset indexSegmentStartOffset, boolean checkAlreadyCopied) { try { boolean isDuplicate = false; IndexValue copyCandidateValue = copyCandidate.getValue(); if (duplicateSearchSpan != null && alreadyExists(srcIndex, duplicateSearchSpan, copyCandidate.getKey(), copyCandidateValue)) { logger.trace("{} in segment with start offset in is a duplicate because it already exists in store", copyCandidate, indexSegmentStartOffset, storeId); isDuplicate = true; } else if (checkAlreadyCopied && alreadyExists(tgtIndex, null, copyCandidate.getKey(), copyCandidateValue)) { logger.trace("{} in segment with start offset in is a duplicate because it has already been copied", copyCandidate, indexSegmentStartOffset, storeId); isDuplicate = true; } else { logger.trace("{} in index segment with start offset in is not a duplicate", copyCandidate, indexSegmentStartOffset, storeId); } return isDuplicate; } catch (StoreException e) { throw new IllegalStateException(e); } }
Source:
private FetchV2Request(@NonNull List<ObjectId> peerHas, @NonNull TreeMap<String, ObjectId> wantedRefs, @NonNull Set<ObjectId> wantIds, @NonNull Set<ObjectId> clientShallowCommits, int deepenSince, @NonNull List<String> deepenNotRefs, int depth, long filterBlobLimit, boolean doneReceived, @NonNull Set<String> clientCapabilities) { super(wantIds, depth, clientShallowCommits, filterBlobLimit, clientCapabilities); this.peerHas = peerHas; this.wantedRefs = wantedRefs; this.deepenSince = deepenSince; this.deepenNotRefs = deepenNotRefs; this.doneReceived = doneReceived; }

Target:
FetchV2Request(@NonNull List<ObjectId> peerHas, @NonNull TreeMap<String, ObjectId> wantedRefs, @NonNull Set<ObjectId> wantIds, @NonNull Set<ObjectId> clientShallowCommits, int deepenSince, @NonNull List<String> deepenNotRefs, int depth, long filterBlobLimit, boolean doneReceived, @NonNull Set<String> clientCapabilities) { super(wantIds, depth, clientShallowCommits, filterBlobLimit, clientCapabilities); this.peerHas = Objects.requireNonNull(peerHas); this.wantedRefs = Objects.requireNonNull(wantedRefs); this.deepenSince = deepenSince; this.deepenNotRefs = Objects.requireNonNull(deepenNotRefs); this.doneReceived = doneReceived; }
Source:
public static void prepare() throws Exception { IntegrationTestInitService.getInstance().init(); resource = new PushPublishFilterResource(); response = new MockHttpResponse(); APILocator.getPublisherAPI().getFilterDescriptorMap().clear(); filterKey = "filterTestAPI.yml"; createFilter(); }

Target:
public static void prepare() throws Exception { IntegrationTestInitService.getInstance().init(); resource = new PushPublishFilterResource(); response = new MockHttpResponse(); PublisherAPIImpl.class.cast(APILocator.getPublisherAPI()).getFilterDescriptorMap().clear(); filterKey = "filterTestAPI.yml"; createFilter(); }
Source:
public void testFailureCAppDeployment() throws Exception { int startESCount = eventStreamManagerAdminServiceClient.getEventStreamCount(); int startERCount = eventReceiverAdminServiceClient.getActiveEventReceiverCount(); int startEPCount = eventPublisherAdminServiceClient.getActiveEventPublisherCount(); int startEPCCount = eventProcessorAdminServiceClient.getAllActiveExecutionPlanConfigurationCount(); String carFilePath = FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + File.separator + "CEP" + File.separator + "car" + File.separator; String cAppDirectoryPath = FrameworkPathUtil.getCarbonHome() + File.separator + "repository" + File.separator + "deployment" + File.separator + "server" + File.separator + "carbonapps" + File.separator; try { FileManager.copyResourceToFileSystem(carFilePath + cAppFailureFileName, cAppDirectoryPath, cAppFailureFileName); } catch (Exception e) { throw new RemoteException("Exception caught when deploying the car file into CEP server", e); } Thread.sleep(20000); Assert.assertEquals(eventStreamManagerAdminServiceClient.getEventStreamCount(), startESCount); Assert.assertEquals(eventReceiverAdminServiceClient.getActiveEventReceiverCount(), startERCount); Assert.assertEquals(eventPublisherAdminServiceClient.getActiveEventPublisherCount(), startEPCount); Assert.assertEquals(eventProcessorAdminServiceClient.getAllActiveExecutionPlanConfigurationCount(), startEPCCount); }

Target:
public void testFailureCAppDeployment() throws Exception { int startESCount = eventStreamManagerAdminServiceClient.getEventStreamCount(); int startERCount = eventReceiverAdminServiceClient.getActiveEventReceiverCount(); int startEPCount = eventPublisherAdminServiceClient.getActiveEventPublisherCount(); int startEPCCount = eventProcessorAdminServiceClient.getAllActiveExecutionPlanConfigurationCount(); String carFilePath = FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + File.separator + "CEP" + File.separator + "car" + File.separator; String cAppDirectoryPath = FrameworkPathUtil.getCarbonHome() + File.separator + "repository" + File.separator + "deployment" + File.separator + "server" + File.separator + "carbonapps" + File.separator; try { FileManager.copyResourceToFileSystem(carFilePath + cAppFailureFileName, cAppDirectoryPath, cAppFailureFileName); } catch (Exception e) { throw new RemoteException("Exception caught when deploying the car file into CEP server", e); } Thread.sleep(20000); Assert.assertEquals(eventStreamManagerAdminServiceClient.getEventStreamCount(), startESCount); Assert.assertEquals(eventReceiverAdminServiceClient.getActiveEventReceiverCount(), startERCount); Assert.assertEquals(eventPublisherAdminServiceClient.getActiveEventPublisherCount(), startEPCount); Assert.assertEquals(eventProcessorAdminServiceClient.getAllActiveExecutionPlanConfigurationCount(), startEPCCount); try { FileManager.deleteFile(cAppDirectoryPath + cAppFailureFileName); } catch (Exception e) { throw new RemoteException("Exception caught when deleting the car file from CEP server", e); } Thread.sleep(20000); }
Source:
public void createPartControl(Composite parent) { super.createPartControl(parent); fTimeGraphViewer = new TimeGraphViewer(parent, SWT.NONE); fTimeGraphContentProvider = new FlameGraphContentProvider(); fPresentationProvider = new FlameGraphPresentationProvider(); fTimeGraphViewer.setTimeGraphContentProvider(fTimeGraphContentProvider); fTimeGraphViewer.setTimeGraphProvider(fPresentationProvider); IEditorPart editor = getSite().getPage().getActiveEditor(); if (editor instanceof ITmfTraceEditor) { ITmfTrace trace = ((ITmfTraceEditor) editor).getTrace(); if (trace != null) { traceSelected(new TmfTraceSelectedSignal(this, trace)); } } contributeToActionBars(); loadSortOption(); getSite().setSelectionProvider(fTimeGraphViewer.getSelectionProvider()); createTimeEventContextMenu(); fTimeGraphViewer.getTimeGraphControl().addMouseListener(new MouseAdapter() { @Override public void mouseDoubleClick(MouseEvent e) { System.out.println(e); TimeGraphControl timeGraphControl = getTimeGraphViewer().getTimeGraphControl(); ISelection selection = timeGraphControl.getSelection(); if (selection instanceof IStructuredSelection) { for (Object object : ((IStructuredSelection) selection).toList()) { if (object instanceof FlamegraphEvent) { FlamegraphEvent event = (FlamegraphEvent) object; long startTime = event.getTime(); long endTime = startTime + event.getDuration(); getTimeGraphViewer().setStartFinishTime(startTime, endTime); break; } } } } }); }

Target:
public void createPartControl(Composite parent) { super.createPartControl(parent); fTimeGraphViewer = new TimeGraphViewer(parent, SWT.NONE); fTimeGraphContentProvider = new FlameGraphContentProvider(); fPresentationProvider = new FlameGraphPresentationProvider(); fTimeGraphViewer.setTimeGraphContentProvider(fTimeGraphContentProvider); fTimeGraphViewer.setTimeGraphProvider(fPresentationProvider); IEditorPart editor = getSite().getPage().getActiveEditor(); if (editor instanceof ITmfTraceEditor) { ITmfTrace trace = ((ITmfTraceEditor) editor).getTrace(); if (trace != null) { traceSelected(new TmfTraceSelectedSignal(this, trace)); } } contributeToActionBars(); loadSortOption(); getSite().setSelectionProvider(fTimeGraphViewer.getSelectionProvider()); createTimeEventContextMenu(); fTimeGraphViewer.getTimeGraphControl().addMouseListener(new MouseAdapter() { @Override public void mouseDoubleClick(MouseEvent e) { TimeGraphControl timeGraphControl = getTimeGraphViewer().getTimeGraphControl(); ISelection selection = timeGraphControl.getSelection(); if (selection instanceof IStructuredSelection) { for (Object object : ((IStructuredSelection) selection).toList()) { if (object instanceof FlamegraphEvent) { FlamegraphEvent event = (FlamegraphEvent) object; long startTime = event.getTime(); long endTime = startTime + event.getDuration(); getTimeGraphViewer().setStartFinishTime(startTime, endTime); break; } } } } }); }
Source:
public static AggregateCall create(SqlAggFunction aggFunction, boolean distinct, List<Integer> argList, int groupCount, RelNode input, RelDataType type, String name) { distinct = aggFunction.getDistinctOptionality() != Optionality.IGNORED && distinct; return create(aggFunction, distinct, false, false, argList, -1, RelCollations.EMPTY, groupCount, input, type, name); }

Target:
public static AggregateCall create(SqlAggFunction aggFunction, boolean distinct, List<Integer> argList, int groupCount, RelNode input, RelDataType type, String name) { return create(aggFunction, distinct, false, false, argList, -1, RelCollations.EMPTY, groupCount, input, type, name); }
Source:
public static void writeObjectIntoJsonFormat(Object obj, Path outputFile) { String objectInJson = new Gson().toJson(obj); try { writeOutputFile(objectInJson, outputFile); } catch (IOException ex) { Logger.getLogger(JsonWriter.class.getName()).log(Level.SEVERE, null, ex); } }

Target:
public static void writeObjectIntoJsonFormat(Object obj, Path outputFile) throws IOException { FileWriter writer = new FileWriter(outputFile.toAbsolutePath().toFile()); writer.write(new Gson().toJson(obj)); writer.close(); }