auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void convertDataValues(ConvertFromSDKVisitor converter) { if (!PullController.PULL_IS_ACTIVE) return; callback.onStep(PullStep.PREPARING_SURVEYS); for (OrganisationUnitExtended organisationUnit : OrganisationUnitExtended.getExtendedList( SdkQueries.getAssignedOrganisationUnits())) { for (ProgramExtended program : ProgramExtended.getExtendedList( SdkQueries.getProgramsForOrganisationUnit(organisationUnit.getId(), ProgramType.WITHOUT_REGISTRATION))) { if(!program.isValidProgram()){ continue; } converter.actualProgram = program; List<EventExtended> events = EventExtended.getExtendedList( SdkQueries.getEvents(organisationUnit.getId(), program.getUid())); System.out.printf("Converting surveys and values for orgUnit: %s | program: %s", organisationUnit.getLabel(), program.getDisplayName()); for (EventExtended event : events) { if (!PullController.PULL_IS_ACTIVE) return; if (event.getEventDate() == null || event.getEventDate().equals("")) { Log.d(TAG, "Alert, ignoring event without eventdate, event uid:"+event.getUid()); continue; } event.accept(converter); } } } SurveyPlanner.getInstance().buildNext(); }

Target:
private void convertDataValues(ConvertFromSDKVisitor converter) { if (!PullController.PULL_IS_ACTIVE) return; callback.onStep(PullStep.PREPARING_SURVEYS); for (OrganisationUnitExtended organisationUnit : OrganisationUnitExtended.getExtendedList( SdkQueries.getAssignedOrganisationUnits())) { for (ProgramExtended program : ProgramExtended.getExtendedList( SdkQueries.getProgramsForOrganisationUnit(organisationUnit.getId(), PreferencesState.getInstance().getContext().getString(R.string.pull_program_code), ProgramType.WITHOUT_REGISTRATION))) { converter.actualProgram = program; List<EventExtended> events = EventExtended.getExtendedList( SdkQueries.getEvents(organisationUnit.getId(), program.getUid())); System.out.printf("Converting surveys and values for orgUnit: %s | program: %s", organisationUnit.getLabel(), program.getDisplayName()); for (EventExtended event : events) { if (!PullController.PULL_IS_ACTIVE) return; if (event.getEventDate() == null || event.getEventDate().equals("")) { Log.d(TAG, "Alert, ignoring event without eventdate, event uid:"+event.getUid()); continue; } event.accept(converter); } } } SurveyPlanner.getInstance().buildNext(); }
Source:
public synchronized Group get( String name ) { boolean global = name == null; if ( globalMode != null && global != globalMode.booleanValue() ) { throw mixingOfGroupModesException(); } if ( name == null ) { return Group.GLOBAL; } Group group = byName.get( name ); if ( group == null ) { throw new HeaderException( "Group '" + name + "' not found. Available groups are: " + groupNames() ); } return group; }

Target:
public synchronized Group get( String name ) { boolean global = name == null; if ( globalMode != null && global != globalMode ) { throw mixingOfGroupModesException(); } if ( name == null ) { return Group.GLOBAL; } Group group = byName.get( name ); if ( group == null ) { throw new HeaderException( "Group '" + name + "' not found. Available groups are: " + groupNames() ); } return group; }
Source:
protected void runJmeter(boolean shouldCreateJmxFile) throws IOException { StandardJMeterEngine jmeter = new StandardJMeterEngine(); loadJmeterProperties(); HashTree testPlanTree = getLnpTestPlan(shouldCreateJmxFile); Summariser summer = null; String summariserName = JMeterUtils.getPropDefault("summariser.name", "summary"); if (summariserName.length() > 0) { summer = new Summariser(summariserName); } String resultFile = TestProperties.LNP_TEST_RESULTS_FOLDER + "/" + getClass().getSimpleName() + ".jtl"; ResultCollector logger = new ResultCollector(summer); logger.setFilename(resultFile); testPlanTree.add(testPlanTree.getArray()[0], logger); File file = new File(resultFile); if (file.exists()) { file.delete(); } jmeter.configure(testPlanTree); jmeter.run(); try { ReportGenerator reportGenerator = new ReportGenerator(resultFile, null); reportGenerator.generate(); } catch (Exception e) { log.warning(e.getMessage()); } }

Target:
protected void runJmeter(boolean shouldCreateJmxFile) throws IOException { StandardJMeterEngine jmeter = new StandardJMeterEngine(); setJmeterProperties(); HashTree testPlan = getLnpTestPlan(); if (shouldCreateJmxFile) { String pathToConfigFile = createFileAndDirectory( TestProperties.LNP_TEST_CONFIG_FOLDER, "/" + getClass().getSimpleName() + ".jmx"); SaveService.saveTree(testPlan, Files.newOutputStream(Paths.get(pathToConfigFile))); } Summariser summariser = null; String summariserName = JMeterUtils.getPropDefault("summariser.name", "summary"); if (summariserName.length() > 0) { summariser = new Summariser(summariserName); } String resultsFile = createFileAndDirectory(TestProperties.LNP_TEST_RESULTS_FOLDER, getJtlResultsPath()); ResultCollector resultCollector = new ResultCollector(summariser); resultCollector.setFilename(resultsFile); testPlan.add(testPlan.getArray()[0], resultCollector); jmeter.configure(testPlan); jmeter.run(); try { ReportGenerator reportGenerator = new ReportGenerator(resultsFile, null); reportGenerator.generate(); } catch (ConfigurationException | GenerationException e) { log.warning(e.getMessage()); } renameStatisticsFile(); }
Source:
BigtableBufferedMutator( BigtableDataClient client, HBaseRequestAdapter adapter, Configuration configuration, BigtableOptions options, BufferedMutator.ExceptionListener listener, HeapSizeManager heapSizeManager, ExecutorService executorService) { this.adapter = adapter; this.configuration = configuration; this.exceptionListener = listener; this.host = options.getDataHost().toString(); this.asyncExecutor = new AsyncExecutor(client, heapSizeManager); LOG.info( "Initializing BigtableBufferd Mutator with %d channels, %,d byte heap size" + " and %d concurrent requests.", options.getChannelCount(), heapSizeManager.getMaxHeapSize(), heapSizeManager.getMaxInFlightRpcs()); this.options = options; this.heapSizeManager = heapSizeManager; this.executorService = executorService == null && options.getAsyncMutatorCount() > 0 ? createDefaultExecutorService() : executorService; }

