auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void deleteOfflineTable(String tableName) { String offlineTableName = TableNameBuilder.OFFLINE.tableNameWithType(tableName); LOGGER.info("Deleting table {}: Start", offlineTableName); HelixHelper.removeResourceFromBrokerIdealState(_helixZkManager, offlineTableName); LOGGER.info("Deleting table {}: Removed from broker resource", offlineTableName); if (_helixAdmin.getResourcesInCluster(_helixClusterName).contains(offlineTableName)) { _helixAdmin.dropResource(_helixClusterName, offlineTableName); LOGGER.info("Deleting table {}: Removed helix table resource", offlineTableName); } _segmentDeletionManager.removeSegmentsFromStore(offlineTableName, getSegmentsFor(offlineTableName)); LOGGER.info("Deleting table {}: Removed stored segments", offlineTableName); ZKMetadataProvider.removeResourceSegmentsFromPropertyStore(_propertyStore, offlineTableName); LOGGER.info("Deleting table {}: Removed segment metadata", offlineTableName); ZKMetadataProvider.removeResourceConfigFromPropertyStore(_propertyStore, offlineTableName); LOGGER.info("Deleting table {}: Removed table config", offlineTableName); final String rawTableName = TableNameBuilder.extractRawTableName(tableName); InstancePartitionsUtils.removeInstancePartitions(_propertyStore, InstancePartitionsType.OFFLINE.getInstancePartitionsName(rawTableName)); LOGGER.info("Deleting table {}: Removed instance partitions", offlineTableName); if (_tableUpdaterLockMap.containsKey(rawTableName)) { synchronized (_tableUpdaterLockMap) { if (_tableUpdaterLockMap.containsKey(rawTableName)) { _tableUpdaterLockMap.remove(rawTableName); } } } LOGGER.info("Deleting table {}: Finish", offlineTableName); }

Target:
public void deleteOfflineTable(String tableName) { String offlineTableName = TableNameBuilder.OFFLINE.tableNameWithType(tableName); LOGGER.info("Deleting table {}: Start", offlineTableName); HelixHelper.removeResourceFromBrokerIdealState(_helixZkManager, offlineTableName); LOGGER.info("Deleting table {}: Removed from broker resource", offlineTableName); if (_helixAdmin.getResourcesInCluster(_helixClusterName).contains(offlineTableName)) { _helixAdmin.dropResource(_helixClusterName, offlineTableName); LOGGER.info("Deleting table {}: Removed helix table resource", offlineTableName); } _segmentDeletionManager.removeSegmentsFromStore(offlineTableName, getSegmentsFor(offlineTableName)); LOGGER.info("Deleting table {}: Removed stored segments", offlineTableName); ZKMetadataProvider.removeResourceSegmentsFromPropertyStore(_propertyStore, offlineTableName); LOGGER.info("Deleting table {}: Removed segment metadata", offlineTableName); ZKMetadataProvider.removeResourceConfigFromPropertyStore(_propertyStore, offlineTableName); LOGGER.info("Deleting table {}: Removed table config", offlineTableName); InstancePartitionsUtils.removeInstancePartitions(_propertyStore, InstancePartitionsType.OFFLINE.getInstancePartitionsName(TableNameBuilder.extractRawTableName(tableName))); LOGGER.info("Deleting table {}: Removed instance partitions", offlineTableName); LOGGER.info("Deleting table {}: Finish", offlineTableName); }
Source:
public static HiveStorageFormat getHiveStorageFormat(ConnectorSession session) { return HiveStorageFormat.valueOf(requireNonNull(session.getProperty(HIVE_STORAGE_FORMAT, String.class), String.format("%s is null", HIVE_STORAGE_FORMAT))); }

Target:
public static HiveStorageFormat getHiveStorageFormat(ConnectorSession session) { return HiveStorageFormat.valueOf(session.getProperty(HIVE_STORAGE_FORMAT, String.class).toUpperCase(ENGLISH)); }
Source:
public ResponseEntity getAnnotations(@PathVariable("variantCoreString") String variantCoreString, @RequestParam(name = "species") String species, @RequestParam(name = "assembly") String assembly, @RequestParam(name = "annot-vep-version", required = false) String annotationVepVersion, @RequestParam(name = "annot-vep-cache-version", required = false) String annotationVepCacheVersion, HttpServletResponse response) throws IllegalArgumentException { try { checkParameters(variantCoreString, annotationVepVersion, annotationVepCacheVersion, species, assembly); } catch (IllegalArgumentException e) { return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST); } MultiMongoDbFactory.setDatabaseNameForCurrentThread(DBAdaptorConnector.getDBName(species + "_" + assembly)); Optional<VariantWithSamplesAndAnnotation> variantEntity; try { variantEntity = getVariantByCoordinatesAndAnnotationVersion(variantCoreString, annotationVepVersion, annotationVepCacheVersion); } catch (AnnotationMetadataNotFoundException | IllegalArgumentException ex) { return new ResponseEntity(ex.getMessage(), HttpStatus.BAD_REQUEST); } if (!variantEntity.isPresent() || variantEntity.get().getAnnotation() == null) { return new ResponseEntity(null, HttpStatus.NOT_FOUND); } Link coreVariantLink = new Link(linkTo(methodOn(VariantWSServerV2.class).getCoreInfo(variantCoreString, species, assembly, response)).toUri().toString(), "CoreVariant"); return new ResponseEntity(new Resource<>(variantEntity.get().getAnnotation(), coreVariantLink), HttpStatus.OK); }

