auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private Map<String, Map<String, RuntimeAndCompileTimeVersions>> getRuntimeInfo() { Map<String, RuntimeAndCompileTimeVersions> coreDeps = fetchDependenciesFromFile( this.getClass().getResourceAsStream("/com/datastax/dse/driver/internal/deps.txt")); Map<String, RuntimeAndCompileTimeVersions> queryBuilderDeps = fetchDependenciesFromFile( this.getClass() .getResourceAsStream("/com/datastax/dse/driver/internal/querybuilder/deps.txt")); Map<String, RuntimeAndCompileTimeVersions> mapperProcessorDeps = fetchDependenciesFromFile( this.getClass() .getResourceAsStream( "/com/datastax/oss/driver/internal/mapper/processor/deps.txt")); Map<String, RuntimeAndCompileTimeVersions> mapperRuntimeDeps = fetchDependenciesFromFile( this.getClass() .getResourceAsStream("/com/datastax/oss/driver/internal/mapper/deps.txt")); Map<String, Map<String, RuntimeAndCompileTimeVersions>> runtimeDependencies = new LinkedHashMap<>(); putIfNonEmpty(coreDeps, runtimeDependencies, "core"); putIfNonEmpty(queryBuilderDeps, runtimeDependencies, "query-builder"); putIfNonEmpty(mapperProcessorDeps, runtimeDependencies, "mapper-processor"); putIfNonEmpty(mapperRuntimeDeps, runtimeDependencies, "mapper-runtime"); addJavaVersion(runtimeDependencies); return runtimeDependencies; }

Target:
private Map<String, Map<String, RuntimeAndCompileTimeVersions>> getRuntimeInfo() { Map<String, RuntimeAndCompileTimeVersions> coreDeps = fetchDependenciesFromFile( this.getClass().getResourceAsStream("/com/datastax/dse/driver/internal/deps.txt")); Map<String, RuntimeAndCompileTimeVersions> queryBuilderDeps = fetchDependenciesFromFile( this.getClass() .getResourceAsStream("/com/datastax/dse/driver/internal/querybuilder/deps.txt")); Map<String, RuntimeAndCompileTimeVersions> mapperProcessorDeps = fetchDependenciesFromFile( this.getClass() .getResourceAsStream( "/com/datastax/dse/driver/internal/mapper/processor/deps.txt")); Map<String, RuntimeAndCompileTimeVersions> mapperRuntimeDeps = fetchDependenciesFromFile( this.getClass() .getResourceAsStream("/com/datastax/dse/driver/internal/mapper/deps.txt")); Map<String, Map<String, RuntimeAndCompileTimeVersions>> runtimeDependencies = new LinkedHashMap<>(); putIfNonEmpty(coreDeps, runtimeDependencies, "core"); putIfNonEmpty(queryBuilderDeps, runtimeDependencies, "query-builder"); putIfNonEmpty(mapperProcessorDeps, runtimeDependencies, "mapper-processor"); putIfNonEmpty(mapperRuntimeDeps, runtimeDependencies, "mapper-runtime"); addJavaVersion(runtimeDependencies); return runtimeDependencies; }
Source:
public final Subscription subscribe(final Action0 onComplete) { requireNonNull(onComplete); final MultipleAssignmentSubscription mad = new MultipleAssignmentSubscription(); subscribe(new CompletableSubscriber() { @Override public void onCompleted() { mad.unsubscribe(); try { onComplete.call(); } catch (Throwable e) { ERROR_HANDLER.handleError(e); } } @Override public void onError(Throwable e) { mad.unsubscribe(); ERROR_HANDLER.handleError(e); } @Override public void onSubscribe(Subscription d) { mad.set(d); } }); return mad; }

Target:
public final Subscription subscribe(final Action0 onComplete) { requireNonNull(onComplete); final MultipleAssignmentSubscription mad = new MultipleAssignmentSubscription(); subscribe(new CompletableSubscriber() { @Override public void onCompleted() { try { onComplete.call(); } catch (Throwable e) { ERROR_HANDLER.handleError(e); } mad.unsubscribe(); } @Override public void onError(Throwable e) { ERROR_HANDLER.handleError(e); mad.unsubscribe(); } @Override public void onSubscribe(Subscription d) { mad.set(d); } }); return mad; }
Source:
private static okhttp3.RequestBody toOkHttpRequestBody(Flux<ByteBuffer> bbFlux, HttpHeaders headers) { okio.ByteString byteString = okio.ByteString.EMPTY; if (bbFlux != null) { byteString = aggregate(bbFlux).block(); } String contentType = headers.value("Content-Type"); if (contentType == null) { return okhttp3.RequestBody.create(byteString, MEDIA_TYPE_OCTET_STREAM); } else { return okhttp3.RequestBody.create(byteString, okhttp3.MediaType.parse(contentType)); } }

Target:
private static Mono<okhttp3.RequestBody> toOkHttpRequestBody(Flux<ByteBuffer> bbFlux, HttpHeaders headers) { Mono<okio.ByteString> bsMono = bbFlux == null ? EMPTY_BYTE_STRING_MONO : aggregate(bbFlux); return bsMono.map(byteString1 -> { String contentType = headers.value("Content-Type"); if (contentType == null) { return RequestBody.create(byteString1, MEDIA_TYPE_OCTET_STREAM); } else { return RequestBody.create(byteString1, okhttp3.MediaType.parse(contentType)); } }); }
Source:
public void start() { if (started) { LOG.warn("Skipping attempt to start an already started ContainerHeartbeatMonitor."); return; } LOG.info("Starting ContainerHeartbeatMonitor"); scheduler.scheduleAtFixedRate(() -> { ContainerHeartbeatResponse response = containerHeartbeatClient.requestHeartbeat(); if (!response.isAlive()) { if (isApplicationMasterHighAvailabilityEnabled) { LOG.warn("Failed to establish connection with {}. Checking for new AM", coordinatorUrl); try { if (checkAndEstablishConnectionWithNewAM()) { return; } } catch (Exception e) { LOG.warn("Exception trying to connect with new AM", e); throw new SamzaException(e); } } scheduler.schedule(() -> { LOG.error("Graceful shutdown timeout expired. Force exiting."); ThreadUtil.logThreadDump("Thread dump at heartbeat monitor shutdown timeout."); System.exit(1); }, SHUTDOWN_TIMOUT_MS, TimeUnit.MILLISECONDS); onContainerExpired.run(); } }, 0, SCHEDULE_MS, TimeUnit.MILLISECONDS); started = true; }