Target:
BigtableBufferedMutator( BigtableDataClient client, HBaseRequestAdapter adapter, Configuration configuration, BigtableOptions options, BufferedMutator.ExceptionListener listener, HeapSizeManager heapSizeManager, ExecutorService executorService) { this.adapter = adapter; this.configuration = configuration; this.exceptionListener = listener; this.host = options.getDataHost().toString(); this.asyncExecutor = new AsyncExecutor(client, heapSizeManager); LOG.info( "Initializing BigtableBufferd Mutator with %d channels, %,d byte heap size" + " and %d concurrent requests.", options.getChannelCount(), heapSizeManager.getMaxHeapSize(), heapSizeManager.getMaxInFlightRpcs()); this.options = options; this.heapSizeManager = heapSizeManager; this.executorService = executorService; }
Source:
public ServiceManagerEnvironment loadServiceManagerEnvironment(IServer server, boolean suppressErrors) { String minishiftLoc = MinishiftBinaryUtility.getMinishiftLocation(server); if (minishiftLoc == null || minishiftLoc.isEmpty() || !(new File(minishiftLoc).exists())) { if (!suppressErrors) { String msg = "Server " + server.getName() + " does not have a minishift location defined."; CDKCoreActivator.pluginLog().logError(msg); } return null; } Map<String, String> adbEnv = loadDockerEnv(server); Properties props = loadOpenshiftConsoleDetails(server, suppressErrors); String registry = getOpenshiftRegistry(server, suppressErrors); if (registry != null) props.put(ServiceManagerEnvironment.IMAGE_REGISTRY_KEY, registry); Map<String, String> merged = merge(adbEnv, props); Properties dotCDK = getCDKProperties(server); merged = merge(merged, dotCDK); File ocLocation = findOCLocation(server); if (ocLocation != null) { merged.put(OC_LOCATION_KEY, ocLocation.getAbsolutePath()); } try { ServiceManagerEnvironment env = new ServiceManagerEnvironment(merged); env.setDefaultUsername("developer"); return env; } catch (URISyntaxException urise) { if (!suppressErrors) { String msg = "Environment variable DOCKER_HOST is not a valid uri: " + merged.get("DOCKER_HOST"); CDKCoreActivator.pluginLog().logError(msg, urise); } return null; } }

Target:
public ServiceManagerEnvironment loadServiceManagerEnvironment(IServer server, boolean suppressErrors) { String minishiftLoc = MinishiftBinaryUtility.getMinishiftLocation(server); if (minishiftLoc == null || minishiftLoc.isEmpty() || !(new File(minishiftLoc).exists())) { if (!suppressErrors) { String msg = "Server " + server.getName() + " does not have a minishift location defined."; CDKCoreActivator.pluginLog().logError(msg); } return null; } Map<String, String> adbEnv = loadDockerEnv(server); Properties props = loadOpenshiftConsoleDetails(server, suppressErrors); String registry = getOpenshiftRegistry(server, suppressErrors); if (registry != null) props.put(ServiceManagerEnvironment.IMAGE_REGISTRY_KEY, registry); Map<String, String> merged = merge(adbEnv, props); Properties dotCDK = getCDKProperties(server); merged = merge(merged, dotCDK); File ocLocation = findOCLocation(server); if (ocLocation != null) { merged.put(OC_LOCATION_KEY, ocLocation.getAbsolutePath()); } try { ServiceManagerEnvironment env = new ServiceManagerEnvironment(merged); env.setDefaultUsername(ServiceManagerEnvironment.DEFAULT_MINISHIFT_USER); return env; } catch (URISyntaxException urise) { if (!suppressErrors) { String msg = "Environment variable DOCKER_HOST is not a valid uri: " + merged.get("DOCKER_HOST"); CDKCoreActivator.pluginLog().logError(msg, urise); } return null; } }
Source:
public void afterClass() { if (this.globalClient != null) { this.globalClient.close(); } for (CosmosAsyncClient asyncClient : this.regionalClients) if (asyncClient != null) { asyncClient.close(); } }

Target:
public void afterClass() { safeClose(this.globalClient); for (CosmosAsyncClient asyncClient : this.regionalClients) safeClose(asyncClient); }
Source:
void delete() throws InfrastructureException { String workspaceId = getWorkspaceId(); String projectName = getName(); KubernetesClient client = clientFactory.create(workspaceId); delete(projectName, client); }

Target:
void delete() throws InfrastructureException { KubernetesClient client = clientFactory.create(workspaceId); delete(name, client); }
Source:
public void setupRemoteCacheFactory() { HotRodServerConfigurationBuilder serverBuilder = new HotRodServerConfigurationBuilder(); serverBuilder.adminOperationsHandler(new EmbeddedServerAdminOperationHandler()); hotrodServer = HotRodTestingUtil.startHotRodServer(cacheManager, 19722, serverBuilder); ConfigurationBuilder builder = new ConfigurationBuilder(); builder.addServer().host("localhost").port(hotrodServer.getPort()); remoteCacheManager = new RemoteCacheManager(builder.build()); }

Target:
public void setupRemoteCacheFactory() { HotRodServerConfigurationBuilder serverBuilder = new HotRodServerConfigurationBuilder(); serverBuilder.adminOperationsHandler(new EmbeddedServerAdminOperationHandler()); hotrodServer = HotRodTestingUtil.startHotRodServer(cacheManager, ServerTestingUtil.findFreePort(), serverBuilder); ConfigurationBuilder builder = new ConfigurationBuilder(); builder.addServer().host("localhost").port(hotrodServer.getPort()); remoteCacheManager = new RemoteCacheManager(builder.build()); }
Source:
private boolean searchForDuplicatesWithExistingVmDevices(VmDevice vmDeviceToHotplug){ Pattern slotSearchPattern = Pattern.compile("slot=0x([0-9a-fA-F]*+)"); String slotToHotplug = getPciSlotFromDevice(vmDeviceToHotplug, slotSearchPattern); if (slotToHotplug == null){ return false; } List<VmDevice> allVmDevices = getVmDeviceDao().getVmDeviceByVmId(getVm().getId()); for (VmDevice vmDevice : allVmDevices) { if (vmDevice.getIsManaged() && !vmDeviceToHotplug.getId().equals(vmDevice.getId())){ String deviceSlot = getPciSlotFromDevice(vmDevice, slotSearchPattern); if(deviceSlot != null && slotToHotplug.equals(deviceSlot)){ return true; } } } return false; }

