auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static Result<String, String> getRunBundles(Project project, boolean resolveIfNecessary) { try { File f = getCacheFile(project); if (f.isFile()) { try { CacheDTO dto = JSON_CODEC.dec() .from(f) .get(CacheDTO.class); if (dto.checksum.equals(project.getChecksum())) { logger.info("read cache for {}", project); return Ok.result(HeaderClause.toParameters(dto.runbundles) .toString()); } } catch (Exception e) { logger.warn("{} getRunBundles exception in reading cache {}, ignoring", project, e); IO.delete(f); } } if (!resolveIfNecessary) { return Ok.result(null); } logger.info("resolve {}", project); Result<RunResolution, String> r = resolve(project, project, null).asResult(); logger.debug("resolve {}", project, r); return r.then(rr -> { logger.info("saving cache {}", project); rr.cache(); return Ok.result(rr); }) .map(RunResolution::getRunBundlesAsString); } catch (Exception e) { throw Exceptions.duck(e); } }

Target:
public static Result<String, String> getRunBundles(Project project, boolean resolveIfNecessary) { try { File f = getCacheFile(project); if (f.isFile()) { try { CacheDTO dto = JSON_CODEC.dec() .from(f) .get(CacheDTO.class); if (dto.checksum.equals(project.getChecksum())) { logger.info("read cache for {}", project); return Ok.result(HeaderClause.toParameters(dto.runbundles) .toString()); } } catch (Exception e) { logger.warn("{} getRunBundles exception in reading cache {}, ignoring", project, e); IO.delete(f); } } if (!resolveIfNecessary) { return Ok.result(null); } logger.info("resolve {}", project); Result<RunResolution, String> r = resolve(project, project, null).asResult(); logger.debug("resolve {}", project, r); return r.flatMap(rr -> { logger.info("saving cache {}", project); rr.cache(); return Ok.result(rr); }) .map(RunResolution::getRunBundlesAsString); } catch (Exception e) { throw Exceptions.duck(e); } }
Source:
public Expression generateIL(GenContext ctx, ValueType expectedType) { CallableExprGenerator exprGen = function.getCallableExpr(ctx); List<FormalArg> formals = exprGen.getExpectedArgTypes(ctx); int offset = 0; List<Expression> args = new LinkedList<Expression>(); if(!this.generics.isEmpty()) { for(String generic : this.generics) { args.add(new wyvern.target.corewyvernIL.expression.New(new TypeDeclaration(DefDeclaration.GENERIC_MEMBER, new NominalType("", generic), this.location))); offset++; } } if (argument instanceof TupleObject) { ExpressionAST[] raw_args = ((TupleObject) argument).getObjects(); for (int i = 0; i < raw_args.length; i++) { ValueType expectedArgType = formals.get(i + offset).getType(); ExpressionAST ast = raw_args[i]; args.add(ast.generateIL(ctx, expectedArgType)); } } else if (argument instanceof UnitVal) { } else { if (formals.size() != 1 + offset) { ToolError.reportError(ErrorMessage.WRONG_NUMBER_OF_ARGUMENTS, this, ""+formals.size()); } args.add(argument.generateIL(ctx, formals.get(0).getType())); } return exprGen.genExprWithArgs(args, this); }

Target:
public Expression generateIL(GenContext ctx, ValueType expectedType) { CallableExprGenerator exprGen = function.getCallableExpr(ctx); List<FormalArg> formals = exprGen.getExpectedArgTypes(ctx); int offset = 0; List<Expression> args = new LinkedList<Expression>(); for(int i = 0; i < generics.size(); i++) { String generic = generics.get(i); String formalName = formals.get(i).getName(); if(formalName.startsWith(DefDeclaration.GENERIC_PREFIX)) { String genericName = formalName.substring(DefDeclaration.GENERIC_PREFIX.length()); ValueType vt = getILTypeForGeneric(ctx, generic); args.add(new wyvern.target.corewyvernIL.expression.New(new TypeDeclaration(genericName, vt, this.location))); } else { ToolError.reportError(ErrorMessage.EXTRA_GENERICS_AT_CALL_SITE, this); } offset++; } if (argument instanceof TupleObject) { ExpressionAST[] raw_args = ((TupleObject) argument).getObjects(); if (formals.size() != raw_args.length + offset) ToolError.reportError(ErrorMessage.WRONG_NUMBER_OF_ARGUMENTS, this, ""+formals.size()); for (int i = 0; i < raw_args.length; i++) { ValueType expectedArgType = formals.get(i + offset).getType(); ExpressionAST ast = raw_args[i]; args.add(ast.generateIL(ctx, expectedArgType)); } } else if (argument instanceof UnitVal) { } else { if (formals.size() != 1 + offset) { ToolError.reportError(ErrorMessage.WRONG_NUMBER_OF_ARGUMENTS, this, ""+formals.size()); } args.add(argument.generateIL(ctx, formals.get(0).getType())); } return exprGen.genExprWithArgs(args, this); }
Source:
private void writeRecord(SinkRecord record) throws IOException { long expectedOffset = offset + recordCounter; if (offset == -1) { offset = record.kafkaOffset(); } else if (record.kafkaOffset() < expectedOffset) { if (!sawStaleOffset) { log.info( "Ignoring stale out-of-order record in {}-{}. Has offset instead of expected offset {}", record.topic(), record.kafkaPartition(), record.kafkaOffset(), expectedOffset); } sawStaleOffset = true; return; } if (sawStaleOffset) { log.info( "Recovered from stale out-of-order records in {}-{} with offset {}", record.topic(), record.kafkaPartition(), expectedOffset); sawStaleOffset = false; } String encodedPartition = partitioner.encodePartition(record); RecordWriter<SinkRecord> writer = getWriter(record, encodedPartition); writer.write(record); if (!startOffsets.containsKey(encodedPartition)) { startOffsets.put(encodedPartition, record.kafkaOffset()); offsets.put(encodedPartition, record.kafkaOffset()); } else { offsets.put(encodedPartition, record.kafkaOffset()); } recordCounter++; }

