auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public URI uploadPackage() throws UploaderException { if (!isLocalFileExists(topologyPackageLocation)) { throw new UploaderException( String.format("Topology file %s does not exist", topologyPackageLocation)); } if (!controller.exists(destTopologyDirectoryURI)) { LOG.info("The destination directory does not exist; creating it."); if (!controller.mkdirs(destTopologyDirectoryURI)) { throw new UploaderException( String.format("Failed to create directory: %s", destTopologyDirectoryURI)); } } else { LOG.info("Target topology file " + packageURI.toString() + " exists, overwriting..."); } LOG.info("Uploading topology " + topologyPackageLocation + " package to target hdfs " + packageURI.toString()); if (!controller.copyFromLocalFile(topologyPackageLocation, packageURI.toString())) { throw new UploaderException( String.format("Failed to upload the package to: %s", packageURI.toString())); } return packageURI; }

Target:
public URI uploadPackage() throws UploaderException { if (!isLocalFileExists(topologyPackageLocation)) { throw new UploaderException( String.format("Expected topology package file to be uploaded does not exist at '%s'", topologyPackageLocation)); } if (!controller.exists(destTopologyDirectoryURI)) { LOG.info(String.format( "The destination directory does not exist. Creating it now at URI '%s'", destTopologyDirectoryURI)); if (!controller.mkdirs(destTopologyDirectoryURI)) { throw new UploaderException( String.format("Failed to create directory for topology package at URI '%s'", destTopologyDirectoryURI)); } } else { LOG.info(String.format("Target topology file already exists at '%s'. Overwriting it now", packageURI.toString())); } LOG.info(String.format("Uploading topology package at '%s' to target HDFS at '%s'", topologyPackageLocation, packageURI.toString())); if (!controller.copyFromLocalFile(topologyPackageLocation, packageURI.toString())) { throw new UploaderException( String.format("Failed to upload the topology package at '%s' to: '%s'", topologyPackageLocation, packageURI.toString())); } return packageURI; }
Source:
public AbstractDiscoveryStrategy(ResourceLoader resourceLoader, Bootstrap bootstrap, Set<Class<? extends Annotation>> initialBeanDefiningAnnotations) { this(); this.setResourceLoader(resourceLoader); this.setBootstrap(bootstrap); this.setInitialBeanDefiningAnnotations(initialBeanDefiningAnnotations); }

Target:
public AbstractDiscoveryStrategy(ResourceLoader resourceLoader, Bootstrap bootstrap, Set<Class<? extends Annotation>> initialBeanDefiningAnnotations) { handlers = new LinkedList<BeanArchiveHandler>(); setResourceLoader(resourceLoader); setBootstrap(bootstrap); setInitialBeanDefiningAnnotations(initialBeanDefiningAnnotations); }
Source:
protected void handleError(final Exception e, final DeviceMessageMetadata deviceMessageMetadata, final String errorMessage) { LOGGER.info("handeling error: for message type: {}", e.getMessage(), deviceMessageMetadata.getMessageType()); final OsgpException osgpException = this.ensureOsgpException(e, errorMessage); this.webServiceResponseMessageSender.send( ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()) .withResult(ResponseMessageResultType.NOT_OK).withOsgpException(osgpException) .withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(), deviceMessageMetadata.getMessageType()); }

Target:
protected void handleError(final Exception e, final DeviceMessageMetadata deviceMessageMetadata, final String errorMessage) { LOGGER.info("handeling error: for message type: {}", e.getMessage(), deviceMessageMetadata.getMessageType()); final OsgpException osgpException = this.ensureOsgpException(e, errorMessage); final ResponseMessage responseMessage = ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()) .withResult(ResponseMessageResultType.NOT_OK).withOsgpException(osgpException) .withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(); this.webServiceResponseMessageSender.send(responseMessage, deviceMessageMetadata.getMessageType()); }
Source:
private void createFooterButton() { final Button closeButton = createButton(coreLocale.close(), "window-edit-configurations-close", new ClickHandler() { @Override public void onClick(ClickEvent event) { delegate.onCloseClicked(); } }); closeButton.addDomHandler(new BlurHandler() { @Override public void onBlur(BlurEvent blurEvent) { selectElementText(filterInputField.getElement()); } }, BlurEvent.getType()); addButtonToFooter(closeButton); Element dummyFocusElement = DOM.createSpan(); dummyFocusElement.setTabIndex(0); getFooter().getElement().appendChild(dummyFocusElement); }

Target:
private void createFooterButton() { final Button closeButton = createButton(coreLocale.close(), "window-edit-configurations-close", new ClickHandler() { @Override public void onClick(ClickEvent event) { delegate.onCloseClicked(); } }); closeButton.addDomHandler(new BlurHandler() { @Override public void onBlur(BlurEvent blurEvent) { selectText(filterInputField.getElement()); } }, BlurEvent.getType()); addButtonToFooter(closeButton); Element dummyFocusElement = DOM.createSpan(); dummyFocusElement.setTabIndex(0); getFooter().getElement().appendChild(dummyFocusElement); }
Source:
public DMNIncludedModel create(final Path dmnModelPath, final Path includedModelPath) throws DMNIncludeModelCouldNotBeCreatedException { throw new DMNIncludeModelCouldNotBeCreatedException(); }

Target:
public DMNIncludedModel create(final Path dmnModelPath, final Path includedModelPath) throws DMNIncludeModelCouldNotBeCreatedException { throw new DMNIncludeModelCouldNotBeCreatedException("Not available in kogito"); }
Source:
private void createZip(List<BinaryContent> binaryContents, File dumpLocation, Metacard metacard) throws CatalogTransformerException, IOException { File zipPath = new File(getOutputFile(dumpLocation, metacard).getAbsolutePath() + ".zip"); try { ZipFile zipFile = new ZipFile(zipPath); int index = 1; for (BinaryContent binaryContent : binaryContents) { ZipParameters p = new ZipParameters(); p.setSourceExternalStream(true); p.setFileNameInZip(String.format("%d%s", index++, generateExtension())); zipFile.addStream(binaryContent.getInputStream(), p); } } catch (ZipException e) { throw new CatalogTransformerException( String.format("unable to create zip file: %s", zipPath.getAbsolutePath()), e); } }

