auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void thenTheEntityDeviceAuthorizationDoesNotExist(final Map<String, String> expectedEntity) throws Throwable { Wait.until(() -> { final Device device = this.deviceRepository .findByDeviceIdentification(expectedEntity.get(PlatformKeys.KEY_DEVICE_IDENTIFICATION)); if (device == null) { Assert.assertFalse(true); } final List<DeviceAuthorization> deviceAuthorizations = this.deviceAuthorizationRepository .findByDevice(device); final DeviceFunctionGroup expectedFunctionGroup = getEnum(expectedEntity, PlatformKeys.KEY_DEVICE_FUNCTION_GROUP, com.alliander.osgp.domain.core.valueobjects.DeviceFunctionGroup.class, PlatformDefaults.DEVICE_FUNCTION_GROUP); final String expectedOrganizationIdentification = getString(expectedEntity, PlatformKeys.KEY_ORGANIZATION_IDENTIFICATION, PlatformDefaults.DEFAULT_ORGANIZATION_IDENTIFICATION); boolean testPassed = true; for (final DeviceAuthorization deviceAuthorization : deviceAuthorizations) { if (expectedOrganizationIdentification .equals(deviceAuthorization.getOrganisation().getOrganisationIdentification()) && expectedFunctionGroup == deviceAuthorization.getFunctionGroup()) { testPassed = false; } } Assert.assertTrue(testPassed); }); }

Target:
public void thenTheEntityDeviceAuthorizationDoesNotExist(final Map<String, String> expectedEntity) throws Throwable { final String expectedAuthorization = expectedEntity.get(PlatformKeys.KEY_DEVICE_FUNCTION_GROUP); final Device device = this.deviceRepository .findByDeviceIdentification(expectedEntity.get(PlatformKeys.KEY_DEVICE_IDENTIFICATION)); Wait.until(() -> { final List<DeviceAuthorization> storedDeviceAuthorizations = this.deviceAuthorizationRepository .findByDevice(device); final String organizationIdentification = getString(expectedEntity, PlatformKeys.KEY_ORGANIZATION_IDENTIFICATION, PlatformDefaults.DEFAULT_ORGANIZATION_IDENTIFICATION); Assert.assertFalse(this.entityDeviceHasAuthorization(expectedAuthorization, organizationIdentification, storedDeviceAuthorizations)); }); }
Source:
public List<Building> getBuildings(String campusCode, String queryCode, String queryName) { Criteria criteria = new Criteria(); criteria.addEqualTo(CuCamsConstants.CapAssetApi.CAMPUS_CODE_PARAMETER, campusCode); if (StringUtils.isNotEmpty(queryName)) { criteria.addLike(getDbPlatform().getUpperCaseFunction() + "(" + "buildingName" + ")", "%" + queryName.toUpperCase() + "%"); } else if (StringUtils.isNotEmpty(queryCode)) { criteria.addLike(getDbPlatform().getUpperCaseFunction() + "(" + "buildingCode" + ")", "%" + queryCode.toUpperCase() + "%"); } Query query = QueryFactory.newQuery(Building.class, criteria); return (List<Building>) getPersistenceBrokerTemplate().getCollectionByQuery(query); }

Target:
public List<Building> getBuildings(String campusCode, String queryCode, String queryName) { Criteria criteria = new Criteria(); criteria.addEqualTo(CuCamsConstants.CapAssetApi.CAMPUS_CODE_PARAMETER, campusCode); if (StringUtils.isNotEmpty(queryName)) { criteria.addLike(getDbPlatform().getUpperCaseFunction() + "(" + KFSPropertyConstants.BUILDING_NAME + ")", "%" + queryName.toUpperCase() + "%"); } else if (StringUtils.isNotEmpty(queryCode)) { criteria.addLike(getDbPlatform().getUpperCaseFunction() + "(" + KFSPropertyConstants.BUILDING_CODE + ")", "%" + queryCode.toUpperCase() + "%"); } Query query = QueryFactory.newQuery(Building.class, criteria); return (List<Building>) getPersistenceBrokerTemplate().getCollectionByQuery(query); }
Source:
public void testVisitForZoom() { ConfigureForDosVisitor conDos = new ConfigureForDosVisitor(); Zoom zoom = mock(Zoom.class); ((ZoomVisitor)conDos).visit(zoom); assertThat(logger.getLoggingEvents()).extracting("level", "message").contains( tuple(INFO, zoom + " used with Dos configurator.")); }

Target:
public void testVisitForZoom() { ConfigureForDosVisitor conDos = new ConfigureForDosVisitor(); Zoom zoom = new Zoom(); conDos.visit(zoom); assertThat(logger.getLoggingEvents()).extracting("level", "message").contains( tuple(INFO, zoom + " used with Dos configurator.")); }
Source:
public BlockLease getBlockView(int[] positions, int positionCount) { checkArgument(outputPositionCount > 0, "outputPositionCount must be greater than zero"); checkState(outputRequired, "This stream reader doesn't produce output"); checkState(positionCount <= outputPositionCount, "Not enough values"); checkState(!valuesInUse, "BlockLease hasn't been closed yet"); if (allNulls) { return newLease(new RunLengthEncodedBlock(outputType.createBlockBuilder(null, 1).appendNull().build(), outputPositionCount)); } boolean includeNulls = nullsAllowed && presentStream != null; return newLease(new VariableWidthBlock(positionCount, slice, offsetVector, Optional.ofNullable(includeNulls ? nulls : null))); }

Target:
public BlockLease getBlockView(int[] positions, int positionCount) { checkArgument(outputPositionCount > 0, "outputPositionCount must be greater than zero"); checkState(outputRequired, "This stream reader doesn't produce output"); checkState(positionCount <= outputPositionCount, "Not enough values"); checkState(!valuesInUse, "BlockLease hasn't been closed yet"); if (allNulls) { return newLease(new RunLengthEncodedBlock(outputType.createBlockBuilder(null, 1).appendNull().build(), outputPositionCount)); } boolean includeNulls = nullsAllowed && presentStream != null; if (positionCount != outputPositionCount) { compactValues(positions, positionCount, includeNulls); } return newLease(new VariableWidthBlock(positionCount, dataAsSlice, offsets, Optional.ofNullable(includeNulls ? nulls : null))); }
Source:
public <R, X extends Exception> R inTransaction(HandleCallback<R, X> callback) throws X { if (isInTransaction()) { return callback.withHandle(this); } return transactions.inTransaction(this, callback); }