Target:
private void writeRecord(SinkRecord record) throws IOException { long expectedOffset = offset + recordCounter; if (offset == -1) { offset = record.kafkaOffset(); } else if (checkStaleOffsets && record.kafkaOffset() != expectedOffset) { if (!sawInvalidOffset) { log.info( "Ignoring stale out-of-order record in {}-{}. Has offset instead of expected offset {}", record.topic(), record.kafkaPartition(), record.kafkaOffset(), expectedOffset); } sawInvalidOffset = true; return; } if (sawInvalidOffset) { log.info( "Recovered from stale out-of-order records in {}-{} with offset {}", record.topic(), record.kafkaPartition(), expectedOffset); sawInvalidOffset = false; } String encodedPartition = partitioner.encodePartition(record); RecordWriter<SinkRecord> writer = getWriter(record, encodedPartition); writer.write(record); if (!startOffsets.containsKey(encodedPartition)) { startOffsets.put(encodedPartition, record.kafkaOffset()); offsets.put(encodedPartition, record.kafkaOffset()); } else { offsets.put(encodedPartition, record.kafkaOffset()); } recordCounter++; }
Source:
public abstract boolean delete(Path f, boolean recursive) throws IOException; public abstract boolean mkdirs(Path f) throws IOException; public abstract FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize) throws IOException; public abstract FSDataOutputStream create(Path f, boolean overwrite) throws IOException; public abstract boolean rename(Path src, Path dst) throws IOException; public boolean initOutPathLocalFS(Path outPath, WriteMode writeMode, boolean parallelOutput) throws IOException { if(this.isDistributedFS()) { return false; } if(this.exists(outPath)) { switch(writeMode) { case CREATE: if(this.getFileStatus(outPath).isDir()) { return true; } else { throw new IOException("Existing file or directory on output path may not be overwritten in CREATE write mode."); } case OVERWRITE: if(this.getFileStatus(outPath).isDir()) { if(parallelOutput) { return true; } else { try { this.delete(outPath, true); } catch(IOException ioe) { throw new IOException("Could not prepare output path. ",ioe); } } } else { try { this.delete(outPath, false); } catch(IOException ioe) { } } break; default: throw new IllegalArgumentException("Invalid write mode: "+writeMode); } } if(parallelOutput) { try { if(!this.exists(outPath)) { this.mkdirs(outPath); } } catch(IOException ioe) { } return this.exists(outPath) && this.getFileStatus(outPath).isDir(); } else { return !this.exists(outPath); } }

Target:
public abstract boolean delete(Path f, boolean recursive) throws IOException; public abstract boolean mkdirs(Path f) throws IOException; public abstract FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize) throws IOException; public abstract FSDataOutputStream create(Path f, boolean overwrite) throws IOException; public abstract boolean rename(Path src, Path dst) throws IOException; public boolean initOutPathLocalFS(Path outPath, WriteMode writeMode, boolean createDirectory) throws IOException { if(this.isDistributedFS()) { return false; } if(this.exists(outPath)) { switch(writeMode) { case CREATE: if(this.getFileStatus(outPath).isDir()) { return true; } else { throw new IOException("Existing file or directory on output path may not be overwritten in CREATE write mode."); } case OVERWRITE: if(this.getFileStatus(outPath).isDir()) { if(createDirectory) { return true; } else { try { this.delete(outPath, true); } catch(IOException ioe) { throw new IOException("Could not prepare output path. ",ioe); } } } else { try { this.delete(outPath, false); } catch(IOException ioe) { } } break; default: throw new IllegalArgumentException("Invalid write mode: "+writeMode); } } if(createDirectory) { try { if(!this.exists(outPath)) { this.mkdirs(outPath); } } catch(IOException ioe) { } return this.exists(outPath) && this.getFileStatus(outPath).isDir(); } else { return !this.exists(outPath); } }
Source:
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); setupContent((ViewGroup) getView().getRootView()); Toolbar toolbar = view.findViewById(R.id.toolbar_main); ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar); ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setTitle(getScreenTitle()); getActivity().setTitle(getScreenTitle()); } }

Target:
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); setupContent((ViewGroup) getView().getRootView()); Toolbar toolbar = view.findViewById(R.id.toolbar_main); ((AppCompatActivity) requireActivity()).setSupportActionBar(toolbar); ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setTitle(getScreenTitle()); getActivity().setTitle(getScreenTitle()); } }
Source:
public ExternalIdSearch withExternalIdRemoved(ExternalId externalId) { if (externalId == null || contains(externalId) == false) { return this; } Set<ExternalId> ids = Sets.newHashSet(this.externalIds); ids.remove(externalId); return new ExternalIdSearch(searchType, ImmutableSet.copyOf(ids)); }

Target:
public ExternalIdSearch withExternalIdRemoved(ExternalId externalId) { if (externalId == null || contains(externalId) == false) { return this; } Set<ExternalId> ids = new HashSet<>(this.externalIds); ids.remove(externalId); return new ExternalIdSearch(searchType, ImmutableSet.copyOf(ids)); }
Source:
public void preStart() { LOGGER.info().setMessage("Starting execution timer") .addData("schema", _schema) .addData("table", _table) .addData("lookahead", _lookahead) .log(); getSelf().tell(TICK, getSelf()); getTimers().startPeriodicTimer(TICKER_NAME, TICK, TICK_INTERVAL); }

Target:
public void preStart() { LOGGER.info().setMessage("Starting execution timer") .addData("schema", _schema) .addData("table", _table) .addData("lookahead", _lookaheadDays) .log(); getSelf().tell(TICK, getSelf()); getTimers().startPeriodicTimer(TICKER_NAME, TICK, TICK_INTERVAL); }
Source:
public void testAlterFunctionInvalidFunctionName() { assertQueryFails( "ALTER FUNCTION testing.tan CALLED ON NULL INPUT", ".*Function name should be in the form of catalog\\.schema\\.function_name, found: testing\\.tan"); assertQueryFails( "ALTER FUNCTION presto.default.tan RETURNS NULL ON NULL INPUT", "Cannot alter function in built-in function namespace: presto\\.default\\.tan"); }