Target:
private boolean searchForDuplicatesWithExistingVmDevices(VmDevice vmDeviceToHotplug){ Map<String, String> addressMapToHotplug = XmlRpcStringUtils.string2Map(vmDeviceToHotplug.getAddress()); if (!addressMapToHotplug.containsKey("slot")){ return false; } List<VmDevice> allVmDevices = getVmDeviceDao().getVmDeviceByVmId(getVm().getId()); for (VmDevice vmDevice : allVmDevices) { if (vmDevice.getIsManaged() && !vmDeviceToHotplug.getId().equals(vmDevice.getId())){ Map<String, String> deviceAddressMap = XmlRpcStringUtils.string2Map(vmDevice.getAddress()); if(deviceAddressMap.equals(addressMapToHotplug)) { return true; } } } return false; }
Source:
private List<String> getMergedDimensions(List<IndexableAdapter> indexes) { if (indexes.size() == 0) { return ImmutableList.of(); } List<String> commonDimOrder = getLongestSharedDimOrder(indexes); if (commonDimOrder == null) { return getLexicographicMergedDimensions(indexes); } else { return commonDimOrder; } }

Target:
public static List<String> getMergedDimensions(List<IndexableAdapter> indexes) { if (indexes.size() == 0) { return ImmutableList.of(); } List<String> commonDimOrder = getLongestSharedDimOrder(indexes); if (commonDimOrder == null) { log.warn("Indexes have incompatible dimension orders, using lexicographic order."); return getLexicographicMergedDimensions(indexes); } else { return commonDimOrder; } }
Source:
public int getExecutionIndex() { return 98; }

Target:
public int getExecutionIndex() { return 99; }
Source:
public synchronized void suggestManualTime(ManualTimeSuggestion suggestion) { final TimestampedValue<Long> newUtcTime = suggestion.getUtcTime(); TimestampedValue<Long> newTime = suggestion.getUtcTime(); long elapsedRealtimeMillis = mCallback.elapsedRealtimeMillis(); if (elapsedRealtimeMillis < newTime.getReferenceTimeMillis()) { Slog.w(LOG_TAG, "New reference time is in the future?" + " elapsedRealtimeMillis=" + elapsedRealtimeMillis + ", timeSuggestion=" + suggestion); return; } String cause = "Manual time suggestion received: suggestion=" + suggestion; setSystemClockIfRequired(ORIGIN_MANUAL, newUtcTime, cause); }

Target:
public synchronized void suggestManualTime(ManualTimeSuggestion suggestion) { final TimestampedValue<Long> newUtcTime = suggestion.getUtcTime(); long elapsedRealtimeMillis = mCallback.elapsedRealtimeMillis(); if (elapsedRealtimeMillis < newUtcTime.getReferenceTimeMillis()) { Slog.w(LOG_TAG, "New reference time is in the future? Ignoring." + " elapsedRealtimeMillis=" + elapsedRealtimeMillis + ", timeSuggestion=" + suggestion); return; } String cause = "Manual time suggestion received: suggestion=" + suggestion; setSystemClockIfRequired(ORIGIN_MANUAL, newUtcTime, cause); }
Source:
protected void executeCommand() { Cluster cluster = getCluster(); cluster.setArchitecture(getArchitecture()); setCpuFlags(); if (cluster.getBiosType() == null || cluster.getArchitecture() != ArchitectureType.undefined) { setDefaultBiosType(); } setDefaultSwitchTypeIfNeeded(); setDefaultFirewallTypeIfNeeded(); setDefaultLogMaxMemoryUsedThresholdIfNeeded(); checkMaxMemoryOverCommitValue(); cluster.setDetectEmulatedMachine(true); cluster.setMacPoolId(calculateMacPoolIdToUse()); clusterDao.save(cluster); if (getParameters().isCompensationEnabled()) { getContext().getCompensationContext().snapshotNewEntity(cluster); getContext().getCompensationContext().stateChanged(); } alertIfFencingDisabled(); if (getParameters().getCluster().getStoragePoolId() != null) { attachManagementNetwork(); } addDefaultCpuProfile(); if (CollectionUtils.isNotEmpty(cluster.getAddtionalFeaturesSupported())) { for (SupportedAdditionalClusterFeature feature : cluster.getAddtionalFeaturesSupported()) { feature.setClusterId(cluster.getId()); } clusterFeatureDao.saveAll(cluster.getAddtionalFeaturesSupported()); } setActionReturnValue(cluster.getId()); setSucceeded(true); }

Target:
protected void executeCommand() { Cluster cluster = getCluster(); cluster.setArchitecture(getArchitecture()); setCpuFlags(); if (cluster.getBiosType() == null) { cluster.setBiosType(BiosType.CLUSTER_DEFAULT); } if (cluster.getBiosType() == BiosType.CLUSTER_DEFAULT && cluster.getArchitecture() != ArchitectureType.undefined) { setDefaultBiosType(); } setDefaultSwitchTypeIfNeeded(); setDefaultFirewallTypeIfNeeded(); setDefaultLogMaxMemoryUsedThresholdIfNeeded(); checkMaxMemoryOverCommitValue(); cluster.setDetectEmulatedMachine(true); cluster.setMacPoolId(calculateMacPoolIdToUse()); clusterDao.save(cluster); if (getParameters().isCompensationEnabled()) { getContext().getCompensationContext().snapshotNewEntity(cluster); getContext().getCompensationContext().stateChanged(); } alertIfFencingDisabled(); if (getParameters().getCluster().getStoragePoolId() != null) { attachManagementNetwork(); } addDefaultCpuProfile(); if (CollectionUtils.isNotEmpty(cluster.getAddtionalFeaturesSupported())) { for (SupportedAdditionalClusterFeature feature : cluster.getAddtionalFeaturesSupported()) { feature.setClusterId(cluster.getId()); } clusterFeatureDao.saveAll(cluster.getAddtionalFeaturesSupported()); } setActionReturnValue(cluster.getId()); setSucceeded(true); }
Source:
public void testDescribe() throws Exception { ObjectId c1 = modify("aaa"); ObjectId c2 = modify("bbb"); tag("alice-t1"); ObjectId c3 = modify("ccc"); tag("bob-t2"); ObjectId c4 = modify("ddd"); assertNull(describe(c1)); assertNull(describe(c1, true)); assertEquals("alice-t1", describe(c2)); assertEquals("alice-t1", describe(c2, "alice*")); assertNull(describe(c2, "bob*")); assertEquals("bob-t2", describe(c3)); assertEquals("bob-t2-0-g44579eb", describe(c3, true)); assertEquals("alice-t1-1-g44579eb", describe(c3, "alice*")); assertEquals("bob-t2", describe(c3, "bob*")); assertNameStartsWith(c4, "3e563c5"); assertEquals("bob-t2-1-g3e563c5", describe(c4)); assertEquals("bob-t2-1-g3e563c5", describe(c4, true)); assertEquals("alice-t1-2-g3e563c5", describe(c4, "alice*")); assertEquals("bob-t2-1-g3e563c5", describe(c4, "bob*")); assertEquals("bob-t2-1-g3e563c5", git.describe().call()); }