Target:
private void createZip(List<BinaryContent> binaryContents, File dumpLocation, Metacard metacard) throws CatalogTransformerException, IOException { File zipPath = new File(getOutputFile(dumpLocation, metacard).getAbsolutePath() + ".zip"); try { ZipFile zipFile = new ZipFile(zipPath); int index = 1; for (BinaryContent binaryContent : binaryContents) { ZipParameters zipParameters = new ZipParameters(); zipParameters.setSourceExternalStream(true); zipParameters.setFileNameInZip(String.format("%d%s", index++, generateExtension())); zipFile.addStream(binaryContent.getInputStream(), zipParameters); } } catch (ZipException e) { throw new CatalogTransformerException( String.format("unable to create zip file: %s", zipPath.getAbsolutePath()), e); } }
Source:
protected void initializeConfiguration( ISynchronizePageConfiguration configuration) { configuration.setProperty(ISynchronizePageConfiguration.P_VIEWER_ID, VIEWER_ID); configuration.setProperty( ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER, GitChangeSetModelProvider.ID); configuration.addActionContribution(new GitActionContributor()); super.initializeConfiguration(configuration); configuration.addActionContribution(new GitActionContributor()); }

Target:
protected void initializeConfiguration( ISynchronizePageConfiguration configuration) { configuration.setProperty(ISynchronizePageConfiguration.P_VIEWER_ID, VIEWER_ID); configuration.setProperty( ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER, GitChangeSetModelProvider.ID); super.initializeConfiguration(configuration); configuration.addActionContribution(new GitActionContributor()); }
Source:
public void traceSelected(@Nullable TmfTraceSelectedSignal signal) { LatencyAnalysis analysis = LatencyViewerUtils.getAnalysisFromSignal(signal); if (analysis != null) { analysis.addListener(fListener); if (analysis.getResults() == null) { if (LatencyViewerUtils.runAnalysis()) { return; } } fData = LatencyViewerUtils.getResultsFromAnalysis(analysis); updateModel(fData); } }

Target:
public void traceSelected(@Nullable TmfTraceSelectedSignal signal) { LatencyAnalysis analysis = LatencyViewerUtils.getAnalysisFromSignal(signal); fData = LatencyViewerUtils.getResultsFromAnalysis(analysis); updateModel(fData); }
Source:
protected LogRecord<M> read() { if (closed) { throw new IllegalStateException("The tailer has been closed."); } List<M> value = new ArrayList<>(1); long offset = cqTailer.index(); if (codec != null) { if (!cqTailer.readDocument(w -> value.add(codec.decode(w.read().bytes())))) { return null; } } else { if (!cqTailer.readDocument(w -> value.add((M) w.read("msg").object()))) { return null; } } return new LogRecord<>(value.get(0), new LogOffsetImpl(partition, offset)); }

Target:
protected LogRecord<M> read() { if (closed) { throw new IllegalStateException("The tailer has been closed."); } List<M> value = new ArrayList<>(1); long offset = cqTailer.index(); if (NO_CODEC.equals(codec)) { try { if (!cqTailer.readDocument(w -> value.add((M) w.read(MSG_KEY).object()))) { return null; } } catch (ClassCastException e) { throw new IllegalArgumentException(e); } } else { if (!cqTailer.readDocument(w -> value.add(codec.decode(w.read().bytes())))) { return null; } } return new LogRecord<>(value.get(0), new LogOffsetImpl(partition, offset)); }
Source:
public void edit(StorageModel object) { driver.edit(object); final StorageModel storageModel = object; storageModel.getAvailableStorageDomainTypeItems().getSelectedItemChangedEvent().addListener((ev, sender, args) -> { updateStorageTypesByDomainType(storageModel); }); storageModel.getAvailableStorageTypeItems().getSelectedItemChangedEvent().addListener((ev, sender, args) -> { revealStorageView(storageModel); }); storageModel.getDataCenterAlert().getEntityChangedEvent().addListener((ev, sender, args) -> { datacenterAlertIcon.setVisible(storageModel.getDataCenterAlert().getIsAvailable()); datacenterAlertIcon.setTitle(storageModel.getDataCenterAlert().getEntity()); }); warningLowSpaceIndicatorEditor.addKeyUpHandler(event -> { if (!storageModel.isNewStorage()) { storageModel.getWarningLowSpaceSize().setEntity( ConstantsManager.getInstance().getMessages().bracketsWithGB(getWarningLowSpaceSize(storageModel))); } }); criticalSpaceActionBlockerEditor.addKeyUpHandler(event -> { int criticalActionBlockerSpace = criticalSpaceActionBlockerEditor.asValueBox().getValue(); if (criticalActionBlockerSpace > getStorageDomainTotalSize(storageModel)) { criticalSpaceActionBlockerEditor.markAsInvalid(Arrays.asList(ConstantsManager .getInstance() .getMessages() .criticalSpaceActionBlockerBiggerThanStorgeDomain(getStorageDomainTotalSize(storageModel)))); } else { criticalSpaceActionBlockerEditor.markAsValid(); } }); }

Target:
public void edit(StorageModel object) { driver.edit(object); final StorageModel storageModel = object; storageModel.getAvailableStorageDomainTypeItems().getSelectedItemChangedEvent().addListener((ev, sender, args) -> { updateStorageTypesByDomainType(storageModel); }); storageModel.getAvailableStorageTypeItems().getSelectedItemChangedEvent().addListener((ev, sender, args) -> { revealStorageView(storageModel); }); storageModel.getDataCenterAlert().getEntityChangedEvent().addListener((ev, sender, args) -> { datacenterAlertIcon.setVisible(storageModel.getDataCenterAlert().getIsAvailable()); datacenterAlertIcon.setTitle(storageModel.getDataCenterAlert().getEntity()); }); warningLowSpaceIndicatorEditor.addKeyUpHandler(event -> { if (!storageModel.isNewStorage()) { storageModel.getWarningLowSpaceSize().setEntity( ConstantsManager.getInstance().getMessages().bracketsWithGB(getWarningLowSpaceSize(storageModel))); } }); criticalSpaceActionBlockerEditor.addKeyUpHandler(event -> { int storageDomainTotalSize = getStorageDomainTotalSize(storageModel); String validationToolTipText = ConstantsManager .getInstance() .getMessages() .criticalSpaceActionBlockerBiggerThanStorageDomain(storageDomainTotalSize); int criticalActionBlockerSpace; if (criticalSpaceActionBlockerEditor.asValueBox().getValue() == null) { criticalSpaceActionBlockerEditor.markAsInvalid(Arrays.asList(validationToolTipText)); } else { criticalActionBlockerSpace = criticalSpaceActionBlockerEditor.asValueBox().getValue(); if (criticalActionBlockerSpace > storageDomainTotalSize) { criticalSpaceActionBlockerEditor.markAsInvalid(Arrays.asList(validationToolTipText)); } else { criticalSpaceActionBlockerEditor.markAsValid(); } } }); }
Source:
public void refreshList() { if (isNetworkAvailable()) { String apiLocationFormat = Constants.getApiLocation(mRoomName); call = MachineService.getService().getMachineStatus(apiLocationFormat); call.enqueue(new Callback<ArrayList<Machine>>() { @Override public void onResponse(Call<ArrayList<Machine>> call, Response<ArrayList<Machine>> response) { if (progressDialog.isShowing()) { progressDialog.dismiss(); } if (response.isSuccessful()) { mSwipeRefreshLayout.setRefreshing(false); isRefreshing = false; classMachines = response.body(); if (ModelOperations.machinesOffline(classMachines)) { showOfflineDialogIfNecessary(); } updateRecyclerView(); } else { int httpCode = response.code(); if (httpCode < 500) { showErrorDialog(getString(R.string.error_client_message)); AnalyticsHelper.sendEventHit("api", "errorCodes", "/location/" + mRoomName, httpCode); } else { showErrorDialog(getString(R.string.error_server_message)); AnalyticsHelper.sendEventHit("api", "errorCodes", "/location/" + mRoomName, httpCode); } } } @Override public void onFailure(Call<ArrayList<Machine>> call, Throwable t) { if (isAdded() && getActivity() != null) { showErrorDialog(getString(R.string.error_server_message)); mSwipeRefreshLayout.setRefreshing(false); isRefreshing = false; alertNetworkError(); } else { AnalyticsHelper.sendEventHit(AnalyticsHelper.ERROR, "onFailure", "MachineFragment's Activity Null"); } AnalyticsHelper.sendErrorHit(t, false); } }); } else { showNoInternetDialog(); } }