Target:
public void testAlterFunctionInvalidFunctionName() { assertQueryFails( "ALTER FUNCTION tan CALLED ON NULL INPUT", ".*Function name should be in the form of catalog\\.schema\\.function_name, found: tan"); assertQueryFails( "ALTER FUNCTION testing.tan CALLED ON NULL INPUT", ".*Function name should be in the form of catalog\\.schema\\.function_name, found: testing\\.tan"); assertQueryFails( "ALTER FUNCTION presto.default.sin RETURNS NULL ON NULL INPUT", "Cannot alter function in built-in function namespace: presto\\.default\\.sin"); }
Source:
private BulkActionsResultView fireBulkActionsTaskForQuery(final WorkflowAction action, final User user, final String luceneQuery, final Set<String> workflowAssociatedStepsIds, final AdditionalParamsBean additionalParamsBean) throws DotDataException { try { final String sanitizedQuery = LuceneQueryUtils .sanitizeBulkActionsQuery(luceneQuery); Logger.debug(getClass(), "luceneQuery: " + sanitizedQuery); final List<Contentlet> contentlets = findContentletsToProcess(sanitizedQuery, workflowAssociatedStepsIds, user); final Long skipsCount = computeSkippedContentletsCount(sanitizedQuery, workflowAssociatedStepsIds, user); return distributeWorkAndProcess(action, user, contentlets, skipsCount, additionalParamsBean); } catch (Exception e) { Logger.error(getClass(), "Error firing actions in bulk.", e); throw new DotDataException(e); } }

Target:
private BulkActionsResultView fireBulkActionsTaskForQuery(final WorkflowAction action, final User user, final String luceneQuery, final Set<String> workflowAssociatedStepsIds, final AdditionalParamsBean additionalParamsBean) throws DotDataException { try { final String sanitizedQuery = LuceneQueryUtils .sanitizeBulkActionsQuery(luceneQuery); Logger.debug(getClass(), ()->"luceneQuery: " + sanitizedQuery); final List<Contentlet> contentlets = findContentletsToProcess(sanitizedQuery, workflowAssociatedStepsIds, user); final Long skipsCount = computeSkippedContentletsCount(sanitizedQuery, workflowAssociatedStepsIds, user); return distributeWorkAndProcess(action, user, contentlets, skipsCount, additionalParamsBean); } catch (Exception e) { Logger.error(getClass(), "Error firing actions in bulk.", e); throw new DotDataException(e); } }
Source:
private String generateDefaultFilename() { String result = ""; if (bamFilePath.trim().isEmpty()) { result = filePath + File.separator + metaQuery.getFilename(); } else { String fileName = new File(bamFilePath).getName(); result = filePath + File.separator + "extract-" + fileName; } return result; }

Target:
private String generateDefaultFilename() { String result = ""; if (bamFilePath.trim().isEmpty()) { result = filePath + File.separator + metaQuery.getFileName(); } else { String fileName = new File(bamFilePath).getName(); result = filePath + File.separator + "extract-" + fileName; } return result; }
Source:
public void configurePipeline(PipelineConfigurer pipelineConfigurer) throws IllegalArgumentException { super.configurePipeline(pipelineConfigurer); parseConfiguration(config.decompressor); try { Schema outputSchema = Schema.parseJson(config.schema); List<Field> outFields = outputSchema.getFields(); for (Field field : outFields) { outSchemaMap.put(field.getName(), field.getSchema().getType()); } } catch (IOException e) { throw new IllegalArgumentException("Format of schema specified is invalid. Please check the format."); } for (Map.Entry<String, DecompressorType> entry : deCompMap.entrySet()) { if (!outSchemaMap.containsKey(entry.getKey())) { throw new IllegalArgumentException("Field '" + entry.getKey() + "' specified to be decompresed is not " + "present in the output schema. Please add field '" + entry.getKey() + "'" + "to output schema or remove it from decompress"); } if (outSchemaMap.get(entry.getKey()) != Schema.Type.BYTES && outSchemaMap.get(entry.getKey()) != Schema.Type.STRING) { throw new IllegalArgumentException("Field '" + entry.getKey() + "' should be of type BYTES or STRING in " + "output schema."); } } }

Target:
public void configurePipeline(PipelineConfigurer pipelineConfigurer) throws IllegalArgumentException { super.configurePipeline(pipelineConfigurer); parseConfiguration(config.decompressor); try { Schema outputSchema = Schema.parseJson(config.schema); List<Field> outFields = outputSchema.getFields(); for (Field field : outFields) { outSchemaMap.put(field.getName(), field.getSchema().getType()); } } catch (IOException e) { throw new IllegalArgumentException("Format of schema specified is invalid. Please check the format. " + e.getMessage()); } for (Map.Entry<String, DecompressorType> entry : deCompMap.entrySet()) { if (!outSchemaMap.containsKey(entry.getKey())) { throw new IllegalArgumentException("Field '" + entry.getKey() + "' specified to be decompresed is not " + "present in the output schema. Please add field '" + entry.getKey() + "'" + "to output schema or remove it from decompress"); } if (outSchemaMap.get(entry.getKey()) != Schema.Type.BYTES && outSchemaMap.get(entry.getKey()) != Schema.Type.STRING) { throw new IllegalArgumentException("Field '" + entry.getKey() + "' should be of type BYTES or STRING in " + "output schema."); } } }
Source:
public FileSystemResourceReference(String name, Path path) { super(Args.notNull(name, "name")); Args.notNull(path, "path"); this.path = path; }

Target:
public FileSystemResourceReference(String name, Path path) { super(name); Args.notNull(path, "path"); this.path = path; }
Source:
protected void init() { this.guiLeft = (this.width - this.xSize) / 2; this.guiTop = (this.height - this.ySize) / 2; this.addButton(new Button(this.guiLeft + ((this.xSize - 80) / 2), this.guiTop + 152, 80, 20, UtilLib.translate("gui.done"), (context) -> { this.onClose(); })); for (int i = 0; i < statCount; i++) { int finalI = i; statButtons.add(this.addButton(new Button(guiLeft + 225, guiTop + 43 + 26 * i, 20, 20, "+", (button) -> VampirismMod.dispatcher.sendToServer(new UpgradeMinionStatPacket(entity.getEntityId(), finalI))))); } }