Target:
public void start() { if (started) { LOG.warn("Skipping attempt to start an already started ContainerHeartbeatMonitor."); return; } LOG.info("Starting ContainerHeartbeatMonitor"); scheduler.scheduleAtFixedRate(() -> { ContainerHeartbeatResponse response = containerHeartbeatClient.requestHeartbeat(); if (!response.isAlive()) { if (isApplicationMasterHighAvailabilityEnabled) { LOG.warn("Failed to establish connection with {}. Checking for new AM", coordinatorUrl); try { if (checkAndEstablishConnectionWithNewAM()) { return; } } catch (Exception e) { LOG.error("Exception trying to connect with new AM", e); forceExit("failure in establishing cconnection with new AM", 0); return; } } forceExit("Graceful shutdown timeout expired. Force exiting.", SHUTDOWN_TIMOUT_MS); } }, 0, SCHEDULE_MS, TimeUnit.MILLISECONDS); started = true; }
Source:
public void adjustThreadNum(final int threadNum) { final int currentThreadNum = eventProcessors.size(); if (currentThreadNum <= threadNum) { addNewThreadsToSet(threadNum - currentThreadNum); } else if (currentThreadNum > threadNum) { final Set<EventProcessor> processorsToBeClosed = new HashSet<>(); for (final EventProcessor eventProcessor : eventProcessors) { processorsToBeClosed.add(eventProcessor); eventProcessor.close(); if (processorsToBeClosed.size() >= currentThreadNum - threadNum) { break; } } processorsToBeClosed.forEach(eventProcessor -> eventProcessors.remove(eventProcessor)); } }

Target:
public void adjustThreadNum(final int threadNum) { final int currentThreadNum = eventProcessors.size(); if (currentThreadNum <= threadNum) { addNewThreadsToSet(threadNum - currentThreadNum); } else if (currentThreadNum > threadNum) { int closedProcessorNum = 0; final Iterator<EventProcessor> iterator = eventProcessors.iterator(); while(iterator.hasNext()) { final EventProcessor eventProcessor = iterator.next(); eventProcessor.close(); iterator.remove(); closedProcessorNum++; if (closedProcessorNum >= currentThreadNum - threadNum) { break; } } } }
Source:
private boolean isBackupContainsRawDisksOnly() { return getParameters().getVmBackup() .getDisks() .stream() .filter(DiskImage::isQcowFormat) .findFirst() .orElse(null) == null; }

Target:
private boolean isBackupContainsRawDisksOnly() { return getParameters().getVmBackup() .getDisks() .stream() .noneMatch(DiskImage::isQcowFormat); }
Source:
private static Map<String, String> asMap(final KeyValueStore<String, String> store) { final HashMap<String, String> result = new HashMap<>(); store.all().forEachRemaining(kv -> { System.out.println(kv); result.put(kv.key, kv.value); }); return result; }

Target:
private static Map<String, String> asMap(final KeyValueStore<String, String> store) { final HashMap<String, String> result = new HashMap<>(); store.all().forEachRemaining(kv -> result.put(kv.key, kv.value)); return result; }
Source:
public Map<String, String> entityPrefixes() { return Collections.singletonMap("wd", entity); }

Target:
public Map<String, String> entityPrefixes() { return Collections.singletonMap(ENTITY_PREFIX, entity); }
Source:
protected TMIterator(TransactionMap<K,?> transactionMap, K from, K to, boolean includeAllUncommitted) { this.transactionMap = transactionMap; TransactionStore store = transactionMap.transaction.store; MVMap<K, VersionedValue> map = transactionMap.map; BitSet committingTransactions; MVMap.RootReference mapRootReference; do { committingTransactions = store.committingTransactions.get(); mapRootReference = map.getRoot(); } while (committingTransactions != store.committingTransactions.get()); this.cursor = new Cursor<>(mapRootReference.root, from, to); this.includeAllUncommitted = includeAllUncommitted; this.committingTransactions = committingTransactions; }

Target:
protected TMIterator(TransactionMap<K,?> transactionMap, K from, K to, boolean includeAllUncommitted) { this.transactionMap = transactionMap; TransactionStore store = transactionMap.transaction.store; MVMap<K, VersionedValue> map = transactionMap.map; BitSet committingTransactions; MVMap.RootReference mapRootReference; do { committingTransactions = store.committingTransactions.get(); mapRootReference = map.getRoot(); } while (committingTransactions != store.committingTransactions.get()); this.cursor = new Cursor<>(mapRootReference.root, from, to); this.committingTransactions = committingTransactions; this.includeAllUncommitted = includeAllUncommitted; }
Source:
public GerritSystemInfo getInfo(IProgressMonitor monitor) throws GerritException { checkSupportedVersion(monitor); List<ContributorAgreement> contributorAgreements = null; Account account = null; if (!isAnonymous()) { account = execute(monitor, new Operation<Account>() { @Override public void execute(IProgressMonitor monitor) throws GerritException { getAccountService().myAccount(this); } }); } else { executeQuery(monitor, "status:open"); } refreshConfigOnce(monitor); return new GerritSystemInfo(contributorAgreements, account); }

Target:
public GerritSystemInfo getInfo(IProgressMonitor monitor) throws GerritException { Version version = getCachedVersion(monitor); List<ContributorAgreement> contributorAgreements = null; Account account = null; if (!isAnonymous()) { account = execute(monitor, new Operation<Account>() { @Override public void execute(IProgressMonitor monitor) throws GerritException { getAccountService().myAccount(this); } }); } else { executeQuery(monitor, "status:open"); } refreshConfigOnce(monitor); return new GerritSystemInfo(version, contributorAgreements, account); }
Source:
public Task createTask(long id, String type, String action, TaskId parentTaskId, Map<String, String> headers) { return new CancellableTask(id, type, action, toString(), parentTaskId, headers) { @Override public boolean shouldCancelChildrenOnCancellation() { return false; } @Override public String getDescription() { return "waitForCompletionTimeout[" + waitForCompletionTimeout + "], keepOnCompletion[" + keepOnCompletion + "] keepAlive[" + keepAlive + "], request=" + request.getDescription(); } }; }

Target:
public Task createTask(long id, String type, String action, TaskId parentTaskId, Map<String, String> headers) { return new CancellableTask(id, type, action, null, parentTaskId, headers) { @Override public boolean shouldCancelChildrenOnCancellation() { return false; } @Override public String getDescription() { return "waitForCompletionTimeout[" + waitForCompletionTimeout + "], keepOnCompletion[" + keepOnCompletion + "] keepAlive[" + keepAlive + "], request=" + request.buildDescription(); } }; }
Source:
public Concept hydrate(String s) { try { return Context.getConceptService().getConcept(Integer.valueOf(s)); } catch (Exception e) { logger.error("Error", e); } return null; }