Target:
public ResponseEntity getAnnotations(@PathVariable("variantCoreString") String variantCoreString, @RequestParam(name = "species") String species, @RequestParam(name = "assembly") String assembly, @RequestParam(name = "annot-vep-version", required = false) String annotationVepVersion, @RequestParam(name = "annot-vep-cache-version", required = false) String annotationVepCacheVersion, HttpServletResponse response) throws IllegalArgumentException { try { checkParameters(variantCoreString, annotationVepVersion, annotationVepCacheVersion, species, assembly); } catch (IllegalArgumentException e) { return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST); } MultiMongoDbFactory.setDatabaseNameForCurrentThread(DBAdaptorConnector.getDBName(species + "_" + assembly)); Optional<VariantWithSamplesAndAnnotation> variantEntity; try { variantEntity = getVariantByCoordinatesAndAnnotationVersion(variantCoreString, annotationVepVersion, annotationVepCacheVersion); } catch (AnnotationMetadataNotFoundException | IllegalArgumentException ex) { return new ResponseEntity(ex.getMessage(), HttpStatus.BAD_REQUEST); } if (!variantEntity.isPresent() || variantEntity.get().getAnnotation() == null) { return new ResponseEntity(null, HttpStatus.NOT_FOUND); } Link coreVariantLink = new Link(linkTo(methodOn(VariantWSServerV2.class).getCoreInfo(variantCoreString, species, assembly, response)).toUri().toString(), "coreVariant"); return new ResponseEntity(new Resource<>(variantEntity.get().getAnnotation(), coreVariantLink), HttpStatus.OK); }
Source:
public void run() { for (Map.Entry<String, AtomicLong> hostAndRequestCount : hostToRequestCount.entrySet()) { String hostname = hostAndRequestCount.getKey(); AtomicLong requestCount = hostAndRequestCount.getValue(); Long hostSleepTime = hostToSleepTime.get(hostname); logger.info("For host {}, request count per sec is {}, current sleep time is ms", hostname, requestCount.get(), hostSleepTime); if (targetQPS > 0 && requestCount.get() > 0) { long val = requestCount.get() * 100 * hostSleepTime / targetQPS; hostSleepTime = val / 100 + (val > 100 && (val % 100 >= 50 || hostSleepTime == 1) ? 1 : 0); requestCount.set(0); logger.info("Updated sleep time is ms for host {}", hostSleepTime, hostname); } hostToSleepTime.put(hostname, hostSleepTime); } }

Target:
public void run() { for (Map.Entry<String, AtomicLong> hostAndRequestCount : hostToRequestCount.entrySet()) { String hostname = hostAndRequestCount.getKey(); AtomicLong requestCount = hostAndRequestCount.getValue(); Long hostSleepTime = hostToSleepTime.get(hostname); long currentQPS = requestCount.get(); logger.info("For host {}, request count per sec is {}, current sleep time is ms", hostname, currentQPS, hostSleepTime); if (targetQPS > 0 && currentQPS > 0) { long newSleepTime = currentQPS * hostSleepTime / targetQPS; newSleepTime = newSleepTime + ((currentQPS > targetQPS && newSleepTime == hostSleepTime) ? 1 : 0); hostSleepTime = newSleepTime; requestCount.set(0); logger.info("Updated sleep time is ms for host {}", hostSleepTime, hostname); } hostToSleepTime.put(hostname, hostSleepTime); } }
Source:
public ProcessInputStream startProcess() throws IOException{ File javaHome = getJavaHome(); ArrayList<String> proxyProperties = getProxyProperties(); String java = javaHome == null ? "java" : String.format("%s/bin/java",javaHome.getAbsolutePath()); CommandBuilder cb = new CommandBuilder(java).add("-DJENKINS_HOME=" + getJenkinsHome()); for (String proxyProp: proxyProperties) { cb.add(proxyProp); } cb.add("-Duser.language=en", "-jar", war, "--ajp13Port=-1", "--httpPort=" + httpPort); cb.env.putAll(commonLaunchEnv()); System.out.println("Starting Jenkins: " + cb.toString()); return cb.popen(); }

Target:
public ProcessInputStream startProcess() throws IOException{ File javaHome = getJavaHome(); ArrayList<String> proxyProperties = getProxyProperties(); String java = javaHome == null ? "java" : String.format("%s/bin/java",javaHome.getAbsolutePath()); CommandBuilder cb = new CommandBuilder(java).add("-DJENKINS_HOME=" + getJenkinsHome()); for (String proxyProp: proxyProperties) { cb.add(proxyProp); } cb.add("-Duser.language=en"); cb.add("-jar", war); cb.add("--ajp13Port=-1"); cb.add("--httpPort=" + httpPort); cb.env.putAll(commonLaunchEnv()); System.out.println("Starting Jenkins: " + cb.toString()); return cb.popen(); }
Source:
private RemoteWebElement newElement(final String elementId) { final RemoteWebElement element = new RemoteWebElement(); element.setParent(driver); element.setId(elementId); element.setFileDetector(driver.getFileDetector()); return element; }

Target:
private MobileElement newElement(final String elementId) { final MobileElement element = new MobileElement(new RemoteWebElement(), driver); element.setParent(driver); element.setId(elementId); element.setFileDetector(driver.getFileDetector()); return element; }
Source:
public DlmsConnection connect(final DlmsDevice device, final DlmsMessageListener dlmsMessageListener) throws TechnicalException { this.checkDevice(device); this.checkIpAddress(device); try { return this.createConnection(device, dlmsMessageListener); } catch (final UnknownHostException e) { LOGGER.warn("The IP address is not found: {}", device.getIpAddress(), e); throw new TechnicalException(ComponentType.PROTOCOL_DLMS, "The IP address is not found: " + device.getIpAddress()); } catch (final IOException e) { throw new ConnectionException(e); } catch (final EncrypterException e) { LOGGER.error("decryption on security keys went wrong for device: {}", device.getDeviceIdentification(), e); throw new TechnicalException(ComponentType.PROTOCOL_DLMS, "decryption on security keys went wrong for device: " + device.getDeviceIdentification()); } }

Target:
public DlmsConnection connect(final DlmsDevice device, final DlmsMessageListener dlmsMessageListener) throws TechnicalException { this.checkDevice(device); this.checkIpAddress(device); try { return this.createConnection(device, dlmsMessageListener); } catch (final UnknownHostException e) { LOGGER.warn("The IP address is not found: {}", device.getIpAddress(), e); throw new TechnicalException(ComponentType.PROTOCOL_DLMS, "The IP address is not found: " + device.getIpAddress()); } catch (final IOException e) { throw new ConnectionException(e); } catch (final EncrypterException e) { LOGGER.error("decryption of security keys failed for device: {}", device.getDeviceIdentification(), e); throw new TechnicalException(ComponentType.PROTOCOL_DLMS, "decryption of security keys failed for device: " + device.getDeviceIdentification()); } }
Source:
public void run() { try { Thread.sleep(timeout); this.timedout.setIsSatisfied(true); } catch (InterruptedException e) { byte a = 0; } }

Target:
public void run() { try { Thread.sleep(timeout); this.timedout.setIsSatisfied(true); } catch (InterruptedException e) { } }
Source:
public int getStateTableIndex(ITimeEvent event) { if (event instanceof TimeEvent) { TimeEvent timeEvent = (TimeEvent) event; Object value = timeEvent.getLabel(); if (value != null) { return Math.floorMod(value.hashCode(), NUM_COLORS); } ITimeGraphEntry entry = event.getEntry(); ITimeGraphEntryModel model = ((TimeGraphEntry) entry).getModel(); if(model instanceof StateSystemEntryModel || model instanceof ModuleEntryModel) { return INVISIBLE; } return NUM_COLORS; } return INVISIBLE; }

