ThibaultMontaufray/Droid-Image

View on GitHub
Project/Droid.Image/Controler/Interface_image.cs

Summary

Maintainability
F
3 wks
Test Coverage

File Interface_image.cs has 1446 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using System.IO;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
using System.Collections.Generic;
Severity: Major
Found in Project/Droid.Image/Controler/Interface_image.cs - About 3 days to fix

    Class Interface_image has 92 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public class Interface_image : GPInterface
        {
            #region Attributes
            public static string WORKINGDIRECTORY = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Servodroid\Droid-Image";
            public static Color THEME_COLOR = Color.DarkOrange;
    Severity: Major
    Found in Project/Droid.Image/Controler/Interface_image.cs - About 1 day to fix

      Method KuwaharaBlur has a Cognitive Complexity of 99 (exceeds 20 allowed). Consider refactoring.
      Open

              public static Bitmap KuwaharaBlur(Bitmap img, int Size)
              {
                  Bitmap TempBitmap = new Bitmap(img);
                  Bitmap NewBitmap = new Bitmap(TempBitmap.Width, TempBitmap.Height);
                  Graphics NewGraphics = Graphics.FromImage(NewBitmap);
      Severity: Minor
      Found in Project/Droid.Image/Controler/Interface_image.cs - About 1 day to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method Dilate has a Cognitive Complexity of 52 (exceeds 20 allowed). Consider refactoring.
      Open

              public static Bitmap Dilate(Bitmap img, int Size)
              {
                  Bitmap TempBitmap = new Bitmap(img);
                  Bitmap NewBitmap = new Bitmap(TempBitmap.Width, TempBitmap.Height);
                  Graphics NewGraphics = Graphics.FromImage(NewBitmap);
      Severity: Minor
      Found in Project/Droid.Image/Controler/Interface_image.cs - About 5 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method KuwaharaBlur has 90 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public static Bitmap KuwaharaBlur(Bitmap img, int Size)
              {
                  Bitmap TempBitmap = new Bitmap(img);
                  Bitmap NewBitmap = new Bitmap(TempBitmap.Width, TempBitmap.Height);
                  Graphics NewGraphics = Graphics.FromImage(NewBitmap);
      Severity: Major
      Found in Project/Droid.Image/Controler/Interface_image.cs - About 3 hrs to fix

        Method GoAction has 89 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public override void GoAction(string action)
                {
                    if (!string.IsNullOrEmpty(action))
                    {
                        switch (action.ToLower())
        Severity: Major
        Found in Project/Droid.Image/Controler/Interface_image.cs - About 3 hrs to fix

          Method MedianFilter has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring.
          Open

                  public static Bitmap MedianFilter(Bitmap Image, int Size)
                  {
                      Bitmap TempBitmap = Image;
                      Bitmap NewBitmap = new Bitmap(TempBitmap.Width, TempBitmap.Height);
                      Graphics NewGraphics = Graphics.FromImage(NewBitmap);
          Severity: Minor
          Found in Project/Droid.Image/Controler/Interface_image.cs - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Method MedianFilter has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public static Bitmap MedianFilter(Bitmap Image, int Size)
                  {
                      Bitmap TempBitmap = Image;
                      Bitmap NewBitmap = new Bitmap(TempBitmap.Width, TempBitmap.Height);
                      Graphics NewGraphics = Graphics.FromImage(NewBitmap);
          Severity: Minor
          Found in Project/Droid.Image/Controler/Interface_image.cs - About 1 hr to fix

            Method Dilate has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public static Bitmap Dilate(Bitmap img, int Size)
                    {
                        Bitmap TempBitmap = new Bitmap(img);
                        Bitmap NewBitmap = new Bitmap(TempBitmap.Width, TempBitmap.Height);
                        Graphics NewGraphics = Graphics.FromImage(NewBitmap);
            Severity: Minor
            Found in Project/Droid.Image/Controler/Interface_image.cs - About 1 hr to fix

              Method LaunchGoogleImg has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      private void LaunchGoogleImg(string direction = "", int count = 42, bool icon = false)
                      {
                          if (_textSearchChanged)
                          {
                              _webSearchUrls = icon ? Droid.Web.Web.GetIcon(_textSearch) : Droid.Web.Web.GetImages(_textSearch);
              Severity: Minor
              Found in Project/Droid.Image/Controler/Interface_image.cs - About 1 hr to fix

                Method ResizeAndDisplayImage has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        private void ResizeAndDisplayImage(int width, int height)
                        {
                            // Set the backcolor of the pictureboxes
                            //pictureboxmini.BackColor = BackColor;
                
                
                Severity: Minor
                Found in Project/Droid.Image/Controler/Interface_image.cs - About 1 hr to fix

                  Method LaunchBack has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          private void LaunchBack()
                          {
                              try
                              {
                                  if (_webSearchUrls != null)
                  Severity: Minor
                  Found in Project/Droid.Image/Controler/Interface_image.cs - About 1 hr to fix

                    Method LaunchNext has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            private void LaunchNext()
                            {
                                try
                                {
                                    if (_webSearchUrls != null)
                    Severity: Minor
                    Found in Project/Droid.Image/Controler/Interface_image.cs - About 1 hr to fix

                      Method parsePictureCode has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              private async void parsePictureCode()
                              {
                                  try
                                  {
                                      ZXing.MultiFormatReader reader = new ZXing.MultiFormatReader();
                      Severity: Minor
                      Found in Project/Droid.Image/Controler/Interface_image.cs - About 1 hr to fix

                        Method LaunchApplyMask has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                private void LaunchApplyMask()
                                {
                                    if (_currentImage != null && _mask != null)
                                    {
                                        Bitmap original = new Bitmap(_currentImage); ;
                        Severity: Minor
                        Found in Project/Droid.Image/Controler/Interface_image.cs - About 1 hr to fix

                          Method AddImage has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  private void AddImage()
                                  {
                                      try
                                      {
                                          if (CurrentImage != null)
                          Severity: Minor
                          Found in Project/Droid.Image/Controler/Interface_image.cs - About 1 hr to fix

                            Method LaunchRecognition has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    private void LaunchRecognition()
                                    {
                                        _pictureByte = imageToByteArray(_currentImage);
                                        List<ParsingPicture.DetectZone> detection = ParsingPicture.ProcessAll(_pictureByte);
                                        if (detection != null && detection.Count > 0) Console.WriteLine("found");
                            Severity: Minor
                            Found in Project/Droid.Image/Controler/Interface_image.cs - About 1 hr to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          for (int y2 = ApetureMin; y2 < ApetureMax; ++y2)
                                                          {
                                                              int TempY = y + y2;
                                                              if (TempY >= 0 && TempY < NewBitmap.Height)
                                                              {
                              Severity: Major
                              Found in Project/Droid.Image/Controler/Interface_image.cs - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                            for (int y2 = ApetureMin; y2 < ApetureMax; ++y2)
                                                            {
                                                                int TempY = y + y2;
                                                                if (TempY >= 0 && TempY < NewBitmap.Height)
                                                                {
                                Severity: Major
                                Found in Project/Droid.Image/Controler/Interface_image.cs - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if (TempX >= 0 && TempX < NewBitmap.Width)
                                                              {
                                                                  for (int y2 = ApetureMinY[i]; y2 < ApetureMaxY[i]; ++y2)
                                                                  {
                                                                      int TempY = y + y2;
                                  Severity: Major
                                  Found in Project/Droid.Image/Controler/Interface_image.cs - About 45 mins to fix

                                    Method ACTION_131_crop_picture has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            public static Bitmap ACTION_131_crop_picture(Bitmap picture, int width, int height, int top, int left)
                                    Severity: Minor
                                    Found in Project/Droid.Image/Controler/Interface_image.cs - About 35 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                  return Rotation.NONE;
                                      Severity: Major
                                      Found in Project/Droid.Image/Controler/Interface_image.cs - About 30 mins to fix

                                        Method LaunchGoogleImg has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring.
                                        Open

                                                private void LaunchGoogleImg(string direction = "", int count = 42, bool icon = false)
                                                {
                                                    if (_textSearchChanged)
                                                    {
                                                        _webSearchUrls = icon ? Droid.Web.Web.GetIcon(_textSearch) : Droid.Web.Web.GetImages(_textSearch);
                                        Severity: Minor
                                        Found in Project/Droid.Image/Controler/Interface_image.cs - About 25 mins to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                public static Bitmap KuwaharaBlur(Bitmap img, int Size)
                                                {
                                                    Bitmap TempBitmap = new Bitmap(img);
                                                    Bitmap NewBitmap = new Bitmap(TempBitmap.Width, TempBitmap.Height);
                                                    Graphics NewGraphics = Graphics.FromImage(NewBitmap);
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 2 days to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 722..815

                                        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 1224.

                                        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

                                        Further Reading

                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                public static Bitmap MedianFilter(Bitmap Image, int Size)
                                                {
                                                    Bitmap TempBitmap = Image;
                                                    Bitmap NewBitmap = new Bitmap(TempBitmap.Width, TempBitmap.Height);
                                                    Graphics NewGraphics = Graphics.FromImage(NewBitmap);
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 1 day to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 944..989

                                        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 588.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                public static Bitmap Dilate(Bitmap img, int Size)
                                                {
                                                    Bitmap TempBitmap = new Bitmap(img);
                                                    Bitmap NewBitmap = new Bitmap(TempBitmap.Width, TempBitmap.Height);
                                                    Graphics NewGraphics = Graphics.FromImage(NewBitmap);
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 7 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 848..891

                                        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 496.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private void BuildEllipse(Graphics g, ParsingPicture.DetectZone zone, Pen pen)
                                                {
                                                    int offset = 76;
                                                    Pen penBis;
                                                    if (zone.Color.R > offset && zone.Color.G > offset && zone.Color.B > offset) penBis = new Pen(Color.FromArgb(100, zone.Color.R - offset, zone.Color.G - offset, zone.Color.B - offset), 2);
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 7 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1721..1736

                                        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 483.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private void LaunchApplyMask()
                                                {
                                                    if (_currentImage != null && _mask != null)
                                                    {
                                                        Bitmap original = new Bitmap(_currentImage); ;
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 5 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1606..1646

                                        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 367.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private void LaunchGoogleImg(string direction = "", int count = 42, bool icon = false)
                                                {
                                                    if (_textSearchChanged)
                                                    {
                                                        _webSearchUrls = icon ? Droid.Web.Web.GetIcon(_textSearch) : Droid.Web.Web.GetImages(_textSearch);
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 4 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1432..1478

                                        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 324.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private void LaunchBack()
                                                {
                                                    try
                                                    {
                                                        if (_webSearchUrls != null)
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 4 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1087..1124

                                        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 276.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private void LaunchNext()
                                                {
                                                    try
                                                    {
                                                        if (_webSearchUrls != null)
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 4 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1125..1161

                                        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 275.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private static Bitmap resizeImage(Bitmap imgToResize, Size size)
                                                {
                                                    int sourceWidth = imgToResize.Width;
                                                    int sourceHeight = imgToResize.Height;
                                        
                                        
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 3 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1964..1992

                                        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 254.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private void LaunchResize()
                                                {
                                                    var destRect = new Rectangle(0, 0, _resizeWidth, _resizeHeight);
                                                    var destImage = new Bitmap(_resizeWidth, _resizeHeight);
                                        
                                        
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 3 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1302..1339

                                        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 236.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private static Bitmap RotateImage(Bitmap image, float angle)
                                                {
                                                    if (image == null) Log.Write("[ERR : 0300] No Image found !");
                                        
                                                    PointF offset = new PointF((float)image.Width / 2, (float)image.Height / 2);
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 3 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 2009..2035

                                        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 229.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private static List<string> GetUrls(string html)
                                                {
                                                    var urls = new List<string>();
                                                    //int ndx = html.IndexOf("class=\"images_table\"", StringComparison.Ordinal);
                                                    int ndx = html.IndexOf("<img", StringComparison.Ordinal);
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 2 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 2226..2242

                                        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 195.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                public static Color ChangeColorBrightness(Color color, float correctionFactor)
                                                {
                                                    float red = (float)color.R;
                                                    float green = (float)color.G;
                                                    float blue = (float)color.B;
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 2 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 675..696

                                        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 185.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                [Description("french[convertir.pdf(fichier)];english[convert.pdf(file)]")]
                                                public static void ACTION_140_convert(string path)
                                                {
                                                    FileInfo fi = new FileInfo(path);
                                                    string file = fi.Directory + "\\" + fi.Name.Replace(fi.Extension, string.Empty) + ".pdf";
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 2 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 327..339

                                        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 184.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                [Description("french[télécharger.image(url)];english[download.image(url)]")]
                                                public static Bitmap ACTION_141_download_image(string url)
                                                {
                                                    try
                                                    {
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 2 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 340..359

                                        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 182.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                [Description("french[prendre.image(nom)];english[take.picture(name)]")]
                                                public static Bitmap ACTION_130_take_picture(string objet)
                                                {
                                                    string html = GetHtmlCode(objet);
                                                    List<string> urls = GetUrls(html);
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 2 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 216..239

                                        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 168.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private static string GetHtmlCode(string topic)
                                                {
                                                    var rnd = new Random();
                                        
                                                    string url = "https://www.google.com/search?q=" + topic + "&tbm=isch";
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 2 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 2205..2225

                                        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 152.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private int determinePrevPictureIndex(string[] fichiers, int curindex)
                                                {
                                                    bool notfound = true;
                                                    string[] ext = { "png", "jpg", "bmp", "gif" };
                                                    while (notfound)
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 2 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1777..1798

                                        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 152.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                public static Bitmap Brightness(Bitmap img, float correctionFactor)
                                                {
                                                    float FinalValue = (float)correctionFactor / 255.0f;
                                                    ColorMatrix TempMatrix = new ColorMatrix();
                                                    TempMatrix.Matrix = new float[][]{
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 2 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 697..709

                                        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 151.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private int determineNextPictureIndex(string[] fichiers, int curindex)
                                                {
                                                    bool notfound = true;
                                                    string[] ext = { "png", "jpg", "bmp", "gif" };
                                                    while (notfound)
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 2 hrs to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1755..1776

                                        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 149.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private Rotation GetPictureOrientation()
                                                {
                                                    string val = string.Empty;
                                                    if (CurrentImage != null)
                                                    { 
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 1 hr to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1799..1816

                                        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 139.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                        using (Pen pen = new Pen(zone.Color, 1))
                                                        {
                                                            using (Graphics g = Graphics.FromImage(CurrentImage))
                                                            {
                                                                if (zone.Style == ParsingPicture.FormStyle.RECTANGLE)
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 1 hr to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1492..1509

                                        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 132.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                public static Bitmap ConvertSepiaTone(Bitmap img)
                                                {
                                                    ColorMatrix TempMatrix = new ColorMatrix();
                                                    TempMatrix.Matrix = new float[][]{
                                                            new float[] {.393f, .349f, .272f, 0, 0},
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 1 hr to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 710..721

                                        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 132.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private static byte[] GetImage(string url)
                                                {
                                                    var request = (HttpWebRequest)WebRequest.Create(url);
                                                    var response = (HttpWebResponse)request.GetResponse();
                                        
                                        
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 1 hr to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 2243..2259

                                        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 131.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private void LaunchUnserializeString()
                                                {
                                                    PathFile = null;
                                                    if (!string.IsNullOrEmpty(_serialiseString))
                                                    {
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 1 hr to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1587..1605

                                        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 121.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private void LaunchSerializeImage()
                                                {
                                                    if (_currentImage != null)
                                                    {
                                                        MemoryStream ms = new MemoryStream();
                                        Severity: Major
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 1 hr to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1572..1586

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private static ImageCodecInfo GetEncoderInfo(String mimeType)
                                                {
                                                    int j;
                                                    ImageCodecInfo[] encoders;
                                                    encoders = ImageCodecInfo.GetImageEncoders();
                                        Severity: Minor
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 55 mins to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1945..1956

                                        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 86.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                [Description("french[appliquer.masque(image,masque)];english[apply.mask(image,mask)]")]
                                                public static Bitmap ACTION_138_apply_mask(Bitmap image, Bitmap mask = null)
                                                {
                                                    _this.CurrentImage = image;
                                                    if (mask != null) _this.Mask = new Bitmap(mask);
                                        Severity: Minor
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 40 mins to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 312..319

                                        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 72.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private void BuildRectangle(Graphics g, ParsingPicture.DetectZone zone, Pen pen)
                                                {
                                                    g.DrawRectangle(pen, new Rectangle(
                                                        zone.Point.X,
                                                        zone.Point.Y,
                                        Severity: Minor
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 40 mins to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1737..1745

                                        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 69.

                                        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

                                        Further Reading

                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                private byte[] imageToByteArray(Bitmap imageIn)
                                                {
                                                    MemoryStream ms = new MemoryStream();
                                                    imageIn.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
                                                    return ms.ToArray();
                                        Severity: Minor
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 35 mins to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 1700..1705

                                        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 65.

                                        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

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                [Description("french[rogner.image(image,largeur,hauteur,haut,bas)];english[crop.picture(picture,width,height,top,left)]")]
                                                public static Bitmap ACTION_131_crop_picture(Bitmap picture, int width, int height, int top, int left)
                                                {
                                                    return cropImage(picture, new Rectangle(left, top, width, height));
                                                }
                                        Severity: Minor
                                        Found in Project/Droid.Image/Controler/Interface_image.cs and 1 other location - About 30 mins to fix
                                        Project/Droid.Image.UI/Interface_image.cs on lines 240..244

                                        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 61.

                                        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

                                        Further Reading

                                        There are no issues that match your filters.

                                        Category
                                        Status