Target:
public void testDescribe() throws Exception { ObjectId c1 = modify("aaa"); ObjectId c2 = modify("bbb"); tag("alice-t1"); ObjectId c3 = modify("ccc"); tag("bob-t2"); ObjectId c4 = modify("ddd"); assertNull(describe(c1)); assertNull(describe(c1, true)); assertNull(describe(c1, "a*", "b*", "c*")); assertEquals("alice-t1", describe(c2)); assertEquals("alice-t1", describe(c2, "alice*")); assertNull(describe(c2, "bob*")); assertNull(describe(c2, "?ob*")); assertEquals("alice-t1", describe(c2, "a*", "b*", "c*")); assertEquals("bob-t2", describe(c3)); assertEquals("bob-t2-0-g44579eb", describe(c3, true)); assertEquals("alice-t1-1-g44579eb", describe(c3, "alice*")); assertEquals("alice-t1-1-g44579eb", describe(c3, "a??c?-t*")); assertEquals("bob-t2", describe(c3, "bob*")); assertEquals("bob-t2", describe(c3, "?ob*")); assertEquals("bob-t2", describe(c3, "a*", "b*", "c*")); assertNameStartsWith(c4, "3e563c5"); assertEquals("bob-t2-1-g3e563c5", describe(c4)); assertEquals("bob-t2-1-g3e563c5", describe(c4, true)); assertEquals("alice-t1-2-g3e563c5", describe(c4, "alice*")); assertEquals("bob-t2-1-g3e563c5", describe(c4, "bob*")); assertEquals("bob-t2-1-g3e563c5", describe(c4, "a*", "b*", "c*")); assertEquals("bob-t2-1-g3e563c5", git.describe().call()); }
Source:
public ExtensionMailboxInfo(@Nonnull final IMAPResponse[] resps) throws ParsingException { super(resps); for (int i = 0; i < resps.length; i++) { if (resps[i] == null) { continue; } final IMAPResponse ir = resps[i]; ir.skipSpaces(); if (ir.readByte() != '[') { ir.reset(); continue; } String key = ir.readAtom(); if (key == null) { ir.reset(); continue; } key = key.toUpperCase(); if (key.equals(MAILBOX_ID)) { final String[] values = ir.readSimpleList(); if (values != null && values.length >= 1) { mailboxId = values[0]; resps[i] = null; break; } } else if (key.equals(NOMODSEQ)) { isNoModSeq = true; } ir.reset(); } }

Target:
public ExtensionMailboxInfo(@Nonnull final IMAPResponse[] resps) throws ParsingException { super(resps); for (int i = 0; i < resps.length; i++) { if (resps[i] == null) { continue; } final IMAPResponse ir = resps[i]; ir.skipSpaces(); if (ir.readByte() != '[') { ir.reset(); continue; } String key = ir.readAtom(); if (key == null) { ir.reset(); continue; } boolean handled = true; key = key.toUpperCase(); if (key.equals(MAILBOX_ID)) { final String[] values = ir.readSimpleList(); if (values != null && values.length >= 1) { mailboxId = values[0]; } else { handled = false; } } else if (key.equals(NOMODSEQ)) { isNoModSeq = true; } else { handled = false; } if (handled) { resps[i] = null; } else { ir.reset(); } } }
Source:
static IBinding[] getBindingsFromScope(ICPPScope scope, LookupData data) throws DOMException { IBinding[] bindings= scope.getBindings(data); if (scope instanceof ICPPASTInternalScope && scope instanceof ICPPClassScope) { final IASTName lookupName = data.getLookupName(); if (LookupData.checkWholeClassScope(lookupName)) { CPPASTTranslationUnit tu = data.getTranslationUnit(); if (tu != null && tu.isForContentAssist()) { IIndex index = tu.getIndex(); IASTNode node = ((IASTInternalScope) scope).getPhysicalNode(); if (index != null && node != null && node.contains(lookupName)) { IBinding indexBinding= index.adaptBinding(((ICPPClassScope) scope).getClassType()); if (indexBinding instanceof ICPPClassType) { IScope scopeInIndex= ((ICPPClassType) indexBinding).getCompositeScope(); bindings= ArrayUtil.addAll(bindings, scopeInIndex.getBindings(data)); } } } } } if (data.ignoreRecursionResolvingBindings()) { bindings = ArrayUtil.filter(bindings, new RecursionResolvingBindingFilter()); } if (data.usingNamespacesOnly) { bindings = ArrayUtil.filter(bindings, (argument) -> { return argument instanceof ICPPNamespace; }); } return expandUsingDeclarationsAndRemoveObjects(bindings, data); }

Target:
static IBinding[] getBindingsFromScope(ICPPScope scope, LookupData data) throws DOMException { IBinding[] bindings= scope.getBindings(data); if (scope instanceof ICPPASTInternalScope && scope instanceof ICPPClassScope) { final IASTName lookupName = data.getLookupName(); if (LookupData.checkWholeClassScope(lookupName)) { CPPASTTranslationUnit tu = data.getTranslationUnit(); if (tu != null && tu.isForContentAssist()) { IIndex index = tu.getIndex(); IASTNode node = ((IASTInternalScope) scope).getPhysicalNode(); if (index != null && node != null && node.contains(lookupName)) { IBinding indexBinding= index.adaptBinding(((ICPPClassScope) scope).getClassType()); if (indexBinding instanceof ICPPClassType) { IScope scopeInIndex= ((ICPPClassType) indexBinding).getCompositeScope(); bindings= ArrayUtil.addAll(bindings, scopeInIndex.getBindings(data)); } } } } } if (data.ignoreRecursionResolvingBindings()) { bindings = ArrayUtil.filter(bindings, new RecursionResolvingBindingFilter()); } if (data.namespacesOnly) { bindings = ArrayUtil.filter(bindings, (argument) -> { return argument instanceof ICPPNamespace; }); } return expandUsingDeclarationsAndRemoveObjects(bindings, data); }
Source:
public Matrix backPropagate(final Matrix input, final Matrix activation, final Matrix nextError) { if (layerError == null || !layerError.hasSameSize(input)) { layerError = matrixFactory.create(input.getRows(), input.getColumns()); } for (int n = 0; n < input.getColumns(); ++n) { final Matrix singleNextError = nextError.getColumn(n).reshape(outputShape[1] * outputShape[2], outputShape[0]); final Matrix row = singleNextError.mmul(getLayerParameter().getWeightParam().transpose()); final Matrix im = row2im(row); layerError.putColumn(n, im); } return layerError; }