Target:
public int getStateTableIndex(ITimeEvent event) { if (event instanceof TimeEvent) { TimeEvent timeEvent = (TimeEvent) event; Object value = timeEvent.getLabel(); if (value != null) { return Math.floorMod(value.hashCode(), NUM_COLORS); } ITimeGraphEntry entry = event.getEntry(); ITmfTreeDataModel model = ((TimeGraphEntry) entry).getEntryModel(); if(model instanceof StateSystemEntryModel || model instanceof ModuleEntryModel) { return INVISIBLE; } return NUM_COLORS; } return INVISIBLE; }
Source:
private void updateHosts(StoragePool datacenter) { AsyncDataProvider.getInstance().getHostListByDataCenter(new AsyncQuery<>(hosts -> { ArrayList<VDS> filteredHosts = new ArrayList<>(); for (VDS host : hosts) { if (isHostAvailable(host)) { filteredHosts.add(host); } } Collections.sort(filteredHosts, new NameableComparator()); getHost().setItems(filteredHosts); getSanStorageModelBase().clearSanStorageModel(); }), datacenter.getId()); }

Target:
private void updateHosts(StoragePool datacenter) { AsyncDataProvider.getInstance().getHostListByDataCenter(new AsyncQuery<>(hosts -> { ArrayList<VDS> filteredHosts = new ArrayList<>(); for (VDS host : hosts) { if (isHostAvailable(host)) { filteredHosts.add(host); } } Collections.sort(filteredHosts, new NameableComparator()); getHost().setItems(filteredHosts); if (getSanStorageModelBase() != null) { getSanStorageModelBase().clearSanStorageModel(); } }), datacenter.getId()); }
Source:
private Function<PollingContext<OperationResult>, Mono<OperationResult>> analyzeFormStreamActivationOperation( Flux<ByteBuffer> data, String modelId, long length, FormContentType formContentType, boolean includeTextDetails) { Objects.requireNonNull(data, "'data' is required and cannot be null."); Objects.requireNonNull(modelId, "'modelId' is required and cannot be null."); final long[] bufferedDataSize = {0}; final List<ByteBuffer> cachedBuffers = new LinkedList<>(); final AtomicBoolean[] isGuessed = {new AtomicBoolean(true)}; final ContentType[] contentType = new ContentType[1]; return pollingContext -> data.filter(ByteBuffer::hasRemaining) .windowUntil(buffer -> { if (bufferedDataSize[0] >= length) { return false; } bufferedDataSize[0] += buffer.remaining(); if (formContentType == null && isGuessed[0].get() && bufferedDataSize[0] >= 4) { byte[] bytes = buffer.array(); contentType[0] = getContentType(ByteBuffer.wrap(bytes)); isGuessed[0].compareAndSet(true, false); } ByteBuffer cachedBuffer = ByteBuffer.allocate(buffer.remaining()).put(buffer); cachedBuffer.flip(); cachedBuffers.add(cachedBuffer); if (bufferedDataSize[0] >= length) { return true; } return false; }, true, Integer.MAX_VALUE) .next() .flatMap(newData -> { final ContentType contentTypeFinal = formContentType == null ? contentType[0] : ContentType.fromString(formContentType.toString()); return service.analyzeWithCustomModelWithResponseAsync(UUID.fromString(modelId), contentTypeFinal, Flux.fromIterable(cachedBuffers), length, includeTextDetails) .map(response -> new OperationResult(parseModelId(response.getDeserializedHeaders().getOperationLocation()))); }); }

Target:
private Function<PollingContext<OperationResult>, Mono<OperationResult>> analyzeFormStreamActivationOperation( Flux<ByteBuffer> data, String modelId, long length, FormContentType formContentType, boolean includeTextDetails) { Objects.requireNonNull(data, "'data' is required and cannot be null."); Objects.requireNonNull(modelId, "'modelId' is required and cannot be null."); return pollingContext -> { if (formContentType != null) { try { return service.analyzeWithCustomModelWithResponseAsync(UUID.fromString(modelId), ContentType.fromString(formContentType.toString()), data, length, includeTextDetails) .map(response -> new OperationResult(parseModelId( response.getDeserializedHeaders().getOperationLocation()))); } catch (RuntimeException ex) { return monoError(logger, ex); } } else { return detectContentType(data) .flatMap(contentType -> service.analyzeWithCustomModelWithResponseAsync(UUID.fromString(modelId), contentType, data, length, includeTextDetails) .map(response -> new OperationResult( parseModelId(response.getDeserializedHeaders().getOperationLocation())))); } }; }
Source:
public DataTransactionResult remove(DataHolder dataHolder) { if (supports(dataHolder)) { if (((net.minecraft.entity.Entity) dataHolder).isRiding()) { ((net.minecraft.entity.Entity) dataHolder).ridingEntity = null; return DataTransactionBuilder.builder().result(DataTransactionResult.Type.SUCCESS).build(); } else { return DataTransactionBuilder.builder().result(DataTransactionResult.Type.FAILURE).build(); } } else { return DataTransactionBuilder.builder().result(DataTransactionResult.Type.FAILURE).build(); } }

Target:
public DataTransactionResult remove(DataHolder dataHolder) { return DataTransactionBuilder.failNoData(); }
Source:
public GatewayAPIDTO getAPIArtifact(String apiId, String gatewayLabel) { GatewayAPIDTO gatewayAPIDTO = null; if (gatewayArtifactSynchronizerProperties.getGatewayLabels().contains(gatewayLabel)) { if (artifactRetriever != null) { try { String gatewayRuntimeArtifact = artifactRetriever.retrieveArtifact(apiId, gatewayLabel, APIConstants.GatewayArtifactSynchronizer.GATEWAY_INSTRUCTION_PUBLISH); gatewayAPIDTO = new Gson().fromJson(gatewayRuntimeArtifact, GatewayAPIDTO.class); } catch (ArtifactSynchronizerException e) { log.error("Error retrieving artifacts of " + apiId + " from storage", e); } } else { log.error("Artifact retriever not found"); } } return gatewayAPIDTO; }