Target:
public <R, X extends Exception> R inTransaction(HandleCallback<R, X> callback) throws X { return isInTransaction() ? callback.withHandle(this) : transactions.inTransaction(this, callback); }
Source:
public int hashCode() { return Objects.hash( unitAmountUSD, unitAmountAUD, unitAmountEUR, unitAmountGBP, unitAmountCZK, unitAmountDKK, unitAmountHUF, unitAmountNOK, unitAmountNZD, unitAmountPLN, unitAmountSGD, unitAmountSEK, unitAmountCHF, unitAmountZAR ); }

Target:
public int hashCode() { return Objects.hashCode( unitAmountUSD, unitAmountCAD, unitAmountAUD, unitAmountEUR, unitAmountGBP, unitAmountCZK, unitAmountDKK, unitAmountHUF, unitAmountNOK, unitAmountNZD, unitAmountPLN, unitAmountSGD, unitAmountSEK, unitAmountCHF, unitAmountZAR ); }
Source:
public void dumpDiagnostics(PrintWriter w) throws IOException { w.printf("Channel %s%n",name); w.printf(" Created=%s%n", new Date(createdAt)); w.printf(" Commands sent=%d%n", commandsSent); w.printf(" Commands received=%d%n", commandsReceived); w.printf(" Last command sent=%s%n", new Date(lastCommandSent)); w.printf(" Last command received=%s%n", new Date(lastCommandReceived)); w.printf(" Pending outgoing calls=%d%n", pendingCalls.size()); w.printf(" Pending incoming calls=%d%n", pendingCalls.size()); }

Target:
public void dumpDiagnostics(PrintWriter w) throws IOException { w.printf("Channel %s%n",name); w.printf(" Created=%s%n", new Date(createdAt)); w.printf(" Commands sent=%d%n", commandsSent); w.printf(" Commands received=%d%n", commandsReceived); w.printf(" Last command sent=%s%n", new Date(lastCommandSentAt)); w.printf(" Last command received=%s%n", new Date(lastCommandReceivedAt)); w.printf(" Pending outgoing calls=%d%n", pendingCalls.size()); w.printf(" Pending incoming calls=%d%n", pendingCalls.size()); }
Source:
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception { if (args.length < 2 || !NumberUtil.isInt(args[1])) { throw new NotEnoughArgumentsException(); } Block target = user.getBase().getTargetBlock(null, 5); if (!(target.getState() instanceof Sign)) { throw new Exception(tl("editsignCommandTarget")); } Sign sign = (Sign) target.getState(); int line = Integer.parseInt(args[1]) - 1; try { if (args[0].equalsIgnoreCase("set") && args.length > 2) { String text = FormatUtil.formatString(user, "essentials.editsign", getFinalArg(args, 2)).trim(); if (ChatColor.stripColor(text).length() > 15 && !user.isAuthorized("essentials.editsign.unlimited")) { throw new Exception(tl("editsignCommandLimit")); } sign.setLine(line, text); sign.update(); user.sendMessage(tl("editsignCommandSetSuccess", line + 1, text)); } else if (args[0].equalsIgnoreCase("reset")) { sign.setLine(line, ""); sign.update(); user.sendMessage(tl("editsignCommandResetLine", line + 1)); } else { throw new NotEnoughArgumentsException(); } } catch (IndexOutOfBoundsException e) { throw new Exception(tl("editsignCommandNoLine")); } }

Target:
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception { if (args.length == 0 || (args.length > 1 && !NumberUtil.isInt(args[1]))) { throw new NotEnoughArgumentsException(); } Block target = user.getBase().getTargetBlock(null, 5); if (!(target.getState() instanceof Sign)) { throw new Exception(tl("editsignCommandTarget")); } Sign sign = (Sign) target.getState(); try { if (args[0].equalsIgnoreCase("set") && args.length > 2) { int line = Integer.parseInt(args[1]) - 1; String text = FormatUtil.formatString(user, "essentials.editsign", getFinalArg(args, 2)).trim(); if (ChatColor.stripColor(text).length() > 15 && !user.isAuthorized("essentials.editsign.unlimited")) { throw new Exception(tl("editsignCommandLimit")); } sign.setLine(line, text); sign.update(); user.sendMessage(tl("editsignCommandSetSuccess", line + 1, text)); } else if (args[0].equalsIgnoreCase("clear")) { if (args.length == 1) { for (int i = 0; i < 4; i++) { sign.setLine(i, ""); } sign.update(); user.sendMessage(tl("editsignCommandClear")); } else { int line = Integer.parseInt(args[1]) - 1; sign.setLine(line, ""); sign.update(); user.sendMessage(tl("editsignCommandClearLine", line + 1)); } } else { throw new NotEnoughArgumentsException(); } } catch (IndexOutOfBoundsException e) { throw new Exception(tl("editsignCommandNoLine")); } }
Source:
public static boolean folderContains(File folder, String filename) { if (folder == null) { return false; } if (!folder.isDirectory()) { return false; } File[] fileList = folder.listFiles(); if (fileList == null) { return false; } for (File f : fileList) { if (f.getName().equals(filename)) { return true; } } return false; }

Target:
public static boolean folderContains(File folder, String filename) { if (folder == null) { return false; } File[] fileList = folder.listFiles(); if (fileList == null) { return false; } for (File f : fileList) { if (f.getName().equals(filename)) { return true; } } return false; }
Source:
public InternalCDORevision removeRevision(CDOID id, CDOBranchVersion branchVersion) { Object key = createKey(id, branchVersion.getBranch()); synchronized (revisionLists) { RevisionList list = revisionLists.getIfPresent(key); if (list != null) { list.removeRevision(branchVersion.getVersion()); if (list.isEmpty()) { revisionLists.invalidate(key); typeRefDecrease(id); } } } return null; }