Target:
public Matrix backPropagate(final Matrix input, final Matrix activation, final Matrix nextError) { final Matrix error = matrixFactory.create(input.getRows(), input.getColumns()); for (int n = 0; n < input.getColumns(); ++n) { final Matrix singleNextError = nextError.getColumn(n).reshape(outputShape[1] * outputShape[2], outputShape[0]); final Matrix row = singleNextError.mmult(getLayerParameter().getWeightParam()); final Matrix im = row2im(row); error.putColumn(n, im); } return error; }
Source:
public CompositeNotifyingFuture(List<NotifyingFuture<T>> futures) { this.futures = futures; this.remaining = new CountDownLatch(futures.size()); InternalListener internalListener = new InternalListener(); for (NotifyingFuture<T> future : futures) { if (!future.isDone()) { future.attachListener(internalListener); } else { internalListener.futureDone(future); } } }

Target:
public CompositeNotifyingFuture(List<NotifyingFuture<T>> futures) { this.futures = futures; this.remaining = new CountDownLatch(futures.size()); InternalListener internalListener = new InternalListener(); for (NotifyingFuture<T> future : futures) { future.attachListener(internalListener); } }
Source:
private void parseJpaCacheStore(XMLExtendedStreamReader reader, JpaStoreConfigurationBuilder builder, ClassLoader classLoader) throws XMLStreamException { for (int i = 0; i < reader.getAttributeCount(); i++) { ParseUtils.requireNoNamespaceAttribute(reader, i); String value = StringPropertyReplacer.replaceProperties(reader.getAttributeValue(i)); Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { case ENTITY_CLASS_NAME: { Class<?> clazz = Util.loadClass(value, classLoader); builder.entityClass(clazz); break; } case BATCH_SIZE: { builder.batchSize(Long.valueOf(value)); break; } case PERSISTENCE_UNIT_NAME: { builder.persistenceUnitName(value); break; } case STORE_METADATA: { builder.storeMetadata(Boolean.valueOf(value)); break; } default: { Parser.parseStoreAttribute(reader, i, builder); } } } while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) { Element element = Element.forName(reader.getLocalName()); Parser.parseStoreElement(reader, builder); } }

Target:
private void parseJpaCacheStore(XMLExtendedStreamReader reader, JpaStoreConfigurationBuilder builder, ClassLoader classLoader) throws XMLStreamException { for (int i = 0; i < reader.getAttributeCount(); i++) { ParseUtils.requireNoNamespaceAttribute(reader, i); String value = StringPropertyReplacer.replaceProperties(reader.getAttributeValue(i)); Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { case ENTITY_CLASS_NAME: { Class<?> clazz = Util.loadClass(value, classLoader); builder.entityClass(clazz); break; } case BATCH_SIZE: { builder.batchSize(Long.valueOf(value)); break; } case PERSISTENCE_UNIT_NAME: { builder.persistenceUnitName(value); break; } case STORE_METADATA: { builder.storeMetadata(Boolean.valueOf(value)); break; } default: { Parser.parseStoreAttribute(reader, i, builder); } } } while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) { Parser.parseStoreElement(reader, builder); } }
Source:
private void display(ResultSet rows) { final int width1 = 38; final int width2 = 12; final int width3 = 30; final int width4 = 21; String format = "%-" + width1 + "s" + "%-" + width2 + "s" + "%-" + width3 + "s" + "%-" + width4 + "s" + "%n"; System.out.printf(format, "sensor_id", "date", "timestamp", "value"); drawLine(width1, width2, width3, width4); for (Row row : rows) { System.out.printf( format, row.getUuid("sensor_id"), row.getLocalDate("date"), row.getInstant("timestamp"), row.getDouble("value")); } }

Target:
private void display(ResultSet rows) { final int width1 = 38; final int width2 = 12; final int width3 = 30; final int width4 = 21; String format = "%-" + width1 + "s%-" + width2 + "s%-" + width3 + "s%-" + width4 + "s%n"; System.out.printf(format, "sensor_id", "date", "timestamp", "value"); drawLine(width1, width2, width3, width4); for (Row row : rows) { System.out.printf( format, row.getUuid("sensor_id"), row.getLocalDate("date"), row.getInstant("timestamp"), row.getDouble("value")); } }
Source:
private void setUpSkipDialog() { Button skipForNowButton = (Button) findViewById(R.id.button_skip_for_now); skipForNowButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).edit() .putBoolean("SKIPPED", true) .apply(); AnalyticsTracker.getInstance(getApplicationContext()).trackEvent("Skipped account creation/login", loggedIn); Intent intent = new Intent(getApplicationContext(), MainActivity.class); startActivity(intent); } }); }

Target:
private void setUpSkipDialog() { Button skipForNowButton = (Button) findViewById(R.id.button_skip_for_now); skipForNowButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(getApplicationContext(), MainActivity.class); startActivity(intent); } }); }
Source:
public void validateViewPointModel() { URI createPlatformPluginURI = URI.createPlatformPluginURI(VIEWPOINT_MODEL_PATH, true); Resource resource = new ResourceSetImpl().getResource(createPlatformPluginURI, true); Diagnostic diagnostic = Diagnostician.INSTANCE.validate(resource.getContents().get(0)); Assert.assertEquals("The internalBlockDiagram.configuration model is not valid ", Diagnostic.OK, diagnostic.getSeverity()); }