Target:
public GatewayAPIDTO getAPIArtifact(String apiId, String gatewayLabel) { GatewayAPIDTO gatewayAPIDTO = null; if (gatewayArtifactSynchronizerProperties.getGatewayLabels().contains(gatewayLabel)) { if (artifactRetriever != null) { try { String gatewayRuntimeArtifact = artifactRetriever.retrieveArtifact(apiId, gatewayLabel, APIConstants.GatewayArtifactSynchronizer.GATEWAY_INSTRUCTION_PUBLISH); if (gatewayRuntimeArtifact != null) { gatewayAPIDTO = new Gson().fromJson(gatewayRuntimeArtifact, GatewayAPIDTO.class); } else { log.error("Error retrieving artifacts for API " + apiId + ". Storage returned null"); } } catch (ArtifactSynchronizerException e) { log.error("Error retrieving artifacts of " + apiId + " from storage", e); } } else { log.error("Artifact retriever not found"); } } return gatewayAPIDTO; }
Source:
private static void insertFromJson(CqlSession session) { User alice = new User("alice", 30); User bob = new User("bob", 35); ObjectNode aliceScores = JsonNodeFactory.instance.objectNode().put("call_of_duty", 4.8).put("pokemon_go", 9.7); ObjectNode bobScores = JsonNodeFactory.instance.objectNode().put("zelda", 8.3).put("pokemon_go", 12.4); Statement stmt = insertInto("examples", "json_jackson_function") .value("id", literal(1)) .value("user", function(CqlIdentifier.fromCql("fromJson"), literal(alice, USER_CODEC))) .value( "scores", function(CqlIdentifier.fromCql("fromJson"), literal(aliceScores, JSON_NODE_CODEC))) .build(); System.out.println(((SimpleStatement) stmt).getQuery()); session.execute(stmt); System.out.println("after"); PreparedStatement pst = session.prepare( insertInto("examples", "json_jackson_function") .value("id", bindMarker("id")) .value("user", function(CqlIdentifier.fromCql("fromJson"), bindMarker("user"))) .value("scores", function(CqlIdentifier.fromCql("fromJson"), bindMarker("scores"))) .build()); System.out.println(pst.getQuery()); session.execute( pst.bind() .setInt("id", 2) .set("user", bob, User.class) .set("scores", bobScores, JsonNode.class)); }

Target:
private static void insertFromJson(CqlSession session) { User alice = new User("alice", 30); User bob = new User("bob", 35); ObjectNode aliceScores = JsonNodeFactory.instance.objectNode().put("call_of_duty", 4.8).put("pokemon_go", 9.7); ObjectNode bobScores = JsonNodeFactory.instance.objectNode().put("zelda", 8.3).put("pokemon_go", 12.4); Statement stmt = insertInto("examples", "json_jackson_function") .value("id", literal(1)) .value( "user", function("fromJson", literal(alice, session.getContext().getCodecRegistry()))) .value( "scores", function("fromJson", literal(aliceScores, session.getContext().getCodecRegistry()))) .build(); System.out.println(((SimpleStatement) stmt).getQuery()); session.execute(stmt); System.out.println("after"); PreparedStatement pst = session.prepare( insertInto("examples", "json_jackson_function") .value("id", bindMarker("id")) .value("user", function("fromJson", bindMarker("user"))) .value("scores", function("fromJson", bindMarker("scores"))) .build()); System.out.println(pst.getQuery()); session.execute( pst.bind() .setInt("id", 2) .set("user", bob, User.class) .set("scores", bobScores, JsonNode.class)); }
Source:
private boolean canLogAtLevel(int logLevel, int environmentLoggingLevel) { if (logLevel < environmentLoggingLevel || logger == null) { return false; } switch (logLevel) { case VERBOSE_LEVEL: return logger.isDebugEnabled(); case INFORMATIONAL_LEVEL: return logger.isInfoEnabled(); case WARNING_LEVEL: return logger.isWarnEnabled(); case ERROR_LEVEL: return logger.isErrorEnabled(); default: return false; } }

Target:
private boolean canLogAtLevel(int logLevel, int environmentLoggingLevel) { if (logLevel < environmentLoggingLevel) { return false; } switch (logLevel) { case VERBOSE_LEVEL: return logger.isDebugEnabled(); case INFORMATIONAL_LEVEL: return logger.isInfoEnabled(); case WARNING_LEVEL: return logger.isWarnEnabled(); case ERROR_LEVEL: return logger.isErrorEnabled(); default: return false; } }
Source:
public void write(DataOutput dataOutput) throws IOException { try { dataOutput.writeLong(this.getLength()); for (int i = 0; i < this.getLength(); i++) { AbstractFileMetadata fileMetaData = fileMetaDataList.get(i); dataOutput.writeUTF(fileMetaData.getFileName()); dataOutput.writeUTF(fileMetaData.getFullPath()); dataOutput.writeLong(fileMetaData.getTimeStamp()); dataOutput.writeUTF(fileMetaData.getOwner()); dataOutput.writeLong(fileMetaData.getFileSize()); dataOutput.writeBoolean(fileMetaData.getIsFolder()); dataOutput.writeUTF(fileMetaData.getBasePath()); dataOutput.writeShort(fileMetaData.getPermission()); writeCredentials(dataOutput, fileMetaData.getCredentials()); } } catch (Exception e) { LOG.error("serialization failed"); } }

Target:
public void write(DataOutput dataOutput) throws IOException { try { dataOutput.writeLong(this.getTotalBytes()); dataOutput.writeLong(this.getLength()); for (AbstractFileMetadata fileMetaData : fileMetaDataList) { fileMetaData.write(dataOutput); } } catch (InterruptedException interruptedException) { throw new IOException("Failed to get length for InputSplit"); } }
Source:
public void setup() { String url = baseUrl + "/api/v1/sections/" + SECTION_ID + "/assignments/" + ASSIGNEMNET_ID + "/submissions/update_grades"; LOG.info(url); fakeRestClient.addSuccessResponse(url, "SampleJson/Progress.json"); submissionWriter = new SubmissionImpl(baseUrl, apiVersion, SOME_OAUTH_TOKEN, fakeRestClient, SOME_CONNECT_TIMEOUT, SOME_READ_TIMEOUT, DEFAULT_PAGINATION_PAGE_SIZE); }

Target:
public void setup() { String url = baseUrl + "/api/v1/sections/" + SECTION_ID + "/assignments/" + ASSIGNEMNET_ID + "/submissions/update_grades"; fakeRestClient.addSuccessResponse(url, "SampleJson/Progress.json"); submissionWriter = new SubmissionImpl(baseUrl, apiVersion, SOME_OAUTH_TOKEN, fakeRestClient, SOME_CONNECT_TIMEOUT, SOME_READ_TIMEOUT, DEFAULT_PAGINATION_PAGE_SIZE); }
Source:
private void doRead() throws Exception { if (this.rawBuffer == null) { this.rawBuffer = allocate(maxMessageSize); } this.writingToPipe = true; try { if (this.taskExecutor == null) { ExecutorService executor = Executors.newCachedThreadPool(); this.taskExecutor = new CompositeExecutor(executor, executor); } if (checkForAssembler()) { if (logger.isTraceEnabled()) { logger.trace("Before read:" + this.rawBuffer.position() + "/" + this.rawBuffer.limit()); } int len = this.socketChannel.read(this.rawBuffer); if (len < 0) { this.writingToPipe = false; this.closeConnection(true); } if (logger.isTraceEnabled()) { logger.trace("After read:" + this.rawBuffer.position() + "/" + this.rawBuffer.limit()); } this.rawBuffer.flip(); if (logger.isTraceEnabled()) { logger.trace("After flip:" + this.rawBuffer.position() + "/" + this.rawBuffer.limit()); } if (logger.isDebugEnabled()) { logger.debug("Read " + rawBuffer.limit() + " into raw buffer"); } this.sendToPipe(rawBuffer); } } catch (Exception e) { this.publishConnectionExceptionEvent(e); throw e; } finally { this.writingToPipe = false; } }