Target:
public InternalCDORevision removeRevision(CDOID id, CDOBranchVersion branchVersion) { Object key = createKey(id, branchVersion.getBranch()); synchronized (revisionLists) { RevisionList list = revisionLists.getIfPresent(key); if (list != null) { if (list.removeRevision(branchVersion.getVersion())) { typeRefDecrease(id); } if (list.isEmpty()) { revisionLists.invalidate(key); } } } return null; }
Source:
public <T> T getSinkConfiguration(final String sinkName, final Class <? extends T> sinkClass) { final SinkConfiguration sinkConfiguration = sinks.get(sinkName); Preconditions.checkArgument(null != sinkConfiguration, "No sink configuration with name: %s", sinkName); Preconditions.checkArgument(sinkClass.isAssignableFrom(sinkConfiguration.getClass()), "Sink configuration '%s' is not a %s sink", sinkName, sinkClass.getSimpleName()); return sinkClass.cast(sinkConfiguration); }

Target:
public <T> T getSinkConfiguration(final String sinkName, final Class <? extends T> sinkClass) { final SinkConfiguration sinkConfiguration = sinks.get(sinkName); Preconditions.checkArgument(null != sinkConfiguration, "No sink configuration with name: %s", sinkName); Preconditions.checkArgument(sinkClass.isInstance(sinkConfiguration), "Sink configuration '%s' is not a %s sink", sinkName, sinkClass.getSimpleName()); return sinkClass.cast(sinkConfiguration); }
Source:
public AbstractTupleDomainFilter(boolean nullAllowed) { this.nullAllowed = nullAllowed; }

Target:
private AbstractTupleDomainFilter(boolean nullAllowed) { this.nullAllowed = nullAllowed; }
Source:
public GoogleComputeProvider(Configured configuration, GoogleCredentials credentials) { super(configuration); this.credentials = credentials; Compute compute = credentials.getCompute(); String projectId = credentials.getProjectId(); String zone = getConfigurationValue(GoogleComputeProviderConfigurationProperty.ZONE); try { compute.zones().get(projectId, zone).execute(); } catch (GoogleJsonResponseException e) { if (e.getStatusCode() == 404) { System.out.println("Zone '" + zone + "' not found."); } } catch (IOException e) { e.printStackTrace(); } }

Target:
public GoogleComputeProvider(Configured configuration, GoogleCredentials credentials) { super(configuration); this.credentials = credentials; Compute compute = credentials.getCompute(); String projectId = credentials.getProjectId(); String zone = getConfigurationValue(GoogleComputeInstanceTemplateConfigurationProperty.ZONE); try { compute.zones().get(projectId, zone).execute(); } catch (GoogleJsonResponseException e) { if (e.getStatusCode() == 404) { throw new IllegalArgumentException("Zone '" + zone + "' not found."); } } catch (IOException e) { throw new RuntimeException(e); } }
Source:
public void preparePack(ProgressMonitor countingMonitor, @NonNull Set<? extends ObjectId> want, @NonNull Set<? extends ObjectId> have, @NonNull Set<? extends ObjectId> shallow) throws IOException { ObjectWalk ow = null; try { if (shallowPack) { ow = new DepthWalk.ObjectWalk(reader, depth - 1); } else { ow = new ObjectWalk(reader); } ow.assumeShallow(shallow); preparePack(countingMonitor, ow, want, have); } finally { if (ow != null) { ow.close(); } } }

Target:
public void preparePack(ProgressMonitor countingMonitor, @NonNull Set<? extends ObjectId> want, @NonNull Set<? extends ObjectId> have, @NonNull Set<? extends ObjectId> shallow) throws IOException { try (ObjectWalk ow = getObjectWalk()) { ow.assumeShallow(shallow); preparePack(countingMonitor, ow, want, have); } }
Source:
public void printBody(final OutputStream output) throws IOException { final InputStream input = new RqLengthAware(this).body(); final byte[] buf = new byte[4096]; while (true) { final int actual = input.read(buf); if (actual < 0) { break; } output.write(buf, 0, actual); } }

Target:
public void printBody(final OutputStream output) throws IOException { final InputStream input = new RqLengthAware(this).body(); final byte[] buf = new byte[4096]; while (true) { final int bytes = input.read(buf); if (bytes < 0) { break; } output.write(buf, 0, bytes); } }
Source:
public JRDataSource getDataSource() { String sessionId = getSessionIdProvider().getSessionId(); DataService dataService = new DefaultDataService(databaseService); Set<TestEntity> testEntities = dataService.getTests(sessionId); List<TestDetailsDTO> result = new ArrayList<TestDetailsDTO>(); for(TestEntity testEntity : testEntities) { TestDetailsDTO testDetailsDTO = new TestDetailsDTO(); testDetailsDTO.setTestName(testEntity.getName()); testDetailsDTO.setId(testEntity.getId().toString()); result.add(testDetailsDTO); } return new JRBeanCollectionDataSource(result); }

Target:
public JRDataSource getDataSource() { String sessionId = getSessionIdProvider().getSessionId(); Set<TestEntity> testEntities = dataService.getTests(sessionId); List<TestDetailsDTO> result = new ArrayList<TestDetailsDTO>(); for(TestEntity testEntity : testEntities) { TestDetailsDTO testDetailsDTO = new TestDetailsDTO(); testDetailsDTO.setTestName(testEntity.getName()); testDetailsDTO.setId(testEntity.getId().toString()); result.add(testDetailsDTO); } return new JRBeanCollectionDataSource(result); }
Source:
public PlayerNetworkComponent getNetwork() { return getExact(PlayerNetworkComponent.class); }

Target:
public PlayerNetworkComponent getNetwork() { return get(PlayerNetworkComponent.class); }
Source:
public void enableExportButton(boolean state) { if ( state ) { if (comboBoxForm.getSelectedIndex() == -1) { btnPemFileChooseButton.setEnabled(false); btnExport.setEnabled(false); return; } BriefcaseFormDefinition lfd = (BriefcaseFormDefinition) comboBoxForm.getSelectedItem(); if ( lfd == null ) { btnPemFileChooseButton.setEnabled(false); btnExport.setEnabled(false); return; } if ( lfd.isFileEncryptedForm() || lfd.isFieldEncryptedForm() ) { btnPemFileChooseButton.setEnabled(true); File pemFile = new File(pemPrivateKeyFilePath.getText()); if ( !pemFile.exists()) { btnExport.setEnabled(false); return; } } else { btnPemFileChooseButton.setEnabled(false); } if (comboBoxExportType.getSelectedIndex() == -1) { btnExport.setEnabled(false); return; } String exportDir = txtExportDirectory.getText(); if ( exportDir == null || exportDir.trim().length() == 0 ) { btnExport.setEnabled(false); return; } if ( checkDates.isSelected() && (pickStartDate.getDate() == null || pickEndDate.getDate() == null)) { btnExport.setEnabled(false); return; } boolean enabled = true; File exportDirectory = new File(exportDir.trim()); if ( exportDirectory == null || !exportDirectory.exists() ) { enabled = false; } if ( !exportDirectory.isDirectory() ) { enabled = false; } if ( FileSystemUtils.isUnderODKFolder(exportDirectory) ) { enabled = false; } else if ( FileSystemUtils.isUnderBriefcaseFolder(exportDirectory)) { enabled = false; } btnExport.setEnabled(enabled); } else { btnExport.setEnabled(false); } }