Target:
public void refreshList() { if (isNetworkAvailable()) { String apiLocationFormat = Constants.getApiLocation(mRoomName); call = MachineService.getService().getMachineStatus(apiLocationFormat); call.enqueue(new Callback<ArrayList<Machine>>() { @Override public void onResponse(Call<ArrayList<Machine>> call, Response<ArrayList<Machine>> response) { if (progressDialog.isShowing()) { progressDialog.dismiss(); } if (response.isSuccessful()) { mSwipeRefreshLayout.setRefreshing(false); isRefreshing = false; classMachines = response.body(); if (ModelOperations.machinesOffline(classMachines)) { showOfflineDialogIfNecessary(); } updateRecyclerView(); } else { int httpCode = response.code(); if (httpCode < 500) { showErrorDialog(getString(R.string.error_client_message)); AnalyticsHelper.sendEventHit("api", "errorCodes", "/location/" + mRoomName, httpCode); } else { showErrorDialog(getString(R.string.error_server_message)); AnalyticsHelper.sendEventHit("api", "errorCodes", "/location/" + mRoomName, httpCode); } } } @Override public void onFailure(Call<ArrayList<Machine>> call, Throwable t) { if (call.isCanceled()) { return; } if (isAdded() && getActivity() != null) { showErrorDialog(getString(R.string.error_server_message)); mSwipeRefreshLayout.setRefreshing(false); isRefreshing = false; alertNetworkError(); } else { AnalyticsHelper.sendErrorHit(new RuntimeException("Activity null"), false); } AnalyticsHelper.sendErrorHit(t, false); } }); } else { showNoInternetDialog(); } }
Source:
@Override public boolean hasNext() { return nextElementIndex != elementCount; }

Target:
@Override public boolean hasNext() { checkForComodification(); return nextElementIndex != elementCount; }
Source:
public boolean next() { if ( next == NO_ID ) { reset(); return false; } boolean hasChanges = read.hasTxStateWithChanges(); TransactionState txs = hasChanges ? read.txState() : null; do { if ( hasChanges && txs.nodeIsAddedInThisTx( next ) ) { setId( next++ ); setInUse( true ); } else if ( hasChanges && txs.nodeIsDeletedInThisTx( next ) ) { next++; setInUse( false ); } else { read.node( this, next++, pageCursor ); } if ( next > highMark ) { if ( highMark == NO_ID ) { next = NO_ID; return inUse(); } else { highMark = read.nodeHighMark(); if ( next > highMark ) { next = NO_ID; return inUse(); } } } else if ( next < 0 ) { next = NO_ID; return inUse(); } } while ( !inUse() ); return true; }

Target:
public boolean next() { if ( next == NO_ID ) { reset(); return false; } boolean hasChanges = read.hasTxStateWithChanges(); TransactionState txs = hasChanges ? read.txState() : null; do { if ( hasChanges && txs.nodeIsAddedInThisTx( next ) ) { setId( next++ ); setInUse( true ); } else if ( hasChanges && txs.nodeIsDeletedInThisTx( next ) ) { next++; setInUse( false ); } else { read.node( this, next++, pageCursor ); } if ( next > highMark ) { if ( isSingle() ) { next = NO_ID; return inUse(); } else { highMark = read.nodeHighMark(); if ( next > highMark ) { next = NO_ID; return inUse(); } } } else if ( next < 0 ) { next = NO_ID; return inUse(); } } while ( !inUse() ); return true; }
Source:
public final boolean incrementToken() throws IOException { if (state != null) { restoreState(state); if (scriptOne.length() > 0) { replayTerm(scriptOne); if (scriptTwo.length() == 0) { state = null; } return true; } if (scriptTwo.length() > 0) { replayTerm(scriptTwo); state = null; return true; } assert false; } if (!input.incrementToken()) { return false; } boolean matchesBothScripts = hasChars(translationTable.getScript1Reg()) && hasChars(translationTable.getScript2Reg()); if (matchesBothScripts) { scriptOne.setLength(0); scriptOne.append(termAtt); translationTable.replaceScriptOne(scriptOne); scriptTwo.setLength(0); scriptTwo.append(termAtt); translationTable.replaceScriptTwo(scriptTwo); if (!translationTable.getScript1Reg().matcher(scriptOne).find()) { state = captureState(); } else { scriptOne.setLength(0); } if (!translationTable.getScript2Reg().matcher(scriptTwo).find()) { if (state == null) { state = captureState(); } } else { scriptTwo.setLength(0); } } return true; }

