auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
S3SelectLineRecordReader( Configuration configuration, HiveClientConfig clientConfig, Path path, long start, long length, Properties schema, String ionSqlQuery, PrestoS3ClientFactory s3ClientFactory) { requireNonNull(configuration, "configuration is null"); requireNonNull(clientConfig, "clientConfig is null"); requireNonNull(schema, "schema is null"); requireNonNull(path, "path is null"); requireNonNull(ionSqlQuery, "ionSqlQuery is null"); requireNonNull(s3ClientFactory, "s3ClientFactory is null"); this.selectClient = new PrestoS3SelectClient(configuration, clientConfig, s3ClientFactory); closer.register(selectClient); this.lineDelimiter = (schema).getProperty(LINE_DELIM, "\n"); this.processedRecords = 0; this.recordsFromS3 = 0; this.start = start; this.position = this.start; this.end = this.start + length; this.isFirstLine = true; this.selectObjectContentRequest = buildSelectObjectRequest(schema, ionSqlQuery, path); HiveS3Config defaults = new HiveS3Config(); this.maxAttempts = configuration.getInt(S3_MAX_CLIENT_RETRIES, defaults.getS3MaxClientRetries()) + 1; this.maxBackoffTime = Duration.valueOf(configuration.get(S3_MAX_BACKOFF_TIME, defaults.getS3MaxBackoffTime().toString())); this.maxRetryTime = Duration.valueOf(configuration.get(S3_MAX_RETRY_TIME, defaults.getS3MaxRetryTime().toString())); }

Target:
S3SelectLineRecordReader( Configuration configuration, HiveClientConfig clientConfig, Path path, long start, long length, Properties schema, String ionSqlQuery, PrestoS3ClientFactory s3ClientFactory) { requireNonNull(configuration, "configuration is null"); requireNonNull(clientConfig, "clientConfig is null"); requireNonNull(schema, "schema is null"); requireNonNull(path, "path is null"); requireNonNull(ionSqlQuery, "ionSqlQuery is null"); requireNonNull(s3ClientFactory, "s3ClientFactory is null"); this.lineDelimiter = (schema).getProperty(LINE_DELIM, "\n"); this.processedRecords = 0; this.recordsFromS3 = 0; this.start = start; this.position = this.start; this.end = this.start + length; this.isFirstLine = true; this.compressionCodecFactory = new CompressionCodecFactory(configuration); this.selectObjectContentRequest = buildSelectObjectRequest(schema, ionSqlQuery, path); HiveS3Config defaults = new HiveS3Config(); this.maxAttempts = configuration.getInt(S3_MAX_CLIENT_RETRIES, defaults.getS3MaxClientRetries()) + 1; this.maxBackoffTime = Duration.valueOf(configuration.get(S3_MAX_BACKOFF_TIME, defaults.getS3MaxBackoffTime().toString())); this.maxRetryTime = Duration.valueOf(configuration.get(S3_MAX_RETRY_TIME, defaults.getS3MaxRetryTime().toString())); this.selectClient = new PrestoS3SelectClient(configuration, clientConfig, s3ClientFactory); closer.register(selectClient); }
Source:
private static boolean parameterCanBeNull(final VariableTree variableTree) { return variableTree.symbol().metadata().isAnnotatedWith("javax.annotation.CheckForNull") || variableTree.symbol().metadata().isAnnotatedWith("javax.annotation.Nullable"); }

Target:
private static boolean parameterCanBeNull(final VariableTree variableTree) { final SymbolMetadata metadata = variableTree.symbol().metadata(); return metadata.isAnnotatedWith("javax.annotation.CheckForNull") || metadata.isAnnotatedWith("javax.annotation.Nullable"); }
Source:
private CqlQueryResponse executeCqlQuery(CqlRequest cqlRequest) throws UnsupportedQueryException, SourceUnavailableException, FederationException { QueryRequest request = cqlRequest.createQueryRequest(catalogFramework.getId(), filterBuilder); Stopwatch stopwatch = Stopwatch.createStarted(); List<QueryResponse> responses = Collections.synchronizedList(new ArrayList<>()); List<Result> results = ResultIterable.resultIterable( (queryRequest) -> { QueryResponse queryResponse = catalogFramework.query(queryRequest); responses.add(queryResponse); return queryResponse; }, request, cqlRequest.getCount()) .stream() .collect(Collectors.toList()); QueryResponse response = new QueryResponseImpl( request, results, true, responses.stream().map(QueryResponse::getHits).findFirst().orElse(-1l), responses .stream() .map(QueryResponse::getProperties) .findFirst() .orElse(Collections.emptyMap())); stopwatch.stop(); return new CqlQueryResponse( cqlRequest.getId(), request, response, cqlRequest.getSource(), stopwatch.elapsed(TimeUnit.MILLISECONDS), cqlRequest.isNormalize(), filterAdapter, actionRegistry); }

Target:
private CqlQueryResponse executeCqlQuery(CqlRequest cqlRequest) throws UnsupportedQueryException, SourceUnavailableException, FederationException { QueryRequest request = cqlRequest.createQueryRequest(catalogFramework.getId(), filterBuilder); Stopwatch stopwatch = Stopwatch.createStarted(); List<QueryResponse> responses = Collections.synchronizedList(new ArrayList<>()); QueryFunction queryFunction = (queryRequest) -> { QueryResponse queryResponse = catalogFramework.query(queryRequest); responses.add(queryResponse); return queryResponse; }; List<Result> results = ResultIterable.resultIterable(queryFunction, request, cqlRequest.getCount()) .stream() .collect(Collectors.toList()); QueryResponse response = new QueryResponseImpl( request, results, true, responses .stream() .filter(Objects::nonNull) .map(QueryResponse::getHits) .findFirst() .orElse(-1l), responses .stream() .filter(Objects::nonNull) .map(QueryResponse::getProperties) .findFirst() .orElse(Collections.emptyMap())); stopwatch.stop(); return new CqlQueryResponse( cqlRequest.getId(), request, response, cqlRequest.getSource(), stopwatch.elapsed(TimeUnit.MILLISECONDS), cqlRequest.isNormalize(), filterAdapter, actionRegistry); }
Source:
@Override @Nullable public Boolean trySample(HttpRequest request) { if (request == null) return null; HttpAdapter<Object, Void> adapter; if (request instanceof HttpClientRequest) { adapter = new HttpClientAdapters.ToRequestAdapter((HttpClientRequest) request); } else { adapter = new HttpServerAdapters.ToRequestAdapter((HttpServerRequest) request); } return trySample(adapter, request.unwrap()); }