Target:
protected void init() { this.statButtons.clear(); this.guiLeft = (this.width - this.xSize) / 2; this.guiTop = (this.height - this.ySize) / 2; this.addButton(new Button(this.guiLeft + this.xSize - 80 - 20, this.guiTop + 152, 80, 20, UtilLib.translate("gui.done"), (context) -> { this.onClose(); })); if (backScreen != null) { this.addButton(new Button(this.guiLeft + 20, this.guiTop + 152, 80, 20, UtilLib.translate("gui.back"), (context) -> { Minecraft.getInstance().displayGuiScreen(this.backScreen); })); } for (int i = 0; i < statCount; i++) { int finalI = i; Button button = this.addButton(new Button(guiLeft + 225, guiTop + 43 + 26 * i, 20, 20, "+", (b) -> VampirismMod.dispatcher.sendToServer(new UpgradeMinionStatPacket(entity.getEntityId(), finalI)))); statButtons.add(button); button.visible = false; } }
Source:
public File getDownloadFolder() { PrefManager pref = new PrefManager(context, PrefManager.Pref.LOGIN); ProfileModel profile = pref.getCurrentUserProfile(); File android = new File(Environment.getExternalStorageDirectory(), "Android"); File downloadsDir = new File(android, "data"); File packDir = new File(downloadsDir, context.getPackageName()); File edxDir = new File(packDir, profile.username); edxDir.mkdirs(); try { File noMediaFile = new File(edxDir, ".nomedia"); if (!noMediaFile.createNewFile()) { logger.debug(".NoMedia file not created"); } }catch (IOException ioException){ logger.error(ioException); } return edxDir; }

Target:
public File getDownloadFolder() { PrefManager pref = new PrefManager(context, PrefManager.Pref.LOGIN); ProfileModel profile = pref.getCurrentUserProfile(); File android = new File(Environment.getExternalStorageDirectory(), "Android"); File downloadsDir = new File(android, "data"); File packDir = new File(downloadsDir, context.getPackageName()); File edxDir = new File(packDir, profile.username); edxDir.mkdirs(); try { File noMediaFile = new File(edxDir, ".nomedia"); noMediaFile.createNewFile(); }catch (IOException ioException){ logger.error(ioException); } return edxDir; }
Source:
protected void reduce(ImmutableBytesWritable arg0, Iterable<IntWritable> arg1, Reducer<ImmutableBytesWritable, IntWritable, NullWritable, NullWritable>.Context context) throws IOException, InterruptedException { if (!calledOnce.compareAndSet(false, true)) { return; } try { IndexTool.IndexVerifyType verifyType = getIndexVerifyType(configuration); if (verifyType != IndexTool.IndexVerifyType.NONE) { updateCounters(verifyType, context); } IndexToolUtil.updateIndexState(configuration, PIndexState.ACTIVE); } catch (SQLException e) { LOGGER.error(" Failed to update the status to Active"); throw new RuntimeException(e.getMessage()); } }

Target:
protected void reduce(ImmutableBytesWritable arg0, Iterable<IntWritable> arg1, Reducer<ImmutableBytesWritable, IntWritable, NullWritable, NullWritable>.Context context) throws IOException, InterruptedException { if (!calledOnce.compareAndSet(false, true)) { return; } IndexTool.IndexVerifyType verifyType = getIndexVerifyType(context.getConfiguration()); if (verifyType != IndexTool.IndexVerifyType.NONE) { updateCounters(verifyType, context); } try { IndexToolUtil.updateIndexState(context.getConfiguration(), PIndexState.ACTIVE); } catch (SQLException e) { LOGGER.error(" Failed to update the status to Active"); throw new RuntimeException(e.getMessage()); } }
Source:
public Set<DownloadRequest> getDownloadList(String typeName, String timeField, String sizeField, String urlField, SubsetParameters subset) throws GoGoDuckException { Set<DownloadRequest> result = new LinkedHashSet<>(); Query query = new Query(); if (subset.getTimeRange() != null) { String timeCoverageStart = subset.getTimeRange().getStart().toString(); String timeCoverageEnd = subset.getTimeRange().getEnd().toString(); Filter cqlFilter; try { cqlFilter = CQL.toFilter( String.format("%s >= '%s' AND %s <= '%s'", timeField, timeCoverageStart, timeField, timeCoverageEnd) ); query = new Query(typeName, cqlFilter, new String[]{urlField, sizeField}); } catch (CQLException e) { logger.error(e.getMessage(), e); throw new GoGoDuckException(e.getMessage()); } } if (query == null) { query = new Query(typeName, null, new String[]{urlField}); } FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints()); SortBy sortByTimeAscending = ff.sort(timeField, SortOrder.ASCENDING); query.setSortBy(new SortBy[]{sortByTimeAscending}); try (SimpleFeatureIterator iterator = getFeatures(typeName, query)) { while (iterator.hasNext()) { SimpleFeature feature = iterator.next(); String url = (String) feature.getAttribute(urlField); long size = 0; if (feature.getAttribute(sizeField) != null ){ size = Math.round((Double)feature.getAttribute(sizeField)); } logger.info(String.format("Processing url '%s'", url)); result.add(new DownloadRequest(urlMangler.mangle(new URI(url)), size)); } } catch (Exception e) { logger.error(e.getMessage(), e); throw new GoGoDuckException(String.format("Could not obtain list of downloads: '%s'", e.getMessage())); } return result; }

Target:
public Set<DownloadRequest> getDownloadList(String typeName, String timeField, String sizeField, String urlField, SubsetParameters subset) throws GoGoDuckException { Set<DownloadRequest> result = new LinkedHashSet<>(); Filter cqlFilter = getFilter(timeField, subset.getTimeRange()); Query query = new Query(typeName, cqlFilter, new String[]{urlField, sizeField}); FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints()); SortBy sortByTimeAscending = ff.sort(timeField, SortOrder.ASCENDING); query.setSortBy(new SortBy[]{sortByTimeAscending}); try (SimpleFeatureIterator iterator = getFeatures(typeName, query)) { while (iterator.hasNext()) { SimpleFeature feature = iterator.next(); String url = (String) feature.getAttribute(urlField); long size = Math.round((Double)feature.getAttribute(sizeField)); logger.info(String.format("Processing url '%s'", url)); result.add(new DownloadRequest(urlMangler.mangle(new URI(url)), size)); } } catch (Exception e) { logger.error(e.getMessage(), e); throw new GoGoDuckException(String.format("Could not obtain list of downloads: '%s'", e.getMessage())); } return result; }
Source:
public void visitReturnStatement(ReturnStatementTree syntaxNode) { SymbolicValue currentVal = programState.peekValue(); if (currentVal != null) { final ExpressionTree expression = syntaxNode.expression(); if (expression != null) { if (expression.is(Tree.Kind.IDENTIFIER)) { final IdentifierTree identifier = (IdentifierTree) expression; currentVal = programState.getValue(identifier.symbol()); } else { currentVal = programState.peekValue(); } closeResource(currentVal); } } }