Target:
public final boolean incrementToken() throws IOException { if (state != null) { restoreState(state); if (scriptOne.length() > 0) { replayTerm(scriptOne); if (scriptTwo.length() == 0) { state = null; } return true; } if (scriptTwo.length() > 0) { replayTerm(scriptTwo); state = null; return true; } throw new IllegalStateException("At least one of script one|two should be non empty"); } if (!input.incrementToken()) { return false; } boolean matchesBothScripts = hasChars(translationTable.getScript1Reg()) && hasChars(translationTable.getScript2Reg()); if (matchesBothScripts) { scriptOne.setLength(0); scriptOne.append(termAtt); translationTable.replaceScriptOne(scriptOne); scriptTwo.setLength(0); scriptTwo.append(termAtt); translationTable.replaceScriptTwo(scriptTwo); if (!translationTable.getScript1Reg().matcher(scriptOne).find()) { state = captureState(); } else { scriptOne.setLength(0); } if (!translationTable.getScript2Reg().matcher(scriptTwo).find()) { if (state == null) { state = captureState(); } } else { scriptTwo.setLength(0); } } return true; }
Source:
private String getRepositoryName(String location) { final String[] tokens = location.split(SEPARATOR); return (location.endsWith(GIT_EXTENSION)) ? tokens[4].substring(0, tokens[4].length() - 4) : tokens[4].substring(0); }

Target:
private String getRepositoryName(String location) { final String[] tokens = location.split(SEPARATOR); if (tokens.length >= 5) return (location.endsWith(GIT_EXTENSION)) ? tokens[4].substring(0, tokens[4].length() - 4) : tokens[4].substring(0); return null; }
Source:
public static ObaRegion get(ContentResolver cr, int id) { final String[] PROJECTION = { _ID, NAME, OBA_BASE_URL, SIRI_BASE_URL, LANGUAGE, CONTACT_EMAIL, SUPPORTS_OBA_DISCOVERY, SUPPORTS_OBA_REALTIME, SUPPORTS_SIRI_REALTIME, SUPPORTS_EMBEDDED_SOCIAL, TWITTER_URL, EXPERIMENTAL, STOP_INFO_URL, OTP_BASE_URL, OTP_CONTACT_EMAIL }; Cursor c = cr.query(buildUri((int) id), PROJECTION, null, null, null); if (c != null) { try { if (c.getCount() == 0) { return null; } c.moveToFirst(); return new ObaRegionElement(id, c.getString(1), true, c.getString(2), c.getString(3), RegionBounds.getRegion(cr, id), RegionOpen311Servers.getOpen311Server(cr, id), c.getString(4), c.getString(5), c.getInt(6) > 0, c.getInt(7) > 0, c.getInt(8) > 0, c.getInt(9) > 0, c.getString(10), c.getInt(11) > 0, c.getString(12), c.getString(13), c.getString(14) ); } finally { c.close(); } } return null; }

Target:
public static ObaRegion get(ContentResolver cr, int id) { final String[] PROJECTION = { _ID, NAME, OBA_BASE_URL, SIRI_BASE_URL, LANGUAGE, CONTACT_EMAIL, SUPPORTS_OBA_DISCOVERY, SUPPORTS_OBA_REALTIME, SUPPORTS_SIRI_REALTIME, TWITTER_URL, EXPERIMENTAL, STOP_INFO_URL, OTP_BASE_URL, OTP_CONTACT_EMAIL, SUPPORTS_OTP_BIKESHARE, SUPPORTS_EMBEDDED_SOCIAL }; Cursor c = cr.query(buildUri((int) id), PROJECTION, null, null, null); if (c != null) { try { if (c.getCount() == 0) { return null; } c.moveToFirst(); return new ObaRegionElement(id, c.getString(1), true, c.getString(2), c.getString(3), RegionBounds.getRegion(cr, id), RegionOpen311Servers.getOpen311Server(cr, id), c.getString(4), c.getString(5), c.getInt(6) > 0, c.getInt(7) > 0, c.getInt(8) > 0, c.getString(9), c.getInt(10) > 0, c.getString(11), c.getString(12), c.getString(13), c.getInt(14) > 0, c.getInt(15) > 0 ); } finally { c.close(); } } return null; }
Source:
public void testChinese() throws IOException, ServletException { CSRFTokenFilter csrfTokenFilter = getFilterForChinese(); csrfTokenFilter.doFilter(req, resp, chain); final Document document = Jsoup.parse(charWriter.toString()); Elements es = document.select("div.center-block"); assertEquals(es.get(1).text(), chinese_loadingPleaseWait); assertEquals(es.get(2).text(), chinese_loadingApplication); }

Target:
public void testChinese() throws IOException, ServletException { csfrTokenFilterTest("/test-html/sample-Chinese.html", chinese_loadingPleaseWait, chinese_loadingApplication); }
Source:
public Set<Annotation> getQualifiers() { return Collections.singleton( NamedLiteral.of( BeanNames.BEAN_META_DATA_CLASS_NORMALIZER ) ); }

Target:
public Set<Annotation> getQualifiers() { return QUALIFIERS; }
Source:
public void testOrderRuleEmpty() throws Exception { final DefaultConfiguration checkConfig = createModuleConfig(CustomImportOrderCheck.class); checkConfig.addAttribute("customImportOrderRules", ""); final String[] expected = { "7: " + getCheckMessage(MSG_SEPARATED_IN_GROUP, "java.util.List"), "13: " + getCheckMessage(MSG_SEPARATED_IN_GROUP, "com.puppycrawl.tools.*"), "16: " + getCheckMessage(MSG_SEPARATED_IN_GROUP, "com.google.common.base.*"), }; verify(checkConfig, getPath("InputCustomImportOrderDefault2.java"), expected); }

Target:
public void testOrderRuleEmpty() throws Exception { final DefaultConfiguration checkConfig = createModuleConfig(CustomImportOrderCheck.class); checkConfig.addAttribute("customImportOrderRules", ""); final String[] expected = { "5: " + getCheckMessage(MSG_SEPARATED_IN_GROUP, "java.util.List"), }; verify(checkConfig, getPath("InputCustomImportOrderEmptyRule.java"), expected); }
Source:
public void testPoll() { manager.start(); manager.poll(); Assert.assertEquals( ImmutableList.of("wikipedia"), manager.getAllDatasourceNames() ); Assert.assertEquals( Sets.newHashSet(segment1, segment2), new HashSet<>(manager.getInventoryValue("wikipedia").getSegments()) ); }

Target:
public void testPoll() { manager.start(); manager.poll(); Assert.assertEquals( ImmutableList.of("wikipedia"), manager.getAllDatasourceNames() ); Assert.assertEquals( ImmutableSet.of(segment1, segment2), ImmutableSet.copyOf(manager.getInventoryValue("wikipedia").getSegments()) ); }
Source:
public DisksContentTypeRadioGroup() { HorizontalPanel panel = new HorizontalPanel(); Label label = new Label(); label.setText(constants.diskContentType()); label.getElement().getStyle().setProperty("marginRight", "10px"); label.getElement().getStyle().setProperty("marginBottom", "4px"); panel.add(label); panel.add(getRadioGroupPanel()); initWidget(panel); }