Target:
public void validateViewPointModel() { URI createPlatformPluginURI = URI.createPlatformPluginURI(VIEWPOINT_MODEL_PATH, true); Resource resource = new ResourceSetImpl().getResource(createPlatformPluginURI, true); Diagnostic diagnostic = Diagnostician.INSTANCE.validate(resource.getContents().get(0)); Assert.assertEquals("The parametricDiagram.configuration viewpoint model is not valid ", Diagnostic.OK, diagnostic.getSeverity()); }
Source:
public String toString() { return "ConfigurableSslSocketFactory{delegate=" + delegate + '}'; }

Target:
public String toString() { return "KeepAliveSslSocketFactory{delegate=" + delegate + '}'; }
Source:
@Test public void privateConstructorsFail() { class Test { @Inject private Test() { } } @Module(entryPoints = Test.class) class TestModule { } try { ObjectGraph.create(new TestModule()).get(Test.class); } catch (IllegalStateException e) { assertThat(e.getMessage()).contains("Can't inject private constructor: "); } }

Target:
@Test public void privateConstructorsFail() { class Test { @Inject private Test() { } } @Module(entryPoints = Test.class) class TestModule { } try { ObjectGraph.create(new TestModule()).get(Test.class); fail(); } catch (IllegalStateException e) { assertThat(e.getMessage()).contains("Can't inject private constructor: "); } }
Source:
private void write(String line) throws InterruptedException { int currentRetry = 0; while (currentRetry < MAX_RETRIES) { try { writer.write(line.getBytes(StandardCharsets.UTF_8)); break; } catch (IOException e) { currentRetry++; if (currentRetry < MAX_RETRIES) { LOG.warn("failed to write data with maxRetries due to", currentRetry, e); } else { LOG.error("failed to write data with maxRetries due to", currentRetry, e); } Thread.sleep(100 * currentRetry * currentRetry); writer = openWriterAppendMode(); } } }

Target:
private void write(String line) throws InterruptedException { int currentRetry = 0; while (currentRetry < MAX_RETRIES) { try { writer.write(line.getBytes(StandardCharsets.UTF_8)); break; } catch (IOException e) { currentRetry++; if (currentRetry < MAX_RETRIES) { LOG.warn("failed to write data with maxRetries due to", currentRetry, e); } else { LOG.error("failed to write data with maxRetries due to", currentRetry, e); throw new RuntimeException("failed to write data", e); } Thread.sleep(100 * currentRetry * currentRetry); writer = openWriterAppendMode(); } } }
Source:
private String getName0() { String name = uri.getPath(); name = name.substring(name.lastIndexOf("/") + 1); return name.replaceAll("\\W", ""); }

Target:
private String getName0() { String name = this.uri.getPath(); name = name.substring(name.lastIndexOf("/") + 1); return name.replaceAll("\\W", ""); }
Source:
public List<PMMLMiningField> getMiningFields() { List<PMMLMiningField> fields = super.getMiningFields(); for (PMMLMiningField field : fields) { String type = field.getType(); if (type == null || type.trim().isEmpty()) { fields.remove(field); } } if (this.segmentation != null) { segmentation.getMiningSegments().forEach(ms -> { PMML4Model model = ms.getModel(); List<PMMLMiningField> innerFields = model.getMiningFields(); innerFields.stream().filter(fld -> !fields.contains(fld)).forEach(fld -> {fields.add(fld);}); }); } return fields; }

Target:
public List<PMMLMiningField> getMiningFields() { List<PMMLMiningField> fields = super.getMiningFields(); for (PMMLMiningField field : fields) { String type = field.getType(); if (type == null || type.trim().isEmpty()) { fields.remove(field); } } if (this.segmentation != null) { segmentation.getMiningSegments().stream() .flatMap(ms -> ms.getModel().getMiningFields().stream() ) .filter(fld -> !fields.contains(fld)) .forEach(fields::add); } return fields; }
Source:
@Test public void deleteBuildsShouldSuccessEvenTheBuildIsRunning() throws Exception { FreeStyleProject project = j.createFreeStyleProject("aProject"); project.getBuildersList().add(new Shell("echo 1\nsleep 10s")); assertThat("Job wasn't scheduled properly", project.scheduleBuild(0), equalTo(true)); while(!project.isBuilding()) { System.out.println("Waiting for build to start and sleep 1s..."); Thread.sleep(1000); } if(!project.getBuildByNumber(1).getLog().contains("echo 1")) { Thread.sleep(1000); } final CLICommandInvoker.Result result = command .authorizedTo(Jenkins.READ, Job.READ, Run.DELETE) .invokeWithArgs("aProject", "1"); assertThat(result, succeeded()); assertThat(result.stdout(), containsString("Deleted 1 builds")); assertThat(((FreeStyleProject) j.jenkins.getItem("aProject")).getBuilds().size(), equalTo(0)); assertThat(project.isBuilding(), equalTo(false)); }

Target:
@Test public void deleteBuildsShouldSuccessEvenTheBuildIsRunning() throws Exception { FreeStyleProject project = j.createFreeStyleProject("aProject"); ExecutorTest.startBlockingBuild(project); assertThat(((FreeStyleProject) j.jenkins.getItem("aProject")).getBuilds(), hasSize(1)); final CLICommandInvoker.Result result = command .authorizedTo(Jenkins.READ, Job.READ, Run.DELETE) .invokeWithArgs("aProject", "1"); assertThat(result, succeeded()); assertThat(result.stdout(), containsString("Deleted 1 builds")); assertThat(((FreeStyleProject) j.jenkins.getItem("aProject")).getBuilds(), hasSize(0)); assertThat(project.isBuilding(), equalTo(false)); }
Source:
public void testAllFlagsReverseOrder() { int flagAsInteger = 0; for (final SAMFlag samFlag : SAMFlag.values()) { flagAsInteger |= samFlag.flag; } final String flagAsString = new StringBuilder("urURpP12sSqd").reverse().toString(); Assert.assertEquals(flagAsInteger, SamFlagField.STRING.parse(flagAsString)); }

Target:
public void testAllFlagsReverseOrder() { int flagAsInteger = 0; for (final SAMFlag samFlag : SAMFlag.values()) { flagAsInteger |= samFlag.flag; } final String flagAsString = new StringBuilder("urURpP12sSxd").reverse().toString(); Assert.assertEquals(flagAsInteger, SamFlagField.STRING.parse(flagAsString)); Assert.assertEquals(SamFlagField.STRING.parse(flagAsString), flagAsInteger); }
Source:
public static Map<String, String> getLabelNameMap(String filePath) { Map<String, String> labelNameMap = new HashMap<>(); try { BufferedReader reader = new BufferedReader(new FileReader(filePath)); String line; while ((line = reader.readLine()) != null) { if (line.isEmpty()) continue; String[] tokens = line.split("\t", 2); String labelId = tokens[0].trim(); String labelName = tokens[1].trim(); labelNameMap.put(labelId, labelName); } reader.close(); } catch (Exception e) { e.printStackTrace(); } return labelNameMap; }