Target:
public Concept hydrate(String s) { try { return Context.getConceptService().getConcept(Integer.valueOf(s)); } catch (Exception e) { log.error("Error", e); } return null; }
Source:
public void testThrowParseExceptions(){ InputRow in = new MapBasedInputRow( timestamp, dims, event ); AggregatorFactory[] aggregatorFactories = new AggregatorFactory[] { new DoubleSumAggregatorFactory("agg_non_existing", "agg_non_existing_in"), new DoubleSumAggregatorFactory("m1out", "m1"), new LongSumAggregatorFactory("m2out", "m2"), new HyperUniquesAggregatorFactory("m3out", "m3"), new LongSumAggregatorFactory("unparseable", "m3") }; try { InputRowSerde.toBytes(in, aggregatorFactories, true); Assert.fail("Should have thrown parseException"); } catch (ParseException e){ } }

Target:
public void testThrowParseExceptions() { InputRow in = new MapBasedInputRow( timestamp, dims, event ); AggregatorFactory[] aggregatorFactories = new AggregatorFactory[]{ new DoubleSumAggregatorFactory("agg_non_existing", "agg_non_existing_in"), new DoubleSumAggregatorFactory("m1out", "m1"), new LongSumAggregatorFactory("m2out", "m2"), new HyperUniquesAggregatorFactory("m3out", "m3"), new LongSumAggregatorFactory("unparseable", "m3") }; InputRowSerde.toBytes(in, aggregatorFactories, true); }
Source:
protected File generateFiles(final Study study, final DatasetDTO dataSetDto, final Map<Integer, StudyInstance> selectedDatasetInstancesMap, final Map<Integer, List<ObservationUnitRow>> observationUnitRowMap, final List<MeasurementVariable> columns, final DatasetFileGenerator generator, final String fileExtension) throws IOException { final List<File> files = new ArrayList<>(); final File temporaryFolder = Files.createTempDir(); for(final Integer instanceDBID: observationUnitRowMap.keySet()) { final String sanitizedFileName = FileUtils.sanitizeFileName(String .format( "%s_%s_%s_%s." + fileExtension, study.getName() + "-" + selectedDatasetInstancesMap.get(instanceDBID).getInstanceNumber(), selectedDatasetInstancesMap.get(instanceDBID).getLocationAbbreviation(), DataSetType.findById(dataSetDto.getDatasetTypeId()).getReadableName(), dataSetDto.getName())); final String fileNameFullPath = temporaryFolder.getAbsolutePath() + File.separator + sanitizedFileName; files.add( generator.generateSingleInstanceFile(study.getId(), dataSetDto, columns, observationUnitRowMap.get(instanceDBID), fileNameFullPath)); } if(this instanceof DatasetKSUCSVExportServiceImpl || this instanceof DatasetKSUExcelExportServiceImpl) { final String sanitizedTraitsAndSelectionFilename = FileUtils.sanitizeFileName(String .format( "%s_%s_%s.trt", study.getName(), DataSetType.findById(dataSetDto.getDatasetTypeId()).getReadableName(), dataSetDto.getName())); final String traitsAndSelectionFilename = temporaryFolder.getAbsolutePath() + File.separator + sanitizedTraitsAndSelectionFilename; final List<MeasurementVariable> traitAndSelectionVariables = this.getTraitAndSelectionVariables(dataSetDto.getDatasetId()); files.add( generator.generateTraitAndSelectionVariablesFile(this.convertTraitAndSelectionVariablesData(traitAndSelectionVariables), traitsAndSelectionFilename)); } if (files.size() == 1) { return files.get(0); } else { return this.zipUtil.zipFiles(study.getName(), files); } }

Target:
File generateFiles(final Study study, final DatasetDTO dataSetDto, final Map<Integer, StudyInstance> selectedDatasetInstancesMap, final Map<Integer, List<ObservationUnitRow>> observationUnitRowMap, final List<MeasurementVariable> columns, final DatasetFileGenerator generator, final String fileExtension) throws IOException { final File temporaryFolder = Files.createTempDir(); final List<File> files = this.getInstanceFiles(study, dataSetDto, selectedDatasetInstancesMap, observationUnitRowMap, columns, generator, fileExtension, temporaryFolder); return this.getReturnFile(study, files); }
Source:
public void testDoesNotPromoteIfMasterTimeoutNotExpired() throws Exception { persister.delta(ManagementPlaneSyncRecordDeltaImpl.builder() .node(newManagerMemento(ownNodeId, ManagementNodeState.STANDBY, currentTimeMillis())) .node(newManagerMemento("node1", ManagementNodeState.MASTER, currentTimeMillis())) .setMaster("node1") .build()); manager.start(HighAvailabilityMode.AUTO); incrementClock(20, TimeUnit.SECONDS); Asserts.succeedsContinually(new Runnable() { @Override public void run() { assertTrue(promotionListener.callTimestamps.isEmpty(), "calls="+promotionListener.callTimestamps); }}); }

Target:
public void testDoesNotPromoteIfMasterTimeoutNotExpired() throws Exception { persister.delta(ManagementPlaneSyncRecordDeltaImpl.builder() .node(newManagerMemento(ownNodeId, ManagementNodeState.STANDBY, currentTimeMillis())) .node(newManagerMemento("node1", ManagementNodeState.MASTER, currentTimeMillis())) .setMaster("node1") .build()); manager.start(HighAvailabilityMode.AUTO); incrementClock(29, TimeUnit.SECONDS); Asserts.succeedsContinually(new Runnable() { @Override public void run() { assertTrue(promotionListener.callTimestamps.isEmpty(), "calls="+promotionListener.callTimestamps); }}); }
Source:
@Override public void onDestroyView() { recyclerView.setAdapter(null); unbinder.unbind(); unbinder = null; super.onDestroyView(); }