Target:
public void enableExportButton(boolean state) { if ( state ) { if (comboBoxForm.getSelectedIndex() == -1) { btnPemFileChooseButton.setEnabled(false); btnExport.setEnabled(false); return; } BriefcaseFormDefinition lfd = (BriefcaseFormDefinition) comboBoxForm.getSelectedItem(); if ( lfd == null ) { btnPemFileChooseButton.setEnabled(false); btnExport.setEnabled(false); return; } if ( lfd.isFileEncryptedForm() || lfd.isFieldEncryptedForm() ) { btnPemFileChooseButton.setEnabled(true); File pemFile = new File(pemPrivateKeyFilePath.getText()); if ( !pemFile.exists()) { btnExport.setEnabled(false); return; } } else { btnPemFileChooseButton.setEnabled(false); } if (comboBoxExportType.getSelectedIndex() == -1) { btnExport.setEnabled(false); return; } String exportDir = txtExportDirectory.getText(); if ( exportDir == null || exportDir.trim().length() == 0 ) { btnExport.setEnabled(false); return; } boolean enabled = true; File exportDirectory = new File(exportDir.trim()); if ( exportDirectory == null || !exportDirectory.exists() ) { enabled = false; } if ( !exportDirectory.isDirectory() ) { enabled = false; } if ( FileSystemUtils.isUnderODKFolder(exportDirectory) ) { enabled = false; } else if ( FileSystemUtils.isUnderBriefcaseFolder(exportDirectory)) { enabled = false; } btnExport.setEnabled(enabled); } else { btnExport.setEnabled(false); } }
Source:
public SubscriptionCalculator(double price, List<CalcSubscription> subscriptions) { this.price = price; this.subscriptions = subscriptions; }

Target:
public SubscriptionCalculator(double price, List<CalcSubscription> subscriptions) { this.price = checkNotNull(price, "price"); this.subscriptions = checkNotNull(subscriptions, "subscriptions"); }
Source:
public void testCorrectHeaderFormatWithInstanceId() { UserAgent baseUserAgent = UserAgent.of("service", "instanceId", "1.0.0"); assertThat(UserAgents.format(baseUserAgent)).isEqualTo("service/instanceId (1.0.0)"); UserAgent derivedAgent = baseUserAgent.merge(UserAgent.of("remoting", "2.0.0")); assertThat(UserAgents.format(derivedAgent)).isEqualTo("service/instanceId (1.0.0), remoting (2.0.0)"); }

Target:
public void testCorrectHeaderFormatWithInstanceId() { UserAgent baseUserAgent = UserAgent.of(UserAgent.Agent.of("service", "1.0.0"), "instanceId"); assertThat(UserAgents.format(baseUserAgent)).isEqualTo("service/instanceId (1.0.0)"); UserAgent derivedAgent = baseUserAgent.addAgent(UserAgent.Agent.of("remoting", "2.0.0")); assertThat(UserAgents.format(derivedAgent)).isEqualTo("service/instanceId (1.0.0), remoting (2.0.0)"); }
Source:
public Action<?, ?> failedAction() { return new AbstractSdxAction<>(SdxDeletionFailedEvent.class) { @Override protected SdxContext createFlowContext(FlowParameters flowParameters, StateContext<FlowState, FlowEvent> stateContext, SdxDeletionFailedEvent payload) { return SdxContext.from(flowParameters, payload); } @Override protected void doExecute(SdxContext context, SdxDeletionFailedEvent payload, Map<Object, Object> variables) throws Exception { Exception exception = payload.getException(); LOGGER.error("Datalake delete failed for datalake: {}", payload.getResourceId(), exception); String statusReason = "Datalake deletion failed"; if (exception.getMessage() != null) { statusReason = exception.getMessage(); } if (payload.isForced()) { Long datalakeId = payload.getResourceId(); LOGGER.info("Datalake delete finalized: {}", datalakeId); SdxCluster sdxCluster = sdxService.getById(datalakeId); if (sdxCluster != null) { metricService.incrementMetricCounter(MetricType.SDX_DELETION_FINISHED, sdxCluster); } sendEvent(context, SDX_DELETE_FINALIZED_EVENT.event(), payload); } else { try { SdxCluster sdxCluster = sdxStatusService.setStatusForDatalakeAndNotify(DatalakeStatusEnum.DELETE_FAILED, statusReason, payload.getResourceId()); metricService.incrementMetricCounter(MetricType.SDX_DELETION_FAILED, sdxCluster); } catch (NotFoundException notFoundException) { LOGGER.info("Can not set status to SDX_DELETION_FAILED because data lake was not found"); } sendEvent(context, SDX_DELETE_FAILED_HANDLED_EVENT.event(), payload); } } @Override protected Object getFailurePayload(SdxDeletionFailedEvent payload, Optional<SdxContext> flowContext, Exception ex) { return null; } }; }