Target:
private void doRead() throws Exception { if (this.rawBuffer == null) { this.rawBuffer = allocate(maxMessageSize); } this.writingToPipe = true; try { if (this.taskExecutor == null) { ExecutorService executor = Executors.newCachedThreadPool(); this.taskExecutor = new CompositeExecutor(executor, executor); } if (checkForAssembler()) { if (logger.isTraceEnabled()) { logger.trace("Before read:" + this.rawBuffer.position() + "/" + this.rawBuffer.limit()); } int len = this.socketChannel.read(this.rawBuffer); if (len < 0) { this.writingToPipe = false; this.closeConnection(true); } if (logger.isTraceEnabled()) { logger.trace("After read:" + this.rawBuffer.position() + "/" + this.rawBuffer.limit()); } this.rawBuffer.flip(); if (logger.isTraceEnabled()) { logger.trace("After flip:" + this.rawBuffer.position() + "/" + this.rawBuffer.limit()); } if (logger.isDebugEnabled()) { logger.debug("Read " + rawBuffer.limit() + " into raw buffer"); } this.sendToPipe(rawBuffer); } } catch (RejectedExecutionException e) { throw e; } catch (Exception e) { this.publishConnectionExceptionEvent(e); throw e; } finally { this.writingToPipe = false; } }
Source:
public boolean hasNext() { return readBytes < readLength && input.isReadable(); }

Target:
public boolean hasNext() { return input.position() < readLength && input.isReadable(); }
Source:
public void readWriteTiles() throws FormatException, DependencyException, ServiceException, IOException { ServiceFactory factory = new ServiceFactory(); OMEXMLService service = factory.getInstance(OMEXMLService.class); IMetadata omexml = service.createOMEXMLMetadata(); reader = new ImageReader(); reader.setMetadataStore(omexml); reader.setId(inputFile); writer = new OMETiffWriter(); writer.setMetadataRetrieve(omexml); writer.setInterleaved(reader.isInterleaved()); writer.setTileSizeX(tileSizeX); writer.setTileSizeY(tileSizeY); writer.setId(outputFile); byte[] buf = new byte[FormatTools.getPlaneSize(reader)]; for (int series=0; series<reader.getSeriesCount(); series++) { reader.setSeries(series); writer.setSeries(series); for (int image=0; image<reader.getImageCount(); image++) { buf = reader.openBytes(image); writer.saveBytes(image, buf); } } }

Target:
public void readWriteTiles() throws FormatException, DependencyException, ServiceException, IOException { byte[] buf = new byte[FormatTools.getPlaneSize(reader)]; for (int series=0; series<reader.getSeriesCount(); series++) { reader.setSeries(series); writer.setSeries(series); for (int image=0; image<reader.getImageCount(); image++) { buf = reader.openBytes(image); writer.saveBytes(image, buf); } } }
Source:
public void initializeQuery(String query) { this.query = query; this.queryList.clear(); offset=0; view.setIsLastPage(false); view.clearAdapter(); }

Target:
public void initializeQuery(String query) { this.query = query; this.queryList.clear(); offset = 0; compositeDisposable.clear(); view.setIsLastPage(false); view.clearAdapter(); }
Source:
public void testSessionTokenIdentifierRoundTripNoRenewer() throws Throwable { SessionTokenIdentifier id = new SessionTokenIdentifier( SESSION_TOKEN_KIND, new Text(), null, landsatUri, new MarshalledCredentials("a", "b", "c"), new EncryptionSecrets(), ""); SessionTokenIdentifier result = S3ATestUtils.roundTrip(id, null); String ids = id.toString(); assertEquals("URI in " + ids, id.getUri(), result.getUri()); assertEquals("credentials in " + ids, id.getMarshalledCredentials(), result.getMarshalledCredentials()); assertEquals(new Text(), id.getRenewer()); }

Target:
public void testSessionTokenIdentifierRoundTripNoRenewer() throws Throwable { SessionTokenIdentifier id = new SessionTokenIdentifier( SESSION_TOKEN_KIND, new Text(), null, landsatUri, new MarshalledCredentials("a", "b", "c"), new EncryptionSecrets(), ""); SessionTokenIdentifier result = S3ATestUtils.roundTrip(id, null); String ids = id.toString(); assertEquals("URI in " + ids, id.getUri(), result.getUri()); assertEquals("credentials in " + ids, id.getMarshalledCredentials(), result.getMarshalledCredentials()); assertEquals("renewer in " + ids, new Text(), id.getRenewer()); }
Source:
public LicensedVideoSwapHistoryPageObject navigateToHistoryPage() { this.waitForElementByElement(lvsHistoryBtn); lvsHistoryBtn.click(); this.waitForElementByElement(backLink); PageObjectLogging.log("navigateToHistoryPage", "lvs history button navigates to right page", true); return new LicensedVideoSwapHistoryPageObject(driver); }

Target:
public LicensedVideoSwapHistoryPageObject navigateToHistoryPage() { waitForElementByElement(lvsHistoryBtn); lvsHistoryBtn.click(); waitForElementByElement(backLink); PageObjectLogging.log("navigateToHistoryPage", "lvs history button navigates to right page", true); return new LicensedVideoSwapHistoryPageObject(driver); }
Source:
public final void unSetClockBit() { long val = state.get(); while (State.isClockBitSet(val) && !state.compareAndSet(val, State.unSetClockBit(val))) { val = state.get(); } }