Target:
public void onDestroyView() { recyclerView.setAdapter(null); unbinder.unbind(); unbinder = null; super.onDestroyView(); }
Source:
public QuerySchemaPatch makePatch(CacheConfiguration<?, ?> targetCfg, Collection<QueryEntity> target) { synchronized (mux) { Map<String, QueryEntity> localEntities = new HashMap<>(); Collection<SchemaAbstractOperation> patchOperations = new ArrayList<>(); Collection<QueryEntity> entityToAdd = new ArrayList<>(); if (entities.isEmpty() && targetCfg != null) { patchOperations.add(new SchemaAddQueryEntityOperation( UUID.randomUUID(), targetCfg.getName(), targetCfg.getSqlSchema(), target, targetCfg.getQueryParallelism(), targetCfg.isSqlEscapeAll() )); return new QuerySchemaPatch(patchOperations, entityToAdd, ""); } for (QueryEntity entity : entities) { if (localEntities.put(entity.getTableName(), entity) != null) throw new IllegalStateException("Duplicate key"); } StringBuilder conflicts = new StringBuilder(); for (QueryEntity queryEntity : target) { if (localEntities.containsKey(queryEntity.getTableName())) { QueryEntity localEntity = localEntities.get(queryEntity.getTableName()); QueryEntityPatch entityPatch = localEntity.makePatch(queryEntity); if (entityPatch.hasConflict()) { if (conflicts.length() > 0) conflicts.append("\n"); conflicts.append(entityPatch.getConflictsMessage()); } if (!entityPatch.isEmpty()) patchOperations.addAll(entityPatch.getPatchOperations()); } else entityToAdd.add(QueryUtils.copy(queryEntity)); } return new QuerySchemaPatch(patchOperations, entityToAdd, conflicts.toString()); } }

Target:
public QuerySchemaPatch makePatch(CacheConfiguration<?, ?> targetCfg, Collection<QueryEntity> target) { synchronized (mux) { if (entities.isEmpty() && targetCfg != null) { SchemaAddQueryEntityOperation op = new SchemaAddQueryEntityOperation( UUID.randomUUID(), targetCfg.getName(), targetCfg.getSqlSchema(), target, targetCfg.getQueryParallelism(), targetCfg.isSqlEscapeAll() ); return new QuerySchemaPatch(Collections.singletonList(op), Collections.emptyList(), ""); } Map<String, QueryEntity> localEntities = new HashMap<>(); for (QueryEntity entity : entities) { if (localEntities.put(entity.getTableName(), entity) != null) throw new IllegalStateException("Duplicate key"); } Collection<SchemaAbstractOperation> patchOperations = new ArrayList<>(); Collection<QueryEntity> entityToAdd = new ArrayList<>(); StringBuilder conflicts = new StringBuilder(); for (QueryEntity queryEntity : target) { if (localEntities.containsKey(queryEntity.getTableName())) { QueryEntity localEntity = localEntities.get(queryEntity.getTableName()); QueryEntityPatch entityPatch = localEntity.makePatch(queryEntity); if (entityPatch.hasConflict()) { if (conflicts.length() > 0) conflicts.append("\n"); conflicts.append(entityPatch.getConflictsMessage()); } if (!entityPatch.isEmpty()) patchOperations.addAll(entityPatch.getPatchOperations()); } else entityToAdd.add(QueryUtils.copy(queryEntity)); } return new QuerySchemaPatch(patchOperations, entityToAdd, conflicts.toString()); } }
Source:
public void testGetDocContent_shortCheckpoint() throws Exception { config.overrideKey("feed.maxUrls", "5"); adaptor.init(context); long startTime = new Date().getTime(); RecordingResponse response = new RecordingResponse(); adaptor.getDocContent(new MockRequest(new DocId("pseudo/type=document")), response); List<Record> golden = ImmutableList.of( new Record.Builder( new DocId("guid/{AAAAAAAA-0000-0000-0000-000000000001}")) .build(), new Record.Builder( new DocId("guid/{AAAAAAAA-0000-0000-0000-000000000002}")) .build(), new Record.Builder( new DocId("guid/{AAAAAAAA-0000-0000-0000-000000000003}")) .build(), new Record.Builder( new DocId("guid/{AAAAAAAA-0000-0000-0000-000000000004}")) .build()); RecordingDocIdPusher pusher = (RecordingDocIdPusher) context.getDocIdPusher(); List<Record> actual = pusher.getRecords(); assertEquals(golden, actual.subList(0, actual.size() - 1)); Record continuation = actual.get(actual.size() - 1); String docid = continuation.getDocId().getUniqueId(); assertTrue(docid, docid.startsWith("pseudo/")); Checkpoint checkpoint = new Checkpoint(docid.substring(docid.indexOf('/') + 1)); assertEquals("document", checkpoint.type); assertEquals(new Id("{AAAAAAAA-0000-0000-0000-000000000004}"), checkpoint.guid); assertTrue((checkpoint.timestamp.getTime() - startTime) < 2000); }

Target:
public void testGetDocContent_shortCheckpoint() throws Exception { config.overrideKey("feed.maxUrls", "5"); adaptor.init(context); RecordingResponse response = new RecordingResponse(); adaptor.getDocContent( new MockRequest(newDocId(new Checkpoint("type=document"))), response); List<Record> actual = getContextPusher().getRecords(); assertEquals(ImmutableList.of( new Record.Builder(newDocId("{AAAAAAAA-0000-0000-0000-000000000001}")) .build(), new Record.Builder(newDocId("{AAAAAAAA-0000-0000-0000-000000000002}")) .build(), new Record.Builder(newDocId("{AAAAAAAA-0000-0000-0000-000000000003}")) .build(), new Record.Builder(newDocId("{AAAAAAAA-0000-0000-0000-000000000004}")) .build()), actual.subList(0, actual.size() - 1)); Record continuation = actual.get(actual.size() - 1); String docid = continuation.getDocId().getUniqueId(); assertTrue(docid, docid.startsWith("pseudo/")); Checkpoint checkpoint = new Checkpoint(docid.substring(docid.indexOf('/') + 1)); assertEquals("document", checkpoint.type); assertEquals("{AAAAAAAA-0000-0000-0000-000000000004}", checkpoint.guid); }
Source:
Map<String, Object> toMapping() { Map<String, Object> mapping = new HashMap<>(); addTypeOptions(mapping); mapping.put("type", typeNameForESMapping()); if (position != null) { mapping.put("position", position); } if (indexType == Reference.IndexType.NO) { mapping.put("index", false); } if (copyToTargets != null) { mapping.put("copy_to", copyToTargets); } if ("array".equals(collectionType)) { Map<String, Object> outerMapping = new HashMap<>(); outerMapping.put("type", "array"); if (dataType().id() == ObjectType.ID) { objectMapping(mapping); } outerMapping.put("inner", mapping); return outerMapping; } else if (dataType().id() == ObjectType.ID) { objectMapping(mapping); } if (columnStore == false) { mapping.put(DOC_VALUES, "false"); } if (formattedDefaultExpression != null) { mapping.put("default_expr", formattedDefaultExpression); } return mapping; }

