cesardl/facultad-sample-app

View on GitHub
src/main/java/org/sanmarcux/view/JPanelStudent.java

Summary

Maintainability
C
7 hrs
Test Coverage
D
66%

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

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

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

            layout.setHorizontalGroup(
                    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(scrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 682, Short.MAX_VALUE)
    Severity: Major
    Found in src/main/java/org/sanmarcux/view/JPanelStudent.java and 4 other locations - About 40 mins to fix
    src/main/java/org/sanmarcux/view/JFrameInit.java on lines 65..71
    src/main/java/org/sanmarcux/view/JFrameInit.java on lines 72..78
    src/main/java/org/sanmarcux/view/JPanelTeacher.java on lines 174..180
    src/main/java/org/sanmarcux/view/JPanelTeacher.java on lines 181..187

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

    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