Target:
public void visitReturnStatement(ReturnStatementTree syntaxNode) { ExpressionTree expression = syntaxNode.expression(); if (expression != null) { SymbolicValue currentVal = programState.peekValue(); if (expression.is(Tree.Kind.IDENTIFIER)) { IdentifierTree identifier = (IdentifierTree) expression; currentVal = programState.getValue(identifier.symbol()); } closeResource(currentVal); } }
Source:
private boolean updateBlobMetadata(BlobId blobId, String fieldName, Object value) throws CloudStorageException { Objects.requireNonNull(blobId, "BlobId cannot be null"); Objects.requireNonNull(fieldName, "Field name cannot be null"); try { boolean updatedStorage, updatedCosmos = false; AzureBlobDataAccessor.UpdateResponse updateResponse = azureBlobDataAccessor.updateBlobMetadata(blobId, fieldName, value); Map<String, String> metadataMap = updateResponse.metadata; updatedStorage = updateResponse.wasUpdated; try { ResourceResponse<Document> response = cosmosDataAccessor.updateMetadata(blobId, fieldName, value); updatedCosmos = response != null; } catch (DocumentClientException dex) { if (dex.getStatusCode() == HttpConstants.StatusCodes.NOTFOUND) { cosmosDataAccessor.upsertMetadata(CloudBlobMetadata.fromMap(metadataMap)); azureMetrics.blobUpdateRecoverCount.inc(); updatedCosmos = true; } else { throw dex; } } if (updatedStorage || updatedCosmos) { logger.debug("Updated blob metadata set to {}.", blobId, fieldName, value); azureMetrics.blobUpdatedCount.inc(); return true; } else { logger.debug("Blob already has = in ABS and Cosmos", blobId, fieldName, value); return false; } } catch (Exception e) { azureMetrics.blobUpdateErrorCount.inc(); throw toCloudStorageException("Error updating blob metadata: " + blobId, e); } }

Target:
private boolean updateBlobMetadata(BlobId blobId, String fieldName, Object value) throws CloudStorageException { Objects.requireNonNull(blobId, "BlobId cannot be null"); Objects.requireNonNull(fieldName, "Field name cannot be null"); try { AzureBlobDataAccessor.UpdateResponse updateResponse = azureBlobDataAccessor.updateBlobMetadata(blobId, fieldName, value); Map<String, String> metadataMap = updateResponse.metadata; boolean updatedStorage = updateResponse.wasUpdated; boolean updatedCosmos = false; try { ResourceResponse<Document> response = cosmosDataAccessor.updateMetadata(blobId, fieldName, value); updatedCosmos = response != null; } catch (DocumentClientException dex) { if (dex.getStatusCode() == HttpConstants.StatusCodes.NOTFOUND) { cosmosDataAccessor.upsertMetadata(CloudBlobMetadata.fromMap(metadataMap)); azureMetrics.blobUpdateRecoverCount.inc(); updatedCosmos = true; } else { throw dex; } } if (updatedStorage || updatedCosmos) { logger.debug("Updated blob metadata set to {}.", blobId, fieldName, value); azureMetrics.blobUpdatedCount.inc(); return true; } else { logger.debug("Blob already has = in ABS and Cosmos", blobId, fieldName, value); return false; } } catch (Exception e) { azureMetrics.blobUpdateErrorCount.inc(); throw toCloudStorageException("Error updating blob metadata: " + blobId, e); } }
Source:
protected boolean validateQuota() { getParameters().setQuotaId(QuotaHelper.getInstance().getQuotaIdToConsume(getQuotaId(), getStoragePool())); setStorageDomainId(_oldDisk.getstorage_ids().get(0).getValue()); return (QuotaManager.validateStorageQuota(getStorageDomainId().getValue(), getParameters().getQuotaId(), getStoragePool().getQuotaEnforcementType(), new Double(getParameters().getDiskInfo().getSizeInGigabytes()), getCommandId(), getReturnValue().getCanDoActionMessages())); }

Target:
protected boolean validateQuota() { boolean quotaValid = true; if (!_oldDisk.getQuotaId().equals(getQuotaId())) { getParameters().setQuotaId(QuotaHelper.getInstance().getQuotaIdToConsume(getQuotaId(), getStoragePool())); setStorageDomainId(_oldDisk.getstorage_ids().get(0).getValue()); quotaValid = (QuotaManager.validateStorageQuota(getStorageDomainId().getValue(), getParameters().getQuotaId(), getStoragePool().getQuotaEnforcementType(), new Double(getParameters().getDiskInfo().getSizeInGigabytes()), getCommandId(), getReturnValue().getCanDoActionMessages())); } return quotaValid; }
Source:
public static void combine(HistogramState state, HistogramState otherState) { requireNonNull(state.get() != null, "this.typedHistogram should always be non-null"); requireNonNull(otherState.get() != null, "scratch state should always be non-null"); TypedHistogram typedHistogram = state.get(); long startSize = typedHistogram.getEstimatedSize(); typedHistogram.addAll(otherState.get()); state.addMemoryUsage(typedHistogram.getEstimatedSize() - startSize); }

Target:
public static void combine(HistogramState state, HistogramState otherState) { requireNonNull(otherState.get() != null, "scratch state should always be non-null"); TypedHistogram typedHistogram = state.get(); long startSize = typedHistogram.getEstimatedSize(); typedHistogram.addAll(otherState.get()); state.addMemoryUsage(typedHistogram.getEstimatedSize() - startSize); }
Source:
public ArrayEncoder<Integer> int32s(String name) { final Field field = findMetadataFor(name, ArrayField.class); List<DataHolder> values = new ArrayList<DataHolder>(); data.add(new ArrayDataHolder(values, field.index())); return new ArrayEncoder<Integer>(values, this) { @Override protected DataHolder buildDataHolder(Integer value) { return new Int32DataHolder(value, field.index()); } }; }