Target:
Map<String, Object> toMapping() { Map<String, Object> mapping = new HashMap<>(); addTypeOptions(mapping); mapping.put("type", typeNameForESMapping()); if (position != null) { mapping.put("position", position); } if (indexType == Reference.IndexType.NO) { mapping.put("index", false); } if (copyToTargets != null) { mapping.put("copy_to", copyToTargets); } if ("array".equals(collectionType)) { Map<String, Object> outerMapping = new HashMap<>(); outerMapping.put("type", "array"); if (dataType().id() == ObjectType.ID) { objectMapping(mapping); } outerMapping.put("inner", mapping); return outerMapping; } else if (dataType().id() == ObjectType.ID) { objectMapping(mapping); } if (columnStore == false) { mapping.put(DOC_VALUES, "false"); } assert ((formattedDefaultExpression != null && defaultExpression != null) || (formattedDefaultExpression == null && defaultExpression == null)) : "Default Expression is not properly initialized"; if (formattedDefaultExpression != null) { mapping.put("default_expr", formattedDefaultExpression); } return mapping; }
Source:
public void readLacComplete(int rc, long ledgerId, final ByteBuf lacBuffer, final ByteBuf lastEntryBuffer, Object ctx) { int bookieIndex = (Integer) ctx; numResponsesPending--; if (completed) { return; } if (rc == BKException.Code.OK) { try { long newLac = LedgerHandle.INVALID_ENTRY_ID; if (lacBuffer != null && lacBuffer.readableBytes() > 0) { long lac = lh.macManager.verifyDigestAndReturnLac(lacBuffer); if (lac > maxLac) { newLac = lac; } } if (lastEntryBuffer != null && lastEntryBuffer.readableBytes() > 0) { RecoveryData recoveryData = lh.macManager.verifyDigestAndReturnLastConfirmed(lastEntryBuffer); long recoveredLac = recoveryData.getLastAddConfirmed(); if (recoveredLac > maxLac) { newLac = recoveredLac; } } if (newLac > maxLac) { cb.getLacComplete(rc, newLac); completed = true; } maxLac = newLac; hasValidResponse = true; } catch (BKDigestMatchException e) { LOG.error("Mac mismatch while reading ledger: " + ledgerId + " LAC from bookie: " + currentEnsemble.get(bookieIndex)); rc = BKException.Code.DigestMatchException; } } if (rc == BKException.Code.NoSuchLedgerExistsException || rc == BKException.Code.NoSuchEntryException) { hasValidResponse = true; } if (rc == BKException.Code.UnauthorizedAccessException && !completed) { cb.getLacComplete(rc, maxLac); completed = true; return; } if (!hasValidResponse && BKException.Code.OK != rc) { lastSeenError = rc; } if (numResponsesPending == 0 && !completed) { if (!hasValidResponse) { cb.getLacComplete(lastSeenError, maxLac); } else { cb.getLacComplete(BKException.Code.OK, maxLac); } completed = true; } }

Target:
public void readLacComplete(int rc, long ledgerId, final ByteBuf lacBuffer, final ByteBuf lastEntryBuffer, Object ctx) { int bookieIndex = (Integer) ctx; numResponsesPending--; if (completed) { return; } if (rc == BKException.Code.OK) { try { long newLac = LedgerHandle.INVALID_ENTRY_ID; if (lacBuffer != null && lacBuffer.readableBytes() > 0) { long lac = lh.macManager.verifyDigestAndReturnLac(lacBuffer); if (lac > maxLac) { newLac = lac; } } if (lastEntryBuffer != null && lastEntryBuffer.readableBytes() > 0) { RecoveryData recoveryData = lh.macManager.verifyDigestAndReturnLastConfirmed(lastEntryBuffer); long piggyBackedLAC = recoveryData.getLastAddConfirmed(); if (piggyBackedLAC > newLac) { newLac = piggyBackedLAC; } } if (newLac > maxLac) { cb.getLacComplete(rc, newLac); completed = true; } maxLac = newLac; hasValidResponse = true; } catch (BKDigestMatchException e) { LOG.error("Mac mismatch while reading ledger: " + ledgerId + " LAC from bookie: " + currentEnsemble.get(bookieIndex)); rc = BKException.Code.DigestMatchException; } } if (rc == BKException.Code.NoSuchLedgerExistsException || rc == BKException.Code.NoSuchEntryException) { hasValidResponse = true; } if (rc == BKException.Code.UnauthorizedAccessException && !completed) { cb.getLacComplete(rc, maxLac); completed = true; return; } if (!hasValidResponse && BKException.Code.OK != rc) { lastSeenError = rc; } if (numResponsesPending == 0 && !completed) { if (!hasValidResponse) { cb.getLacComplete(lastSeenError, maxLac); } else { cb.getLacComplete(BKException.Code.OK, maxLac); } completed = true; } }
Source:
protected ImagePickerSheetView(final Builder builder) { super(builder.context); inflate(getContext(), R.layout.grid_sheet_view, this); tileGrid = (GridView) findViewById(R.id.grid); if(builder.spacing>0){ spacing = builder.spacing; }else { spacing = getResources().getDimensionPixelSize(R.dimen.bottomsheet_image_tile_spacing); } tileGrid.setDrawSelectorOnTop(true); tileGrid.setVerticalSpacing(spacing); tileGrid.setHorizontalSpacing(spacing); tileGrid.setPadding(spacing, 0, spacing, 0); titleView = (TextView) findViewById(R.id.title); originalGridPaddingTop = tileGrid.getPaddingTop(); setTitle(builder.title); if (builder.onTileSelectedListener != null) { tileGrid.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(@NonNull AdapterView<?> parent, @NonNull View view, int position, long id) { builder.onTileSelectedListener.onTileSelected(adapter.getItem(position)); } }); } maxItems = builder.maxItems; imageProvider = builder.imageProvider; showCameraOption = builder.showCameraOption; showPickerOption = builder.showPickerOption; cameraDrawable = builder.cameraDrawable; pickerDrawable = builder.pickerDrawable; ViewCompat.setElevation(this, Util.dp2px(getContext(), 16f)); }

Target:
protected ImagePickerSheetView(final Builder builder) { super(builder.context); inflate(getContext(), R.layout.grid_sheet_view, this); tileGrid = (GridView) findViewById(R.id.grid); if(builder.spacing>=0){ spacing = builder.spacing; }else { spacing = getResources().getDimensionPixelSize(R.dimen.bottomsheet_image_tile_spacing); } tileGrid.setDrawSelectorOnTop(true); tileGrid.setVerticalSpacing(spacing); tileGrid.setHorizontalSpacing(spacing); tileGrid.setPadding(spacing, 0, spacing, 0); titleView = (TextView) findViewById(R.id.title); originalGridPaddingTop = tileGrid.getPaddingTop(); setTitle(builder.title); if (builder.onTileSelectedListener != null) { tileGrid.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(@NonNull AdapterView<?> parent, @NonNull View view, int position, long id) { builder.onTileSelectedListener.onTileSelected(adapter.getItem(position)); } }); } maxItems = builder.maxItems; imageProvider = builder.imageProvider; showCameraOption = builder.showCameraOption; showPickerOption = builder.showPickerOption; cameraDrawable = builder.cameraDrawable; pickerDrawable = builder.pickerDrawable; ViewCompat.setElevation(this, Util.dp2px(getContext(), 16f)); }
Source:
protected StorageDomain getNewMaster() { if (newMaster == null) { newMaster = electNewMaster(true, canChooseInactiveDomainAsMaster, canChooseCurrentMasterAsNewMaster); } return newMaster; }