Target:
public DisksContentTypeRadioGroup() { FlowPanel panel = new FlowPanel(); Label label = new Label(); label.setText(constants.diskContentType() + ":"); label.addStyleName("disk-content-type-group-label"); panel.add(label); panel.add(getRadioGroupPanel()); initWidget(panel); }
Source:
public boolean put(PageId pageId, byte[] page) { LOG.debug("put({},{} bytes) enters", pageId, page.length); if (!mAsyncWrite) { boolean inserted = putInternal(pageId, page); if (inserted) { LOG.debug("put({},{} bytes) exits", pageId, page.length); } else { LOG.debug("put({},{} bytes) fails", pageId, page.length); } return inserted; } if (!mPendingRequests.add(pageId)) { return false; } try { mAsyncCacheExecutor.submit(() -> { try { putInternal(pageId, page); } finally { mPendingRequests.remove(pageId); } }); } catch (RejectedExecutionException e) { mPendingRequests.remove(pageId); LOG.debug("put({},{} bytes) fails due to full queue", pageId, page.length); return false; } LOG.debug("put({},{} bytes) exits with async write", pageId, page.length); return true; }

Target:
public boolean put(PageId pageId, byte[] page) { LOG.debug("put({},{} bytes) enters", pageId, page.length); if (!mAsyncWrite) { boolean inserted = putInternal(pageId, page); LOG.debug("put({},{} bytes) exits: {}", pageId, page.length, inserted); return inserted; } if (!mPendingRequests.add(pageId)) { return false; } try { mAsyncCacheExecutor.submit(() -> { try { putInternal(pageId, page); } finally { mPendingRequests.remove(pageId); } }); } catch (RejectedExecutionException e) { mPendingRequests.remove(pageId); Metrics.PUT_ERRORS.inc(); LOG.debug("put({},{} bytes) fails due to full queue", pageId, page.length); return false; } LOG.debug("put({},{} bytes) exits with async write", pageId, page.length); return true; }
Source:
public List<DedicatedResourceVO> listAvailableResources(Long accountId, Long... domains) { StringBuilder sql = new StringBuilder("select data_center_id, pod_id, cluster_id, host_id, domain_id, account_id,"); sql.append("affinity_group_id from dedicated_resources where account_id = ? or (account_id IS NULL and domain_id in ("); for(int i = 0; i < domains.length; i++) { if(i == (domains.length - 1)) { sql.append("?));"); } else { sql.append("?, "); } } TransactionLegacy txn = TransactionLegacy.currentTxn(); ArrayList<DedicatedResourceVO> result = new ArrayList<DedicatedResourceVO>(); try(PreparedStatement pstmt = txn.prepareStatement(sql.toString());) { if(accountId != null) { pstmt.setLong(1, accountId); } for (int i = 2; i < (domains.length + 2); i++) { pstmt.setLong(i, domains[i-2]); } try(ResultSet rs = pstmt.executeQuery();) { while(rs.next()) { Long dataCenterId = rs.getLong(1); if(rs.wasNull()) { dataCenterId = null; } Long podId = rs.getLong(2); if(rs.wasNull()) { podId = null; } Long clusterId = rs.getLong(3); if(rs.wasNull()) { clusterId = null; } Long hostId = rs.getLong(4); if(rs.wasNull()) { hostId = null; } Long domainId = rs.getLong(5); if(rs.wasNull()) { domainId = null; } Long tempAccountId = rs.getLong(6); if(rs.wasNull()) { tempAccountId= null; } Long affinityGroupId = rs.getLong(7); result.add(new DedicatedResourceVO(dataCenterId, podId, clusterId, hostId, domainId, tempAccountId, affinityGroupId)); } } catch (Exception e) { s_logger.warn("Exception: ", e); } } catch (Exception e) { s_logger.warn("Exception: ", e); } return result; }

Target:
public List<DedicatedResourceVO> listAvailableResources(Long accountId, Long... domains) { SearchCriteria<DedicatedResourceVO> sc = ListAvailableResourcesSearch.create(); sc.setParameters("accountId", accountId); sc.setParameters("domainId", domains); return listBy(sc); }
Source:
Map<String, Runnable> getScaleCallBacks() { return callBacks; }

Target:
Map<String, Runnable> getScaleCallBacks() { return Collections.unmodifiableMap(callBacks); }
Source:
private boolean hasTextDefined(Citation citation) { return citation.getEntry().getRawText()!=null && StringUtils.isNotBlank(citation.getEntry().getRawText().toString()); }

Target:
private boolean hasTextDefined(Citation citation) { return StringUtils.isNotBlank(citation.getEntry().getRawText()); }
Source:
private static String formatArrayTypeImpl( List<@Nullable ATypeElement> scenelibRepInJavacOrder, ArrayType javacRep) { TypeMirror javacComponent = javacRep.getComponentType(); ATypeElement scenelibRep = scenelibRepInJavacOrder.get(0); ATypeElement scenelibComponent = scenelibRepInJavacOrder.get(1); String result = ""; List<? extends AnnotationMirror> explicitAnnos = javacRep.getAnnotationMirrors(); for (AnnotationMirror explicitAnno : explicitAnnos) { result += explicitAnno.toString(); result += " "; } if ("".equals(result)) { if (scenelibRep != null) { result += formatAnnotations(scenelibRep.tlAnnotationsHere); } } result += "[] "; if (javacComponent.getKind() == TypeKind.ARRAY) { return formatArrayTypeImpl( scenelibRepInJavacOrder.subList(1, scenelibRepInJavacOrder.size()), (ArrayType) javacComponent) + result; } return formatType(scenelibComponent, javacComponent) + result; }