Target:
@Override @Nullable public Boolean trySample(HttpRequest request) { if (request == null) return null; Object unwrapped = request.unwrap(); if (unwrapped == null) unwrapped = NULL_SENTINEL; HttpAdapter<Object, Void> adapter; if (request instanceof HttpClientRequest) { adapter = new HttpClientAdapters.ToRequestAdapter((HttpClientRequest) request, unwrapped); } else { adapter = new HttpServerAdapters.ToRequestAdapter((HttpServerRequest) request, unwrapped); } return trySample(adapter, unwrapped); }
Source:
public void validate_shouldPassIfThereIsAtLeastOneValidDescription() throws Exception { Concept concept = new Concept(); concept.addDescription(new ConceptDescription("one description", Context.getLocale())); Errors errors = new BindException(concept, "concept"); new ConceptValidator().validate(concept, errors); boolean notFound = false; for (ObjectError error : errors.getAllErrors()) { if (!error.getCode().equals("Concept.error.notAtLeastOneNonBlankDescription")) { notFound = true; } } Assert.assertTrue(notFound); }

Target:
public void validate_shouldPassIfThereIsAtLeastOneValidDescription() throws Exception { Concept concept = new Concept(); concept.addDescription(new ConceptDescription("one description", Context.getLocale())); Errors errors = new BindException(concept, "concept"); new ConceptValidator().validate(concept, errors); boolean notFound = true; for (ObjectError error : errors.getAllErrors()) { if (error.getCode().equals("Concept.error.notAtLeastOneNonBlankDescription")) { notFound = false; break; } } Assert.assertTrue(notFound); }
Source:
void display(final ProjectMergeStrategies result) { final Project.NameKey wildKey = Gerrit.getConfig().getWildProject(); Project.NameKey parent = result.getInheritsFrom(); final boolean isWild = parent == null; if (parent == null) { parent = wildKey; } parentPanel.setVisible(!isWild); parentName.setTargetHistoryToken(Dispatcher.toProjectAdmin(parent, ProjectScreen.MERGE_STRATEGY)); parentName.setText(parent.get()); mergeStrategies.display(result.getLocal()); mergeStrategies.setRevision(result.getRevision()); }

Target:
void display(final ProjectMergeStrategies result) { final Project.NameKey wildKey = Gerrit.getConfig().getWildProject(); Project.NameKey parent = result.getInheritsFrom(); final boolean isWild = parent == null; if (parent == null) { parent = wildKey; } parentPanel.setVisible(!isWild); parentName.setTargetHistoryToken(Dispatcher.toProjectAdmin(parent, ProjectScreen.MERGE_STRATEGY)); parentName.setText(parent.get()); mergeStrategies.setRevision(result.getRevision()); if (!result.getMergeStrategies().isEmpty()) { mergeStrategies.setVisible(true); mergeStrategies.display(result.getMergeStrategies()); } }
Source:
public void beforeMethod() throws Exception { subConsumers = new LineConsumer[] { lineConsumer1, lineConsumer2 }; for (LineConsumer lineConsumer : subConsumers) { doNothing().when(lineConsumer).writeLine(anyString()); } }

Target:
public void beforeMethod() throws Exception { subConsumers = new LineConsumer[] { lineConsumer1, lineConsumer2, lineConsumer3 }; compositeLineConsumer = new CompositeLineConsumer(subConsumers); }
Source:
void didChange() { realmObserverPairs.foreach(onChangeCallBack); Iterator<Runnable> it = transactionCallbacks.iterator(); while (it.hasNext()) { Runnable runnable = it.next(); it.remove(); runnable.run(); } }

Target:
void didChange() { realmObserverPairs.foreach(onChangeCallBack); if (!transactionCallbacks.isEmpty()) { List<Runnable> callbacks = transactionCallbacks; transactionCallbacks = new ArrayList<Runnable>(); for (Runnable runnable : callbacks) { runnable.run(); } } }
Source:
public void saveEncounter_shouldSaveEncounterWhenTopLevelObsIsUpdatedByRemovingChildObs() throws Exception { executeDataSet(ENC_OBS_HIERARCHY_DATA_XML); EncounterService es = Context.getEncounterService(); ObsService os = Context.getObsService(); Encounter enc = es.getEncounter(100); Obs oParent = os.getObs(100); Obs oChild = os.getObs(101); oParent.removeGroupMember(oChild); es.saveEncounter(enc); Context.evictFromSession(enc); Context.flushSession(); enc = es.getEncounter(100); Set<Obs> obsAtTopLevel = enc.getObsAtTopLevel(true); assertEquals(2,obsAtTopLevel.size()); assertTrue(obsAtTopLevel.contains(os.getObs(100))); Obs newObs = obsAtTopLevel.stream().filter(obs -> obs.getObsId() != 100 ).findFirst().get(); assertNotNull(newObs.getPreviousVersion()); assertEquals(oChild.getObsId(), newObs.getPreviousVersion().getObsId()); assertTrue(os.getObs(100).getGroupMembers(true).contains(os.getObs(102))); assertFalse(os.getObs(100).getGroupMembers(true).contains(os.getObs(101))); }

Target:
public void saveEncounter_shouldSaveEncounterWhenTopLevelObsIsUpdatedByRemovingChildObs() throws Exception { executeDataSet(ENC_OBS_HIERARCHY_DATA_XML); EncounterService es = Context.getEncounterService(); ObsService os = Context.getObsService(); Encounter enc = es.getEncounter(100); Obs oParent = os.getObs(100); Obs oChild = os.getObs(101); oParent.removeGroupMember(oChild); es.saveEncounter(enc); Context.flushSession(); Context.clearSession(); enc = es.getEncounter(100); Set<Obs> obsAtTopLevel = enc.getObsAtTopLevel(true); assertEquals(2,obsAtTopLevel.size()); assertTrue(obsAtTopLevel.contains(os.getObs(100))); Obs newObs = obsAtTopLevel.stream().filter(obs -> obs.getObsId() != 100 ).findFirst().get(); assertNotNull(newObs.getPreviousVersion()); assertEquals(oChild.getObsId(), newObs.getPreviousVersion().getObsId()); assertTrue(os.getObs(100).getGroupMembers(true).contains(os.getObs(102))); assertTrue(os.getObs(100).getGroupMembers(true).contains(os.getObs(101))); }
Source:
protected void activate(ComponentContext ctx, Map<String, Object> properties) { logger.info("Activating"); this.componentContext = ctx; init(properties); }