Target:
public Action<?, ?> failedAction() { return new AbstractSdxAction<>(SdxDeletionFailedEvent.class) { @Override protected SdxContext createFlowContext(FlowParameters flowParameters, StateContext<FlowState, FlowEvent> stateContext, SdxDeletionFailedEvent payload) { return SdxContext.from(flowParameters, payload); } @Override protected void doExecute(SdxContext context, SdxDeletionFailedEvent payload, Map<Object, Object> variables) throws Exception { Exception exception = payload.getException(); LOGGER.error("Datalake delete failed for datalake: {}", payload.getResourceId(), exception); String statusReason = "Datalake deletion failed"; if (exception.getMessage() != null) { statusReason = exception.getMessage(); } try { SdxCluster sdxCluster = sdxStatusService.setStatusForDatalakeAndNotify(DatalakeStatusEnum.DELETE_FAILED, statusReason, payload.getResourceId()); metricService.incrementMetricCounter(MetricType.SDX_DELETION_FAILED, sdxCluster); } catch (NotFoundException notFoundException) { LOGGER.info("Can not set status to SDX_DELETION_FAILED because data lake was not found"); } sendEvent(context, SDX_DELETE_FAILED_HANDLED_EVENT.event(), payload); } @Override protected Object getFailurePayload(SdxDeletionFailedEvent payload, Optional<SdxContext> flowContext, Exception ex) { return null; } }; }
Source:
public PutOperation<K, V> decode(ByteBuffer buffer) throws ClassNotFoundException { BaseOperation.Code opCode = BaseOperation.Code.valueOf(buffer.get()); if (opCode != PUT) { throw new AssertionError(this.getClass().getName() + " can not decode operation of type " + opCode); } byte[] keyBlob = new byte[buffer.getInt()]; buffer.get(keyBlob); byte[] valueBlob = new byte[buffer.getInt()]; buffer.get(valueBlob); return new PutOperation<K, V>( keySerializer.read(ByteBuffer.wrap(keyBlob)), valueSerializer.read(ByteBuffer.wrap(valueBlob))); }

Target:
public PutOperation<K, V> decode(ByteBuffer buffer) throws ClassNotFoundException { OperationCode opCode = OperationCode.valueOf(buffer.get()); if (opCode != PUT) { throw new IllegalArgumentException(this.getClass().getName() + " can not decode operation of type " + opCode); } int keySize = buffer.getInt(); buffer.limit(buffer.position() + keySize); ByteBuffer keyBlob = buffer.slice(); buffer.position(buffer.limit()); buffer.limit(buffer.capacity()); int valueSize = buffer.getInt(); buffer.limit(buffer.position() + valueSize); ByteBuffer valueBlob = buffer.slice(); return new PutOperation<K, V>( keySerializer.read(keyBlob), valueSerializer.read(valueBlob)); }
Source:
private void doLog(LogicalMessageContext smc) { if (!(Boolean) smc.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY)) { try { TransformerFactory tff = TransformerFactory.newInstance(); Transformer tf = tff.newTransformer(); tf.setOutputProperty(OutputKeys.INDENT, "yes"); tf.setOutputProperty("{<LINK_0>}indent-amount", "2"); Source sc = smc.getMessage().getPayload(); StreamResult result = new StreamResult(outputStream); tf.transform(sc, result); } catch (Exception e) { PrintWriter ps = new PrintWriter(outputStream); ps.println("Exception getting response message log: "); log.error(e); } } }

Target:
private void doLog(LogicalMessageContext smc) { if (!(Boolean) smc.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY)) { try { TransformerFactory tff = TransformerFactory.newInstance(); Transformer tf = tff.newTransformer(); tf.setOutputProperty(OutputKeys.INDENT, "yes"); tf.setOutputProperty("{<LINK_0>}indent-amount", "2"); Source sc = smc.getMessage().getPayload(); StreamResult result = new StreamResult(outputStream); tf.transform(sc, result); } catch (Exception e) { PrintWriter ps = new PrintWriter(outputStream); ps.println("Exception getting response message log: "); e.printStackTrace(ps); } } }
Source:
private void servePageOrFragment(App app, HttpRequest request, HttpResponse response) { DebugLogger.startRequest(request); try { setResponseSecurityHeaders(app, response); if (request.isFragmentRequest()) { JsonObject renderedFragment = app.renderFragment(request, response); response.setContent(STATUS_OK, renderedFragment.toString(), CONTENT_TYPE_APPLICATION_JSON); } else { Configuration configuration = app.getConfiguration(); for (Filter filter : filters) { FilterResult result = filter.doFilter(configuration, request, response); if (!result.isContinue()) { serveDefaultErrorPage(result.getStatusCode().orElse(STATUS_INTERNAL_SERVER_ERROR), result.getMessage().orElse("Internal Server Error"), response); return; } } String html = app.renderPage(request, response); response.setContent(STATUS_OK, html, CONTENT_TYPE_TEXT_HTML); } } catch (UUFException e) { throw e; } catch (Exception e) { Throwable th = e; while ((th = th.getCause()) != null) { if (th instanceof UUFException) { throw (UUFException) th; } } throw e; } finally { DebugLogger.endRequest(request); } }

Target:
private void servePageOrFragment(App app, HttpRequest request, HttpResponse response) { DebugLogger.startRequest(request); try { setResponseSecurityHeaders(app, response); if (request.isFragmentRequest()) { JsonObject renderedFragment = app.renderFragment(request, response); response.setContent(STATUS_OK, renderedFragment.toString(), CONTENT_TYPE_APPLICATION_JSON); } else { Configuration configuration = app.getConfiguration(); for (Filter filter : filters) { FilterResult result = filter.doFilter(request, configuration); if (!result.isContinue()) { serveDefaultErrorPage(result.getHttpStatusCode(), result.getMessage(), response); return; } } String html = app.renderPage(request, response); response.setContent(STATUS_OK, html, CONTENT_TYPE_TEXT_HTML); } } catch (UUFException e) { throw e; } catch (Exception e) { Throwable th = e; while ((th = th.getCause()) != null) { if (th instanceof UUFException) { throw (UUFException) th; } } throw e; } finally { DebugLogger.endRequest(request); } }
Source:
public NamedFields get() { LOGGER.debug("Retrieving RDF representation for: {}", uri); try { final Model rdf = rdfr.get(); if (!rdf.contains(createResource(uri.toString()), INDEXING_TRANSFORM_PREDICATE)) { LOGGER.info("Looking up property locating LDPath transform for: {}", uri); final HttpHead headRequest = new HttpHead(uri); final HttpResponse headResponse = httpClient.execute(headRequest); URI descriptionURI = null; final Header[] links = headResponse.getHeaders("Link"); if ( links != null ) { for ( Header h : headResponse.getHeaders("Link") ) { final Link link = Link.valueOf(h.getValue()); if (link.getRel().equals("describedby")) { descriptionURI = link.getUri(); LOGGER.debug("Using URI from Link header: {}", descriptionURI); } } } if (descriptionURI == null) { throw new AbsentTransformPropertyException("Property lookup failed"); } return getNamedFields(rdf, descriptionURI); } return getNamedFields(rdf, uri); } catch (IOException | HttpException e) { throw propagate(e); } }