Target:
protected StorageDomain getNewMaster() { if (newMaster == null) { newMaster = electNewMaster(true, getParameters().isCanChooseInactiveDomainAsMaster(), getParameters().isCanChooseCurrentMasterAsNewMaster()); } return newMaster; }
Source:
public Matrix addi(final Matrix matrix) { if (matrix.isDense()) { throw new UnsupportedOperationException(); } else { ((NumericOps) breezeMatrix).$plus$eq(((CSCMatrix) matrix).breezeMatrix, MatrixOps.ADDI_SS); return this; } }

Target:
public Matrix addi(final Matrix matrix) { if (matrix.isDense()) { ((NumericOps) breezeMatrix).$plus$eq(((DenseMatrix) matrix).getBreezeMatrix(), MatrixOps.ADDI_MM); } else { ((NumericOps) breezeMatrix).$plus$eq(((CSCMatrix) matrix).breezeMatrix, MatrixOps.ADDI_SS); } return this; }
Source:
private void setupProjects() { if (projectController.canReadProjects()) { projects = projects.stream() .filter(p -> projectController.canReadProject(p)) .collect(Collectors.toList()); projects.sort((p1, p2) -> p1.getProjectName().compareTo(p2.getProjectName())); updateView(projects); } }

Target:
private void setupProjects() { if (projectController.canReadProjects()) { projects = projects.stream() .filter(p -> projectController.canReadProject(p)) .collect(Collectors.toList()); projects.sort((p1, p2) -> p1.getProjectName().toUpperCase().compareTo(p2.getProjectName().toUpperCase())); updateView(projects); } }
Source:
public List<V> get(@Nullable K k) { List<V> value = null; Slice valueSlice = store.getSync(getBucketId(k), streamCodec.toByteArray(k)); if (isKeyContainsMultiValue) { value = (List<V>)streamCodec.fromByteArray(valueSlice); } else { if (valueSlice == null || valueSlice.length == 0 || valueSlice.buffer == null) { return null; } value = new ArrayList<>(); value.add((V)streamCodec.fromByteArray(valueSlice)); } return value; }

Target:
public List<V> get(@Nullable K k) { List<V> value = null; Slice valueSlice = store.getSync(getBucketId(k), streamCodec.toByteArray(k)); if (valueSlice == null || valueSlice.length == 0 || valueSlice.buffer == null) { return null; } if (isKeyContainsMultiValue) { return (List<V>)streamCodec.fromByteArray(valueSlice); } value = new ArrayList<>(); value.add((V)streamCodec.fromByteArray(valueSlice)); return value; }
Source:
public void updated(Dictionary<String, ?> config) throws ConfigurationException { if (config != null) { String configuredConnection = (String) config.get("connection"); if (StringUtils.isNotBlank(configuredConnection)) { connectionString = configuredConnection; logger.debug("Setting connection from config: {}", connectionString); } String configuredRepeatMode = ((String) config.get("repeatMode")).toLowerCase(); if (StringUtils.isNotBlank(configuredRepeatMode)) { if (configuredRepeatMode.matches("always")) { repeatMode = DmxTransmitter.REPEAT_MODE_ALWAYS; logger.debug("repeatMode set to always"); } else if (configuredRepeatMode.matches("never")) { repeatMode = DmxTransmitter.REPEAT_MODE_NEVER; logger.debug("repeatMode set to never"); } else if (configuredRepeatMode.matches("reduced")) { repeatMode = DmxTransmitter.REPEAT_MODE_REDUCED; logger.debug("repeatMode set to reduced"); } else { repeatMode = DmxTransmitter.REPEAT_MODE_ALWAYS; logger.warn("repeatMode not recognized, set to default 'always'"); } if (transmitter != null) { transmitter.setRepeatMode(repeatMode); } } } if (connection != null) { if (!connection.isClosed()) { connection.close(); } } }

Target:
public void updated(Dictionary<String, ?> config) throws ConfigurationException { if (config != null) { String configuredConnection = (String) config.get("connection"); if (StringUtils.isNotBlank(configuredConnection)) { connectionString = configuredConnection; logger.debug("Setting connection from config: {}", connectionString); } String configuredRepeatMode = ((String) config.get("repeatMode")); if (StringUtils.isNotBlank(configuredRepeatMode)) { repeatMode = DmxTransmitter.DmxRepeatMode.fromString(configuredRepeatMode); if (repeatMode == null) { repeatMode = DmxTransmitter.DmxRepeatMode.ALWAYS; logger.error("repeatMode not recognized, set to {}", configuredRepeatMode, repeatMode); } else { logger.debug("repeatMode set to {}", repeatMode.toString()); } if (transmitter != null) { transmitter.setRepeatMode(repeatMode); } } } if (connection != null) { if (!connection.isClosed()) { connection.close(); } } }
Source:
public void flush() throws RemoteException { int size = whereArgs.size(); if (size > 0) { String foo = new String [size]; foo = whereArgs.toArray(foo); int numrows = mProvider.delete(mBaseUri, MediaStore.MediaColumns._ID + " IN (" + whereClause.toString() + ")", foo); Log.i(TAG, "rows deleted: " + numrows); whereClause.setLength(0); whereArgs.clear(); } }