Target:
static Map<String, String> getLabelNameMap(String filePath) { Map<String, String> labelNameMap = new HashMap<>(); try(BufferedReader reader = new BufferedReader(new FileReader(filePath))) { String line; while ((line = reader.readLine()) != null) { if (line.isEmpty()) continue; String[] tokens = line.split("\t", 2); String labelId = tokens[0].trim(); String labelName = tokens[1].trim(); labelNameMap.put(labelId, labelName); } } catch (IOException e) { e.printStackTrace(); logger.error("IO Error while reading the file at " + filePath); throw new RuntimeException("IO Error while reading the file at " + filePath); } return labelNameMap; }
Source:
public String getName() { return "PROCESS DEFINTIONS"; }

Target:
public String getName() { return TYPE_NAME; }
Source:
public Fragment getFragment(final Context context) { if (playlistType == LocalItemType.PLAYLIST_LOCAL_ITEM) { return LocalPlaylistFragment.getInstance(playlistId, playlistName == null ? "" : playlistName); } else { return PlaylistFragment.getInstance(playlistServiceId, playlistUrl, playlistName == null ? "" : playlistName); } }

Target:
public Fragment getFragment(final Context context) { if (playlistType == LocalItemType.PLAYLIST_LOCAL_ITEM) { return LocalPlaylistFragment.getInstance(playlistId, playlistName); } else { return PlaylistFragment.getInstance(playlistServiceId, playlistUrl, playlistName); } }
Source:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); fromManager = getIntent().getBooleanExtra(AppManagerActivity.KEY_LAUNCH_FROM_MANAGER, false); if (!checkForMultipleAppsViolation()) { loadIntentAndInstanceState(savedInstanceState); persistCommCareAppState(); if (isSingleAppBuild()) { uiState = UiState.BLANK; } boolean askingForPerms = Permissions.acquireAllAppPermissions(this, this, Permissions.ALL_PERMISSIONS_REQUEST); if (!askingForPerms) { if (isSingleAppBuild()) { SingleAppInstallation.installSingleApp(this, DIALOG_INSTALL_PROGRESS); } else { performSMSInstall(false); } } } }

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); fromManager = getIntent().getBooleanExtra(AppManagerActivity.KEY_LAUNCH_FROM_MANAGER, false); if (checkForMultipleAppsViolation()) { return; } loadIntentAndInstanceState(savedInstanceState); persistCommCareAppState(); if (isSingleAppBuild()) { uiState = UiState.BLANK; } boolean askingForPerms = Permissions.acquireAllAppPermissions(this, this, Permissions.ALL_PERMISSIONS_REQUEST); if (!askingForPerms) { if (isSingleAppBuild()) { SingleAppInstallation.installSingleApp(this, DIALOG_INSTALL_PROGRESS); } else { performSMSInstall(false); } } }
Source:
public void before() { final String safeTestName = safeUniqueTestName(getClass(), testName); inputTopicName = "input-topic-" + safeTestName; outputTopicName = "output-topic-" + safeTestName; stateStoreName = "lagfetch-test-store" + safeTestName; streamsConfiguration = new Properties(); streamsConfiguration.put(StreamsConfig.APPLICATION_ID_CONFIG, "app-" + safeTestName); streamsConfiguration.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, CLUSTER.bootstrapServers()); streamsConfiguration.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"); streamsConfiguration.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass()); streamsConfiguration.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass()); streamsConfiguration.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, 100); consumerConfiguration = new Properties(); consumerConfiguration.setProperty(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, CLUSTER.bootstrapServers()); consumerConfiguration.setProperty(ConsumerConfig.GROUP_ID_CONFIG, safeTestName + "-consumer"); consumerConfiguration.setProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"); consumerConfiguration.setProperty(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class.getName()); consumerConfiguration.setProperty(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, LongDeserializer.class.getName()); }

Target:
public void before() { final String safeTestName = safeUniqueTestName(getClass(), testName); inputTopicName = "input-topic-" + safeTestName; outputTopicName = "output-topic-" + safeTestName; stateStoreName = "lagfetch-test-store" + safeTestName; streamsConfiguration = new Properties(); streamsConfiguration.put(StreamsConfig.APPLICATION_ID_CONFIG, "app-" + safeTestName); streamsConfiguration.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, CLUSTER.bootstrapServers()); streamsConfiguration.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"); streamsConfiguration.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass()); streamsConfiguration.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass()); streamsConfiguration.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, 100); consumerConfiguration = new Properties(); consumerConfiguration.setProperty(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, CLUSTER.bootstrapServers()); consumerConfiguration.setProperty(ConsumerConfig.GROUP_ID_CONFIG, "group-" + safeTestName); consumerConfiguration.setProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"); consumerConfiguration.setProperty(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class.getName()); consumerConfiguration.setProperty(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, LongDeserializer.class.getName()); }
Source:
public void testParseField_sequence_value() { Definition fieldDef = fixture.lookupDefinition(SEQ); CtfTmfEventField result = CtfTmfEventField.parseField(fieldDef, NAME); long[] values = (long[]) result.getValue(); assertEquals(2, values.length); assertEquals(2, values[0]); assertEquals(2, values[1]); }

Target:
public void testParseField_sequence_value() { Definition fieldDef = fixture.lookupDefinition(SEQ); CtfTmfEventField result = CtfTmfEventField.parseField(fieldDef, NAME); long[] values = (long[]) result.getValue(); long[] expected = new long[] { 2, 2 }; assertArrayEquals(expected, values); }
Source:
private void setLevel(Level level) { networkInterceptor.level(level); applicationInterceptor.level(level); }