Target:
public ArrayEncoder<Integer> int32s(String name) { final Field field = fieldSearcher.findField(name, ArrayField.class, Int32Field.class); List<DataHolder> values = new ArrayList<DataHolder>(); data.add(new ArrayDataHolder(values, field.index())); return new ArrayEncoder<Integer>(values, this) { @Override protected DataHolder buildDataHolder(Integer value) { return new Int32DataHolder(value, field.index()); } }; }
Source:
public void put(String name, List<String> list) { Objects.requireNonNull(name, "name"); remove(name); if (list == null) return; for (String v : list) { if (v != null) add(name, v); } }

Target:
public void put(String name, List<String> list) { Objects.requireNonNull(name, "name must not be null"); remove(name); if (list == null) return; for (String v : list) { if (v != null) add(name, v); } }
Source:
@Test public void unusedArguments() { try { CodeBlock.builder().add("", "foo"); fail(); } catch (IllegalArgumentException expected) { assertThat(expected).hasMessage("Too many parameters were given; parameters [foo] were unused"); } }

Target:
@Test public void unusedArguments() { try { CodeBlock.builder().add("", "foo"); fail(); } catch (IllegalArgumentException expected) { assertThat(expected).hasMessage("Too many parameters were given; expected 0, got 1"); } }
Source:
public BPUserLibraryElement getNewLibrary() { BPListElement[] entries = null; Map<String, String> attributes = null; if (fElementToEdit != null) { entries = fElementToEdit.getChildren(); IBuildpathContainer buildpathContainer = fElementToEdit .getUpdatedContainer(); if (buildpathContainer instanceof IBuildpathContainerExtension3) { IBuildpathContainerExtension3 buildpathContainer3 = (IBuildpathContainerExtension3) buildpathContainer; attributes = buildpathContainer3.getAttributes(); } } return new BPUserLibraryElement(fNameField.getText(), fIsSystemField.isSelected(), entries, attributes); }

Target:
public BPUserLibraryElement getNewLibrary() { BPListElement[] entries = null; Map<String, String> attributes = null; if (fElementToEdit != null) { entries = fElementToEdit.getChildren(); attributes = fElementToEdit.getAttributes(); } return new BPUserLibraryElement(fNameField.getText(), fIsSystemField.isSelected(), entries, attributes); }
Source:
public PostDonationCounselling flagForCounselling(long id) { PostDonationCounselling postDonationCounselling = postDonationCounsellingRepository.findById(id); postDonationCounselling.setFlaggedForCounselling(Boolean.TRUE); postDonationCounselling.setCounsellingDate(null); postDonationCounselling.setCounsellingStatus(null); postDonationCounselling.getDonation().setNotes(null); postDonationCounselling.setIsDeleted(Boolean.FALSE); return postDonationCounsellingRepository.update(postDonationCounselling); }

Target:
public PostDonationCounselling flagForCounselling(long id) { PostDonationCounselling postDonationCounselling = postDonationCounsellingRepository.findById(id); postDonationCounselling.setFlaggedForCounselling(Boolean.TRUE); postDonationCounselling.setCounsellingDate(null); postDonationCounselling.setCounsellingStatus(null); postDonationCounselling.getDonation().setNotes(null); postDonationCounselling.setIsDeleted(Boolean.FALSE); postDonationCounselling.setLastUpdated(dateGeneratorService.generateDate()); postDonationCounselling.setLastUpdatedBy(utilController.getCurrentUser()); return postDonationCounsellingRepository.update(postDonationCounselling); }
Source:
public OrderedPartitionableRecord( String stream, PartitionIdType partitionId, SequenceOffsetType sequenceNumber, List<byte[]> data ) { this.stream = stream; this.partitionId = partitionId; this.sequenceNumber = sequenceNumber; this.data = data; }

Target:
public OrderedPartitionableRecord( String stream, PartitionIdType partitionId, SequenceOffsetType sequenceNumber, List<byte[]> data ) { Preconditions.checkNotNull(stream, "stream"); Preconditions.checkNotNull(partitionId, "partitionId"); Preconditions.checkNotNull(sequenceNumber, "sequenceNumber"); this.stream = stream; this.partitionId = partitionId; this.sequenceNumber = sequenceNumber; this.data = data == null ? ImmutableList.of() : data; }
Source:
public void findByLocationNearWithDistance() { final City mumbai = new City("1001", "Mumbai", new Point(19.0990358,72.9612976)); final City pune = new City("1002", "Pune", new Point(18.5247663,73.792756)); final City bangalore = new City("1003", "Bangalore", new Point(12.9542944,77.4905127)); Point solapur = new Point(17.661548,75.8835121); this.cityMap.put(mumbai.getId(), mumbai); this.cityMap.put(pune.getId(), pune); this.cityMap.put(bangalore.getId(), bangalore); List<City> matches = this.cityRepository.findByLocationNear(solapur, new Distance(100, Metrics.KILOMETERS)); int len = matches.size(); assertThat("Nothing should returned", len, equalTo(0)); matches = this.cityRepository.findByLocationNear(solapur, new Distance(250, Metrics.KILOMETERS)); len = matches.size(); assertThat("Pune should return", len, equalTo(1)); assertThat("Pune should return", matches.get(0), hasProperty("name", equalTo("Pune"))); matches = this.cityRepository.findByLocationNear(solapur, new Distance(350, Metrics.KILOMETERS)); len = matches.size(); assertThat("Pune and Mumbai should return", len, equalTo(2)); assertThat("Pune and Mumbai should return", matches, containsInAnyOrder(hasProperty("name", equalTo("Pune")), hasProperty("name", equalTo("Mumbai")))); this.cityMap.remove(mumbai.getId()); this.cityMap.remove(pune.getId()); this.cityMap.remove(bangalore.getId()); }