Target:
public NamedFields get() { LOGGER.debug("Retrieving RDF representation for: {}", uri); try { final Model rdf = rdfr.get(); if (!rdf.contains(createResource(uri.toString()), INDEXING_TRANSFORM_PREDICATE)) { LOGGER.info("Looking up property locating LDPath transform for: {}", uri); final HttpHead headRequest = new HttpHead(uri); final HttpResponse headResponse = httpClient.execute(headRequest); URI descriptionURI = null; final Header[] links = headResponse.getHeaders("Link"); if ( links != null ) { for ( Header h : headResponse.getHeaders("Link") ) { final Link link = Link.valueOf(h.getValue()); if (link.getRel().equals("describedby")) { descriptionURI = link.getUri(); LOGGER.debug("Using URI from Link header: {}", descriptionURI); } } } if (descriptionURI == null) { throw new AbsentTransformPropertyException("Property lookup failed for uri: " + uri); } return getNamedFields(rdf, descriptionURI); } return getNamedFields(rdf, uri); } catch (IOException | HttpException e) { throw propagate(e); } }
Source:
public Optional<Long> getPreviousOutOfBedTime(final SleepPeriod.Period period, final MainEventTimes prevNightMainEventTimes) { if ( period == SleepPeriod.Period.MORNING) { if (prevNightMainEventTimes.hasValidEventTimes()) { return Optional.of(prevNightMainEventTimes.eventTimeMap.get(Event.Type.OUT_OF_BED).time); } else { return Optional.absent(); } } if (period == SleepPeriod.Period.AFTERNOON) { if (this.morningResults.processed && this.morningResults.mainEventTimes.hasValidEventTimes()) { return Optional.of(this.morningResults.mainEventTimes.eventTimeMap.get(Event.Type.OUT_OF_BED).time); }else if (prevNightMainEventTimes.hasValidEventTimes()) { return Optional.of(prevNightMainEventTimes.eventTimeMap.get(Event.Type.OUT_OF_BED).time); }else { return Optional.absent(); } } if (period == SleepPeriod.Period.NIGHT) { if (this.afternoonResults.processed && this.afternoonResults.mainEventTimes.hasValidEventTimes()) { return Optional.of(this.afternoonResults.mainEventTimes.eventTimeMap.get(Event.Type.OUT_OF_BED).time); } else if (this.morningResults.processed && this.morningResults.mainEventTimes.hasValidEventTimes()) { return Optional.of(this.morningResults.mainEventTimes.eventTimeMap.get(Event.Type.OUT_OF_BED).time); }else if (prevNightMainEventTimes.hasValidEventTimes()) { return Optional.of(prevNightMainEventTimes.eventTimeMap.get(Event.Type.OUT_OF_BED).time); } else { return Optional.absent(); } } return Optional.absent(); }

Target:
public Optional<Long> getPreviousOutOfBedTime(final SleepPeriod.Period period, final MainEventTimes prevNightMainEventTimes) { if ( period == SleepPeriod.Period.MORNING) { if (prevNightMainEventTimes.hasValidEventTimes()) { return Optional.of(prevNightMainEventTimes.eventTimeMap.get(Event.Type.OUT_OF_BED).time); } return Optional.absent(); } if (period == SleepPeriod.Period.AFTERNOON) { if (this.morningResults.processed && this.morningResults.mainEventTimes.hasValidEventTimes()) { return Optional.of(this.morningResults.mainEventTimes.eventTimeMap.get(Event.Type.OUT_OF_BED).time); }else if (prevNightMainEventTimes.hasValidEventTimes()) { return Optional.of(prevNightMainEventTimes.eventTimeMap.get(Event.Type.OUT_OF_BED).time); } return Optional.absent(); } if (period == SleepPeriod.Period.NIGHT) { if (this.afternoonResults.processed && this.afternoonResults.mainEventTimes.hasValidEventTimes()) { return Optional.of(this.afternoonResults.mainEventTimes.eventTimeMap.get(Event.Type.OUT_OF_BED).time); } else if (this.morningResults.processed && this.morningResults.mainEventTimes.hasValidEventTimes()) { return Optional.of(this.morningResults.mainEventTimes.eventTimeMap.get(Event.Type.OUT_OF_BED).time); }else if (prevNightMainEventTimes.hasValidEventTimes()) { return Optional.of(prevNightMainEventTimes.eventTimeMap.get(Event.Type.OUT_OF_BED).time); } return Optional.absent(); } return Optional.absent(); }
Source:
static SanitizedLockRequestProgress create(LockServiceStateDebugger.LockRequestProgress progress, LockDescriptorMapper descriptorMapper, String clientId) { return ImmutableSanitizedLockRequestProgress.builder() .totalNumLocks(progress.getTotalNumLocks()) .numLocksAcquired(progress.getNumLocksAcquired()) .nextLock(progress.getNextLock().map(descriptorMapper::getDescriptorMapping) .orElse(UNKNOWN_NEXT_LOCK_MESSAGE)) .requests( StreamSupport.stream(progress.getRequest().getLockDescriptors().entries().spliterator(), false) .map(descriptor -> SimpleLockRequest.of( progress.getRequest(), descriptorMapper.getDescriptorMapping(descriptor.getKey()), descriptor.getValue(), clientId)) .collect(Collectors.toList())) .build(); }

Target:
static SanitizedLockRequestProgress create(LockServiceStateDebugger.LockRequestProgress progress, LockDescriptorMapper descriptorMapper, String clientId) { return ImmutableSanitizedLockRequestProgress.builder() .totalNumLocks(progress.getTotalNumLocks()) .numLocksAcquired(progress.getNumLocksAcquired()) .nextLock(progress.getNextLock().map(descriptorMapper::getDescriptorMapping) .orElse(UNKNOWN_NEXT_LOCK_MESSAGE)) .requests( StreamSupport.stream(progress.getRequest().getLockDescriptors().entries().spliterator(), false) .map(descriptor -> SimpleLockRequest.of( progress.getRequest(), descriptorMapper.getDescriptorMapping(descriptor.getKey()), clientId)) .collect(Collectors.toList())) .build(); }
Source:
ClientsClassDefinition(Class<?> clazz) { argumentIsNotNull(clazz); this.clazz = clazz; this.ignoredProperties = Collections.emptyList(); }