Target:
protected void activate(ComponentContext ctx, Map<String, Object> properties) { logger.info("Activating {}", ctx.getProperties().get(KURA_SERVICE_PID)); this.componentContext = ctx; init(properties); }
Source:
public ThreadSafeUnaligner( int totalNumChannels, ChannelStateWriter channelStateWriter, CheckpointBarrierUnaligner handler) { barrierReceivedChannels = new boolean[totalNumChannels]; this.channelStateWriter = channelStateWriter; this.handler = handler; Arrays.fill(barrierReceivedChannels, true); numOpenChannels = totalNumChannels; }

Target:
public ThreadSafeUnaligner( int totalNumChannels, ChannelStateWriter channelStateWriter, CheckpointBarrierUnaligner handler) { storeNewBuffers = new boolean[totalNumChannels]; this.channelStateWriter = channelStateWriter; this.handler = handler; numOpenChannels = totalNumChannels; }
Source:
private void next(final String email, final String password) { if (TextUtils.isEmpty(password)) { mPasswordField.setError(getString(R.string.required_field)); return; } else { mPasswordField.setError(null); } final FirebaseAuth firebaseAuth = mActivityHelper.getFirebaseAuth(); firebaseAuth.signInWithEmailAndPassword(email, password) .addOnFailureListener( new TaskFailureLogger(TAG, "Error signing in with email and password")) .addOnSuccessListener(new OnSuccessListener<AuthResult>() { @Override public void onSuccess(AuthResult authResult) { AuthCredential authCredential = AuthCredentialHelper.getAuthCredential(mIdpResponse); if (authCredential == null) { mActivityHelper.saveCredentialsOrFinish( mSaveSmartLock, authResult.getUser(), password, new IdpResponse(EmailAuthProvider.PROVIDER_ID, email)); } else { authResult.getUser() .linkWithCredential(authCredential) .addOnFailureListener(new TaskFailureLogger( TAG, "Error signing in with credential")) .addOnSuccessListener(new OnSuccessListener<AuthResult>() { @Override public void onSuccess(AuthResult authResult) { mActivityHelper.saveCredentialsOrFinish( mSaveSmartLock, authResult.getUser(), mIdpResponse); } }); } } }) .addOnFailureListener(this, new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { mActivityHelper.dismissDialog(); String error = e.getLocalizedMessage(); mPasswordLayout.setError(error); } }); }

Target:
private void next(final String email, final String password) { if (TextUtils.isEmpty(password)) { mPasswordLayout.setError(getString(R.string.required_field)); return; } else { mPasswordLayout.setError(null); } mActivityHelper.showLoadingDialog(R.string.progress_dialog_signing_in); final FirebaseAuth firebaseAuth = mActivityHelper.getFirebaseAuth(); firebaseAuth.signInWithEmailAndPassword(email, password) .addOnFailureListener( new TaskFailureLogger(TAG, "Error signing in with email and password")) .addOnSuccessListener(new OnSuccessListener<AuthResult>() { @Override public void onSuccess(AuthResult authResult) { AuthCredential authCredential = AuthCredentialHelper.getAuthCredential(mIdpResponse); if (authCredential == null) { mActivityHelper.saveCredentialsOrFinish( mSaveSmartLock, authResult.getUser(), password, new IdpResponse(EmailAuthProvider.PROVIDER_ID, email)); } else { authResult.getUser() .linkWithCredential(authCredential) .addOnFailureListener(new TaskFailureLogger( TAG, "Error signing in with credential")) .addOnSuccessListener(new OnSuccessListener<AuthResult>() { @Override public void onSuccess(AuthResult authResult) { mActivityHelper.saveCredentialsOrFinish( mSaveSmartLock, authResult.getUser(), mIdpResponse); } }); } } }) .addOnFailureListener(this, new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { mActivityHelper.dismissDialog(); String error = e.getLocalizedMessage(); mPasswordLayout.setError(error); } }); }
Source:
public IntArrayList computeEligibleRowIds(Page page) { IntArrayList ids = new IntArrayList(page.getPositionCount()); Page bucketColumnsPage = extractColumns(page, bucketColumns); for (int position = 0; position < page.getPositionCount(); position++) { int bucket = HiveBucketing.getHiveBucket(tableBucketCount, typeInfoList, bucketColumnsPage, position); if ((bucket - bucketToKeep) % partitionBucketCount != 0) { throw new PrestoException(HIVE_INVALID_BUCKET_FILES, format( "A row that is supposed to be in bucket %s is encountered. Only rows in bucket %s (modulo %s) is expected", bucket, bucketToKeep % partitionBucketCount, partitionBucketCount)); } if (bucket == bucketToKeep) { ids.add(position); } } return ids; }

Target:
public IntArrayList computeEligibleRowIds(Page page) { IntArrayList ids = new IntArrayList(page.getPositionCount()); Page bucketColumnsPage = extractColumns(page, bucketColumns); for (int position = 0; position < page.getPositionCount(); position++) { int bucket = getHiveBucket(tableBucketCount, typeInfoList, bucketColumnsPage, position); if ((bucket - bucketToKeep) % partitionBucketCount != 0) { throw new PrestoException(HIVE_INVALID_BUCKET_FILES, format( "A row that is supposed to be in bucket %s is encountered. Only rows in bucket %s (modulo %s) are expected", bucket, bucketToKeep % partitionBucketCount, partitionBucketCount)); } if (bucket == bucketToKeep) { ids.add(position); } } return ids; }
Source:
public void writeToFile(String repoIdString, String issuesETag, String collabsETag, String labelsETag, String milestonesETag, String issueCheckTime, ObservableList<TurboUser> collaborators, ObservableList<TurboLabel> labels, ObservableList<TurboMilestone> milestones, ObservableList<TurboIssue> issues) { logger.info("About to write to file for repo: " + repoIdString); this.issues = issues.stream().collect(Collectors.toList()); this.collaborators = collaborators.stream().collect(Collectors.toList()); this.labels = labels.stream().collect(Collectors.toList()); this.milestones = milestones.stream().collect(Collectors.toList()); TurboRepoData currentRepoData = new TurboRepoData(issuesETag, collabsETag, labelsETag, milestonesETag, issueCheckTime, this.collaborators, this.labels, this.milestones, this.issues); Gson gson = new GsonBuilder().setPrettyPrinting().create(); String json = gson.toJson(currentRepoData); try { FileWriter writer = new FileWriter(getFileName(FILE_DATA_CACHE_TEMP, repoIdString)); writer.write(json); writer.close(); logger.info("Done writing to file for repo: " + repoIdString); File file = new File(getFileName(FILE_DATA_CACHE, repoIdString)); if (file.exists()) { if (file.delete()) { } else { logger.error("Failed to delete cache file"); } } File newFile = new File(getFileName(FILE_DATA_CACHE_TEMP, repoIdString)); if (newFile.renameTo(file)) { } else { logger.error("Failed to rename temp cache file"); } } catch (IOException e) { e.printStackTrace(); } }

