CloneSet2964


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
27220.991compilation_unit
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12711
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/AnnotationFilter.java
22711
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/EnumFilter.java
Clone Instance
1
Line Count
27
Source Line
11
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/AnnotationFilter.java

/*******************************************************************************
 * Copyright (c) 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.filters;

import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;

import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;

/**
 * Filters annotations.
 */
public class AnnotationFilter extends ViewerFilter {

        /*
         * @see ViewerFilter
         */
        public boolean select(Viewer viewer, Object parent, Object element) {
                if (element instanceof IType) {
                        try {
                                return !((IType) element).isAnnotation();
                        } catch (JavaModelException ex) {
                                return true;
                          }
                }
                return true;
        }
}




Clone Instance
2
Line Count
27
Source Line
11
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/EnumFilter.java

/*******************************************************************************
 * Copyright (c) 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.filters;

import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;

import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;

/**
 * Filters enums.
 */
public class EnumFilter extends ViewerFilter {

        /*
         * @see ViewerFilter
         */
        public boolean select(Viewer viewer, Object parent, Object element) {
                if (element instanceof IType) {
                        try {
                                return !((IType) element).isEnum();
                        } catch (JavaModelException ex) {
                                return true;
                          }
                }
                return true;
        }
}




Clone AbstractionParameter Count: 2Parameter Bindings

/*******************************************************************************
 * Copyright (c) 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.filters;

import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;

/**
 * Filters annotations.
 */
/**
 * Filters enums.
 */
public class [[#variableb6681120]]extends ViewerFilter {
  /*
           * @see ViewerFilter
           */
  public boolean select(Viewer viewer, Object parent, Object element) {
    if (element instanceof IType) {
      try {
        return !((IType) element). [[#variableb66810c0]]();
      }
      catch (JavaModelException ex) {
        return true;
      }
    }
    return true;
  }
}


 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b6681120]]
AnnotationFilter 
12[[#b6681120]]
EnumFilter 
21[[#b66810c0]]
isAnnotation 
22[[#b66810c0]]
isEnum