Target:
public final boolean unSetClockBit() { long val = state.get(); if (!State.isClockBitSet(val)) return false; while (State.isClockBitSet(val)) { if (state.compareAndSet(val, State.unSetClockBit(val))) return true; val = state.get(); } return false; }
Source:
public void notDistortContent() throws IOException { final int length = 1000000; final File tempfile = this.temp.newFile("notDistortContent.tmp"); final BufferedWriter bwr = new BufferedWriter(new FileWriter(tempfile)); final String head = Joiner.on(RqMultipartTest.CRLF).join( "--zzz1", "Content-Disposition: form-data; name=\"test1\"", "", "" ); bwr.write(head); final int byt = 0x7f; for (int idx = 0; idx < length; ++idx) { bwr.write(idx % byt); } final String foot = Joiner.on(RqMultipartTest.CRLF).join( "", "--zzz1--", "" ); bwr.write(foot); bwr.close(); final Request req = new RqFake( Arrays.asList( "POST /post?u=3 HTTP/1.1", "Host: exampl.com", contentLengthHeader( head.getBytes().length + length + foot.getBytes().length ), "Content-Type: multipart/form-data; boundary=zzz1" ), new TempInputStream(new FileInputStream(tempfile), tempfile) ); final InputStream stream = new RqMultipart.Smart( new RqMultipart.Base(req) ).single("test1").body(); try { MatcherAssert.assertThat( stream.available(), Matchers.equalTo(length) ); for (int idx = 0; idx < length; ++idx) { MatcherAssert.assertThat( String.format("byte %d not matched", idx), stream.read(), Matchers.equalTo(idx % byt) ); } } finally { req.body().close(); stream.close(); } }

Target:
public void notDistortContent() throws IOException { final int length = 1000000; final String part = "test1"; final File file = this.temp.newFile("notDistortContent.tmp"); final BufferedWriter bwr = new BufferedWriter(new FileWriter(file)); final String head = Joiner.on(RqMultipartTest.CRLF).join( "--zzz1", String.format(RqMultipartTest.CONTENT, part), "", "" ); bwr.write(head); final int byt = 0x7f; for (int idx = 0; idx < length; ++idx) { bwr.write(idx % byt); } final String foot = Joiner.on(RqMultipartTest.CRLF).join( "", "--zzz1--", "" ); bwr.write(foot); bwr.close(); final Request req = new RqFake( Arrays.asList( "POST /post?u=3 HTTP/1.1", "Host: exampl.com", contentLengthHeader( head.getBytes().length + length + foot.getBytes().length ), "Content-Type: multipart/form-data; boundary=zzz1" ), new TempInputStream(new FileInputStream(file), file) ); final InputStream stream = new RqMultipart.Smart( new RqMultipart.Base(req) ).single(part).body(); try { MatcherAssert.assertThat( stream.available(), Matchers.equalTo(length) ); for (int idx = 0; idx < length; ++idx) { MatcherAssert.assertThat( String.format("byte %d not matched", idx), stream.read(), Matchers.equalTo(idx % byt) ); } } finally { req.body().close(); stream.close(); } }
Source:
public void createGeoExitAlert() throws Exception { Boolean result = geoLocationProviderServiceImpl. createGeoAlert(getTestAlert(), getDeviceIdentifier(), DeviceManagementConstants.GeoServices.ALERT_TYPE_EXIT); Assert.assertEquals(result, Boolean.TRUE); verifyPrivate(geoLocationProviderServiceImpl).invoke("getEventProcessorAdminServiceStub"); }

Target:
public void createGeoExitAlert() throws GeoLocationBasedServiceException { Boolean result = geoLocationProviderServiceImpl. createGeoAlert(getExitAlert(), getDeviceIdentifier(), DeviceManagementConstants.GeoServices.ALERT_TYPE_EXIT); Assert.assertEquals(result, Boolean.TRUE); }
Source:
public long getTimestamp() { try { return locateBlobObjectStamp(); } catch (CoreException e) { e.printStackTrace(); return -1; } }

Target:
public long getTimestamp() { try { return locateBlobObjectStamp(); } catch (CoreException e) { Activator.logError(e.getMessage(), e); return -1; } }
Source:
public void sendResponse(final Exchange exchange, final Response response) { try { if (exchange.getRequest().getOptions().hasObserve()) { exchange.retransmitResponse(); } top.sendResponse(exchange, response); } catch (Exception ex) { response.setSendError(ex); } }

Target:
public void sendResponse(final Exchange exchange, final Response response) { try { if (exchange.getRequest().getOptions().hasObserve()) { exchange.retransmitResponse(); } top.sendResponse(exchange, response); } catch (RuntimeException ex) { response.setSendError(ex); } }
Source:
protected void performDefaults() { for (int i= 0; i < fCheckBoxes.size(); i++) { Button button= fCheckBoxes.get(i); String key= (String) button.getData(); IPreferenceStore nextStore = (IPreferenceStore) button.getData(PREFERENCE_STORE_KEY); button.setSelection(nextStore.getDefaultBoolean(key)); } IPreferenceStore store= getPreferenceStore(); for (int i= 0; i < fRadioButtons.size(); i++) { Button button= fRadioButtons.get(i); String[] info= (String[]) button.getData(); button.setSelection(info[1].equals(store.getDefaultString(info[0]))); } for (int i= 0; i < fTextControls.size(); i++) { Text text= fTextControls.get(i); String key= (String) text.getData(); text.setText(store.getDefaultString(key)); } super.performDefaults(); }

Target:
protected void performDefaults() { for (int i= 0; i < fCheckBoxes.size(); i++) { Button button= fCheckBoxes.get(i); String key= (String) button.getData(); IPreferenceStore buttonPreferenceStore = (IPreferenceStore) button.getData(PREFERENCE_STORE_KEY); button.setSelection(buttonPreferenceStore.getDefaultBoolean(key)); } IPreferenceStore store= getPreferenceStore(); for (int i= 0; i < fRadioButtons.size(); i++) { Button button= fRadioButtons.get(i); String[] info= (String[]) button.getData(); button.setSelection(info[1].equals(store.getDefaultString(info[0]))); } for (int i= 0; i < fTextControls.size(); i++) { Text text= fTextControls.get(i); String key= (String) text.getData(); text.setText(store.getDefaultString(key)); } super.performDefaults(); }
Source:
public void copyPortGroupsFromHost(HostMO srcHost) throws Exception { if (srcHost == null) { return; } List<HostPortGroupSpec> portGroupSpecs = srcHost.getHostPortGroupSpecs(); if (portGroupSpecs == null || portGroupSpecs.isEmpty()) { s_logger.debug("No port groups in the host: " + srcHost.getName()); return; } for (HostPortGroupSpec spec : portGroupSpecs) { s_logger.debug("Creating port group: " + spec.getName() + " in the host: " + getName()); createPortGroup(spec); } }