Target:
public void writeToFile(String repoIdString, String issuesETag, String collabsETag, String labelsETag, String milestonesETag, String issueCheckTime, ObservableList<TurboUser> collaborators, ObservableList<TurboLabel> labels, ObservableList<TurboMilestone> milestones, ObservableList<TurboIssue> issues) { logger.info("About to write to file for repo: " + repoIdString + " with last checked time: " + issueCheckTime); this.issues = issues.stream().collect(Collectors.toList()); this.collaborators = collaborators.stream().collect(Collectors.toList()); this.labels = labels.stream().collect(Collectors.toList()); this.milestones = milestones.stream().collect(Collectors.toList()); TurboRepoData currentRepoData = new TurboRepoData(issuesETag, collabsETag, labelsETag, milestonesETag, issueCheckTime, this.collaborators, this.labels, this.milestones, this.issues); Gson gson = new GsonBuilder().setPrettyPrinting().create(); String json = gson.toJson(currentRepoData); try { FileWriter writer = new FileWriter(getFileName(FILE_DATA_CACHE_TEMP, repoIdString)); writer.write(json); writer.close(); logger.info("Done writing to file for repo: " + repoIdString); File file = new File(getFileName(FILE_DATA_CACHE, repoIdString)); if (file.exists()) { if (file.delete()) { } else { logger.error("Failed to delete cache file"); } } File newFile = new File(getFileName(FILE_DATA_CACHE_TEMP, repoIdString)); if (newFile.renameTo(file)) { } else { logger.error("Failed to rename temp cache file"); } } catch (IOException e) { e.printStackTrace(); } }
Source:
private void resetBlockBuilders() { for (int i = 0; i < replicateTypes.size(); i++) { Block newInputBlock = currentPage.getBlock(replicateChannels.get(i)); replicatedBlockBuilders.get(i).resetInputBlock(newInputBlock); } for (int i = 0; i < unnestTypes.size(); i++) { int inputChannel = unnestChannels.get(i); Block unnestChannelInputBlock = currentPage.getBlock(inputChannel); unnesters.get(i).resetInput(unnestChannelInputBlock); } }

Target:
private void resetBlockBuilders() { for (int i = 0; i < replicateTypes.size(); i++) { Block newInputBlock = currentPage.getBlock(replicateChannels.get(i)); replicatedBlockBuilders.get(i).resetInputBlock(newInputBlock); } int positionCount = currentPage.getPositionCount(); maxLengths = ensureCapacity(maxLengths, positionCount, SMALL, INITIALIZE); for (int i = 0; i < unnestTypes.size(); i++) { int inputChannel = unnestChannels.get(i); Block unnestChannelInputBlock = currentPage.getBlock(inputChannel); Unnester unnester = unnesters.get(i); unnester.resetInput(unnestChannelInputBlock); int[] lengths = unnester.getLengths(); for (int j = 0; j < positionCount; j++) { maxLengths[j] = max(maxLengths[j], lengths[j]); } } }
Source:
public Sieve(int maxPrime) { throw new UnsupportedOperationException("Delete this statement and provide your own implementation."); }

Target:
Sieve(int maxPrime) { throw new UnsupportedOperationException("Delete this statement and provide your own implementation."); }
Source:
public void resolveColumnIndexes() { IndexScanPlanNode index_scan = (IndexScanPlanNode) getInlinePlanNode(PlanNodeType.INDEXSCAN); assert(m_children.size() == 2 && index_scan == null); for (AbstractPlanNode child : m_children) { child.resolveColumnIndexes(); } final NodeSchema outer_schema = m_children.get(0).getOutputSchema(); final NodeSchema inner_schema = m_children.get(1).getOutputSchema(); final int outerSize = outer_schema.size(); final int innerSize = inner_schema.size(); resolvePredicate(m_preJoinPredicate, outer_schema, inner_schema); resolvePredicate(m_joinPredicate, outer_schema, inner_schema); resolvePredicate(m_wherePredicate, outer_schema, inner_schema); resolveSubqueryColumnIndexes(); for (int i = 0; i < m_outputSchemaPreInlineAgg.size(); ++i) { SchemaColumn col = m_outputSchemaPreInlineAgg.getColumns().get(i); assert(col.getExpression() instanceof TupleValueExpression); TupleValueExpression tve = (TupleValueExpression)col.getExpression(); int index = i; if (i < outerSize) { index = tve.setColumnIndexUsingSchema(outer_schema); } else { index = tve.setColumnIndexUsingSchema(inner_schema); index += outerSize; } if (index == -1) { throw new RuntimeException("Unable to find index for column: " + col.toString()); } tve.setColumnIndex(index); tve.setDifferentiator(index); } m_outputSchemaPreInlineAgg.sortByTveIndex(0, outer_schema.size()); m_outputSchemaPreInlineAgg.sortByTveIndex(outer_schema.size(), m_outputSchemaPreInlineAgg.size()); m_hasSignificantOutputSchema = true; resolveRealOutputSchema(); }

Target:
public void resolveColumnIndexes() { IndexScanPlanNode index_scan = (IndexScanPlanNode) getInlinePlanNode(PlanNodeType.INDEXSCAN); assert(m_children.size() == 2 && index_scan == null); for (AbstractPlanNode child : m_children) { child.resolveColumnIndexes(); } final NodeSchema outer_schema = m_children.get(0).getOutputSchema(); final NodeSchema inner_schema = m_children.get(1).getOutputSchema(); final int outerSize = outer_schema.size(); final int innerSize = inner_schema.size(); resolvePredicate(m_preJoinPredicate, outer_schema, inner_schema); resolvePredicate(m_joinPredicate, outer_schema, inner_schema); resolvePredicate(m_wherePredicate, outer_schema, inner_schema); resolveSubqueryColumnIndexes(); for (int i = 0; i < m_outputSchemaPreInlineAgg.size(); ++i) { SchemaColumn col = m_outputSchemaPreInlineAgg.getColumns().get(i); assert(col.getExpression() instanceof TupleValueExpression); TupleValueExpression tve = (TupleValueExpression)col.getExpression(); int index; if (i < outerSize) { index = tve.setColumnIndexUsingSchema(outer_schema); } else { index = tve.setColumnIndexUsingSchema(inner_schema); index += outerSize; } if (index == -1) { throw new RuntimeException("Unable to find index for column: " + col.toString()); } tve.setColumnIndex(index); tve.setDifferentiator(index); } m_outputSchemaPreInlineAgg.sortByTveIndex(0, outer_schema.size()); m_outputSchemaPreInlineAgg.sortByTveIndex(outer_schema.size(), m_outputSchemaPreInlineAgg.size()); m_hasSignificantOutputSchema = true; resolveRealOutputSchema(); }
Source:
public String getQueryId() throws SQLException { if (stmtHandle == null) { return null; } try { return client.GetQueryId(new TGetQueryIdReq(stmtHandle)).getQueryId(); } catch (TException e) { throw new SQLException(e); } }