Target:
public void findByLocationNearWithDistance() { final City mumbai = new City("1001", "Mumbai", new Point(19.0990358,72.9612976)); final City pune = new City("1002", "Pune", new Point(18.5247663,73.792756)); final City bangalore = new City("1003", "Bangalore", new Point(12.9542944,77.4905127)); Point solapur = new Point(17.661548,75.8835121); this.cityMap.put(mumbai.getId(), mumbai); this.cityMap.put(pune.getId(), pune); this.cityMap.put(bangalore.getId(), bangalore); List<City> matches = this.cityRepository.findByLocationNear(solapur, new Distance(100, Metrics.KILOMETERS)); int len = matches.size(); assertThat("Nothing should returned", len, equalTo(0)); matches = this.cityRepository.findByLocationNear(solapur, new Distance(250, Metrics.KILOMETERS)); len = matches.size(); assertThat("Pune should return", len, equalTo(1)); assertThat("Pune should return", matches.get(0), equalTo(pune)); matches = this.cityRepository.findByLocationNear(solapur, new Distance(350, Metrics.KILOMETERS)); len = matches.size(); assertThat("Pune and Mumbai should return", len, equalTo(2)); assertThat("Pune and Mumbai should return", matches, containsInAnyOrder(pune, mumbai)); this.cityMap.remove(mumbai.getId()); this.cityMap.remove(pune.getId()); this.cityMap.remove(bangalore.getId()); }
Source:
protected List<ResultSetFuture> fetchLabelIds(final Iterator<String> ngrams) { List<ResultSetFuture> resultSets = new ArrayList<>(); while (ngrams.hasNext()) { String ngram = ngrams.next(); if (ngram.isEmpty()) { return resultSets; } ResultSetFuture metricResult = labelIdQuery(ngram, LabelType.METRIC); ResultSetFuture tagkResult = labelIdQuery(ngram, LabelType.TAGK); ResultSetFuture tagvResult = labelIdQuery(ngram, LabelType.TAGV); resultSets.add(metricResult); resultSets.add(tagkResult); resultSets.add(tagvResult); } return resultSets; }

Target:
protected List<ResultSetFuture> fetchLabelIds(final Iterator<String> ngrams) { final List<ResultSetFuture> resultSets = new ArrayList<>(); while (ngrams.hasNext()) { final String ngram = ngrams.next(); if (ngram.isEmpty()) { return resultSets; } final ResultSetFuture metricResult = labelIdQuery(ngram, LabelType.METRIC); final ResultSetFuture tagkResult = labelIdQuery(ngram, LabelType.TAGK); final ResultSetFuture tagvResult = labelIdQuery(ngram, LabelType.TAGV); resultSets.add(metricResult); resultSets.add(tagkResult); resultSets.add(tagvResult); } return resultSets; }
Source:
public String createNewAuthToken(String email) { User user = userService.getUserByEmail(email); List<AuthenticationToken> existingTokens = authenticationTokenRepository.findByUserEmail(email); if (existingTokens.size() >= 4) { authenticationTokenRepository.deleteAll(existingTokens); } return authenticationTokenRepository.saveAndFlush(new AuthenticationToken(user)).getToken(); }

Target:
public String createNewAuthToken(String email) { User user = userService.getUserByEmail(email); List<AuthenticationToken> existingTokens = authenticationTokenRepository.findByUserEmailOrderByExpiryDate(email); if (existingTokens.size() >= 4) { authenticationTokenRepository.delete(existingTokens.get(0)); } return authenticationTokenRepository.saveAndFlush(new AuthenticationToken(user)).getToken(); }
Source:
public void test_with_prefix_and_matching_pattern_and_single_host_and_replace_host() throws Exception { MockBundle bundle = new MockBundle(-1); MockComponentContext ctx = new MockComponentContext(bundle); ctx.setProperty("prefixes", new String[] { "/content/dam" }); ctx.setProperty("attributes", new String[] { "img:src" }); ctx.setProperty("host.pattern", "static.host.com"); ctx.setProperty("matchingPatterns", "img:src;(\\/content\\/dam\\/.+?\\.(png|jpg))"); ctx.setProperty("replaceHost", "true"); StaticReferenceRewriteTransformerFactory factory = new StaticReferenceRewriteTransformerFactory(); factory.activate(ctx); Transformer transformer = factory.createTransformer(); transformer.setContentHandler(handler); AttributesImpl imageWithJustSrc = new AttributesImpl(); imageWithJustSrc.addAttribute(null, "src", null, "CDATA", "<LINK_0>"); transformer.startElement(null, "img", null, imageWithJustSrc); verify(handler, only()).startElement(isNull(String.class), eq("img"), isNull(String.class), attributesCaptor.capture()); List<Attributes> values = attributesCaptor.getAllValues(); assertEquals("<LINK_1>", values.get(0).getValue(0)); }

Target:
public void test_with_prefix_and_matching_pattern_and_single_host_and_replace_host() throws Exception { MockBundle bundle = new MockBundle(-1); MockComponentContext ctx = new MockComponentContext(bundle); ctx.setProperty("prefixes", new String[] { "/content/dam" }); ctx.setProperty("attributes", new String[] { "img:src" }); ctx.setProperty("host.pattern", "static.host.com"); ctx.setProperty("matchingPatterns", "img:src;(\\/content\\/dam\\/.+?\\.(png|jpg))"); ctx.setProperty("replaceHost", true); StaticReferenceRewriteTransformerFactory factory = new StaticReferenceRewriteTransformerFactory(); factory.activate(ctx); Transformer transformer = factory.createTransformer(); transformer.setContentHandler(handler); AttributesImpl imageWithJustSrc = new AttributesImpl(); imageWithJustSrc.addAttribute(null, "src", null, "CDATA", "<LINK_0>"); transformer.startElement(null, "img", null, imageWithJustSrc); verify(handler, only()).startElement(isNull(String.class), eq("img"), isNull(String.class), attributesCaptor.capture()); List<Attributes> values = attributesCaptor.getAllValues(); assertEquals("<LINK_1>", values.get(0).getValue(0)); }
Source:
public byte[] idBuffer() { if (contentIdFromPtr == ptr) return contentId; if (state.walk != null) { DirCacheIterator i = state.walk.getTree(state.dirCacheTree, DirCacheIterator.class); if (i != null) { DirCacheEntry ent = i.getDirCacheEntry(); if (ent != null && !isModified(ent, false )) return i.idBuffer(); } } switch (mode & FileMode.TYPE_MASK) { case FileMode.TYPE_FILE: contentIdFromPtr = ptr; return contentId = idBufferBlob(entries[ptr]); case FileMode.TYPE_SYMLINK: return zeroid; case FileMode.TYPE_GITLINK: return zeroid; } return zeroid; }