Target:
public void copyPortGroupsFromHost(HostMO srcHost) throws Exception { if (srcHost == null) { return; } List<HostPortGroupSpec> portGroupSpecs = srcHost.getHostPortGroupSpecs(); if (CollectionUtils.isEmpty(portGroupSpecs)) { s_logger.debug("No port groups in the host: " + srcHost.getName()); return; } for (HostPortGroupSpec spec : portGroupSpecs) { s_logger.debug("Creating port group: " + spec.getName() + " in the host: " + getName()); createPortGroup(spec); } }
Source:
private void validateFieldStatus(Path.PathElement currentElement) { String currentField = currentElement.getFieldName(); Class<?> currentClass = currentElement.getType(); if (schema.getMetrics().stream().anyMatch(m -> m.getName().contains(currentField))) { if (metricMap.keySet().stream().noneMatch(m -> m.getName().equals(currentField))) { throw new InvalidOperationException("Can't sort on metric that is not present in query"); } } if (dictionary.getIdFieldName(currentClass).equals(currentField)) { throw new InvalidOperationException("Sorting on id field is not permitted"); } }

Target:
private void validateFieldStatus(Path.PathElement currentElement) { String currentField = currentElement.getFieldName(); Class<?> currentClass = currentElement.getType(); if (schema.getMetrics().stream().anyMatch(m -> m.getName().contains(currentField))) { if (metricMap.keySet().stream().noneMatch(m -> m.getName().equals(currentField))) { throw new InvalidOperationException("Can't sort on metric that is not present in query"); } } if (dictionary.getIdFieldName(currentClass).equals(currentField) || currentField.equals("id")) { throw new InvalidOperationException("Sorting on id field is not permitted"); } }
Source:
private CallInformation(Tuple actualParameters, PQuery referredQuery, final Set<Integer> bindings, Map<PVariable, Integer> variableMapping) { this.referredQuery = referredQuery; int keySize = actualParameters.getSize(); int[] parameterMaskIndeces = new int[keySize]; for (int i = 0; i < keySize; i++) { PParameter symbolicParameter = referredQuery.getParameters().get(i); PVariable parameter = (PVariable) actualParameters.get(i); mapping.put(symbolicParameter, variableMapping.get(parameter)); parameterMaskIndeces[i] = variableMapping.get(parameter); if (bindings.contains(variableMapping.get(parameter))) { adornment.add(symbolicParameter); } } frameMask = TupleMask.fromSelectedIndices(bindings.size(), parameterMaskIndeces); boundParameterIndices = new int[adornment.size()]; int boundIndex = 0; freeParameterIndices = new int[keySize - adornment.size()]; int freeIndex = 0; for (int i = 0; i < keySize; i++) { if (bindings.contains(variableMapping.get(actualParameters.get(i)))) { boundParameterIndices[boundIndex] = i; boundIndex++; } else { freeParameterIndices[freeIndex] = i; freeIndex++; } } parameterMask = TupleMask.fromSelectedIndices(keySize, boundParameterIndices); matcherReference = new MatcherReference(referredQuery, adornment); }

Target:
private CallInformation(Tuple actualParameters, PQuery referredQuery, final Set<Integer> bindings, Map<PVariable, Integer> variableMapping) { this.referredQuery = referredQuery; int keySize = actualParameters.getSize(); List<Integer> parameterMaskIndices = new ArrayList<>(); int[] fullParameterMaskIndices = new int[keySize]; for (int i = 0; i < keySize; i++) { PParameter symbolicParameter = referredQuery.getParameters().get(i); PVariable parameter = (PVariable) actualParameters.get(i); Integer originalFrameIndex = variableMapping.get(parameter); mapping.put(symbolicParameter, originalFrameIndex); fullParameterMaskIndices[i] = originalFrameIndex; if (bindings.contains(originalFrameIndex)) { parameterMaskIndices.add(originalFrameIndex); adornment.add(symbolicParameter); } } thinFrameMask = TupleMask.fromSelectedIndices(variableMapping.size(), parameterMaskIndices); fullFrameMask = TupleMask.fromSelectedIndices(variableMapping.size(), fullParameterMaskIndices); int[] boundParameterIndices = new int[adornment.size()]; int boundIndex = 0; freeParameterIndices = new int[keySize - adornment.size()]; int freeIndex = 0; for (int i = 0; i < keySize; i++) { if (bindings.contains(variableMapping.get(actualParameters.get(i)))) { boundParameterIndices[boundIndex] = i; boundIndex++; } else { freeParameterIndices[freeIndex] = i; freeIndex++; } } parameterMask = TupleMask.fromSelectedIndices(thinFrameMask.getSize(), boundParameterIndices); matcherReference = new MatcherReference(referredQuery, adornment); }
Source:
public java.lang.Boolean executeAction() throws Exception { this.destination = __destination == null ? null : system.proxies.FileDocument.initialize(getContext(), __destination); StringUtils.stringToFile(getContext(), value, destination, encoding); return true; END USER CODE }

Target:
public java.lang.Boolean executeAction() throws Exception { this.destination = __destination == null ? null : system.proxies.FileDocument.initialize(getContext(), __destination); Charset charset = StandardCharsets.UTF_8; if (this.encoding != null) charset = Charset.forName(this.encoding.name().replace('_', '-')); StringUtils.stringToFile(getContext(), value, destination, charset); return true; END USER CODE }
Source:
public static void removeFile(String sourceFile) throws IOException { File file = new File(sourceFile); if (file.delete()) { LOGGER.log(Level.INFO, file.getName() + " is deleted!"); } else { LOGGER.log(Level.WARNING, file.getName() + "deletion is failed."); } }

Target:
private static void removeFile(String sourceFile) throws IOException { File file = new File(sourceFile); if (file.delete()) { LOGGER.log(Level.INFO, file.getName() + " is deleted!"); } else { LOGGER.log(Level.WARNING, file.getName() + "deletion is failed."); } }
Source:
public Boolean doNotThrowAnyException(boolean bo) { class ClassWithBooleanField { Boolean b; } ClassWithBooleanField objWithBooleanField = new ClassWithBooleanField(); Boolean aBoolean = Boolean.TRUE; return bo ? objWithBooleanField.b : aBoolean; }

