public void visit(JavaClass obj)     { implementsCloneableDirectly = false; isCloneable = false; check = false; if (obj.isInterface()) return; if (obj.isAbstract()) return;  String [] interface_names = obj.getInterfaceNames(); for(int i=0; i < interface_names.length; i++) { if (interface_names[i].equals("java.lang.Cloneable")) { implementsCloneableDirectly = true; isCloneable = true; break; } }  try { isCloneable = Repository.implementationOf(obj, "java.lang.Cloneable"); JavaClass superClass = obj.getSuperClass(); if (superClass != null && Repository.implementationOf(superClass, "java.lang.Cloneable")) implementsCloneableDirectly = false; } catch (ClassNotFoundException e) {  } hasCloneMethod = false; referencesCloneMethod = false; check = true; super.visit(obj);
public void visit(Code obj)  { if (methodName.equals("clone") && methodSig.startsWith("()")) super.visit(obj);
  public void visit(JavaClass obj)     {	implementsCloneableDirectly = false;	isCloneable = false;	check = false;	if (obj.isInterface()) return;	if (obj.isAbstract()) return;        // Does this class directly implement Cloneable?        String [] interface_names = obj.getInterfaceNames();        for(int i=0; i < interface_names.length; i++) {            if (interface_names[i].equals("java.lang.Cloneable")) {                implementsCloneableDirectly = true;                isCloneable = true;                break;                }            }	try {	isCloneable = Repository.implementationOf(obj, "java.lang.Cloneable");	JavaClass superClass = obj.getSuperClass();	if (superClass != null && Repository.implementationOf(superClass, "java.lang.Cloneable"))		implementsCloneableDirectly = false;	} catch (ClassNotFoundException e) {		// ignore		}	hasCloneMethod = false;	referencesCloneMethod = false;	check = true;	super.visit(obj);	}