Target:
public void flush() throws RemoteException { int size = whereArgs.size(); if (size > 0) { String foo = new String [size]; foo = whereArgs.toArray(foo); int numrows = mProvider.delete(mBaseUri, MediaStore.MediaColumns._ID + " IN (" + whereClause.toString() + ")", foo); if (DEBUG) Log.i(TAG, "rows deleted: " + numrows); whereClause.setLength(0); whereArgs.clear(); } }
Source:
protected void executeVdsIdCommand() { final SetVdsStatusVDSCommandParameters parameters = getParameters(); if (_vdsManager != null) { final VDS vds = getVds(); if (vds.getSpmStatus() != VdsSpmStatus.None && parameters.getStatus() != VDSStatus.Up) { log.infoFormat("VDS {0} is spm and moved from up calling resetIrs.", vds.getName()); getVDSReturnValue().setSucceeded( ResourceManager .getInstance() .runVdsCommand( VDSCommandType.ResetIrs, new ResetIrsVDSCommandParameters(vds.getStoragePoolId(), vds.getId())) .getSucceeded()); if (!getVDSReturnValue().getSucceeded() && getParameters().shouldLogStopSpmFailure()) { AuditLogableBase base = new AuditLogableBase(); base.setVds(vds); AuditLogDirector.log(base, AuditLogType.FAILED_TO_STOP_SPM_ON_HOST); } } if (getVDSReturnValue().getSucceeded()) { updateVdsFromParameters(parameters, vds); TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { _vdsManager.setStatus(parameters.getStatus(), vds); _vdsManager.updateDynamicData(vds.getDynamicData()); _vdsManager.updateStatisticsData(vds.getStatisticsData()); return null; } }); } } else { getVDSReturnValue().setSucceeded(false); } }

Target:
protected void executeVdsIdCommand() { final SetVdsStatusVDSCommandParameters parameters = getParameters(); if (_vdsManager != null) { final VDS vds = getVds(); if (vds.getSpmStatus() != VdsSpmStatus.None && parameters.getStatus() != VDSStatus.Up) { log.infoFormat("VDS {0} is spm and moved from up calling resetIrs.", vds.getName()); getVDSReturnValue().setSucceeded( ResourceManager .getInstance() .runVdsCommand( VDSCommandType.ResetIrs, new ResetIrsVDSCommandParameters(vds.getStoragePoolId(), vds.getId())) .getSucceeded()); if (!getVDSReturnValue().getSucceeded()) { if (getParameters().isStopSpmFailureLogged()) { AuditLogableBase base = new AuditLogableBase(); base.setVds(vds); AuditLogDirector.log(base, AuditLogType.FAILED_TO_STOP_SPM_ON_HOST); } return; } } updateVdsFromParameters(parameters, vds); TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { _vdsManager.setStatus(parameters.getStatus(), vds); _vdsManager.updateDynamicData(vds.getDynamicData()); _vdsManager.updateStatisticsData(vds.getStatisticsData()); return null; } }); } else { getVDSReturnValue().setSucceeded(false); } }
Source:
public static TissueOrigin to(TissueOriginDto from) { TissueOrigin to = new TissueOriginImpl(); to.setAlias(from.getAlias()); to.setDescription(from.getDescription()); return to; }

Target:
public static TissueOrigin to(TissueOriginDto from) { TissueOrigin to = new TissueOriginImpl(); to.setTissueOriginId(from.getId()); to.setAlias(from.getAlias()); to.setDescription(from.getDescription()); return to; }
Source:
private void checkDefineArguments(FunctionCallTree tree) { SeparatedList<ExpressionTree> arguments = tree.arguments(); if (arguments.size() >= 3 && arguments.get(2).is(Kind.BOOLEAN_LITERAL) && "true".equalsIgnoreCase(((LiteralTree)arguments.get(2)).value())) { context().newIssue(this, tree, "Define this constant as case sensitive."); } }

Target:
private void checkDefineArguments(FunctionCallTree tree) { SeparatedList<ExpressionTree> arguments = tree.arguments(); if (arguments.size() == 3) { ExpressionTree caseInsensitiveArgument = arguments.get(2); if (caseInsensitiveArgument.is(Kind.BOOLEAN_LITERAL) && "true".equalsIgnoreCase(((LiteralTree) caseInsensitiveArgument).value())) { context().newIssue(this, tree, "Define this constant as case sensitive."); } } }
Source:
private MessageChannel createNewSubflow(Message<?> message) { String host = (String) message.getHeaders().get("host"); Integer port = (Integer) message.getHeaders().get("port"); Assert.state(host != null && port != null, "host and/or port header missing"); String hostPort = host + port; TcpNetClientConnectionFactory cf = new TcpNetClientConnectionFactory(host, port); this.context.getBeanFactory().registerSingleton(hostPort + ".cf", cf); this.context.getBeanFactory().initializeBean(cf, hostPort+".cf"); cf.afterPropertiesSet(); TcpSendingMessageHandler handler = new TcpSendingMessageHandler(); handler.setConnectionFactory(cf); IntegrationFlow flow = f -> f.handle(handler); this.flowContext.register(hostPort + ".flow", flow); MessageChannel channel = context.getBean(hostPort + ".flow.input", MessageChannel.class); this.subFlows.put(hostPort, channel); return channel; }

Target:
private MessageChannel createNewSubflow(Message<?> message) { String host = (String) message.getHeaders().get("host"); Integer port = (Integer) message.getHeaders().get("port"); Assert.state(host != null && port != null, "host and/or port header missing"); String hostPort = host + port; TcpNetClientConnectionFactory cf = new TcpNetClientConnectionFactory(host, port); this.context.getBeanFactory().registerSingleton(hostPort + ".cf", cf); this.context.getBeanFactory().initializeBean(cf, hostPort+".cf"); cf.afterPropertiesSet(); TcpSendingMessageHandler handler = new TcpSendingMessageHandler(); handler.setConnectionFactory(cf); IntegrationFlow flow = f -> f.handle(handler); this.flowContext.register(hostPort + ".flow", flow); MessageChannel channel = this.flowContext.messagingTemplateFor(hostPort + ".flow").getDefaultDestination(); this.subFlows.put(hostPort, channel); return channel; }
Source:
private void createTaskDataBySprint(int sprintid) { SprintBacklogMapper backlog = (new SprintBacklogLogic(project, session, String.valueOf(sprintid))).getSprintBacklogMapper(); List<IIssue> issues = backlog.getAllTasks(); Date timeNode = new Date(this.m_chartStartDate.getTime()); while (timeNode.getTime() <= this.m_chartEndDate.getTime()) { if ((this.Today.getDate() == timeNode.getDate()) && (Math.abs(this.Today.getTime() - timeNode.getTime()) <= OneDay)) { this.countStatusChange(issues, this.Today); break; } else { this.countStatusChange(issues, timeNode); } timeNode = new Date(timeNode.getTime() + this.m_interval * OneDay); } }

