CloneSet2132


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
14210.985class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11495
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaElementPropertyTester.java
214152
plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaLaunchableTester.java
Clone Instance
1
Line Count
14
Source Line
95
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaElementPropertyTester.java

        /**
         * Look for a Java main() method in the specified resource.
         * @return true if the target resource has a <code>main</code> method,
         * <code>false</code> otherwise.
         */
        private boolean hasMain(IJavaElement element) {
                try {
            IType mainType = getType(element);
                        if (mainType != null && mainType.exists()) {
                                IMethod[] methods = mainType.getMethods();
                                for (int i = 0; i < methods.length; i++) {
                                        if (methods[i].isMainMethod()) {
                                                return true;
                                        } //end if
                                } //end for
                        } //end if
                } //end try 
                catch (JavaModelException e) {
                }
                return false;
        }


Clone Instance
2
Line Count
14
Source Line
152
Source File
plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaLaunchableTester.java

        /**
         * Determines is the java element contains a main method.
         * 
         * @param element the element to check for the method 
         * @return true if the method is found in the element, false otherwise
         */
        private boolean hasMain(IJavaElement element) {
                try {
            IType type = getType(element);
                        if (type != null && type.exists()) {
                                IMethod[] methods = type.getMethods();
                                for (int i = 0; i < methods.length; i++) {
                                        if (methods[i].isMainMethod()) {
                                                        return true;
                                        }
                                }
                        }
                }
                catch (JavaModelException e) {
                }
                return false;
        }


Clone AbstractionParameter Count: 1Parameter Bindings

/**
         * Determines is the java element contains a main method.
         * 
         * @param element the element to check for the method 
         * @return true if the method is found in the element, false otherwise
         */
/**
         * Look for a Java main() method in the specified resource.
         * @return true if the target resource has a <code>main</code> method,
         * <code>false</code> otherwise.
         */
private boolean hasMain(IJavaElement element) {
  try {
    IType  [[#variable4fe8b820]]= getType(element);
    if ( [[#variable4fe8b820]]!= null && [[#variable4fe8b820]].exists()) {
      IMethod[] methods = [[#variable4fe8b820]].getMethods();
      for (int i = 0; i < methods.length; i++) {
        if (methods[i].isMainMethod()) {
          return true;
        } //end if
      } //end for
    } //end if
  } //end try 
  catch (JavaModelException e) {
  }
  return false;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4fe8b820]]
type 
12[[#4fe8b820]]
mainType