Target:
private static String formatArrayTypeImpl( List<@Nullable ATypeElement> scenelibRepInJavacOrder, ArrayType javacRep) { TypeMirror javacComponent = javacRep.getComponentType(); ATypeElement scenelibRep = scenelibRepInJavacOrder.get(0); ATypeElement scenelibComponent = scenelibRepInJavacOrder.get(1); String result = ""; List<? extends AnnotationMirror> explicitAnnos = javacRep.getAnnotationMirrors(); for (AnnotationMirror explicitAnno : explicitAnnos) { result += explicitAnno.toString(); result += " "; } if (result.isEmpty() && scenelibRep != null) { result += formatAnnotations(scenelibRep.tlAnnotationsHere); } result += "[] "; if (javacComponent.getKind() == TypeKind.ARRAY) { return formatArrayTypeImpl( scenelibRepInJavacOrder.subList(1, scenelibRepInJavacOrder.size()), (ArrayType) javacComponent) + result; } return formatType(scenelibComponent, javacComponent) + result; }
Source:
protected void actionPerformed( final GuiButton btn ) { if( btn == this.craftingStatusBtn ) { NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_CRAFTING_STATUS ) ); } if( btn instanceof GuiImgButton ) { final boolean backwards = Mouse.isButtonDown( 1 ); final GuiImgButton iBtn = (GuiImgButton) btn; if( iBtn.getSetting() != Settings.ACTIONS ) { final Enum cv = iBtn.getCurrentValue(); final Enum next = Platform.rotateEnum( cv, backwards, iBtn.getSetting().getPossibleValues() ); if( btn == this.terminalStyleBox ) { AEConfig.instance().getConfigManager().putSetting( iBtn.getSetting(), next ); } else if( btn == this.searchBoxSettings ) { AEConfig.instance().getConfigManager().putSetting( iBtn.getSetting(), next ); } else { try { NetworkHandler.instance.sendToServer( new PacketValueConfig( iBtn.getSetting().name(), next.name() ) ); } catch( final IOException e ) { AELog.debug( e ); } } iBtn.set( next ); if( next.getClass() == SearchBoxMode.class || next.getClass() == TerminalStyle.class ) { this.reinitalize(); } } } }

Target:
protected void actionPerformed( final GuiButton btn ) { if( btn == this.craftingStatusBtn ) { NetworkHandler.instance().sendToServer( new PacketSwitchGuis( GuiBridge.GUI_CRAFTING_STATUS ) ); } if( btn instanceof GuiImgButton ) { final boolean backwards = Mouse.isButtonDown( 1 ); final GuiImgButton iBtn = (GuiImgButton) btn; if( iBtn.getSetting() != Settings.ACTIONS ) { final Enum cv = iBtn.getCurrentValue(); final Enum next = Platform.rotateEnum( cv, backwards, iBtn.getSetting().getPossibleValues() ); if( btn == this.terminalStyleBox ) { AEConfig.instance().getConfigManager().putSetting( iBtn.getSetting(), next ); } else if( btn == this.searchBoxSettings ) { AEConfig.instance().getConfigManager().putSetting( iBtn.getSetting(), next ); } else { try { NetworkHandler.instance().sendToServer( new PacketValueConfig( iBtn.getSetting().name(), next.name() ) ); } catch( final IOException e ) { AELog.debug( e ); } } iBtn.set( next ); if( next.getClass() == SearchBoxMode.class || next.getClass() == TerminalStyle.class ) { this.reinitalize(); } } } }
Source:
InvalidSessionStrategy getInvalidSessionStrategy() { if (this.invalidSessionStrategy != null) { return this.invalidSessionStrategy; } if (this.invalidSessionUrl != null) { this.invalidSessionStrategy = new SimpleRedirectInvalidSessionStrategy( this.invalidSessionUrl); } return this.invalidSessionStrategy; }

Target:
InvalidSessionStrategy getInvalidSessionStrategy() { if (this.invalidSessionStrategy != null) { return this.invalidSessionStrategy; } if (this.invalidSessionUrl == null) { return null; } this.invalidSessionStrategy = new SimpleRedirectInvalidSessionStrategy( this.invalidSessionUrl); return this.invalidSessionStrategy; }
Source:
public boolean stop(String name) { List<Binding<Object>> inputBindings = BindingsEndpoint.this.gatherInputBindings(); for (Binding<Object> binding : inputBindings) { String bindingName = binding.getName(); if (name.equals(bindingName)) { binding.unbind(); } } return true; }

Target:
public boolean stop(String name) { List<Binding<Object>> inputBindings = BindingsEndpoint.this.gatherInputBindings(); for (Binding<Object> binding : inputBindings) { if (name.equals(binding.getName())) { binding.stop(); return true; } } return false; }
Source:
public void init() { if (isInitialized.compareAndSet(false, true)) { LOG.info("Starting the coordinator stream system consumer with config: {}.", config); registerConsumer(); systemConsumer.start(); systemProducer.register(SOURCE); systemProducer.start(); Runtime.getRuntime().addShutdownHook(new Thread(() -> { LOG.info("CoordinatorStreamStore Shut Down Hook thread is closing kafka clients"); this.systemProducer.stop(); this.systemConsumer.stop(); this.systemAdmin.stop(); })); iterator = new SystemStreamPartitionIterator(systemConsumer, coordinatorSystemStreamPartition); readMessagesFromCoordinatorStream(); } else { LOG.info("Store had already been initialized. Skipping.", coordinatorSystemStreamPartition); } }

Target:
public void init() { if (isInitialized.compareAndSet(false, true)) { LOG.info("Starting the coordinator stream system consumer with config: {}.", config); registerConsumer(); systemConsumer.start(); systemProducer.register(SOURCE); systemProducer.start(); iterator = new SystemStreamPartitionIterator(systemConsumer, coordinatorSystemStreamPartition); readMessagesFromCoordinatorStream(); } else { LOG.info("Store had already been initialized. Skipping.", coordinatorSystemStreamPartition); } }
Source:
<T> Mono<PagedResponse<T>> listRelationshipsFirstPage(String digitalTwinId, String relationshipName, Class<T> clazz, Context context) { return protocolLayer .getDigitalTwins() .listRelationshipsSinglePageAsync(digitalTwinId, relationshipName, context) .map( objectPagedResponse -> { List<T> list = objectPagedResponse.getValue().stream() .map(object -> { try { return DeserializationHelpers.castObject(mapper, object, clazz); } catch (JsonProcessingException e) { logger.error("JsonProcessingException occurred while retrieving relationships: ", e); throw new RuntimeException("JsonProcessingException occurred while retrieving relationships", e); } }) .filter(Objects::nonNull) .collect(Collectors.toList()); return new PagedResponseBase<>( objectPagedResponse.getRequest(), objectPagedResponse.getStatusCode(), objectPagedResponse.getHeaders(), list, SerializationHelpers.serializeContinuationToken(objectPagedResponse.getContinuationToken()), ((PagedResponseBase) objectPagedResponse).getDeserializedHeaders()); } ); }