Target:
private void createTaskDataBySprint(int sprintid) { SprintBacklogMapper backlog = (new SprintBacklogLogic(project, session, String.valueOf(sprintid))).getSprintBacklogMapper(); ArrayList<TaskObject> issues = backlog.getAllTasks(); Date timeNode = new Date(this.m_chartStartDate.getTime()); while (timeNode.getTime() <= this.m_chartEndDate.getTime()) { if ((this.Today.getDate() == timeNode.getDate()) && (Math.abs(this.Today.getTime() - timeNode.getTime()) <= OneDay)) { this.countStatusChange(issues, this.Today); break; } else { this.countStatusChange(issues, timeNode); } timeNode = new Date(timeNode.getTime() + this.m_interval * OneDay); } }
Source:
protected IResourceLoader createLoaderFor(HttpServletRequest req, String requestedExternalPath) { for (ResourceLoaders f : m_resourceLoaders) { IResourceLoader candidate = f.create(req, requestedExternalPath); if (candidate != null) { return candidate; } } return null; }

Target:
protected IResourceLoader createLoaderFor(HttpServletRequest req, String requestedExternalPath) { for (ResourceLoaders loaderFactory : m_resourceLoaders) { IResourceLoader loader = loaderFactory.create(req, requestedExternalPath); if (loader != null) { return loader; } } return null; }
Source:
public static NotebookAuthorization init(ZeppelinConfiguration config) { if (instance == null) { instance = new NotebookAuthorization(); } conf = config; filePath = conf.getNotebookAuthorizationPath(); GsonBuilder builder = new GsonBuilder(); builder.setPrettyPrinting(); gson = builder.create(); try { loadFromFile(); } catch (IOException e) { LOG.error("Error loading NotebookAuthorization", e); } return instance; }

Target:
public static NotebookAuthorization init(ZeppelinConfiguration config) { if (instance == null) { instance = new NotebookAuthorization(); conf = config; filePath = conf.getNotebookAuthorizationPath(); GsonBuilder builder = new GsonBuilder(); builder.setPrettyPrinting(); gson = builder.create(); try { loadFromFile(); } catch (IOException e) { LOG.error("Error loading NotebookAuthorization", e); } } return instance; }
Source:
public void updateClasspath(IProject project, IProgressMonitor monitor) { IJavaProject javaProject = JavaCore.create(project); if(javaProject != null) { AbstractJavaProjectConfigurator.removeTestMavenClasspathContainer(javaProject); try { IClasspathEntry containerEntry = getMavenContainerEntry(javaProject); IPath path = containerEntry != null ? containerEntry.getPath() : new Path(CONTAINER_ID); IClasspathEntry[] mainClasspath = getClasspath(project, CLASSPATH_RUNTIME, monitor); HashSet<IPath> mainPaths = new HashSet<>(); for(IClasspathEntry ce : mainClasspath) { mainPaths.add(ce.getPath()); } IClasspathEntry[] testClasspath = getClasspath(project, CLASSPATH_DEFAULT, monitor); IClasspathEntry[] classpath = new IClasspathEntry[testClasspath.length]; for(int i = 0; i < testClasspath.length; i++ ) { IClasspathEntry classpathEntry = testClasspath[i]; if(mainPaths.contains(classpathEntry.getPath())) { classpath[i] = classpathEntry; } else { classpath[i] = addTestAttribute(classpathEntry); } } IClasspathContainer container = new MavenClasspathContainer(path, classpath); JavaCore.setClasspathContainer(container.getPath(), new IJavaProject[] {javaProject}, new IClasspathContainer[] {container}, monitor); saveContainerState(project, container); } catch(CoreException ex) { log.error(ex.getMessage(), ex); } } }

Target:
public void updateClasspath(IProject project, IProgressMonitor monitor) { IJavaProject javaProject = JavaCore.create(project); if(javaProject != null) { try { IClasspathEntry containerEntry = getMavenContainerEntry(javaProject); IPath path = containerEntry != null ? containerEntry.getPath() : new Path(CONTAINER_ID); IClasspathEntry[] mainClasspath = getClasspath(project, CLASSPATH_RUNTIME, monitor); HashSet<IPath> mainPaths = new HashSet<>(); for(IClasspathEntry ce : mainClasspath) { mainPaths.add(ce.getPath()); } IClasspathEntry[] testClasspath = getClasspath(project, CLASSPATH_DEFAULT, monitor); IClasspathEntry[] classpath = new IClasspathEntry[testClasspath.length]; for(int i = 0; i < testClasspath.length; i++ ) { IClasspathEntry classpathEntry = testClasspath[i]; if(mainPaths.contains(classpathEntry.getPath())) { classpath[i] = classpathEntry; } else { classpath[i] = addTestAttribute(classpathEntry); } } IClasspathContainer container = new MavenClasspathContainer(path, classpath); JavaCore.setClasspathContainer(container.getPath(), new IJavaProject[] {javaProject}, new IClasspathContainer[] {container}, monitor); saveContainerState(project, container); } catch(CoreException ex) { log.error(ex.getMessage(), ex); } } }
Source:
public void trackValuePropLearnMoreTapped(@NonNull String courseId, @Nullable String assignmentId, @NonNull String screenName) { final SegmentEvent aEvent = new SegmentEvent(); aEvent.properties.putValue(Keys.NAME, Values.VALUE_PROP_LEARN_MORE_CLICKED); aEvent.data.putValue(Keys.COURSE_ID, courseId); if (assignmentId != null) { aEvent.data.putValue(Keys.ASSIGNMENT_ID, assignmentId); } aEvent.data.putValue(Keys.SCREEN_NAME, screenName); trackSegmentEvent(Events.VALUE_PROP_LEARN_MORE_CLICKED, aEvent.properties); }

Target:
public void trackValuePropLearnMoreTapped(@NonNull String courseId, @Nullable String assignmentId, @NonNull String screenName) { final SegmentEvent aEvent = new SegmentEvent(); aEvent.properties.putValue(Keys.NAME, Values.VALUE_PROP_LEARN_MORE_CLICKED); aEvent.data.putValue(Keys.COURSE_ID, courseId); if (TextUtils.isEmpty(assignmentId)) { aEvent.data.putValue(Keys.ASSIGNMENT_ID, assignmentId); } aEvent.data.putValue(Keys.SCREEN_NAME, screenName); trackSegmentEvent(Events.VALUE_PROP_LEARN_MORE_CLICKED, aEvent.properties); }
Source:
public void start(String scmId) throws IOException { LOG.info("Attempting to start container services."); startContainerScrub(); if (!writeChannel.isRunning()) { writeChannel.start(); } if (!readChannel.isRunning()) { readChannel.start(); } hddsDispatcher.init(); hddsDispatcher.setScmId(scmId); }

Target:
public void start(String scmId) throws IOException { LOG.info("Attempting to start container services."); startContainerScrub(); writeChannel.start(); readChannel.start(); hddsDispatcher.init(); hddsDispatcher.setScmId(scmId); }