Showing 2,936 of 7,765 total issues

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

        var self = this,
            cave = self.cave,
            isH = orient == 'hor',
            bar = self.$n(orient),
            ind = self.$n(orient + '-indicator'),
Severity: Major
Found in zul/src/main/resources/web/js/zul/Scrollbar.ts and 1 other location - About 4 hrs to fix
zul/src/main/resources/web/js/zul/Scrollbar.ts on lines 526..533

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

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

  protected static final String addEscapes(String str) {
    StringBuffer retval = new StringBuffer();
    char ch;
    for (int i = 0; i < str.length(); i++) {
      switch (str.charAt(i))
zel/src/main/java/org/zkoss/zel/impl/parser/ParseException.java on lines 142..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 258.

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

  static String add_escapes(String str) {
      StringBuffer retval = new StringBuffer();
      char ch;
      for (int i = 0; i < str.length(); i++) {
        switch (str.charAt(i))
zel/src/main/java/org/zkoss/zel/impl/parser/TokenMgrError.java on lines 51..94

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

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 class Person {
        private String firstName;
        private String lastName;
        private Date birthday;
        private boolean gender;
zktest/src/main/java/org/zkoss/zktest/bind/basic/LoadComposer.java on lines 30..105

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

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 class Person {
        private String firstName;
        private String lastName;
        private Date birthday;
        private boolean gender;
zktest/src/main/java/org/zkoss/zktest/bind/basic/LoadIndirectComposer.java on lines 30..105

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

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

/* ListboxModelVM.java

    Purpose:
        
    Description:
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00762Combobox1.java on lines 1..94

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

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

    public Converter getConverter(String name) {
        checkInit();
        Converter converter = null;
        if (_hasGetConverterMethod) {
            Object vm = getViewModel();
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java and 1 other location - About 4 hrs to fix
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 637..676

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

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

    public Validator getValidator(String name) {
        checkInit();
        Validator validator = null;
        if (_hasGetValidatorMethod) {
            Object vm = getViewModel();
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java and 1 other location - About 4 hrs to fix
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 595..634

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

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

/* ListboxModelVM.java

    Purpose:
        
    Description:
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00762Listbox1.java on lines 1..94

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

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

wgt4714.test01.Test01 = zk.$extends(zk.Widget, {
    redraw: function (out) {
        out.push('<div', this.domAttrs_(), '>', this.widgetName);
        for (var w = this.firstChild; w; w = w.nextSibling) {
            w.redraw(out);
Severity: Major
Found in zktest/src/main/webapp/web/js/wgt4714/test01/Test01.js and 3 other locations - About 4 hrs to fix
zktest/src/main/webapp/web/js/wgt4714/test02/Test02.js on lines 1..9
zktest/src/main/webapp/web/js/wgt4714/test03/Test03.js on lines 1..9
zktest/src/main/webapp/web/js/wgt4714/test04/Test04.js on lines 1..9

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

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

wgt4714.test02.Test02 = zk.$extends(zk.Widget, {
    redraw: function (out) {
        out.push('<div', this.domAttrs_(), '>', this.widgetName);
        for (var w = this.firstChild; w; w = w.nextSibling) {
            w.redraw(out);
Severity: Major
Found in zktest/src/main/webapp/web/js/wgt4714/test02/Test02.js and 3 other locations - About 4 hrs to fix
zktest/src/main/webapp/web/js/wgt4714/test01/Test01.js on lines 1..9
zktest/src/main/webapp/web/js/wgt4714/test03/Test03.js on lines 1..9
zktest/src/main/webapp/web/js/wgt4714/test04/Test04.js on lines 1..9

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

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

wgt4714.test03.Test03 = zk.$extends(zk.Widget, {
    redraw: function (out) {
        out.push('<div', this.domAttrs_(), '>', this.widgetName);
        for (var w = this.firstChild; w; w = w.nextSibling) {
            w.redraw(out);
Severity: Major
Found in zktest/src/main/webapp/web/js/wgt4714/test03/Test03.js and 3 other locations - About 4 hrs to fix
zktest/src/main/webapp/web/js/wgt4714/test01/Test01.js on lines 1..9
zktest/src/main/webapp/web/js/wgt4714/test02/Test02.js on lines 1..9
zktest/src/main/webapp/web/js/wgt4714/test04/Test04.js on lines 1..9

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

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

wgt4714.test04.Test04 = zk.$extends(zk.Widget, {
    redraw: function (out) {
        out.push('<div', this.domAttrs_(), '>', this.widgetName);
        for (var w = this.firstChild; w; w = w.nextSibling) {
            w.redraw(out);
Severity: Major
Found in zktest/src/main/webapp/web/js/wgt4714/test04/Test04.js and 3 other locations - About 4 hrs to fix
zktest/src/main/webapp/web/js/wgt4714/test01/Test01.js on lines 1..9
zktest/src/main/webapp/web/js/wgt4714/test02/Test02.js on lines 1..9
zktest/src/main/webapp/web/js/wgt4714/test03/Test03.js on lines 1..9

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

        localizedSymbols ??= {
            DOW_1ST: zk.DOW_1ST,
            MINDAYS: zk.MINDAYS,
            ERA: zk.ERA,
            YDELTA: zk.YDELTA,
Severity: Major
Found in zul/src/main/resources/web/js/zul/db/datefmt.ts and 1 other location - About 4 hrs to fix
zul/src/main/resources/web/js/zul/db/datefmt.ts on lines 230..243

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

        localizedSymbols ??= {
            DOW_1ST: zk.DOW_1ST,
            MINDAYS: zk.MINDAYS,
            ERA: zk.ERA,
            YDELTA: zk.YDELTA,
Severity: Major
Found in zul/src/main/resources/web/js/zul/db/datefmt.ts and 1 other location - About 4 hrs to fix
zul/src/main/resources/web/js/zul/db/datefmt.ts on lines 519..532

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

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

msgzk = {
    NOT_FOUND: '找不到:',
    UNSUPPORTED: '尚未支持:',
    FAILED_TO_SEND: '无法传送资料到服务器。',
    FAILED_TO_RESPONSE: '伺服器暂时无法处理你的请求。',
Severity: Major
Found in zk/src/main/resources/web/js/zk/lang/msgzk_zh_CN.js and 10 other locations - About 4 hrs to fix
zk/src/main/resources/web/js/zk/lang/msgzk.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_da.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_de.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_fr.js on lines 16..41
zk/src/main/resources/web/js/zk/lang/msgzk_ja.js on lines 16..41
zk/src/main/resources/web/js/zk/lang/msgzk_pl.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_ru.js on lines 6..28
zk/src/main/resources/web/js/zk/lang/msgzk_zh.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh_SG.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh_TW.js on lines 15..40

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

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 11 locations. Consider refactoring.
Open

msgzk = {
    NOT_FOUND: 'Не найден: ',
    UNSUPPORTED: 'Не поддерживается: ',
    FAILED_TO_SEND: 'Не удалось послать запрос на сервер.',
    FAILED_TO_RESPONSE: 'Сервер временно недоступен.',
Severity: Major
Found in zk/src/main/resources/web/js/zk/lang/msgzk_ru.js and 10 other locations - About 4 hrs to fix
zk/src/main/resources/web/js/zk/lang/msgzk.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_da.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_de.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_fr.js on lines 16..41
zk/src/main/resources/web/js/zk/lang/msgzk_ja.js on lines 16..41
zk/src/main/resources/web/js/zk/lang/msgzk_pl.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh_CN.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh_SG.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh_TW.js on lines 15..40

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

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 11 locations. Consider refactoring.
Open

msgzk = {
    NOT_FOUND: '找不到:',
    UNSUPPORTED: '尚未支援:',
    FAILED_TO_SEND: '無法傳送資料到伺服器。',
    FAILED_TO_RESPONSE: '伺服器暫時無法處理你的請求。',
Severity: Major
Found in zk/src/main/resources/web/js/zk/lang/msgzk_zh_TW.js and 10 other locations - About 4 hrs to fix
zk/src/main/resources/web/js/zk/lang/msgzk.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_da.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_de.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_fr.js on lines 16..41
zk/src/main/resources/web/js/zk/lang/msgzk_ja.js on lines 16..41
zk/src/main/resources/web/js/zk/lang/msgzk_pl.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_ru.js on lines 6..28
zk/src/main/resources/web/js/zk/lang/msgzk_zh.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh_CN.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh_SG.js on lines 15..40

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

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 11 locations. Consider refactoring.
Open

msgzk = {
    NOT_FOUND: '找不到:',
    UNSUPPORTED: '尚未支持:',
    FAILED_TO_SEND: '无法传送资料到服务器。',
    FAILED_TO_RESPONSE: '伺服器暂时无法处理你的请求。',
Severity: Major
Found in zk/src/main/resources/web/js/zk/lang/msgzk_zh_SG.js and 10 other locations - About 4 hrs to fix
zk/src/main/resources/web/js/zk/lang/msgzk.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_da.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_de.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_fr.js on lines 16..41
zk/src/main/resources/web/js/zk/lang/msgzk_ja.js on lines 16..41
zk/src/main/resources/web/js/zk/lang/msgzk_pl.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_ru.js on lines 6..28
zk/src/main/resources/web/js/zk/lang/msgzk_zh.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh_CN.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh_TW.js on lines 15..40

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

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 11 locations. Consider refactoring.
Open

msgzk = {
    NOT_FOUND: 'Not found: ',
    UNSUPPORTED: 'Not supported yet: ',
    FAILED_TO_SEND: 'Failed to send requests to server.',
    FAILED_TO_RESPONSE: 'The server is temporarily out of service.',
Severity: Major
Found in zk/src/main/resources/web/js/zk/lang/msgzk.js and 10 other locations - About 4 hrs to fix
zk/src/main/resources/web/js/zk/lang/msgzk_da.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_de.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_fr.js on lines 16..41
zk/src/main/resources/web/js/zk/lang/msgzk_ja.js on lines 16..41
zk/src/main/resources/web/js/zk/lang/msgzk_pl.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_ru.js on lines 6..28
zk/src/main/resources/web/js/zk/lang/msgzk_zh.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh_CN.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh_SG.js on lines 15..40
zk/src/main/resources/web/js/zk/lang/msgzk_zh_TW.js on lines 15..40

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

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