Target:
ClientsClassDefinition(Class<?> clazz) { this(clazz, Collections.EMPTY_LIST); }
Source:
public void transform(StructuredRecord input, Emitter<KeyValue<NullWritable, AbstractFileMetadata>> emitter) throws Exception { AbstractFileMetadata output; switch ((String) input.get(AbstractFileMetadata.Credentials.DATA_BASE_TYPE)) { case S3FileMetadata.DATA_BASE_NAME : output = new S3FileMetadata((String) input.get(AbstractFileMetadata.FILE_NAME), (String) input.get(AbstractFileMetadata.FULL_PATH), (long) input.get(AbstractFileMetadata.TIMESTAMP), (String) input.get(AbstractFileMetadata.OWNER), (long) input.get(AbstractFileMetadata.FILE_SIZE), (Boolean) input.get(AbstractFileMetadata.IS_FOLDER), (String) input.get(AbstractFileMetadata.BASE_PATH), (short) input.get(AbstractFileMetadata.PERMISSION), new S3FileMetadata.S3Credentials((String) input.get(S3Credentials.ACCESS_KEY_ID), (String) input.get(S3Credentials.SECRET_KEY_ID), (String) input.get(S3Credentials.REGION), (String) input.get(S3Credentials.BUCKET_NAME)) ); break; default: throw new IllegalArgumentException("unrecognized database type"); } emitter.emit(new KeyValue<NullWritable, AbstractFileMetadata>(null, output)); }

Target:
public void transform(StructuredRecord input, Emitter<KeyValue<NullWritable, AbstractFileMetadata>> emitter) throws Exception { AbstractFileMetadata output; String fsScheme = URI.create((String) input.get(AbstractFileMetadata.HOST_URI)).getScheme(); switch (fsScheme) { case "s3n" : case "s3a" : output = new S3FileMetadata(input); break; default: throw new IllegalArgumentException(fsScheme + "is not supported."); } emitter.emit(new KeyValue<NullWritable, AbstractFileMetadata>(null, output)); }
Source:
private static String flattenVectorOfStrings(Vector<String> v) { String s = ""; for (String caseId : v) { s = s + caseId + ", "; } s = s.substring(0, s.length()-2); return s; }

Target:
private static String flattenVectorOfStrings(Vector<String> v) { StringBuilder builder = new StringBuilder(); for (String caseId : v) { builder.append(caseId + " "); } return builder.toString(); }
Source:
public static java.util.Date parseDate(String newDate) throws PerforceException { try { return dateParser.parse(newDate); } catch(ParseException e) { throw new PerforceException("Could not parse changelist timestamp " + "returned by server : " + newDate); } }

Target:
public static java.util.Date parseDate(String newDate) { if(newDate == null || newDate.equals("")) { return null; } String parts[] = newDate.split(" "); String date[] = parts[0].split("/"); String time[] = null; if(parts.length > 1) { time = parts[1].split(":"); time[2] = time[2].replaceAll("\\.0", ""); } else { time = "00:00:00".split(":"); } GregorianCalendar cal = (GregorianCalendar) Calendar.getInstance(); cal.clear(); cal.set(new Integer(date[0]).intValue(), (new Integer(date[1]).intValue() - 1), new Integer(date[2]).intValue(), new Integer( time[0]).intValue(), new Integer(time[1]).intValue(), new Integer(time[2]).intValue()); return cal.getTime(); }
Source:
private static JwtDecoder getJwtDecoder() { return token -> { Map<String, Object> claims = new HashMap<>(); claims.put(IdTokenClaimNames.SUB, "sub123"); claims.put(IdTokenClaimNames.ISS, "http://localhost/iss"); claims.put(IdTokenClaimNames.AUD, Arrays.asList("clientId", "a", "u", "d")); claims.put(IdTokenClaimNames.AZP, "clientId"); return new Jwt("token123", Instant.now(), Instant.now().plusSeconds(3600), Collections.singletonMap("header1", "value1"), claims); }; }

Target:
private static JwtDecoder getJwtDecoder() { Map<String, Object> claims = new HashMap<>(); claims.put(IdTokenClaimNames.SUB, "sub123"); claims.put(IdTokenClaimNames.ISS, "http://localhost/iss"); claims.put(IdTokenClaimNames.AUD, Arrays.asList("clientId", "a", "u", "d")); claims.put(IdTokenClaimNames.AZP, "clientId"); Jwt jwt = new Jwt("token123", Instant.now(), Instant.now().plusSeconds(3600), Collections.singletonMap("header1", "value1"), claims); JwtDecoder jwtDecoder = mock(JwtDecoder.class); when(jwtDecoder.decode(any())).thenReturn(jwt); return jwtDecoder; }
Source:
public static Object[][] getTestData() throws IOException, ClassNotFoundException { Object[][] searchTerms = XlsFileReader.getAllRowsFromXlsSheet("OrderSearchTerms"); return new Object[][]{new Object[]{DBUtility.getMerchandiser(), searchTerms[0][0]}, new Object[]{DBUtility.getMerchandiser(), searchTerms[1][0]}, new Object[]{DBUtility.getMerchandiser(), searchTerms[2][0]}, new Object[]{DBUtility.getCustomer(), searchTerms[0][0]}, new Object[]{DBUtility.getCustomer(), searchTerms[1][0]}, new Object[]{DBUtility.getCustomer(), searchTerms[2][0]}}; }