Target:
public String getQueryId() throws SQLException { if (stmtHandle == null) { return null; } try { return client.GetQueryId(new TGetQueryIdReq(stmtHandle)).getQueryId(); } catch (TException e) { throw new SQLException(e); } catch (Exception e) { return null; } }
Source:
public String toString() { return "SystemServiceItemStoppedEvent{" + "item='" + item + '\'' + ", total=" + total + ", current=" + current + "} " + super.toString(); }

Target:
public String toString() { return "SystemServiceItemStoppedEvent{" + "item='" + item + '\'' + ", total=" + total + ", current=" + current + ", eventType='" + getType() + '\'' + ", service='" + getServiceName() + "\'}"; }
Source:
protected String getUrlForWebView() { return ""; }

Target:
protected String getUrlForWebView() { if ( courseData != null && courseData.getCourse() != null ){ return courseData.getCourse().getCourse_url(); } return ""; }
Source:
public void onSuccess() { if (failureCount.get() > 0) { synchronized (this) { failureCount.set(0); } } }

Target:
public void onSuccess() { failureCount.set(0); }
Source:
public void onWalSegmentRemoved(long segmentIdx) { Map<Integer, Set<Integer>> rmvKeys = grpKeys.releaseWalKeys(segmentIdx); if (F.isEmpty(rmvKeys)) return; synchronized (metaStorageMux) { try { writeToMetaStore(0, false, true); for (Map.Entry<Integer, Set<Integer>> entry : rmvKeys.entrySet()) { int grpId = entry.getKey(); if (reencryptGroups.containsKey(grpId)) continue; Set<Integer> keyIds = entry.getValue(); boolean rmv = grpKeys.removeKeysById(grpId, keyIds); assert rmv : keyIds; writeToMetaStore(grpId, true, false); if (log.isInfoEnabled()) { log.info("Previous encryption keys have been removed [grpId=" + grpId + ", keyIds=" + keyIds + "]"); } } } catch (IgniteCheckedException e) { log.error("Unable to remove encryption keys from metastore.", e); } } }

Target:
public void onWalSegmentRemoved(long segmentIdx) { withMasterKeyChangeReadLock(() -> { synchronized (metaStorageMux) { Map<Integer, Set<Integer>> rmvKeys = grpKeys.releaseWalKeys(segmentIdx); if (F.isEmpty(rmvKeys)) return null; try { writeTrackedWalIdxsToMetaStore(); for (Map.Entry<Integer, Set<Integer>> entry : rmvKeys.entrySet()) { Integer grpId = entry.getKey(); if (reencryptGroups.containsKey(grpId)) continue; Set<Integer> keyIds = entry.getValue(); if (!grpKeys.removeKeysById(grpId, keyIds)) continue; writeGroupKeysToMetaStore(grpId, grpKeys.getAll(grpId)); if (log.isInfoEnabled()) { log.info("Previous encryption keys have been removed [grpId=" + grpId + ", keyIds=" + keyIds + "]"); } } } catch (IgniteCheckedException e) { log.error("Unable to remove encryption keys from metastore.", e); } } return null; }); }
Source:
private Character argToChar(Object o) { return o != null ? ((char) o) : null; }

Target:
private Character argToChar(Object o) { if (o instanceof Character) return (char) o; throw new IllegalArgumentException("expected type but was " + o); }
Source:
public boolean remove(String citationNumber, String phoneNumber, LocalDate dob){ if (doesAlertExist(citationNumber,phoneNumber)){ Map<String, Object> parameterMap = new HashMap<String, Object>(); parameterMap.put("citationNumber", citationNumber); parameterMap.put("phoneNumber", phoneNumber); parameterMap.put("dob", DatabaseUtilities.convertLocalDateToDatabaseDate(dob)); String sql = "DELETE FROM sms_alerts WHERE citation_number=:citationNumber AND phone_number=:phoneNumber AND date_of_birth=:dob"; try{ jdbcTemplate.execute(sql, parameterMap, new PreparedStatementCallback<Boolean>(){ @Override public Boolean doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException { return ps.execute(); } }); return true; }catch(Exception e){ LogSystem.LogDBException(e); return false; } }else{ return true; } }

Target:
public boolean remove(String citationNumber, String phoneNumber, LocalDate dob){ if (doesAlertExist(citationNumber,phoneNumber)){ Map<String, Object> parameterMap = new HashMap<String, Object>(); parameterMap.put("citationNumber", citationNumber); parameterMap.put("phoneNumber", phoneNumber); parameterMap.put("dob", DatabaseUtilities.convertLocalDateToDatabaseDate(dob)); try{ int rowsAffected = jdbcTemplate.update(getSql("SMSAlert/delete-SMSAlert.sql"), parameterMap); if (rowsAffected==1){ return true; }else{ return false; } }catch(Exception e){ LogSystem.LogDBException(e); return false; } }else{ return true; } }
Source:
public void shouldInstallWidget() throws Exception { String componentCode = "de_test_widget"; try { installAndCheckForCompletion(componentCode); assertThat(widgetService.getWidget(componentCode)).isNotNull(); } finally { try { if (widgetService.getWidget(componentCode) != null) { widgetService.removeWidget(componentCode); } } catch (RestRourceNotFoundException ignored) { } } }