Target:
private void setLevel(Level level) { networkInterceptor.setLevel(level); applicationInterceptor.setLevel(level); }
Source:
private boolean executeWithoutTransaction() { boolean functionReturnValue = false; boolean exceptionOccurred = true; try { logRunningCommand(); if (hasTaskHandlers()) { getCurrentTaskHandler().execute(); } else { executeCommand(); } functionReturnValue = getSucceeded(); exceptionOccurred = false; } catch (VdcBLLException e) { log.error(String.format("Command %1$s throw Vdc Bll exception. With error message %2$s", getClass().getName(), e.getMessage())); if (log.isDebugEnabled()) { log.debug(String.format("Command %1$s throw Vdc Bll exception", getClass().getName()), e); } processExceptionToClient(new VdcFault(e, e.getVdsError().getCode())); } catch (RuntimeException e) { processExceptionToClient(new VdcFault(e, VdcBllErrors.ENGINE)); log.error(String.format("Command %1$s throw exception", getClass().getName()), e); } finally { if (exceptionOccurred) { clearChildAsyncTasksWithOutVdsmId(); } if (exceptionOccurred || !getSucceeded()) { setCommandStatus(CommandStatus.FAILED); setSucceeded(false); compensate(); } else { cleanUpCompensationData(); } } return functionReturnValue; }

Target:
private boolean executeWithoutTransaction() { boolean functionReturnValue = false; boolean exceptionOccurred = true; try { logRunningCommand(); if (hasTaskHandlers()) { getCurrentTaskHandler().execute(); } else { executeCommand(); } functionReturnValue = getSucceeded(); exceptionOccurred = false; } catch (VdcBLLException e) { log.error(String.format("Command %1$s throw Vdc Bll exception. With error message %2$s", getClass().getName(), e.getMessage())); if (log.isDebugEnabled()) { log.debug(String.format("Command %1$s throw Vdc Bll exception", getClass().getName()), e); } processExceptionToClient(new VdcFault(e, e.getVdsError().getCode())); } catch (RuntimeException e) { processExceptionToClient(new VdcFault(e, VdcBllErrors.ENGINE)); log.error(String.format("Command %1$s throw exception", getClass().getName()), e); } finally { if (exceptionOccurred || !getSucceeded()) { clearChildAsyncTasksWithOutVdsmId(); setCommandStatus(CommandStatus.FAILED); setSucceeded(false); compensate(); } else { cleanUpCompensationData(); } } return functionReturnValue; }
Source:
private static PasswordAuthentication getSystemCreds( final AuthScope authscope, final Authenticator.RequestorType requestorType, final HttpContext context) { final String hostname = authscope.getHost(); final int port = authscope.getPort(); final HttpHost origin = authscope.getOrigin(); final String protocol = origin != null ? origin.getSchemeName() : (port == 443 ? "https" : "http"); final URL targetHostURL; if (context != null) { final HttpUriRequest httpUriRequest = (HttpUriRequest) context.getAttribute(HttpCoreContext.HTTP_REQUEST); try { targetHostURL = httpUriRequest.getURI().toURL(); } catch (final MalformedURLException e) { throw new IllegalStateException("Unexpected request url format: " + httpUriRequest, e); } } else { targetHostURL = null; } return Authenticator.requestPasswordAuthentication( hostname, null, port, protocol, authscope.getRealm(), translateScheme(authscope.getScheme()), targetHostURL, requestorType); }

Target:
private static PasswordAuthentication getSystemCreds( final AuthScope authscope, final Authenticator.RequestorType requestorType, final HttpContext context) { final String hostname = authscope.getHost(); final int port = authscope.getPort(); final HttpHost origin = authscope.getOrigin(); final String protocol = origin != null ? origin.getSchemeName() : (port == 443 ? "https" : "http"); final URL targetHostURL = getTargetHostURL(context); return Authenticator.requestPasswordAuthentication( hostname, null, port, protocol, authscope.getRealm(), translateScheme(authscope.getScheme()), targetHostURL, requestorType); }
Source:
public RenderPipelineTask generateTask() { if (enabled) { return new SetWireframeTask(ENABLED); } else { return new SetWireframeTask(DISABLED); } }

Target:
public RenderPipelineTask generateTask() { if (enabled) { if (enablingTask == null) { enablingTask = new SetWireframeTask(true); } return enablingTask; } else { if (disablingTask == null) { disablingTask = new SetWireframeTask(false); } return enablingTask; } }
Source:
private void checkDRepresentationDescriptor(DAnalysis dAnalysis) { List<DRepresentation> repList = dAnalysis.eResource().getContents().stream().filter(DRepresentation.class::isInstance).map(DRepresentation.class::cast).collect(Collectors.toList()); dAnalysis.getOwnedViews().stream().flatMap(v -> v.getOwnedRepresentationDescriptors().stream()) .forEachOrdered(repDesc -> { DRepresentation representation = repDesc.getRepresentation(); assertNotNull("DRepresentationDescriptor.representation is null", representation); assertTrue("The DRepresentation " + representation + " is not found as root object.", repList.contains(representation)); assertEquals("The representation documentation has not been migrated.","todo",repDesc.getDocumentation()); assertTrue("The representation name has not been migrated.",repDesc.getName()!=null && !repDesc.getName().isEmpty()); }); }

Target:
private void checkDRepresentationDescriptor(DAnalysis dAnalysis) { List<DRepresentation> repList = dAnalysis.eResource().getContents().stream().filter(DRepresentation.class::isInstance).map(DRepresentation.class::cast).collect(Collectors.toList()); dAnalysis.getOwnedViews().stream().flatMap(v -> v.getOwnedRepresentationDescriptors().stream()) .forEachOrdered(repDesc -> { DRepresentation representation = repDesc.getRepresentation(); assertNotNull("DRepresentationDescriptor.representation is null", representation); assertTrue("The DRepresentation " + representation + " is not found as root object.", repList.contains(representation)); assertEquals("The representation documentation has not been migrated.","todo",repDesc.getDocumentation()); assertTrue("The representation name has not been migrated.",!StringUtil.isEmpty(repDesc.getName())); }); }
Source:
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { int numChunks = 0; for (World world : server.getWorlds()) { numChunks += unloadUnusedChunks(world); } TFM_Util.adminAction(sender.getName(), "Unloading unused chunks", true); if (!senderIsConsole) { sender_p.sendMessage(numChunks + " chunks unloaded."); } TFM_Log.info(numChunks + " chunks unloaded."); return true; }

Target:
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { TFM_Util.adminAction(sender.getName(), "Unloading unused chunks", true); int numChunks = 0; for (World world : server.getWorlds()) { numChunks += unloadUnusedChunks(world); } if (!senderIsConsole) { sender_p.sendMessage(numChunks + " chunks unloaded."); } TFM_Log.info(numChunks + " chunks unloaded."); return true; }