Showing 3,203 of 3,219 total issues
Similar blocks of code found in 4 locations. Consider refactoring. Open
public class ShowPdf : DataItem
{
internal ShowPdf()
{
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 117.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
public class SaveButton : DataItem
{
internal SaveButton()
{
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 117.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
public class Audio : DataItem
{
internal Audio()
{
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 117.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
public class Timer : DataItem
{
internal Timer()
{
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 117.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method Core_SiteWorkers_Advanced_SiteWorkerDelete_MarksAsRemoved
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task Core_SiteWorkers_Advanced_SiteWorkerDelete_MarksAsRemoved()
{
// Arrange
Method Up
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsAchievable",
table: "CheckListVersions",
Method CreateUploadedData
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public async Task<UploadedData> CreateUploadedData(string checkSum, string currentFile, string extension,
string fileLocation, string fileName, short? local, Worker worker, string uploaderType, int version,
bool createPhysicalFile)
{
UploadedData UD = new UploadedData
Method Advanced_TemplateDisplayIndexChangeServer
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public async Task<bool> Advanced_TemplateDisplayIndexChangeServer(int templateId, int siteUId,
int newDisplayIndex)
{
string methodName = "Core.Advanced_TemplateDisplayIndexChangeServer";
try
Similar blocks of code found in 2 locations. Consider refactoring. Open
{
if (!Running()) throw new Exception("Core is not running");
Log.LogStandard(methodName, "called");
Log.LogVariable(methodName, nameof(microtingUId), microtingUId);
Log.LogVariable(methodName, nameof(checkUId), checkUId);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 116.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
{
if (!Running()) throw new Exception("Core is not running");
Log.LogStandard(methodName, "called");
Log.LogVariable(methodName, nameof(templateId), templateId);
Log.LogVariable(methodName, nameof(newDisplayIndex), newDisplayIndex);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 116.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method Core_SiteWorkers_Advanced_SiteWorkerCreate_CreatesWorker
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test] //mangler mock
public async Task Core_SiteWorkers_Advanced_SiteWorkerCreate_CreatesWorker()
{
// Arrange
Method SQL_Check_CheckListValueStatusUpdate_UpdatesCheckListValues
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_Check_CheckListValueStatusUpdate_UpdatesCheckListValues()
{
// Arrance
Method SQL_Tags_GetAllTags_DoesReturnAllTags
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_Tags_GetAllTags_DoesReturnAllTags()
{
// Arrance
string tagName1 = "Tag1";
Method SQL_UploadedData_FileRead_DoesReturnOneUploadedData
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_UploadedData_FileRead_DoesReturnOneUploadedData()
{
// Arrance
string checksum = "";
Method Core_UploadedData_UploadedDataRead_DoesReturnOneUploadedDataClass
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task Core_UploadedData_UploadedDataRead_DoesReturnOneUploadedDataClass()
{
// Arrance
string checksum = "";
Method siteSurveyConfiguration_Delete_DoesDelete
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task siteSurveyConfiguration_Delete_DoesDelete()
{
// Arrange
Random rnd = new Random();
Method HttpDelete
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private async Task<string> HttpDelete(string url, string contentType = null, bool addToken = false,
bool followRedirect = false)
{
try
{
Method HttpPost
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private async Task<string> HttpPost(string url, StringContent content, string contentType = null,
bool addToken = false, bool followRedirect = false)
{
try
{
Method Core_Case_CaseIdLookUp_returnsId
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task Core_Case_CaseIdLookUp_returnsId()
{
// Arrange
Method PutFileToS3Storage
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public async Task PutFileToS3Storage(Stream stream, string fileName)
{
string methodName = "Core.PutFileToS3Storage";
string bucketName = await _sqlController.SettingRead(Settings.s3BucketName);
Log.LogStandard(methodName, $"Trying to upload file {fileName} to {bucketName}");