Target:
public void shouldInstallWidget() throws Exception { String componentCode = "de_test_widget"; try { installAndCheckForCompletion(componentCode); assertThat(widgetService.getWidget(componentCode)).isNotNull(); } finally { try { widgetService.removeWidget(componentCode); } catch (ValidationGenericException ignored) { } } }
Source:
private void initExternalPluginsState(ILaunchConfiguration configuration) throws CoreException { Map<IPluginModelBase, String> map = BundleLauncherHelper.getTargetBundleMap(configuration, Collections.EMPTY_SET, IPDELauncherConstants.TARGET_BUNDLES); fPluginTreeViewer.setSubtreeChecked(fExternalPlugins, false); for (Entry<IPluginModelBase, String> entry : map.entrySet()) { IPluginModelBase model = entry.getKey(); if (fPluginTreeViewer.setChecked(model, true)) { setText(model, entry.getValue().toString()); } } fNumExternalChecked = map.size(); resetGroup(fExternalPlugins); fPluginTreeViewer.setChecked(fExternalPlugins, fNumExternalChecked > 0); fPluginTreeViewer.setGrayed(fExternalPlugins, fNumExternalChecked > 0 && fNumExternalChecked < getExternalModels().length); }

Target:
private void initExternalPluginsState(ILaunchConfiguration configuration) throws CoreException { Map<IPluginModelBase, String> map = BundleLauncherHelper.getTargetBundleMap(configuration, Collections.EMPTY_SET, IPDELauncherConstants.TARGET_BUNDLES); fPluginTreeViewer.setSubtreeChecked(fExternalPlugins, false); for (Entry<IPluginModelBase, String> entry : map.entrySet()) { IPluginModelBase model = entry.getKey(); if (fPluginTreeViewer.setChecked(model, true)) { setText(model, entry.getValue()); } } fNumExternalChecked = map.size(); resetGroup(fExternalPlugins); fPluginTreeViewer.setChecked(fExternalPlugins, fNumExternalChecked > 0); fPluginTreeViewer.setGrayed(fExternalPlugins, fNumExternalChecked > 0 && fNumExternalChecked < getExternalModels().length); }
Source:
public GroupingSetAnalysis( List<Set<FieldId>> cubes, List<List<FieldId>> rollups, List<List<Set<FieldId>>> ordinarySets, List<Expression> complexExpressions) { this.cubes = cubes; this.rollups = rollups; this.ordinarySets = ordinarySets; this.complexExpressions = complexExpressions; }

Target:
public GroupingSetAnalysis( List<Set<FieldId>> cubes, List<List<FieldId>> rollups, List<List<Set<FieldId>>> ordinarySets, List<Expression> complexExpressions) { this.cubes = ImmutableList.copyOf(cubes); this.rollups = ImmutableList.copyOf(rollups); this.ordinarySets = ImmutableList.copyOf(ordinarySets); this.complexExpressions = ImmutableList.copyOf(complexExpressions); }
Source:
private boolean noBeanPresentForComponent(Object instance, String parentBeanName) { if (instance instanceof NamedComponent) { String beanName = ((NamedComponent) instance).getComponentName(); if (beanName != null) { if (this.beanFactory.containsBean(beanName)) { BeanDefinition existingBeanDefinition = this.beanFactory.getBeanDefinition(beanName); if (!ConfigurableBeanFactory.SCOPE_PROTOTYPE.equals(existingBeanDefinition.getScope()) && instance != this.beanFactory.getBean(beanName)) { AbstractBeanDefinition beanDefinition = BeanDefinitionBuilder.genericBeanDefinition((Class<Object>) instance.getClass(), () -> instance) .getBeanDefinition(); beanDefinition.setResourceDescription("the '" + parentBeanName + "' bean definition"); throw new BeanDefinitionOverrideException(beanName, beanDefinition, existingBeanDefinition); } else { return false; } } else { return true; } } } return !this.beanFactory.getBeansOfType(instance.getClass(), false, false) .values() .contains(instance); }

Target:
private boolean noBeanPresentForComponent(Object instance, String parentBeanName) { if (instance instanceof NamedComponent) { String beanName = ((NamedComponent) instance).getComponentName(); if (beanName != null) { if (this.beanFactory.containsBean(beanName)) { BeanDefinition existingBeanDefinition = this.beanFactory.getBeanDefinition(beanName); if (!ConfigurableBeanFactory.SCOPE_PROTOTYPE.equals(existingBeanDefinition.getScope()) && !instance.equals(this.beanFactory.getBean(beanName))) { AbstractBeanDefinition beanDefinition = BeanDefinitionBuilder.genericBeanDefinition((Class<Object>) instance.getClass(), () -> instance) .getBeanDefinition(); beanDefinition.setResourceDescription("the '" + parentBeanName + "' bean definition"); throw new BeanDefinitionOverrideException(beanName, beanDefinition, existingBeanDefinition); } else { return false; } } else { return true; } } } return !this.beanFactory.getBeansOfType(instance.getClass(), false, false) .values() .contains(instance); }
Source:
public void testIsDeleteD() { when(data.getModType()).thenReturn(ModificationType.DELETED); assertTrue(relation.isHardDeleted()); when(data.getModType()).thenReturn(ModificationType.ARTIFACT_DELETED); assertTrue(relation.isHardDeleted()); when(data.getModType()).thenReturn(ModificationType.MODIFIED); assertFalse(relation.isHardDeleted()); }

Target:
public void testIsDeleteD() { when(data.getModType()).thenReturn(ModificationType.DELETED); assertTrue(relation.isHardDeleted()); when(data.getModType()).thenReturn(ModificationType.MODIFIED); assertFalse(relation.isHardDeleted()); }
Source:
public void testBuilderFrom() throws IOException { final Order.OrderType type = Order.OrderType.ASK; final BigDecimal originalAmount = new BigDecimal("100.501"); final CurrencyPair currencyPair = CurrencyPair.BTC_USD; final BigDecimal limitPrice = new BigDecimal("250.34"); final BigDecimal averagePrice = new BigDecimal("255.00"); final BigDecimal cumulativeAmount = new BigDecimal("0.00"); final BigDecimal stopPrice = new BigDecimal("266.21"); final BigDecimal fee = new BigDecimal("22.2"); final Date timestamp = new Date(); final String id = "id"; final Order.OrderStatus status = Order.OrderStatus.FILLED; final StopOrder original = new StopOrder( type, originalAmount, currencyPair, id, timestamp, stopPrice, limitPrice, averagePrice, cumulativeAmount, fee, status); original.addOrderFlag(TestFlags.TEST1); original.addOrderFlag(TestFlags.TEST3); final StopOrder copy = StopOrder.Builder.from(original).build(); assertThat(copy).isEqualToComparingFieldByField(original); StopOrder jsonCopy = ObjectMapperHelper.viaJSON(copy); assertThat(jsonCopy).isEqualToIgnoringGivenFields(copy, "cumulativeAmount"); assertTrue(jsonCopy.getCumulativeAmount().compareTo(copy.getCumulativeAmount()) == 0); }