Target:
public Boolean doNotThrowAnyException(boolean bo) { class ClassWithBooleanField { Boolean b; } ClassWithBooleanField objWithBooleanField = new ClassWithBooleanField(); return bo ? objWithBooleanField.b : Boolean.TRUE; }
Source:
public int hashCode() { int result = _networkDomainName != null ? _networkDomainName.hashCode() : 0; result = 31 * result + (_networkDomainPath != null ? _networkDomainPath.hashCode() : 0); result = 31 * result + (_networkDomainUuid != null ? _networkDomainUuid.hashCode() : 0); result = 31 * result + (_networkAccountName != null ? _networkAccountName.hashCode() : 0); result = 31 * result + (_networkAccountUuid != null ? _networkAccountUuid.hashCode() : 0); result = 31 * result + (_networkName != null ? _networkName.hashCode() : 0); result = 31 * result + (_networkCidr != null ? _networkCidr.hashCode() : 0); result = 31 * result + (_networkGateway != null ? _networkGateway.hashCode() : 0); result = 31 * result + (_networkAclId != null ? _networkAclId.hashCode() : 0); result = 31 * result + (_dnsServers != null ? _dnsServers.hashCode() : 0); result = 31 * result + (_gatewaySystemIds != null ? _gatewaySystemIds.hashCode() : 0); result = 31 * result + (_networkUuid != null ? _networkUuid.hashCode() : 0); result = 31 * result + (_isL3Network ? 1 : 0); result = 31 * result + (_isVpc ? 1 : 0); result = 31 * result + (_isSharedNetwork ? 1 : 0); result = 31 * result + (_vpcName != null ? _vpcName.hashCode() : 0); result = 31 * result + (_vpcUuid != null ? _vpcUuid.hashCode() : 0); result = 31 * result + (_defaultEgressPolicy ? 1 : 0); result = 31 * result + (_ipAddressRange != null ? _ipAddressRange.hashCode() : 0); result = 31 * result + (_domainTemplateName != null ? _domainTemplateName.hashCode() : 0); return result; }

Target:
public int hashCode() { int result = super.hashCode(); result = 31 * result + (_networkDomainName != null ? _networkDomainName.hashCode() : 0); result = 31 * result + (_networkDomainPath != null ? _networkDomainPath.hashCode() : 0); result = 31 * result + (_networkDomainUuid != null ? _networkDomainUuid.hashCode() : 0); result = 31 * result + (_networkAccountName != null ? _networkAccountName.hashCode() : 0); result = 31 * result + (_networkAccountUuid != null ? _networkAccountUuid.hashCode() : 0); result = 31 * result + (_networkName != null ? _networkName.hashCode() : 0); result = 31 * result + (_networkCidr != null ? _networkCidr.hashCode() : 0); result = 31 * result + (_networkGateway != null ? _networkGateway.hashCode() : 0); result = 31 * result + (_networkAclId != null ? _networkAclId.hashCode() : 0); result = 31 * result + (_dnsServers != null ? _dnsServers.hashCode() : 0); result = 31 * result + (_gatewaySystemIds != null ? _gatewaySystemIds.hashCode() : 0); result = 31 * result + (_networkUuid != null ? _networkUuid.hashCode() : 0); result = 31 * result + (_isL3Network ? 1 : 0); result = 31 * result + (_isVpc ? 1 : 0); result = 31 * result + (_isSharedNetwork ? 1 : 0); result = 31 * result + (_vpcName != null ? _vpcName.hashCode() : 0); result = 31 * result + (_vpcUuid != null ? _vpcUuid.hashCode() : 0); result = 31 * result + (_defaultEgressPolicy ? 1 : 0); result = 31 * result + (_ipAddressRange != null ? _ipAddressRange.hashCode() : 0); result = 31 * result + (_domainTemplateName != null ? _domainTemplateName.hashCode() : 0); return result; }
Source:
public void should_fail_if_one_entry_does_not_satisfy_the_given_requirements() { AssertionError error = expectAssertionError(() -> maps.assertAllSatisfy(someInfo(), greatPlayers, (team, player) -> { assertThat(team).isIn("Lakers", "Bulls", "Spurs"); assertThat(player.getPointsPerGame()).as("%s %s ppg", player.getName().first, player.getName().getLast()) .isGreaterThanOrEqualTo(30); })); assertThat(error).isNotNull(); assertThat(error).hasMessage(elementsShouldSatisfy(greatPlayers, list(failOnPpg("Spurs", duncan, 30), failOnPpg("Lakers", magic, 30))).create()); }

Target:
public void should_fail_if_one_entry_does_not_satisfy_the_given_requirements() { AssertionError error = expectAssertionError(() -> maps.assertAllSatisfy(someInfo(), greatPlayers, (team, player) -> { assertThat(team).isIn("Lakers", "Bulls", "Spurs"); assertThat(player.getPointsPerGame()).as("%s %s ppg", player.getName().first, player.getName().getLast()) .isLessThan(30); })); assertThat(error).hasMessage(elementsShouldSatisfy(greatPlayers, list(failOnPpgLessThan("Bulls", jordan, 30))).create()); }
Source:
protected Object getHandlerInternal(HttpServletRequest request) throws Exception { BroadleafRequestContext context = BroadleafRequestContext.getBroadleafRequestContext(); if (context != null && context.getRequestURIWithoutContext() != null) { String requestUri = URLDecoder.decode(context.getRequestURIWithoutContext(), charEncoding); Boolean internalValidateFindPreviouslySet = false; PageDTO page; try { if (!BroadleafRequestContext.getBroadleafRequestContext().getInternalValidateFind()) { BroadleafRequestContext.getBroadleafRequestContext().setInternalValidateFind(true); internalValidateFindPreviouslySet = true; } page = pageService.findPageByURI(context.getLocale(), requestUri, buildMvelParameters(request), context.isSecure()); } finally { if (internalValidateFindPreviouslySet) { BroadleafRequestContext.getBroadleafRequestContext().setInternalValidateFind(true); } } if (page != null && ! (page instanceof NullPageDTO)) { context.getRequest().setAttribute(PAGE_ATTRIBUTE_NAME, page); return controllerName; } } return null; }

Target:
protected Object getHandlerInternal(HttpServletRequest request) throws Exception { BroadleafRequestContext context = BroadleafRequestContext.getBroadleafRequestContext(); if (context != null && context.getRequestURIWithoutContext() != null) { String requestUri = URLDecoder.decode(context.getRequestURIWithoutContext(), charEncoding); Boolean internalValidateFindPreviouslySet = false; PageDTO page; try { if (!BroadleafRequestContext.getBroadleafRequestContext().getInternalValidateFind()) { BroadleafRequestContext.getBroadleafRequestContext().setInternalValidateFind(true); internalValidateFindPreviouslySet = true; } page = pageService.findPageByURI(context.getLocale(), requestUri, buildMvelParameters(request), context.isSecure()); } finally { if (internalValidateFindPreviouslySet) { BroadleafRequestContext.getBroadleafRequestContext().setInternalValidateFind(false); } } if (page != null && ! (page instanceof NullPageDTO)) { context.getRequest().setAttribute(PAGE_ATTRIBUTE_NAME, page); return controllerName; } } return null; }