cesardl/facultad-sample-app

View on GitHub

Showing 67 of 67 total issues

Method initComponents has 145 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @PostConstruct
    private void initComponents() {

        javax.swing.ButtonGroup buttonGroup = new javax.swing.ButtonGroup();
        javax.swing.JPanel panel = new javax.swing.JPanel();
Severity: Major
Found in src/main/java/org/sanmarcux/view/JDialogStudent.java - About 5 hrs to fix

    Method initComponents has 101 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @PostConstruct
        private void initComponents() {
    
            javax.swing.JPanel panel = new javax.swing.JPanel();
            javax.swing.JLabel labelCode = new javax.swing.JLabel();
    Severity: Major
    Found in src/main/java/org/sanmarcux/view/JDialogTeacher.java - About 4 hrs to fix

      Method initComponents has 91 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @PostConstruct
          private void initComponents() {
              javax.swing.JPanel panel = new javax.swing.JPanel();
              tabbedPane = new javax.swing.JTabbedPane();
              javax.swing.JMenuBar menuBar = new javax.swing.JMenuBar();
      Severity: Major
      Found in src/main/java/org/sanmarcux/view/JFrameInit.java - About 3 hrs to fix

        File JDialogStudent.java has 296 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * JDialogStudent.java
         *
         * Created on 12/07/2009, 05:13:31 PM
         */
        Severity: Minor
        Found in src/main/java/org/sanmarcux/view/JDialogStudent.java - About 3 hrs to fix

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

              @Override
              protected void deleteRow(int row, String code) {
                  int i = JOptionPane.showConfirmDialog(this,
                          bundle.getString("app.warning.teacher.delete"),
                          bundle.getString("app.title"), JOptionPane.YES_NO_OPTION);
          Severity: Major
          Found in src/main/java/org/sanmarcux/view/JPanelTeacher.java and 1 other location - About 2 hrs to fix
          src/main/java/org/sanmarcux/view/JPanelStudent.java on lines 69..90

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

          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

              @Override
              protected void deleteRow(int row, String code) {
                  int i = JOptionPane.showConfirmDialog(this,
                          bundle.getString("app.warning.student.delete"),
                          bundle.getString("app.title"), JOptionPane.YES_NO_OPTION);
          Severity: Major
          Found in src/main/java/org/sanmarcux/view/JPanelStudent.java and 1 other location - About 2 hrs to fix
          src/main/java/org/sanmarcux/view/JPanelTeacher.java on lines 66..87

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

          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

              @Override
              public void showDialog(DialogAction dialogAction, int row, String code) {
                  LOG.info("Opening teacher dialog for " + dialogAction);
          
                  Teacher teacher;
          Severity: Major
          Found in src/main/java/org/sanmarcux/view/JPanelTeacher.java and 1 other location - About 2 hrs to fix
          src/main/java/org/sanmarcux/view/JPanelStudent.java on lines 92..119

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

          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

              @Override
              public void showDialog(DialogAction dialogAction, int row, String code) {
                  LOG.info("Opening student dialog for " + dialogAction);
          
                  Student student;
          Severity: Major
          Found in src/main/java/org/sanmarcux/view/JPanelStudent.java and 1 other location - About 2 hrs to fix
          src/main/java/org/sanmarcux/view/JPanelTeacher.java on lines 89..116

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

          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

          Method initComponents has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              @PostConstruct
              private void initComponents() {
          
                  javax.swing.JScrollPane scrollPane = new javax.swing.JScrollPane();
                  table = new javax.swing.JTable();
          Severity: Major
          Found in src/main/java/org/sanmarcux/view/JPanelStudent.java - About 2 hrs to fix

            Method initComponents has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @PostConstruct
                private void initComponents() {
            
                    javax.swing.JScrollPane scrollPane = new javax.swing.JScrollPane();
                    table = new javax.swing.JTable();
            Severity: Major
            Found in src/main/java/org/sanmarcux/view/JPanelTeacher.java - About 2 hrs to fix

              Method validateData has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  @Override
                  public boolean validateData() {
                      code = textFieldCode.getText().trim();
                      names = textFieldNames.getText().trim();
                      birthday = dateChooserBirthday.getDate();
              Severity: Minor
              Found in src/main/java/org/sanmarcux/view/JDialogTeacher.java - About 1 hr to fix

                Method initComponents has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    @PostConstruct
                    private void initComponents() {
                
                        javax.swing.JPanel panel = new javax.swing.JPanel();
                        javax.swing.JLabel labelImage = new javax.swing.JLabel();
                Severity: Minor
                Found in src/main/java/org/sanmarcux/view/JDialogAbout.java - About 1 hr to fix

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

                      @Override
                      public boolean validateData() {
                          code = textFieldCode.getText().trim();
                          names = textFieldNames.getText().trim();
                          birthday = dateChooserBirthday.getDate();
                  Severity: Minor
                  Found in src/main/java/org/sanmarcux/view/JDialogStudent.java - About 1 hr to fix

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

                        private void menuItemUpdateStudentActionPerformed() {//GEN-FIRST:event_menuItemUpdateStudentActionPerformed
                            JTable target = panelStudent.getTable();
                            int row = target.getSelectedRow();
                    
                            if (row == FormSupport.BAD_ROW) {
                    Severity: Major
                    Found in src/main/java/org/sanmarcux/view/JFrameInit.java and 1 other location - About 1 hr to fix
                    src/main/java/org/sanmarcux/view/JFrameInit.java on lines 191..204

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

                    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 void menuItemUpdateTeacherActionPerformed() {//GEN-FIRST:event_menuItemUpdateTeacherActionPerformed
                            JTable target = panelTeacher.getTable();
                            int row = target.getSelectedRow();
                    
                            if (row == FormSupport.BAD_ROW) {
                    Severity: Major
                    Found in src/main/java/org/sanmarcux/view/JFrameInit.java and 1 other location - About 1 hr to fix
                    src/main/java/org/sanmarcux/view/JFrameInit.java on lines 159..172

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

                    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

                                if (state) {
                                    key = "app.success.student.save";
                                    LOG.info(key);
                                    Toast.makeText(this, bundle.getString(key), Toast.Style.SUCCESS).display();
                                    dispose();
                    Severity: Major
                    Found in src/main/java/org/sanmarcux/view/JDialogStudent.java and 1 other location - About 1 hr to fix
                    src/main/java/org/sanmarcux/view/JDialogTeacher.java on lines 260..269

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

                    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

                                if (state) {
                                    key = "app.success.teacher.save";
                                    LOG.info(key);
                                    Toast.makeText(this, bundle.getString(key), Toast.Style.SUCCESS).display();
                                    dispose();
                    Severity: Major
                    Found in src/main/java/org/sanmarcux/view/JDialogTeacher.java and 1 other location - About 1 hr to fix
                    src/main/java/org/sanmarcux/view/JDialogStudent.java on lines 336..345

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

                    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 void menuItemDeleteTeacherActionPerformed() {//GEN-FIRST:event_menuItemDeleteTeacherActionPerformed
                            JTable target = panelTeacher.getTable();
                            int row = target.getSelectedRow();
                    
                            if (row == FormSupport.BAD_ROW) {
                    Severity: Major
                    Found in src/main/java/org/sanmarcux/view/JFrameInit.java and 1 other location - About 1 hr to fix
                    src/main/java/org/sanmarcux/view/JFrameInit.java on lines 174..185

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

                    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 void menuItemDeleteStudentActionPerformed() {//GEN-FIRST:event_menuItemDeleteStudentActionPerformed
                            JTable target = panelStudent.getTable();
                            int row = target.getSelectedRow();
                    
                            if (row == FormSupport.BAD_ROW) {
                    Severity: Major
                    Found in src/main/java/org/sanmarcux/view/JFrameInit.java and 1 other location - About 1 hr to fix
                    src/main/java/org/sanmarcux/view/JFrameInit.java on lines 206..217

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

                    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

                        @Override
                        public int selectIdByCode(final String code) {
                            try {
                                String sql = "SELECT id_alum FROM alumno WHERE cod_alum = ?";
                    
                    
                    Severity: Major
                    Found in src/main/java/org/sanmarcux/dao/impl/StudentDAOImpl.java and 1 other location - About 1 hr to fix
                    src/main/java/org/sanmarcux/dao/impl/TeacherDAOImpl.java on lines 122..134

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

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language