Target:
public byte[] idBuffer() { if (contentIdFromPtr == ptr) return contentId; if (state.walk != null) { DirCacheIterator i = state.walk.getTree(state.dirCacheTree, DirCacheIterator.class); if (i != null) { DirCacheEntry ent = i.getDirCacheEntry(); if (ent != null && compareMetadata(ent) == MetadataDiff.DIFFER_BY_TIMESTAMP) return i.idBuffer(); } } switch (mode & FileMode.TYPE_MASK) { case FileMode.TYPE_FILE: contentIdFromPtr = ptr; return contentId = idBufferBlob(entries[ptr]); case FileMode.TYPE_SYMLINK: return zeroid; case FileMode.TYPE_GITLINK: return zeroid; } return zeroid; }
Source:
private Document parse (String s) { try { BufferedReader r = new BufferedReader (new StringReader(s)); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance (); DocumentBuilder builder = factory.newDocumentBuilder (); return builder.parse (new InputSource (r)); } catch (ParserConfigurationException e) { throw new IllegalArgumentException ("Parser Config Exception: " + e.getMessage (), e); } catch (SAXException e) { throw new IllegalArgumentException ("SAX Exception: " + e.getMessage (), e); } catch (IOException e) { throw new IllegalArgumentException ("IO Exception: " + e.getMessage (), e); } }

Target:
private Document parse(String s) { try (BufferedReader r = new BufferedReader(new StringReader(s))) { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); return builder.parse(new InputSource(r)); } catch (ParserConfigurationException e) { throw new IllegalArgumentException("Parser Config Exception: " + e.getMessage(), e); } catch (SAXException e) { throw new IllegalArgumentException("SAX Exception: " + e.getMessage(), e); } catch (IOException e) { throw new IllegalArgumentException("IO Exception: " + e.getMessage(), e); } }
Source:
private void checkPasswordStrength(String password){ if(password == null){ throw new IllegalArgumentException("Null password is not allowed"); } if(password.length() < 8){ throw new IllegalArgumentException("Password should be at least 8 characters long"); } if(password.length() > 128){ throw new IllegalArgumentException("Password can be up to 128 characters long"); } long satisfiedCategories = Stream.of(PASSWORD_CATEGORY_VALIDATION_PATTERNS) .filter(p -> p.matcher(password).find()) .count(); if(satisfiedCategories < 3){ throw new IllegalArgumentException( "Password must contains characters from three of the following four categories:\n" + " - Latin uppercase letters (A through Z)\n" + " - Latin lowercase letters (a through z)\n" + " - Base 10 digits (0 through 9)\n" + " - Non-alphanumeric characters such as: exclamation point (!), dollar sign ($), number sign (#), " + "or percent (%)." ); } }

Target:
private void checkPasswordStrength(String password) { if (password == null) { throw new IllegalArgumentException("Null password is not allowed"); } if (password.length() < 8) { throw new IllegalArgumentException("Password should be at least 8 characters long"); } if (password.length() > 128) { throw new IllegalArgumentException("Password can be up to 128 characters long"); } long satisfiedCategories = Stream.of(PASSWORD_CATEGORY_VALIDATION_PATTERNS) .filter(p -> p.matcher(password).find()) .count(); if (satisfiedCategories < 3) { throw new IllegalArgumentException( "Password must contain characters from three of the following four categories:\n" + " - Latin uppercase letters (A through Z)\n" + " - Latin lowercase letters (a through z)\n" + " - Base 10 digits (0 through 9)\n" + " - Non-alphanumeric characters such as: exclamation point (!), dollar sign ($), number sign (#), " + "or percent (%)." ); } }
Source:
public void should_create_sonar_way_profile() { ValidationMessages validation = ValidationMessages.create(); JavaSonarWayProfile definition = new JavaSonarWayProfile(ruleFinder()); RulesProfile profile = definition.createProfile(validation); assertThat(profile.getLanguage()).isEqualTo(Java.KEY); List<ActiveRule> activeRules = profile.getActiveRulesByRepository(CheckList.REPOSITORY_KEY); int numberOfRules = 197; assertThat(activeRules) .overridingErrorMessage("Expected " + numberOfRules + " rules for Sonar Way profile, but got " + activeRules.size() + " active rules.") .hasSize(numberOfRules); assertThat(profile.getName()).isEqualTo("Sonar way"); assertThat(validation.hasErrors()).isFalse(); }

Target:
public void should_create_sonar_way_profile() { ValidationMessages validation = ValidationMessages.create(); JavaSonarWayProfile definition = new JavaSonarWayProfile(ruleFinder()); RulesProfile profile = definition.createProfile(validation); assertThat(profile.getLanguage()).isEqualTo(Java.KEY); List<ActiveRule> activeRules = profile.getActiveRulesByRepository(CheckList.REPOSITORY_KEY); assertThat(activeRules) .overridingErrorMessage("Expected " + NUMBER_OF_RULES_IN_PROFILE + " rules for Sonar Way profile, but got " + activeRules.size() + " active rules.") .hasSize(NUMBER_OF_RULES_IN_PROFILE); assertThat(profile.getName()).isEqualTo("Sonar way"); assertThat(validation.hasErrors()).isFalse(); }
Source:
public void executeQueryCommand() { clusterId = getParameters().getClusterId(); Guid volumeId = getParameters().getVolumeId(); if (volumeId != null) { volume = getGlusterVolumeDao().getById(volumeId); if (volume == null) { throw new RuntimeException(String.format("Invalid volume id %s", volumeId)); } } if(clusterId == null) { clusterId = volume.getClusterId(); } getQueryReturnValue().setReturnValue(fetchRemobeBricksStatusDetails()); }

Target:
public void executeQueryCommand() { clusterId = getParameters().getClusterId(); Guid volumeId = getParameters().getVolumeId(); if (volumeId != null) { volume = getGlusterVolumeDao().getById(volumeId); if (volume == null) { throw new RuntimeException(VdcBllMessages.INVALID_VOLUME_ID.toString()); } } if(clusterId == null) { clusterId = volume.getClusterId(); } getQueryReturnValue().setReturnValue(fetchRemobeBricksStatusDetails()); }