File BinderImpl.java
has 2385 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* BinderImpl.java
Purpose:
Description:
BinderImpl
has 148 methods (exceeds 20 allowed). Consider refactoring. Open
public class BinderImpl implements Binder, BinderCtrl, Serializable {
private static final long serialVersionUID = 1463169907348730644L;
private static final Logger _log = LoggerFactory.getLogger(BinderImpl.class);
Method init
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
public void init(Component comp, Object viewModel, Map<String, Object> initArgs) {
if (_init)
throw new UiException("binder is already initialized");
_init = true;
- Read upRead up
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 addPropertySaveBindings0
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
private void addPropertySaveBindings0(Component comp, String attr, String saveExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs, String validatorExpr, Map<String, Object> validatorArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
- Read upRead up
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 addPropertyLoadBindings0
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
private void addPropertyLoadBindings0(Component comp, String attr, String loadExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
- Read upRead up
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 getCommandMethod
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
private Method getCommandMethod(Class<?> clz, String command, CommandMethodInfoProvider cmdInfo,
Map<Class<?>, Map<String, CachedItem<Method>>> cache, int commandParamCount, boolean isGlobal) {
Map<String, CachedItem<Method>> methods;
Method matchedMethodWithoutAnno = null;
CachedItem<Method> method = null;
- Read upRead up
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 doValidate
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
protected boolean doValidate(Component comp, String command, Event evt, BindContext ctx, Set<Property> notifys) {
final Set<Property> validates = new HashSet<Property>();
String debugInfo = MessageFormat.format("doValidate "
+ "comp=[{0}],command=[{1}],evt=[{2}],context=[{3}]", comp, command, evt, ctx);
try {
- Read upRead up
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 doPropertyChange0
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
private void doPropertyChange0(Object base, String prop, Set<LoadBinding> bindings) {
Execution exec = Executions.getCurrent();
Set<Component> skipCheckChildren = (Set<Component>) exec.getAttribute(HtmlShadowElement.SKIP_DISTRIBUTED_CHILDREN_PROPERTY_CHANGE);
for (LoadBinding binding : bindings) {
//BUG 828, the sub-sequence binding might be removed after the previous loading.
- Read upRead up
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 addChildrenLoadBindings0
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
private void addChildrenLoadBindings0(Component comp, String loadExpr, String[] beforeCmds, String[] afterCmds,
Map<String, Object> bindingArgs, String converterExpr, Map<String, Object> converterArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
if (prompt) {
- Read upRead up
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 addFormLoadBindings0
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
private void addFormLoadBindings0(Component comp, String formId, String loadExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
final String attr = formId;
final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
- Read upRead up
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 initRendererIfAny
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
private void initRendererIfAny(Component comp, String attr) {
final Object installed = comp.getAttribute(BinderCtrl.RENDERER_INSTALLED);
if (installed != null) { //renderer was set already init
return;
}
- Read upRead up
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 addPropertySaveBindings0
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void addPropertySaveBindings0(Component comp, String attr, String saveExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs, String validatorExpr, Map<String, Object> validatorArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
Method addFormSaveBindings0
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private void addFormSaveBindings0(Component comp, String formId, String saveExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String validatorExpr,
Map<String, Object> validatorArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
if (prompt) {
- Read upRead up
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 getValidator
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public Validator getValidator(String name) {
checkInit();
Validator validator = null;
if (_hasGetValidatorMethod) {
Object vm = getViewModel();
- Read upRead up
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 getConverter
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public Converter getConverter(String name) {
checkInit();
Converter converter = null;
if (_hasGetConverterMethod) {
Object vm = getViewModel();
- Read upRead up
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 addPropertyLoadBindings0
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void addPropertyLoadBindings0(Component comp, String attr, String loadExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
Method doValidate
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected boolean doValidate(Component comp, String command, Event evt, BindContext ctx, Set<Property> notifys) {
final Set<Property> validates = new HashSet<Property>();
String debugInfo = MessageFormat.format("doValidate "
+ "comp=[{0}],command=[{1}],evt=[{2}],context=[{3}]", comp, command, evt, ctx);
try {
Method getCommandMethod
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Method getCommandMethod(Class<?> clz, String command, CommandMethodInfoProvider cmdInfo,
Map<Class<?>, Map<String, CachedItem<Method>>> cache, int commandParamCount, boolean isGlobal) {
Map<String, CachedItem<Method>> methods;
Method matchedMethodWithoutAnno = null;
CachedItem<Method> method = null;
Method onEvent0
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private void onEvent0(Event event) throws Exception {
//command need to be confirmed shall be execute first!
//must sort the command sequence?
//BUG 619, event may come from children of some component,
- Read upRead up
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 doExecute
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected void doExecute(Component comp, String command, Map<String, Object> commandArgs, BindContext ctx,
Set<Property> notifys) {
String debugInfo = MessageFormat.format("doExecute "
+ "comp=[{0}],command=[{1}],notifys=[{2}]", comp, command, notifys);
try {
- Read upRead up
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 addFormAssociatedSaveBinding
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public void addFormAssociatedSaveBinding(Component associatedComp, String formId, SaveBinding saveBinding,
String fieldName) {
checkInit();
//find the form component by form id and a associated/nested component
Component formComp = lookupAssociatedFormComponent(formId, associatedComp);
- Read upRead up
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 init
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void init(Component comp, Object viewModel, Map<String, Object> initArgs) {
if (_init)
throw new UiException("binder is already initialized");
_init = true;
Method onEvent0
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void onEvent0(Event event) throws Exception {
//command need to be confirmed shall be execute first!
//must sort the command sequence?
//BUG 619, event may come from children of some component,
Method storeForm
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public void storeForm(Component comp, String id, Form form) {
final String oldid = (String) comp.getAttribute(FORM_ID, Component.COMPONENT_SCOPE);
//check if a form exist already, allow to store a form with same id again for replacing the form
if (oldid != null && !oldid.equals(id)) {
throw new IllegalArgumentException(
- Read upRead up
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 loadComponentProperties0
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private void loadComponentProperties0(Component comp, boolean loadinit) {
final Map<String, List<Binding>> compBindings = _bindings.get(comp);
if (compBindings != null) { // if component is not registered in this binder, do nothing.
for (String key : compBindings.keySet()) {
- Read upRead up
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 addChildrenLoadBindings0
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void addChildrenLoadBindings0(Component comp, String loadExpr, String[] beforeCmds, String[] afterCmds,
Map<String, Object> bindingArgs, String converterExpr, Map<String, Object> converterArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
if (prompt) {
Method doPropertyChange0
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void doPropertyChange0(Object base, String prop, Set<LoadBinding> bindings) {
Execution exec = Executions.getCurrent();
Set<Component> skipCheckChildren = (Set<Component>) exec.getAttribute(HtmlShadowElement.SKIP_DISTRIBUTED_CHILDREN_PROPERTY_CHANGE);
for (LoadBinding binding : bindings) {
//BUG 828, the sub-sequence binding might be removed after the previous loading.
Method addFormLoadBindings0
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void addFormLoadBindings0(Component comp, String formId, String loadExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
final String attr = formId;
final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
Method doExecute
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected void doExecute(Component comp, String command, Map<String, Object> commandArgs, BindContext ctx,
Set<Property> notifys) {
String debugInfo = MessageFormat.format("doExecute "
+ "comp=[{0}],command=[{1}],notifys=[{2}]", comp, command, notifys);
try {
Method addFormSaveBindings0
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void addFormSaveBindings0(Component comp, String formId, String saveExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String validatorExpr,
Map<String, Object> validatorArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
if (prompt) {
Method initRendererIfAny
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void initRendererIfAny(Component comp, String attr) {
final Object installed = comp.getAttribute(BinderCtrl.RENDERER_INSTALLED);
if (installed != null) { //renderer was set already init
return;
}
Method addFormAssociatedSaveBinding
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void addFormAssociatedSaveBinding(Component associatedComp, String formId, SaveBinding saveBinding,
String fieldName) {
checkInit();
//find the form component by form id and a associated/nested component
Component formComp = lookupAssociatedFormComponent(formId, associatedComp);
Method getValidator
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Validator getValidator(String name) {
checkInit();
Validator validator = null;
if (_hasGetValidatorMethod) {
Object vm = getViewModel();
Method getConverter
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Converter getConverter(String name) {
checkInit();
Converter converter = null;
if (_hasGetConverterMethod) {
Object vm = getViewModel();
Method doCommand
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
private int doCommand(Component comp, CommandBinding commandBinding, String command, Event evt,
Map<String, Object> commandArgs, Set<Property> notifys) {
final String evtnm = evt == null ? null : evt.getName();
String debugInfo = MessageFormat.format("doCommand "
+ "comp=[{0}],command=[{1}],evtnm=[{2}]", comp, command, evtnm);
Method storeForm
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void storeForm(Component comp, String id, Form form) {
final String oldid = (String) comp.getAttribute(FORM_ID, Component.COMPONENT_SCOPE);
//check if a form exist already, allow to store a form with same id again for replacing the form
if (oldid != null && !oldid.equals(id)) {
throw new IllegalArgumentException(
Method newSavePropertyBinding
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
protected SavePropertyBinding newSavePropertyBinding(Component comp, String attr, String saveAttr, String saveExpr,
ConditionType conditionType, String command, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs, String validatorExpr, Map<String, Object> validatorArgs) {
Method doGlobalCommandExecute
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void doGlobalCommandExecute(Component comp, String command, Map<String, Object> commandArgs,
BindContext ctx, Set<Property> notifys) {
String debugInfo = MessageFormat.format("doGlobalCommandExecute comp=[{0}],command=[{1}]", comp, command);
try {
if (_log.isDebugEnabled()) {
Method newLoadPropertyBinding
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
protected LoadPropertyBinding newLoadPropertyBinding(Component comp, String attr, String loadAttr,
Class<?> attrType, String loadExpr, ConditionType conditionType, String command,
Map<String, Object> bindingArgs, String converterExpr, Map<String, Object> converterArgs) {
Method addPropertySaveBindings0
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
private void addPropertySaveBindings0(Component comp, String attr, String saveExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs, String validatorExpr, Map<String, Object> validatorArgs) {
Method doGlobalCommandExecute
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void doGlobalCommandExecute(Component comp, String command, Map<String, Object> commandArgs,
BindContext ctx, Set<Property> notifys) {
String debugInfo = MessageFormat.format("doGlobalCommandExecute comp=[{0}],command=[{1}]", comp, command);
try {
if (_log.isDebugEnabled()) {
- Read upRead up
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 addPropertySaveBindings
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addPropertySaveBindings(Component comp, String attr, String saveExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs, String validatorExpr, Map<String, Object> validatorArgs) {
Method initMatchMediaValues
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private Map<String, Method> initMatchMediaValues(Object viewModel) {
Map<String, Method> values = new HashMap<>(6);
for (Method m : BindUtils.getViewModelClass(viewModel).getMethods()) {
MatchMedia annomm = ViewModelAnnotationResolvers.getAnnotation(m, MatchMedia.class);
if (annomm != null) {
- Read upRead up
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 loadComponent0
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected void loadComponent0(Component comp, boolean loadinit) {
loadComponentProperties0(comp, loadinit);
final Map<String, List<Binding>> compBindings = _bindings.get(comp);
if (_activating || compBindings == null || !compBindings.keySet().contains(CHILDREN_ATTR)) {
- Read upRead up
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 doPropertyChange
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void doPropertyChange(Object base, String prop) {
String debugInfo = MessageFormat.format("doPropertyChange: base=[{0}],prop=[{1}]", base, prop);
if (_log.isDebugEnabled()) {
_log.debug(debugInfo);
}
- Read upRead up
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 addPropertyInitBinding0
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void addPropertyInitBinding0(Component comp, String attr, String initExpr, Map<String, Object> bindingArgs,
String converterExpr, Map<String, Object> converterArgs) {
final ComponentCtrl compCtrl = (ComponentCtrl) comp;
final Annotation ann = AnnotationUtil.getSystemAnnotation(compCtrl, attr);
Method removeBindings0
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void removeBindings0(Component comp) {
checkInit();
if (_rootComp == comp) {
//the binder component was detached, unregister queue
unsubscribeQueue(_quename, _quescope, _queueListener);
Method doPropertyChange
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void doPropertyChange(Object base, String prop) {
String debugInfo = MessageFormat.format("doPropertyChange: base=[{0}],prop=[{1}]", base, prop);
if (_log.isDebugEnabled()) {
_log.debug(debugInfo);
}
Method collectNotifyCommands
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private void collectNotifyCommands(Object vm) {
Class<?> viewModelClz = BindUtils.getViewModelClass(vm);
NotifyCommands commands = ViewModelAnnotationResolvers.getAnnotation(viewModelClz, NotifyCommands.class);
NotifyCommand command = ViewModelAnnotationResolvers.getAnnotation(viewModelClz, NotifyCommand.class);
if (_notifyCommands != null)
- Read upRead up
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 handleNotifyChange
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
static void handleNotifyChange(BindContext ctx, Object viewModel,
Method method, ParamCall parCall,
Set<Property> notifys) {
final SmartNotifyChange sannt = ViewModelAnnotationResolvers.getAnnotation(method, SmartNotifyChange.class);
Object originViewModel = getOriginViewModel(viewModel);
- Read upRead up
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 addFormSaveBindings0
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
private void addFormSaveBindings0(Component comp, String formId, String saveExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String validatorExpr,
Map<String, Object> validatorArgs) {
Method newSaveFormBinding
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
protected SaveFormBinding newSaveFormBinding(Component comp, String formId, String saveExpr,
ConditionType conditionType, String command, Map<String, Object> bindingArgs, String validatorExpr,
Map<String, Object> validatorArgs) {
Method addPropertyLoadBindings0
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
private void addPropertyLoadBindings0(Component comp, String attr, String loadExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs) {
Method newInitPropertyBinding
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
protected InitPropertyBinding newInitPropertyBinding(Component comp, String attr, String loadAttr,
Class<?> attrType, String initExpr, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs) {
Method addFormSaveBindings
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addFormSaveBindings(Component comp, String id, String saveExpr, String[] beforeCmds, String[] afterCmds,
Map<String, Object> bindingArgs, String validatorExpr, Map<String, Object> validatorArgs) {
Method addPropertyLoadBindings
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addPropertyLoadBindings(Component comp, String attr, String loadExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs) {
Method sendCommand
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public int sendCommand(String command, Map<String, Object> args) {
checkInit();
final Set<Property> notifys = new HashSet<Property>();
Event evt = null;
//ZK-3133
- Read upRead up
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 removeBindings0
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private void removeBindings0(Component comp) {
checkInit();
if (_rootComp == comp) {
//the binder component was detached, unregister queue
unsubscribeQueue(_quename, _quescope, _queueListener);
- Read upRead up
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 addPropertyInitBinding0
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private void addPropertyInitBinding0(Component comp, String attr, String initExpr, Map<String, Object> bindingArgs,
String converterExpr, Map<String, Object> converterArgs) {
final ComponentCtrl compCtrl = (ComponentCtrl) comp;
final Annotation ann = AnnotationUtil.getSystemAnnotation(compCtrl, attr);
- Read upRead up
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 newLoadChildrenBinding
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
protected LoadChildrenBinding newLoadChildrenBinding(Component comp, String loadExpr, ConditionType conditionType,
String command, Map<String, Object> bindingArgs, String converterExpr, Map<String, Object> converterArgs) {
Method addChildrenLoadBindings
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addChildrenLoadBindings(Component comp, String loadExpr, String[] beforeCmds, String[] afterCmds,
Map<String, Object> bindingArgs, String converterExpr, Map<String, Object> converterArgs) {
Method addChildrenLoadBindings0
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
private void addChildrenLoadBindings0(Component comp, String loadExpr, String[] beforeCmds, String[] afterCmds,
Map<String, Object> bindingArgs, String converterExpr, Map<String, Object> converterArgs) {
Avoid deeply nested control flow statements. Open
if (wve != null) {
Component c = wve.getComponent();
if (c == null)
c = wvc;
Clients.wrongValue(c, wve.getMessage());
Avoid deeply nested control flow statements. Open
if (renderer instanceof TemplateRendererCtrl) {
((TemplateRendererCtrl) renderer).setAttributeName(attr);
}
Method addFormLoadBindings
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addFormLoadBindings(Component comp, String id, String loadExpr, String[] beforeCmds, String[] afterCmds,
Map<String, Object> bindingArgs) {
Method doCommand
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private int doCommand(Component comp, CommandBinding commandBinding, String command, Event evt,
Map<String, Object> commandArgs, Set<Property> notifys) {
Method addPropertyInitBinding0
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private void addPropertyInitBinding0(Component comp, String attr, String initExpr, Map<String, Object> bindingArgs,
String converterExpr, Map<String, Object> converterArgs) {
Method addPropertyInitBinding
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addPropertyInitBinding(Component comp, String attr, String initExpr, Map<String, Object> initArgs,
String converterExpr, Map<String, Object> converterArgs) {
Avoid deeply nested control flow statements. Open
if (matchMedias != null && args.size() != 0) {
if (!matchMedias[0].isEmpty()) {
for (String s : matchMedias) {
if (!_matchMediaValues.containsKey(s))
continue;
Method addFormLoadBindings0
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private void addFormLoadBindings0(Component comp, String formId, String loadExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs) {
Method getLoadPromptBindings
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public List<Binding> getLoadPromptBindings(Component comp, String attr) {
checkInit();
final List<Binding> bindings = new ArrayList<Binding>();
final BindingKey bkey = getBindingKey(comp, attr);
final List<LoadPropertyBinding> loadBindings = _propertyBindingHandler.getLoadPromptBindings(bkey);
- Read upRead up
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 newLoadFormBinding
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected LoadFormBinding newLoadFormBinding(Component comp, String formId, String loadExpr,
ConditionType conditionType, String command, Map<String, Object> bindingArgs) {
Method getCommandMethod
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private Method getCommandMethod(Class<?> clz, String command, CommandMethodInfoProvider cmdInfo,
Map<Class<?>, Map<String, CachedItem<Method>>> cache, int commandParamCount, boolean isGlobal) {
Avoid deeply nested control flow statements. Open
if ("ZKMatchMedia".equals(name)) {
matchMedias = value.trim().split(",");
} else if ("ZKClientInfo".equals(name)) {
args.put(BinderCtrl.CLIENT_INFO, JSONValue.parse(value));
}
Method postGlobalCommand
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private void postGlobalCommand(Component comp, CommandBinding commandBinding, String command, Event evt,
Map<String, Object> args) {
Method addChildrenInitBinding
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addChildrenInitBinding(Component comp, String initExpr, Map<String, Object> initArgs,
String converterExpr, Map<String, Object> converterArgs) {
Method addChildrenInitBinding0
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private void addChildrenInitBinding0(Component comp, String initExpr, Map<String, Object> bindingArgs,
String converterExpr, Map<String, Object> converterArgs) {
Method newInitChildrenBinding
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected InitChildrenBinding newInitChildrenBinding(Component comp, String initExpr,
Map<String, Object> bindingArgs, String converterExpr, Map<String, Object> converterArgs) {
Method doSaveAfter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected void doSaveAfter(Component comp, String command, Event evt, BindContext ctx, Set<Property> notifys) {
Method doExecute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected void doExecute(Component comp, String command, Map<String, Object> commandArgs, BindContext ctx,
Set<Property> notifys) {
Method handleNotifyChange
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
static void handleNotifyChange(BindContext ctx, Object viewModel,
Method method, ParamCall parCall,
Set<Property> notifys) {
Method doSaveBefore
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected void doSaveBefore(Component comp, String command, Event evt, BindContext ctx, Set<Property> notifys) {
Method doGlobalCommand
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private void doGlobalCommand(Component comp, String command, Event evt, Map<String, Object> commandArgs,
Set<Property> notifys) {
Method doValidate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected boolean doValidate(Component comp, String command, Event evt, BindContext ctx, Set<Property> notifys) {
Method newTemplateResolverImpl
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private TemplateResolver newTemplateResolverImpl(BinderImpl binderImpl, Component comp, String attr,
String templateExpr, Map<String, Object> templateArgs) {
Method doGlobalCommandExecute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private void doGlobalCommandExecute(Component comp, String command, Map<String, Object> commandArgs,
BindContext ctx, Set<Property> notifys) {
Method addPropertySaveBindings
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void addPropertySaveBindings(Component comp, String attr, String saveExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs, String validatorExpr, Map<String, Object> validatorArgs) {
checkInit();
if (saveExpr == null) {
- Read upRead up
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 removeBindings
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void removeBindings(Component comp, String key) {
checkInit();
removeEventCommandListenerIfExists(comp, key); //_listenerMap; //comp+evtnm -> eventlistener
final BindingKey bkey = getBindingKey(comp, key);
- Read upRead up
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 doCommand
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private int doCommand(Component comp, CommandBinding commandBinding, String command, Event evt,
Map<String, Object> commandArgs, Set<Property> notifys) {
final String evtnm = evt == null ? null : evt.getName();
String debugInfo = MessageFormat.format("doCommand "
+ "comp=[{0}],command=[{1}],evtnm=[{2}]", comp, command, evtnm);
- Read upRead up
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 getTracker
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public Tracker getTracker() {
if (_tracker == null) {
String clznm = Library.getProperty("org.zkoss.bind.Tracker.class");
if (clznm != null) {
- Read upRead up
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 getRenderer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected Object getRenderer(String name) {
Object renderer = RENDERERS.get(name);
if (renderer == null && name.indexOf('.') > 0) { //might be a class path
try {
renderer = Classes.newInstanceByThread(name);
- Read upRead up
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
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();
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public Converter getConverter(String name) {
checkInit();
Converter converter = null;
if (_hasGetConverterMethod) {
Object vm = getViewModel();
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (beforeCmds != null && beforeCmds.length > 0) {
for (String cmd : beforeCmds) {
final SavePropertyBinding binding = newSavePropertyBinding(comp, attr, saveRep, saveExpr,
ConditionType.BEFORE_COMMAND, cmd, bindingArgs, converterExpr, converterArgs, validatorExpr,
validatorArgs);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 154.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (afterCmds != null && afterCmds.length > 0) {
for (String cmd : afterCmds) {
final SavePropertyBinding binding = newSavePropertyBinding(comp, attr, saveRep, saveExpr,
ConditionType.AFTER_COMMAND, cmd, bindingArgs, converterExpr, converterArgs, validatorExpr,
validatorArgs);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 154.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (beforeCmds != null && beforeCmds.length > 0) {
for (String cmd : beforeCmds) {
LoadPropertyBinding binding = newLoadPropertyBinding(comp, attr, loadRep, attrType, loadExpr,
ConditionType.BEFORE_COMMAND, cmd, bindingArgs, converterExpr, converterArgs);
addBinding(comp, attr, binding);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 150.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (afterCmds != null && afterCmds.length > 0) {
for (String cmd : afterCmds) {
LoadPropertyBinding binding = newLoadPropertyBinding(comp, attr, loadRep, attrType, loadExpr,
ConditionType.AFTER_COMMAND, cmd, bindingArgs, converterExpr, converterArgs);
addBinding(comp, attr, binding);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 150.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (beforeCmds != null && beforeCmds.length > 0) {
for (String cmd : beforeCmds) {
final SaveFormBinding binding = newSaveFormBinding(comp, formId, saveExpr, ConditionType.BEFORE_COMMAND,
cmd, bindingArgs, validatorExpr, validatorArgs);
addBinding(comp, formId, binding);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 144.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (afterCmds != null && afterCmds.length > 0) {
for (String cmd : afterCmds) {
final SaveFormBinding binding = newSaveFormBinding(comp, formId, saveExpr, ConditionType.AFTER_COMMAND,
cmd, bindingArgs, validatorExpr, validatorArgs);
addBinding(comp, formId, binding);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 144.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (afterCmds != null && afterCmds.length > 0) {
for (String cmd : afterCmds) {
LoadChildrenBindingImpl binding = new LoadChildrenBindingImpl(this, comp, loadExpr,
ConditionType.AFTER_COMMAND, cmd, bindingArgs, converterExpr, converterArgs);
addBinding(comp, CHILDREN_ATTR, binding);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 142.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (beforeCmds != null && beforeCmds.length > 0) {
for (String cmd : beforeCmds) {
LoadChildrenBindingImpl binding = new LoadChildrenBindingImpl(this, comp, loadExpr,
ConditionType.BEFORE_COMMAND, cmd, bindingArgs, converterExpr, converterArgs);
addBinding(comp, CHILDREN_ATTR, binding);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 142.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (beforeCmds != null && beforeCmds.length > 0) {
for (String cmd : beforeCmds) {
final LoadFormBinding binding = newLoadFormBinding(comp, formId, loadExpr,
ConditionType.BEFORE_COMMAND, cmd, bindingArgs);
addBinding(comp, attr, binding);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 140.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (afterCmds != null && afterCmds.length > 0) {
for (String cmd : afterCmds) {
final LoadFormBinding binding = newLoadFormBinding(comp, formId, loadExpr,
ConditionType.AFTER_COMMAND, cmd, bindingArgs);
addBinding(comp, attr, binding);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 140.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
protected void doSaveAfter(Component comp, String command, Event evt, BindContext ctx, Set<Property> notifys) {
String debugInfo = MessageFormat.format("doSaveAfter "
+ "comp=[{0}],command=[{1}],evt=[{2}],notifys=[{3}]", comp, command, evt, notifys);
if (_log.isDebugEnabled()) {
_log.debug(debugInfo);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 114.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
protected void doSaveBefore(Component comp, String command, Event evt, BindContext ctx, Set<Property> notifys) {
String debugInfo = MessageFormat.format("doSaveBefore "
+ "comp=[{0}],command=[{1}],evt=[{2}],notifys=[{3}]", comp, command, evt, notifys);
if (_log.isDebugEnabled()) {
_log.debug(debugInfo);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 114.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
protected void doLoadAfter(Component comp, String command, BindContext ctx) {
String debugInfo = MessageFormat.format("doLoadAfter comp=[{0}],command=[{1}]", comp, command);
if (_log.isDebugEnabled()) {
_log.debug(debugInfo);
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 106.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
protected void doLoadBefore(Component comp, String command, BindContext ctx) {
String debugInfo = MessageFormat.format("doLoadBefore comp=[{0}],command=[{1}]", comp, command);
if (_log.isDebugEnabled()) {
_log.debug(debugInfo);
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 106.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public void addGlobalCommandBinding(Component comp, String evtnm, String commandExpr, Map<String, Object> args) {
checkInit();
final CommandBinding binding = newCommandBinding(comp, evtnm, commandExpr, args);
addBinding(comp, evtnm, binding);
registerCommandEventListener(comp, evtnm, binding, true);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 91.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public void addCommandBinding(Component comp, String evtnm, String commandExpr, Map<String, Object> args) {
checkInit();
final CommandBinding binding = newCommandBinding(comp, evtnm, commandExpr, args);
addBinding(comp, evtnm, binding);
registerCommandEventListener(comp, evtnm, binding, false);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 91.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (method != null) {
BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
if (collector != null) {
collector.addInfo(new CommandInfo(CommandInfo.EXECUTE, comp, null, null, command, commandArgs,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (method != null) {
BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
if (collector != null) {
collector.addInfo(new CommandInfo(CommandInfo.EXECUTE_GLOBAL, comp, null, null, command,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
private static final CommandMethodInfoProvider _commandMethodInfoProvider = new CommandMethodInfoProvider() {
public String getAnnotationName() {
return Command.class.getSimpleName();
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 76.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
private static final CommandMethodInfoProvider _globalCommandMethodInfoProvider = new CommandMethodInfoProvider() {
public String getAnnotationName() {
return GlobalCommand.class.getSimpleName();
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 76.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public BindingAnnotationInfoChecker getBindingAnnotationInfoChecker() {
DebuggerFactory factory = DebuggerFactory.getInstance();
if (factory == null) return null;
// ZK-5048: setViewModelClass for MVVM DebuggerFactory to log via SLF4J
BindingAnnotationInfoChecker checker = factory.getAnnotationInfoChecker();
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 71.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public BindingExecutionInfoCollector getBindingExecutionInfoCollector() {
DebuggerFactory factory = DebuggerFactory.getInstance();
if (factory == null) return null;
// ZK-5048: setViewModelClass for MVVM DebuggerFactory to log via SLF4J
BindingExecutionInfoCollector collector = factory.getExecutionInfoCollector();
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 71.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
private String getSystemValidator(Component comp, String attr) {
final ComponentCtrl compCtrl = (ComponentCtrl) comp;
final Annotation ann = AnnotationUtil.getSystemAnnotation(compCtrl, attr);
if (ann != null) {
final Map<String, String[]> attrs = ann.getAttributes(); //(tag, tagExpr)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
private String getSystemConverter(Component comp, String attr) {
final ComponentCtrl compCtrl = (ComponentCtrl) comp;
final Annotation ann = AnnotationUtil.getSystemAnnotation(compCtrl, attr);
if (ann != null) {
final Map<String, String[]> attrs = ann.getAttributes(); //(tag, tagExpr)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
try {
if (_log.isDebugEnabled()) {
_log.debug(debugInfo);
}
doPrePhase(Phase.LOAD_BINDING, ctx);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 62.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public void addSaveFormFieldName(Form form, String fieldName) {
Set<String> fields = initSaveFormMap().get(form);
if (fields == null) {
fields = new HashSet<String>(16);
_saveFormFields.put(form, fields);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 55.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public void addSaveFormFieldName(Form form, Set<String> fieldNames) {
Set<String> fields = initSaveFormMap().get(form);
if (fields == null) {
fields = new HashSet<String>(16);
_saveFormFields.put(form, fields);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 55.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
for (String key : compBindings.keySet()) {
final BindingKey bkey = getBindingKey(comp, key);
if (loadinit) {
_formBindingHandler.doInit(comp, bkey);
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 50.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
for (String key : compBindings.keySet()) {
final BindingKey bkey = getBindingKey(comp, key);
if (loadinit) {
_propertyBindingHandler.doInit(comp, bkey);
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 50.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
for (String key : compBindings.keySet()) {
final BindingKey bkey = getBindingKey(comp, key);
if (loadinit) {
_childrenBindingHandler.doInit(comp, bkey);
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 50.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
if (Strings.isBlank(converterExpr)) {
converterExpr = getSystemConverter(comp, attr);
if (converterExpr != null) {
converterExpr = "'" + converterExpr + "'";
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
if (Strings.isBlank(converterExpr)) {
converterExpr = getSystemConverter(comp, attr);
if (converterExpr != null) {
converterExpr = "'" + converterExpr + "'";
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
if (Strings.isBlank(converterExpr)) {
converterExpr = getSystemConverter(comp, attr);
if (converterExpr != null) {
converterExpr = "'" + converterExpr + "'";
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (evtnm == null) {
//no trigger event, since the value never change of component, so both prompt and command are useless
if (BinderUtil.hasContext() && BinderUtil.getContext().isIgnoreAccessCreationWarn()) {
return;
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
if (Strings.isBlank(validatorExpr)) {
validatorExpr = getSystemValidator(comp, attr);
if (validatorExpr != null) {
validatorExpr = "'" + validatorExpr + "'";
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (!"both".equals(rw) && !"save".equals(rw)) { //load only, skip
if (BinderUtil.hasContext() && BinderUtil.getContext().isIgnoreAccessCreationWarn()) {
return;
}
_log.warn(MiscUtil.formatLocationMessage(
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (binding instanceof PropertyBinding) {
attr = ((PropertyBinding) binding).getFieldName();
} else if (binding instanceof FormBinding) {
attr = ((FormBinding) binding).getFormId();
} else {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 46.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (type != null) {
try {
attrType = Classes.forNameByThread(type);
} catch (ClassNotFoundException e) {
throw UiException.Aide.wrap(e, e.getMessage());
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 44.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (type != null) {
try {
attrType = Classes.forNameByThread(type);
} catch (ClassNotFoundException e) {
throw UiException.Aide.wrap(e, e.getMessage());
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 44.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (validatorExpr != null) {
BindingKey bkey = getBindingKey(comp, formId);
if (!_hasValidators.contains(bkey)) {
_hasValidators.add(bkey);
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 42.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (validatorExpr != null) {
BindingKey bkey = getBindingKey(comp, attr);
if (!_hasValidators.contains(bkey)) {
_hasValidators.add(bkey);
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 42.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76