Showing 3,203 of 3,219 total issues
Similar blocks of code found in 14 locations. Consider refactoring. Open
Question question = new Question
{
Image = randomBool,
Maximum = rnd.Next(1, 255),
Minimum = rnd.Next(1, 255),
- 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 203.
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 14 locations. Consider refactoring. Open
Question question = new Question
{
Image = randomBool,
Maximum = rnd.Next(1, 255),
Minimum = rnd.Next(1, 255),
- 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 203.
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 14 locations. Consider refactoring. Open
Question question = new Question
{
Image = randomBool,
Maximum = rnd.Next(1, 255),
Minimum = rnd.Next(1, 255),
- 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 203.
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 14 locations. Consider refactoring. Open
Question question = new Question
{
Image = randomBool,
Maximum = rnd.Next(1, 255),
Minimum = rnd.Next(1, 255),
- 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 203.
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 14 locations. Consider refactoring. Open
Question question2 = new Question
{
Image = randomBool,
Maximum = rnd.Next(1, 255),
Minimum = rnd.Next(1, 255),
- 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 203.
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 14 locations. Consider refactoring. Open
Question question = new Question
{
Image = randomBool,
Maximum = rnd.Next(1, 255),
Minimum = rnd.Next(1, 255),
- 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 203.
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_eForm_SimpleCommenteFormFromXML_ReturnseMainElement
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test] // Core_Template_TemplateFromXml_ReturnsTemplate()
public async Task Core_eForm_SimpleCommenteFormFromXML_ReturnseMainElement()
{
// Arrange
string xmlstring = @"
Method Up
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "MicrotingUid",
table: "notifications",
Method EntityGroupAll
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public async Task<EntityGroupList> EntityGroupAll(string sort, string nameFilter, int offSet, int pageSize,
string entityType, bool desc, string workflowState)
{
if (entityType != Constants.Constants.FieldTypes.EntitySearch &&
entityType != Constants.Constants.FieldTypes.EntitySelect)
Method Down
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "case_versions");
Method XmlToClassUsingXmlDocument
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Response XmlToClassUsingXmlDocument(string xmlStr)
{
try
{
ResponseTypes rType = ResponseTypes.Invalid;
Method Core_eFormSimpleCheckBoxFormCreateInDB_ReturnseFormId
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task Core_eFormSimpleCheckBoxFormCreateInDB_ReturnseFormId()
{
string xmlstring = @"
<?xml version='1.0' encoding='UTF-8'?>
Method Core_eForm_SimplePdfFormCreateInDB_ReturnseFormId
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task Core_eForm_SimplePdfFormCreateInDB_ReturnseFormId()
{
// Arrange
string xmlstring = @"
Method SimpleSiteGetAll
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public async Task<List<SiteDto>> SimpleSiteGetAll(string workflowState, int? offSet, int? limit)
{
List<SiteDto> siteList = new List<SiteDto>();
await using var db = GetContext();
List<Site> matches = null;
Method Options_Delete_DoesSetWorkflowStateToRemoved
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task Options_Delete_DoesSetWorkflowStateToRemoved()
{
Random rnd = new Random();
Class SqlControllerTestQuestionSet
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
[TestFixture]
public class SqlControllerTestQuestionSet : DbTestFixture
{
private SqlController sut;
private TestHelpers testHelpers;
Method SQL_Site_SiteGetAll_DoesReturnAllSites
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_Site_SiteGetAll_DoesReturnAllSites()
{
// Arrance
Method Core_eFormSimpleNumberFormFromXML_ReturnseMainElement
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task Core_eFormSimpleNumberFormFromXML_ReturnseMainElement()
{
string xmlstring = @"
<?xml version='1.0' encoding='UTF-8'?>
Method Core_eFormSimpleTimerFormCreateInDB_ReturnseFormId
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task Core_eFormSimpleTimerFormCreateInDB_ReturnseFormId()
{
string xmlstring = @"
<?xml version='1.0' encoding='UTF-8'?>
Method Up
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected override void Up(MigrationBuilder migrationBuilder)
{
// migrationBuilder.DropForeignKey(
// name: "FK_field_values_check_lists_check_list_id",
// table: "field_values");