Showing 7,775 of 7,775 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (tabscroll) {
out.push(
'<div id="', uuid, '-up" class="', /*safe*/ icon, ' ', this.$s('up-scroll'), '">', domIconHTML('up'), '</div>',
'<div id="', uuid, '-down" class="', /*safe*/ icon, ' ', this.$s('down-scroll'), '">', domIconHTML('down'), '</div>');
}
- 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 60.
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 (tabscroll) {
out.push(
'<div id="', uuid, '-left" class="', /*safe*/ icon, ' ', this.$s('left-scroll'), '">', domIconHTML('left'), '</div>',
'<div id="', uuid, '-right" class="', /*safe*/ icon, ' ', this.$s('right-scroll'), '">', domIconHTML('right'), '</div>');
}
- 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 60.
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 (ids = dt._pfDoneIds) {
if (fetchHeaders) fetchHeaders['ZK-Client-Complete'] = ids;
if (ws) {
zWs.setRequestHeaders('ZK-Client-Complete', ids);
}
- 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 60.
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
var indicator = this.$n('hor-indicator'),
wwdh = wrapper.offsetWidth,
iwdh = Math.round(wwdh * wdh / swdh),
iwdh = iwdh > 15 ? iwdh : 15;
- 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 60.
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 (ids = dt._pfRecvIds) {
if (fetchHeaders) fetchHeaders['ZK-Client-Receive'] = ids;
if (ws) {
zWs.setRequestHeaders('ZK-Client-Receive', ids);
}
- 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 60.
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
var indicator = this.$n('ver-indicator'),
whgh = wrapper.offsetHeight,
ihgh = Math.round(whgh * hgh / shgh),
ihgh = ihgh > 15 ? ihgh : 15;
- 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 60.
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
Method write
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void write(int b) throws IOException {
if (_type != 0) {
if (!"UTF-8".equals(_charset) || (b & 0xc0) == 0x80) {
_bs[_cnt ++] = (byte)b;
if (_cnt == _type) { //complete
Method init
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void init() throws ServletException {
final ServletContext ctx = getServletContext();
final ServletConfig config = getServletConfig();
String param = config.getInitParameter("compress");
if (param != null)
Method setValue
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void setValue(ELContext context, Object base, Object property,
Object value) {
if (context == null) {
throw new NullPointerException();
Method getType
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Class<?> getType(ELContext context, Object base, Object property) {
if (context == null) {
throw new NullPointerException();
}
Method visit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void visit(Node node) throws ELException {
if (node instanceof AstFunction) {
AstFunction funcNode = (AstFunction) node;
Method render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void render(Listitem item, Object obj, int index)
throws Exception {
if (item instanceof Listgroup) {
FoodGroupInfo groupInfo = (FoodGroupInfo) obj;
Food food = groupInfo.getFirstChild();
Method filterOutShadows
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static final Component[] filterOutShadows(Component[] shadows) {
if (shadows == null || shadows.length == 0)
return shadows;
int length = shadows.length;
Method outZkTags
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static String outZkTags(Execution exec, WebApp wapp, String deviceType) {
if (exec.getAttribute(ATTR_ZK_TAGS_GENERATED) != null)
return null;
exec.setAttribute(ATTR_ZK_TAGS_GENERATED, Boolean.TRUE);
Method remove0
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private boolean remove0(String name, Scope ctxscope) {
Map<String, EventQueue> eqs;
Object ctxLock = Scopes.getLockForScopeIfAny(ctxscope);
synchronized (ctxLock) {
Method handleError
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void handleError(Session sess, RenderRequest request, RenderResponse response, String path, Throwable err,
String msg) throws PortletException, IOException {
// ZK-3679
Throwable cause;
if (err instanceof OperationException && (cause = err.getCause()) instanceof Expectable)
Method recycleDesktop
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void recycleDesktop(Execution exec, Page page, Writer out) throws IOException {
PerformanceMeter pfmeter = page.getDesktop().getWebApp().getConfiguration().getPerformanceMeter();
final long startTime = pfmeter != null ? System.currentTimeMillis() : 0;
final String pfReqId = pfmeter != null ? meterLoadStart(pfmeter, exec, startTime) : null;
Method getVariableImpl
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected Variable getVariableImpl(String name, boolean recurse) throws UtilEvalError {
//Note: getVariableImpl returns null if not defined,
//while getVariable return Primitive.VOID if not defined
//Tom M Yeh: 20060606:
Method coerceToUi
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Object coerceToUi(Object val, Component comp, BindContext ctx) {
Tree tree = (Tree) comp;
final TreeModel<Object> model = tree.getModel();
if (model != null && !(model instanceof TreeSelectableModel)) {
Method load
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void load(BindContext ctx) {
final Component comp = getComponent(); //ctx.getComponent();
final BindEvaluatorX eval = getBinder().getEvaluatorX();
final BindingExecutionInfoCollector collector = ((BinderCtrl) getBinder()).getBindingExecutionInfoCollector();