Target:
public void testBuilderFrom() throws IOException { final Order.OrderType type = Order.OrderType.ASK; final BigDecimal originalAmount = new BigDecimal("100.501"); final CurrencyPair currencyPair = CurrencyPair.BTC_USD; final BigDecimal limitPrice = new BigDecimal("250.34"); final BigDecimal averagePrice = new BigDecimal("255.00"); final BigDecimal cumulativeAmount = new BigDecimal("0.00"); final BigDecimal stopPrice = new BigDecimal("266.21"); final BigDecimal fee = new BigDecimal("22.2"); final Date timestamp = new Date(); final String id = "id"; final Order.OrderStatus status = Order.OrderStatus.FILLED; final StopOrder original = new StopOrder( type, originalAmount, currencyPair, id, timestamp, stopPrice, limitPrice, averagePrice, cumulativeAmount, fee, status); original.addOrderFlag(TestFlags.TEST1); original.addOrderFlag(TestFlags.TEST3); final StopOrder copy = StopOrder.Builder.from(original).build(); assertThat(copy).isEqualToComparingFieldByField(original); }
Source:
public void testSwitchWhitespaceAround() throws Exception { final String[] expected = { "6:15: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "switch"), }; verify(checkConfig, getPath("InputWhitespaceAroundSwitchWhitespaceAround.java"), expected); }

Target:
public void testSwitchWhitespaceAround() throws Exception { final String[] expected = { "6:15: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "switch"), }; verify(checkConfig, getPath("InputWhitespaceAroundSwitch.java"), expected); }
Source:
public void testKieServerStateConfigMap() throws InterruptedException { Resource<ConfigMap, DoneableConfigMap> configMapResource = client.configMaps().inNamespace(testNamespace) .withName(TEST_KIE_SERVER_ID); ConfigMap configMap = configMapResource.get(); assertEquals(TEST_KIE_SERVER_ID, configMap.getMetadata().getName()); Map<String, String> data = configMap.getData(); String srvStateInXML = data.get(KieServerStateCloudRepository.CFG_MAP_DATA_KEY); KieServerState kieServerState = (KieServerState) xs.fromXML(srvStateInXML); assertNotNull(kieServerState); assertEquals(TEST_KIE_SERVER_ID, kieServerState.getConfiguration().getConfigItem(KieServerConstants.KIE_SERVER_ID).getValue()); assertTrue(client instanceof AutoCloseable); }

Target:
public void testKieServerStateConfigMap() throws InterruptedException { Resource<ConfigMap, DoneableConfigMap> configMapResource = client.configMaps().inNamespace(testNamespace) .withName(TEST_KIE_SERVER_ID); ConfigMap configMap = configMapResource.get(); assertEquals(TEST_KIE_SERVER_ID, configMap.getMetadata().getName()); Map<String, String> data = configMap.getData(); String srvStateInXML = data.get(KieServerStateCloudRepository.CFG_MAP_DATA_KEY); KieServerState kieServerState = (KieServerState) xs.fromXML(srvStateInXML); assertNotNull(kieServerState); assertEquals(TEST_KIE_SERVER_ID, kieServerState.getConfiguration().getConfigItem(KieServerConstants.KIE_SERVER_ID).getValue()); }
Source:
public void askUserAndSaveMigratedSession(Session session) { if (MigrationUIUtil.shouldMigratedElementBeSaved(session, getSessionNameToDisplayWhileSaving(session))) { PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { try { new ProgressMonitorDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell()).run(false, false, new WorkspaceModifyOperation() { @Override protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException { session.save(monitor); if (session.getSessionResource() instanceof XMLResource) { ((XMLResource) session.getSessionResource()).getDefaultLoadOptions().remove(AbstractSiriusMigrationService.OPTION_RESOURCE_MIGRATION_LOADEDVERSION); } } }); } catch (InvocationTargetException e) { SiriusEditPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SiriusEditPlugin.ID, e.getLocalizedMessage(), e)); } catch (InterruptedException e) { SiriusEditPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SiriusEditPlugin.ID, e.getLocalizedMessage(), e)); } }); } }

Target:
public void askUserAndSaveMigratedSession(Session session) { if (askUserToSaveAutomaticMigration(session, getSessionNameToDisplayWhileSaving(session))) { PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { try { new ProgressMonitorDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell()).run(false, false, new WorkspaceModifyOperation() { @Override protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException { session.save(monitor); } }); } catch (InvocationTargetException e) { SiriusEditPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SiriusEditPlugin.ID, e.getLocalizedMessage(), e)); } catch (InterruptedException e) { SiriusEditPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SiriusEditPlugin.ID, e.getLocalizedMessage(), e)); } }); } }
Source:
public ProbabilisticBufferReviewer() { mConf = ServerConfiguration.global(); mHardLimitBytes = mConf.getBytes(PropertyKey.WORKER_REVIEWER_BUFFER_HARDLIMIT_BYTES); long stopSoftBytes = mConf.getBytes(PropertyKey.WORKER_REVIEWER_BUFFER_SOFTLIMIT_BYTES); if (stopSoftBytes <= mHardLimitBytes) { LOG.warn("{} should be greater than or equal to {}. Setting to {}.", PropertyKey.WORKER_REVIEWER_BUFFER_SOFTLIMIT_BYTES.toString(), PropertyKey.WORKER_REVIEWER_BUFFER_HARDLIMIT_BYTES.toString(), PropertyKey.WORKER_REVIEWER_BUFFER_SOFTLIMIT_BYTES.toString(), mHardLimitBytes); mSoftLimitBytes = mHardLimitBytes; } else { mSoftLimitBytes = stopSoftBytes; } }