Target:
<T> Mono<PagedResponse<T>> listRelationshipsFirstPage(String digitalTwinId, String relationshipName, Class<T> clazz, Context context) { return protocolLayer .getDigitalTwins() .listRelationshipsSinglePageAsync(digitalTwinId, relationshipName, context) .map( objectPagedResponse -> { List<T> list = objectPagedResponse.getValue().stream() .map(object -> { try { return DeserializationHelpers.castObject(mapper, object, clazz); } catch (JsonProcessingException e) { logger.error("JsonProcessingException occurred while deserializing the list relationship response: ", e); throw new RuntimeException("JsonProcessingException occurred while deserializing the list relationship response", e); } }) .filter(Objects::nonNull) .collect(Collectors.toList()); return new PagedResponseBase<>( objectPagedResponse.getRequest(), objectPagedResponse.getStatusCode(), objectPagedResponse.getHeaders(), list, SerializationHelpers.serializeContinuationToken(objectPagedResponse.getContinuationToken()), ((PagedResponseBase) objectPagedResponse).getDeserializedHeaders()); } ); }
Source:
public void testCreateViewWithMatchRecognize() { Map<String, String> prop = new HashMap<>(); prop.put("connector", "datagen"); prop.put("number-of-rows", "10"); CatalogTableImpl catalogTable = new CatalogTableImpl( TableSchema.builder() .field("id", DataTypes.INT().notNull()) .field("measurement", DataTypes.BIGINT().notNull()) .field("ts", DataTypes.ROW(DataTypes.FIELD("tmstmp", DataTypes.TIMESTAMP(3)))) .build(), prop, null ); catalogManager.createTable( catalogTable, ObjectIdentifier.of("builtin", "default", "events"), false); final String sql = "" + "CREATE TEMPORARY VIEW foo AS " + "SELECT * " + "FROM events MATCH_RECOGNIZE (" + " PARTITION BY id " + " ORDER BY ts ASC " + " MEASURES " + " next_step.measurement - this_step.measurement AS diff " + " AFTER MATCH SKIP TO NEXT ROW " + " PATTERN (this_step next_step)" + " DEFINE " + " this_step AS TRUE," + " next_step AS TRUE" + ")"; Operation operation = parse(sql, SqlDialect.DEFAULT); assertThat(operation, instanceOf(CreateViewOperation.class)); }

Target:
public void testCreateViewWithMatchRecognize() { Map<String, String> prop = new HashMap<>(); prop.put("connector", "values"); prop.put("bounded", "true"); CatalogTableImpl catalogTable = new CatalogTableImpl( TableSchema.builder() .field("id", DataTypes.INT().notNull()) .field("measurement", DataTypes.BIGINT().notNull()) .field("ts", DataTypes.ROW(DataTypes.FIELD("tmstmp", DataTypes.TIMESTAMP(3)))) .build(), prop, null ); catalogManager.createTable( catalogTable, ObjectIdentifier.of("builtin", "default", "events"), false); final String sql = "" + "CREATE TEMPORARY VIEW foo AS " + "SELECT * " + "FROM events MATCH_RECOGNIZE (" + " PARTITION BY id " + " ORDER BY ts ASC " + " MEASURES " + " next_step.measurement - this_step.measurement AS diff " + " AFTER MATCH SKIP TO NEXT ROW " + " PATTERN (this_step next_step)" + " DEFINE " + " this_step AS TRUE," + " next_step AS TRUE" + ")"; Operation operation = parse(sql, SqlDialect.DEFAULT); assertThat(operation, instanceOf(CreateViewOperation.class)); }
Source:
private Map<String, Name> computeImports(DataSchema schema, String rootNamespace) { Set<Name> encounteredTypes = new HashSet<>(); Set<String> typeNamesWithSimpleReference = new HashSet<>(); gatherTypes(schema, true, encounteredTypes, typeNamesWithSimpleReference, rootNamespace); return encounteredTypes .stream() .filter(name -> !name.getNamespace().equals(rootNamespace) && !typeNamesWithSimpleReference.contains(name.getName())) .collect(Collectors.toMap( Name::getName, Function.identity(), (Name nameA, Name nameB) -> nameA.compareTo(nameB) < 0 ? nameA : nameB )); }

Target:
private Map<String, Name> computeImports(DataSchema schema, String rootNamespace) { Set<Name> encounteredTypes = new HashSet<>(); Set<String> nonImportableTypeNames = new HashSet<>(); gatherTypes(schema, true, encounteredTypes, nonImportableTypeNames, rootNamespace); return encounteredTypes .stream() .filter(name -> !name.getNamespace().equals(rootNamespace) && !nonImportableTypeNames.contains(name.getName())) .collect(Collectors.toMap( Name::getName, Function.identity(), (Name nameA, Name nameB) -> nameA.compareTo(nameB) < 0 ? nameA : nameB )); }
Source:
public static boolean createMerc(SolGame game, SolShip hero, MercItem mercItem) { ShipConfig config = mercItem.getConfig(); Guardian dp = new Guardian(game, config.hull, hero.getPilot(), hero.getPosition(), hero.getHull().config, SolMath.rnd(180)); AiPilot pilot = new AiPilot(dp, true, Faction.LAANI, false, "Merc", Const.AI_DET_DIST); Vector2 pos = getPos(game, hero, config.hull); if (pos == null) { return false; } SolShip merc = game.getShipBuilder().buildNewFar(game, pos, new Vector2(), 0, 0, pilot, config.items, config.hull, null, true, config.money, null, true) .toObj(game); merc.setMerc(mercItem); mercItem.setSolShip(merc); game.getHero().getTradeContainer().getMercs().add(mercItem); game.getObjMan().addObjNow(game, merc); return true; }

Target:
public static boolean createMerc(SolGame game, SolShip hero, MercItem mercItem) { ShipConfig config = mercItem.getConfig(); Guardian guardian = new Guardian(game, config.hull, hero.getPilot(), hero.getPosition(), hero.getHull().config, SolMath.rnd(180)); AiPilot pilot = new AiPilot(guardian, true, Faction.LAANI, false, "Merc", Const.AI_DET_DIST); Vector2 pos = getPos(game, hero, config.hull); if (pos == null) { return false; } SolShip merc = game.getShipBuilder().buildNewFar(game, pos, new Vector2(), 0, 0, pilot, config.items, config.hull, null, true, config.money, null, true) .toObj(game); merc.setMerc(mercItem); mercItem.setSolShip(merc); game.getHero().getTradeContainer().getMercs().add(mercItem); game.getObjMan().addObjNow(game, merc); return true; }
Source:
public boolean isPropertySet(Property prop, boolean cacheAndWatch) { if (fixedProps.containsKey(prop.getKey())) { return true; } if (cacheAndWatch) { if (getRaw(prop.getKey()) != null) { return true; } } else { ZooReader zr = context.getZooReaderWriter(); String zPath = propPathPrefix + "/" + prop.getKey(); try { if (zr.exists(zPath) && zr.getData(zPath, null) != null) { return true; } } catch (KeeperException|InterruptedException e) { throw new RuntimeException(e); } } return parent.isPropertySet(prop, cacheAndWatch); }

