| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 14 | 2 | 1 | 0.985 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 14 | 95 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaElementPropertyTester.java |
| 2 | 14 | 152 | plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaLaunchableTester.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;
}
|
| ||||
/**
* 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;
}
|
| |||
/**
* 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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#4fe8b820]] | type |
| 1 | 2 | [[#4fe8b820]] | mainType |