Target:
public ProbabilisticBufferReviewer() { InstancedConfiguration conf = ServerConfiguration.global(); mHardLimitBytes = conf.getBytes(PropertyKey.WORKER_REVIEWER_PROBABILISTIC_HARDLIMIT_BYTES); long stopSoftBytes = conf.getBytes(PropertyKey.WORKER_REVIEWER_PROBABILISTIC_SOFTLIMIT_BYTES); if (stopSoftBytes <= mHardLimitBytes) { LOG.warn("{} should be greater than or equal to {}. Setting to {}.", PropertyKey.WORKER_REVIEWER_PROBABILISTIC_SOFTLIMIT_BYTES.toString(), PropertyKey.WORKER_REVIEWER_PROBABILISTIC_HARDLIMIT_BYTES.toString(), PropertyKey.WORKER_REVIEWER_PROBABILISTIC_SOFTLIMIT_BYTES.toString(), mHardLimitBytes); mSoftLimitBytes = mHardLimitBytes; } else { mSoftLimitBytes = stopSoftBytes; } }
Source:
public void test_remote_bidi_greeting_expect_IllegalArgumentException() { GreetingService service = createProxy(); Flux<GreetingResponse> responses = service.bidiGreetingIllegalArgumentException( Mono.just(new GreetingRequest("IllegalArgumentException"))); StepVerifier.create(responses) .expectErrorMessage("IllegalArgumentException") .verify(Duration.ofSeconds(300)); }

Target:
public void test_remote_bidi_greeting_expect_IllegalArgumentException() { GreetingService service = createProxy(); Flux<GreetingResponse> responses = service.bidiGreetingIllegalArgumentException( Mono.just(new GreetingRequest("IllegalArgumentException"))); StepVerifier.create(responses) .expectErrorMessage("IllegalArgumentException") .verify(Duration.ofSeconds(3)); }
Source:
public void onDestroy() { mDispatcher.unregister(this); super.onStop(); }

Target:
public void onDestroy() { mDispatcher.unregister(this); super.onDestroy(); }
Source:
public void rewritesOnSubqueryWithoutProjection() { tester.assertThat(rule) .on(p -> p.lateral( ImmutableList.of(p.symbol("corr")), p.values(p.symbol("corr")), p.enforceSingleRow( p.filter( p.expression("corr = a"), p.tableScan( NATION, ImmutableList.of(p.symbol("a")), ImmutableMap.of(p.symbol("a"), new TpchColumnHandle("nationkey", BIGINT))))))) .matches( project( filter( "CASE is_distinct WHEN true THEN true ELSE CAST(fail(28, 'Scalar sub-query has returned multiple rows') AS BOOLEAN) END", markDistinct( "is_distinct", ImmutableList.of("unique", "corr"), join( JoinNode.Type.LEFT, ImmutableList.of(), Optional.of("corr = a"), assignUniqueId( "unique", values(ImmutableMap.of("corr", 0))), project( ImmutableMap.of("non_null", expression("true")), tableScan("nation", ImmutableMap.of("a", "nationkey")))))))); }

Target:
public void rewritesOnSubqueryWithoutProjection() { tester.assertThat(rule) .on(p -> p.lateral( ImmutableList.of(p.symbol("corr")), p.values(p.symbol("corr")), p.enforceSingleRow( p.filter( p.expression("corr = a"), p.tableScan( NATION, ImmutableList.of(p.symbol("a")), ImmutableMap.of(p.symbol("a"), new TpchColumnHandle("nationkey", BIGINT))))))) .matches( project( filter( ensureScalarSubquery(), markDistinct( "is_distinct", ImmutableList.of("unique", "corr"), join( JoinNode.Type.LEFT, ImmutableList.of(), Optional.of("corr = a"), assignUniqueId( "unique", values(ImmutableMap.of("corr", 0))), project( ImmutableMap.of("non_null", expression("true")), tableScan("nation", ImmutableMap.of("a", "nationkey")))))))); }
Source:
protected Boolean doCall() { String deploymentName = context.getDeploymentName(); String resourceGroupName = context.getResourceGroupName(); AzureClient azureClient = context.getAzureClient(); String networkId = context.getNetworkId(); List<AzurePrivateDnsZoneServiceEnum> enabledPrivateEndpointServices = context.getEnabledPrivateEndpointServices(); LOGGER.info("Waiting for DNS zone to be created: {}", deploymentName); ResourceStatus templateDeploymentStatus = azureClient.getTemplateDeploymentStatus(resourceGroupName, deploymentName); if (templateDeploymentStatus.isPermanent() && templateDeploymentStatus != ResourceStatus.DELETED && azureClient.checkIfDnsZonesDeployed(resourceGroupName, enabledPrivateEndpointServices)) { LOGGER.info("DNS zone and network link creation has been finished with status {}", templateDeploymentStatus); if (StringUtils.isNotEmpty(networkId)) { return azureClient.checkIfNetworkLinksDeployed(resourceGroupName, networkId, enabledPrivateEndpointServices); } return true; } else { LOGGER.info("DNS zone and network link creation not finished yet."); return false; } }

Target:
protected Boolean doCall() { String deploymentName = context.getDeploymentName(); String resourceGroupName = context.getResourceGroupName(); AzureClient azureClient = context.getAzureClient(); String networkId = context.getNetworkId(); List<AzurePrivateDnsZoneServiceEnum> enabledPrivateEndpointServices = context.getEnabledPrivateEndpointServices(); LOGGER.info("Waiting for DNS zone deployment to be created: {}", deploymentName); ResourceStatus templateDeploymentStatus = azureClient.getTemplateDeploymentStatus(resourceGroupName, deploymentName); if (templateDeploymentStatus == ResourceStatus.DELETED) { throw new CloudConnectorException(String.format("Deployment %s is either deleted of does not exist", deploymentName)); } if (templateDeploymentStatus.isPermanent() && templateDeploymentStatus != ResourceStatus.DELETED) { LOGGER.info("Deployment has been finished with status {}", templateDeploymentStatus); if (StringUtils.isNotEmpty(networkId)) { return azureClient.checkIfNetworkLinksDeployed(resourceGroupName, networkId, enabledPrivateEndpointServices); } else { return azureClient.checkIfDnsZonesDeployed(resourceGroupName, enabledPrivateEndpointServices); } } else { LOGGER.info("DNS zone or network link creation not finished yet."); return false; } }
Source:
public void setup() { closeStandalone = new TMarkLogicCloseStandalone(); closeProperties = new MarkLogicCloseProperties("close"); closeProperties.referencedComponent.componentInstanceId.setValue("referenced1"); container = Mockito.mock(RuntimeContainer.class); closeStandalone.initialize(container, closeProperties); }

Target:
public void setup() { closeStandalone = new TMarkLogicCloseStandalone(); }
Source:
public Collection<SequencerReference> listByPlatformType(PlatformType platformType) throws IOException { return sequencerReferenceDao.list(0, 0, true, "id", PaginationFilter.archived(false)); }

Target:
public Collection<SequencerReference> listByPlatformType(PlatformType platformType) throws IOException { return sequencerReferenceDao.list(0, 0, true, "id", PaginationFilter.platformType(platformType), PaginationFilter.archived(false)); }