Source files: 3

Click here to show/hide file names

Clones detected: 5

54 of 345 lines are duplicates (15.65%)

Parameters
clustering_threshold = 10
distance_threshold = 5
size_threshold = 5
hashing_depth = 1
clusterize_using_hash = False
clusterize_using_dcup = False

Time elapsed
Construction of AST : 0.06 seconds
Building statement hash : 0.00 seconds
Building patterns : 0.10 seconds
Marking similar statements : 0.09 seconds
Finding similar sequences of statements : 0.02 seconds
Refining candidates : 0.03 seconds
Total time: 0.29
Started at: Mon Aug 1 06:55:47 2016
Finished at: Mon Aug 1 06:55:47 2016

Clone # 1
Distance between two fragments = 4
Clone size = 10
Source file "drivers/bootstrap.py"
The first line is 399
Source file "drivers/bootstrap.py"
The first line is 393
def gateset_decomp_decay_diag(gs):
    output = _np.zeros(3, dtype=float)
    for i, gate in enumerate(gs.gates.keys()):
        output[i] = _tools.decompose_gate_matrix(gs.gates[gate]).get('decay of diagonal rotation terms', 0)
    return output
def gateset_decomp_angle(gs):
    output = _np.zeros(3, dtype=float)
    for i, gate in enumerate(gs.gates.keys()):
        output[i] = _tools.decompose_gate_matrix(gs.gates[gate]).get('pi rotations', 0)
    return output
def gateset_decomp_decay_offdiag(gs):
    output = _np.zeros(3, dtype=float)
    for i, gate in enumerate(gs.gates.keys()):
        output[i] = _tools.decompose_gate_matrix(gs.gates[gate]).get('decay of off diagonal rotation terms', 0)
    return output
def gateset_decomp_decay_diag(gs):
    output = _np.zeros(3, dtype=float)
    for i, gate in enumerate(gs.gates.keys()):
        output[i] = _tools.decompose_gate_matrix(gs.gates[gate]).get('decay of diagonal rotation terms', 0)
    return output



Clone # 2
Distance between two fragments = 4
Clone size = 10
Source file "drivers/bootstrap.py"
The first line is 315
Source file "drivers/bootstrap.py"
The first line is 266
print(('Best SPAM weight is %s') % (bestSPAMWeight)) print(('Spam weight %s') % (spWind))
listOfBootStrapEstsG0toTargetSmallSpam = [] listOfBootStrapEstsNoOptG0toTargetVarSpam = []
for gs in listOfBootStrapEstsNoOpt:
    listOfBootStrapEstsG0toTargetSmallSpam.append(_alg.optimize_gauge(gs, 'target', targetGateset=targetGateset, spamWeight=bestSPAMWeight, constrainToTP=constrainToTP, targetGatesMetric=gateMetric, targetSpamMetric=spamMetric))
for gs in listOfBootStrapEstsNoOpt:
    listOfBootStrapEstsNoOptG0toTargetVarSpam.append(_alg.optimize_gauge(gs, 'target', targetGateset=targetGateset, spamWeight=spW, constrainToTP=constrainToTP, targetGatesMetric=gateMetric, targetSpamMetric=spamMetric))



Clone # 3
Distance between two fragments = 2
Clone size = 5
Source file "drivers/bootstrap.py"
The first line is 380
Source file "drivers/bootstrap.py"
The first line is 417
def gateset_jtracedist(gs, gs_target, mxBasis='gm'):
    output = _np.zeros(3, dtype=float)
    for i, gate in enumerate(gs_target.gates.keys()):
        output[i] = _tools.jtracedist(gs.gates[gate], gs_target.gates[gate], mxBasis=mxBasis)
    return output
def gateset_diamonddist(gs, gs_target, mxBasis='gm'):
    output = _np.zeros(3, dtype=float)
    for i, gate in enumerate(gs_target.gates.keys()):
        output[i] = _tools.diamonddist(gs.gates[gate], gs_target.gates[gate], mxBasis=mxBasis)
    return output



Clone # 4
Distance between two fragments = 0
Clone size = 5
Source file "drivers/bootstrap.py"
The first line is 363
Source file "drivers/bootstrap.py"
The first line is 354
numResamples = len(gsList) numResamples = len(gsList)
gsVecArray = _np.zeros([numResamples], dtype='object') gsVecArray = _np.zeros([numResamples], dtype='object')
for i in range(numResamples):
    gsVecArray[i] = gsList[i].to_vector()
for i in range(numResamples):
    gsVecArray[i] = gsList[i].to_vector()
output_gs = target_gs.copy() output_gs = target_gs.copy()



Clone # 5
Distance between two fragments = 2
Clone size = 5
Source file "drivers/bootstrap.py"
The first line is 405
Source file "drivers/bootstrap.py"
The first line is 393
def gateset_decomp_decay_offdiag(gs):
    output = _np.zeros(3, dtype=float)
    for i, gate in enumerate(gs.gates.keys()):
        output[i] = _tools.decompose_gate_matrix(gs.gates[gate]).get('decay of off diagonal rotation terms', 0)
    return output
def gateset_decomp_angle(gs):
    output = _np.zeros(3, dtype=float)
    for i, gate in enumerate(gs.gates.keys()):
        output[i] = _tools.decompose_gate_matrix(gs.gates[gate]).get('pi rotations', 0)
    return output



Clone Digger is aimed to find software clones in Python and Java programs. It is provided under the GPL license and can be downloaded from the site http://clonedigger.sourceforge.net