Target:
public static Object[][] getTestData() throws IOException, ClassNotFoundException { final Object[][] searchTerms = XlsFileReader.getAllRowsFromXlsSheet("OrderSearchTerms"); return new Object[][]{new Object[]{DBUtility.getMerchandiser(), searchTerms[0][0]}, new Object[]{DBUtility.getMerchandiser(), searchTerms[1][0]}, new Object[]{DBUtility.getMerchandiser(), searchTerms[2][0]}, new Object[]{DBUtility.getCustomer(), searchTerms[0][0]}, new Object[]{DBUtility.getCustomer(), searchTerms[1][0]}, new Object[]{DBUtility.getCustomer(), searchTerms[2][0]}}; }
Source:
public void removeDynamicMenuContributions(MenuManager menuManager, MMenu menuModel) { for (Entry<MMenuElement, IContributionItem> entry : modelToContribution.entrySet()) { if (entry.getKey() instanceof MDynamicMenuContribution) { final IContributionItem contributionItem = entry.getValue(); if (contributionItem instanceof DynamicContributionContributionItem) { final DynamicContributionContributionItem dynamicContributionItem = (DynamicContributionContributionItem) contributionItem; if ((dynamicContributionItem.getParent() instanceof MenuManager) && dynamicContributionItem.getParent().equals(menuManager)) { final ArrayList<MMenuElement> childElements = (ArrayList<MMenuElement>) entry.getKey() .getTransientData().get(MenuManagerShowProcessor.DYNAMIC_ELEMENT_STORAGE_KEY); if (childElements != null) { removeDynamicMenuContributions(menuManager, menuModel, childElements); } } } } } }

Target:
public void removeDynamicMenuContributions(MenuManager menuManager, MMenu menuModel) { for (Entry<MMenuElement, IContributionItem> entry : modelToContribution.entrySet()) { MMenuElement menuElement = entry.getKey(); if (menuElement instanceof MDynamicMenuContribution) { final IContributionItem contributionItem = entry.getValue(); if (contributionItem instanceof DynamicContributionContributionItem) { final DynamicContributionContributionItem dynamicContributionItem = (DynamicContributionContributionItem) contributionItem; if ((dynamicContributionItem.getParent() instanceof MenuManager) && dynamicContributionItem.getParent().equals(menuManager)) { final ArrayList<MMenuElement> childElements = (ArrayList<MMenuElement>) menuElement .getTransientData().get(MenuManagerShowProcessor.DYNAMIC_ELEMENT_STORAGE_KEY); if (childElements != null) { removeDynamicMenuContributions(menuManager, menuModel, childElements); } } } } } }
Source:
public void register(ServiceEndPoint endPoint) { checkNotNull(endPoint); Timer.Context context = _registerTimer.time(); doRegister(endPoint); context.stop(); }

Target:
public void register(ServiceEndPoint endPoint) { checkNotNull(endPoint); Timer.Context context = _registerTimer.time(); try { doRegister(endPoint); } catch (Exception ex) { LOG.error("Error registering service handle", ex); } finally { context.stop(); } }
Source:
public void setError(@NonNull Throwable e, @Nullable String customErrorText) { messageTextView.setVisibility(View.GONE); Throwable inner = getInnermostThrowable(e); String errorText; String messageText = null; if (inner instanceof ApiException) { errorText = getResources().getString(R.string.error_server_response); ApiException apiEx = (ApiException) inner; if (apiEx.getInfo() != null) { messageText = String.format(getResources().getString(R.string.error_server_message), apiEx.getInfo()); } else if (apiEx.getCode() != null) { messageText = String.format(getResources().getString(R.string.error_server_code), apiEx.getCode()); } } else if (throwableContainsException(e, HttpRequest.HttpRequestException.class) || throwableContainsException(e, UnknownHostException.class) || throwableContainsException(e, TimeoutException.class) || throwableContainsException(e, SSLException.class)) { errorText = getResources().getString(R.string.error_network_error); messageText = String.format(getResources().getString(R.string.error_server_message), inner.getLocalizedMessage()); } else if (throwableContainsException(e, JSONException.class)) { errorText = getResources().getString(R.string.error_response_malformed); } else { errorText = getResources().getString(R.string.error_unknown); messageText = inner.getLocalizedMessage(); } if (customErrorText != null) { errorText = customErrorText; } errorTextView.setText(errorText); if (messageText != null) { messageTextView.setText(messageText); messageTextView.setVisibility(View.VISIBLE); } }

Target:
public void setError(@NonNull Throwable e, @Nullable String customErrorText) { messageTextView.setVisibility(View.GONE); Throwable inner = ThrowableUtil.getInnermostThrowable(e); String errorText; String messageText = null; if (inner instanceof ApiException) { errorText = getResources().getString(R.string.error_server_response); messageText = getApiErrorMessage((ApiException) inner); } else if (ThrowableUtil.throwableContainsException(e, HttpRequest.HttpRequestException.class) || ThrowableUtil.throwableContainsException(e, UnknownHostException.class) || ThrowableUtil.throwableContainsException(e, TimeoutException.class) || ThrowableUtil.throwableContainsException(e, SSLException.class)) { errorText = getResources().getString(R.string.error_network_error); messageText = String.format(getResources().getString(R.string.format_error_server_message), inner.getLocalizedMessage()); } else if (ThrowableUtil.throwableContainsException(e, JSONException.class)) { errorText = getResources().getString(R.string.error_response_malformed); } else { errorText = getResources().getString(R.string.error_unknown); messageText = inner.getLocalizedMessage(); } if (!TextUtils.isEmpty(customErrorText)) { errorText = customErrorText; } errorTextView.setText(errorText); if (!TextUtils.isEmpty(messageText)) { messageTextView.setText(messageText); messageTextView.setVisibility(View.VISIBLE); } }
Source:
Optional<InputStreamReader> loadPath(final Path path) { try { final byte[] bytes = ioService.readAllBytes(Paths.convert(path)); final ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes); return Optional.of(new InputStreamReader(inputStream)); } catch (final Exception e) { return Optional.empty(); } }

Target:
Optional<InputStreamReader> loadPath(final Path path) { InputStreamReader mutableInputStream = null; try { final byte[] bytes = ioService.readAllBytes(convertPath(path)); final ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes); mutableInputStream = new InputStreamReader(inputStream); return Optional.of(mutableInputStream); } catch (final Exception e) { closeInputStreamReader(mutableInputStream); return Optional.empty(); } }
Source:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = super.onCreateView(inflater, container, savedInstanceState); mSearchFiltersHeader = view.findViewById(R.id.filterResultsHeader); mSearchFiltersHeader.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startFilterActivity(); } }); setupSearchFiltersHeader(); search(); return view; }

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = super.onCreateView(inflater, container, savedInstanceState); mSearchFiltersHeader = view.findViewById(R.id.filterResultsHeader); mSearchFiltersHeader.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startFilterActivity(); } }); setupSearchFiltersHeader(); return view; }