Target:
public boolean isPropertySet(Property prop, boolean cacheAndWatch) { if (fixedProps.containsKey(prop.getKey())) { return true; } if (cacheAndWatch) { if (getRaw(prop.getKey()) != null) { return true; } } else { ZooReader zr = context.getZooReaderWriter(); String zPath = propPathPrefix + "/" + prop.getKey(); try { if (zr.exists(zPath)) { return true; } } catch (KeeperException|InterruptedException e) { throw new IllegalStateException(e); } } return parent.isPropertySet(prop, cacheAndWatch); }
Source:
public void testRegexProxyChainWithInvalidProxy() throws TicketValidationException, UnsupportedEncodingException { final List<String[]> list = new ArrayList<String[]>(); list.add(new String[] { "proxy1", "proxy2", "^proxy3/[a-z]*/" }); this.ticketValidator.setAllowedProxyChains(new ProxyList(list)); final String RESPONSE = "<cas:serviceResponse xmlns:cas='<LINK_0>'><cas:authenticationSuccess><cas:user>username</cas:user><cas:proxyGrantingTicket>PGTIOU-84678-8a9d...</cas:proxyGrantingTicket><cas:proxies><cas:proxy>proxy/ABC/</cas:proxy><cas:proxy>proxy2</cas:proxy><cas:proxy>proxy3</cas:proxy></cas:proxies></cas:authenticationSuccess></cas:serviceResponse>"; server.content = RESPONSE.getBytes(server.encoding); try { this.ticketValidator.validate("test", "test"); fail("Invalid proxy chain"); } catch (InvalidProxyChainTicketValidationException e) { } }

Target:
public void testRegexProxyChainWithInvalidProxy() throws TicketValidationException, UnsupportedEncodingException { final List<String[]> list = new ArrayList<String[]>(); list.add(new String[] { "proxy1", "proxy2", "^proxy3/[a-z]*/" }); this.ticketValidator.setAllowedProxyChains(new ProxyList(list)); final String RESPONSE = "<cas:serviceResponse xmlns:cas='<LINK_0>'><cas:authenticationSuccess><cas:user>username</cas:user><cas:proxyGrantingTicket>PGTIOU-84678-8a9d...</cas:proxyGrantingTicket><cas:proxies><cas:proxy>proxy1</cas:proxy><cas:proxy>proxy2</cas:proxy><cas:proxy>proxy3/ABC/</cas:proxy></cas:proxies></cas:authenticationSuccess></cas:serviceResponse>"; server.content = RESPONSE.getBytes(server.encoding); try { this.ticketValidator.validate("test", "test"); fail("Invalid proxy chain"); } catch (InvalidProxyChainTicketValidationException e) { } }
Source:
public DamagedItemDefinition( @Nonnull IStackSrc source ) { this.source = source; }

Target:
public DamagedItemDefinition( @Nonnull IStackSrc source ) { this.source = Preconditions.checkNotNull( source ); }
Source:
private void resizePVs(List<String> lunsToRefresh) { for (String lun : lunsToRefresh) { Long pvSizeInBytes = resizePV(lun); log.debug("PV size after resize of LUN " + lun + " :" + pvSizeInBytes + " bytes"); } }

Target:
private void resizePVs(List<String> lunsToRefresh) { for (String lun : lunsToRefresh) { Long pvSizeInBytes = resizeStorageDomainPV(lun); log.debug("PV size after resize of LUN " + lun + " :" + pvSizeInBytes + " bytes"); } }
Source:
private void updateTaskWithIncomingReviewState(ITask task, boolean hasIncomingReviews) { task.setAttribute(ReviewsCoreConstants.INCOMING_REVIEW_STATE, hasIncomingReviews ? "true" : "false"); }

Target:
private void updateTaskWithIncomingReviewState(ITask task, boolean hasIncomingReviews) { task.setAttribute(ReviewsCoreConstants.INCOMING_REVIEW_STATE, Boolean.toString(hasIncomingReviews)); }
Source:
public OpenShiftEnvironment( InternalRecipe internalRecipe, Map<String, InternalMachineConfig> machines, List<Warning> warnings, Map<String, Pod> pods, Map<String, Service> services, Map<String, Ingress> ingresses, Map<String, PersistentVolumeClaim> pvcs, Map<String, Secret> secrets, Map<String, ConfigMap> configMaps, Map<String, Route> routes) { super(internalRecipe, machines, warnings, pods, services, ingresses, pvcs, secrets, configMaps); this.routes = routes; setType(TYPE); }

Target:
public OpenShiftEnvironment( InternalRecipe internalRecipe, Map<String, InternalMachineConfig> machines, List<Warning> warnings, Map<String, Pod> pods, Map<String, Service> services, Map<String, Ingress> ingresses, Map<String, PersistentVolumeClaim> pvcs, Map<String, Secret> secrets, Map<String, ConfigMap> configMaps, Map<String, Route> routes) { super(internalRecipe, machines, warnings, pods, services, ingresses, pvcs, secrets, configMaps); setType(TYPE); this.routes = routes; }
Source:
private AuthenticationResult tryAcquireTokenSilentLocally(final AuthenticationRequest authenticationRequest) throws AuthenticationException { Logger.v(TAG, "Try to silently get token from local cache."); final AcquireTokenSilentHandler acquireTokenSilentHandler = new AcquireTokenSilentHandler(mContext, authenticationRequest, mTokenCacheAccessor); if(mAuthContext.getExtendedLifetimeEnabled()) { acquireTokenSilentHandler.setOutageModeIsOn(true); } final AuthenticationResult authResult; try { authResult = acquireTokenSilentHandler.getAccessToken(); } catch (final AuthenticationException authenticationException) { ClientAnalytics.logEvent(new RefreshTokenEvent( new InstrumentationPropertiesBuilder(authenticationRequest, authenticationException), InstrumentationIDs.EVENT_RESULT_FAIL)); throw authenticationException; } return authResult; }

Target:
private AuthenticationResult tryAcquireTokenSilentLocally(final AuthenticationRequest authenticationRequest) throws AuthenticationException { Logger.v(TAG, "Try to silently get token from local cache."); final AcquireTokenSilentHandler acquireTokenSilentHandler = new AcquireTokenSilentHandler(mContext, authenticationRequest, mTokenCacheAccessor); final AuthenticationResult authResult; try { authResult = acquireTokenSilentHandler.getAccessToken(); } catch (final AuthenticationException authenticationException) { ClientAnalytics.logEvent(new RefreshTokenEvent( new InstrumentationPropertiesBuilder(authenticationRequest, authenticationException), InstrumentationIDs.EVENT_RESULT_FAIL)); throw authenticationException; } return authResult; }