===================================================================== Found a 69 line (853 tokens) duplication in the following files: Starting at line 134 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/Reference/x86/x86ReferenceCompiler.java Starting at line 194 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/Quad/x86/SimpleCompiler.java HeapAddress addr = HeapAddress.addressOf(o); asm.emit1_Imm32(x86.PUSH_i32, addr.to32BitValue()); Code2HeapReference r = new Code2HeapReference((CodeAddress) asm.getCurrentAddress().offset(-4), addr); data_relocs.add(r); if (ALWAYS_TRACE) System.out.println("Code2Heap reference: "+r); } else { asm.emit1_Imm8(x86.PUSH_i8, (byte)0); } } public final void emitPushMemory(jq_StaticField f) { emitPushMemory(f, asm, data_relocs); } public static final void emitPushMemory(jq_StaticField f, x86Assembler asm, List data_relocs) { HeapAddress addr = f.getAddress(); asm.emit2_Mem(x86.PUSH_m, addr.to32BitValue()); Code2HeapReference r = new Code2HeapReference((CodeAddress) asm.getCurrentAddress().offset(-4), addr); data_relocs.add(r); if (ALWAYS_TRACE) System.out.println("Code2Heap reference: "+r); } public final void emitPushMemory8(jq_StaticField f) { emitPushMemory8(f, asm, data_relocs); } public static final void emitPushMemory8(jq_StaticField f, x86Assembler asm, List data_relocs) { HeapAddress addr = f.getAddress(); asm.emit2_Mem(x86.PUSH_m, addr.offset(4).to32BitValue()); // hi Code2HeapReference r = new Code2HeapReference((CodeAddress) asm.getCurrentAddress().offset(-4), (HeapAddress) addr.offset(4)); data_relocs.add(r); asm.emit2_Mem(x86.PUSH_m, addr.to32BitValue()); // lo r = new Code2HeapReference((CodeAddress) asm.getCurrentAddress().offset(-4), addr); data_relocs.add(r); if (ALWAYS_TRACE) System.out.println("Code2Heap reference: "+r); } public final void emitPopMemory(jq_StaticField f) { emitPopMemory(f, asm, data_relocs); } public static final void emitPopMemory(jq_StaticField f, x86Assembler asm, List data_relocs) { HeapAddress addr = f.getAddress(); asm.emit2_Mem(x86.POP_m, addr.to32BitValue()); Code2HeapReference r = new Code2HeapReference((CodeAddress) asm.getCurrentAddress().offset(-4), addr); data_relocs.add(r); if (ALWAYS_TRACE) System.out.println("Code2Heap reference: "+r); } public final void emitPopMemory8(jq_StaticField f) { emitPopMemory8(f, asm, data_relocs); } public static final void emitPopMemory8(jq_StaticField f, x86Assembler asm, List data_relocs) { HeapAddress addr = f.getAddress(); asm.emit2_Mem(x86.POP_m, addr.to32BitValue()); // lo Code2HeapReference r = new Code2HeapReference((CodeAddress) asm.getCurrentAddress().offset(-4), addr); data_relocs.add(r); if (ALWAYS_TRACE) System.out.println("Code2Heap reference: "+r); asm.emit2_Mem(x86.POP_m, addr.offset(4).to32BitValue()); // hi r = new Code2HeapReference((CodeAddress) asm.getCurrentAddress().offset(-4), (HeapAddress) addr.offset(4)); data_relocs.add(r); if (ALWAYS_TRACE) System.out.println("Code2Heap reference: "+r); } public final void emitCallMemory(jq_StaticField f) { emitCallMemory(f, asm, data_relocs); } public static final void emitCallMemory(jq_StaticField f, x86Assembler asm, List data_relocs) { HeapAddress addr = f.getAddress(); asm.emit2_Mem(x86.CALL_m, addr.to32BitValue()); Code2HeapReference r = new Code2HeapReference((CodeAddress) asm.getCurrentAddress().offset(-4), addr); data_relocs.add(r); if (ALWAYS_TRACE) System.out.println("Code2Heap reference: "+r); } public final void emitFLD64(jq_StaticField f) { emitFLD64(f, asm, data_relocs); } public static final void emitFLD64(jq_StaticField f, x86Assembler asm, List data_relocs) { HeapAddress addr = f.getAddress(); asm.emit2_Mem(x86.FLD_m64, addr.to32BitValue()); Code2HeapReference r = new Code2HeapReference((CodeAddress) asm.getCurrentAddress().offset(-4), addr); data_relocs.add(r); if (ALWAYS_TRACE) System.out.println("Code2Heap reference: "+r); } public final List getCodeRelocs() { return code_relocs; } public final List getDataRelocs() { return data_relocs; } public static final jq_CompiledCode generate_compile_stub(jq_Method method) { ===================================================================== Found a 56 line (593 tokens) duplication in the following files: Starting at line 233 of /home/tom/data/pmd/pmd-web/src/joeq/Main/TraceFlags.java Starting at line 494 of /home/tom/data/pmd/pmd-web/src/joeq/Main/Driver.java Assert.UNREACHABLE("array parameter doesn't start with {"); int count = 0; while (!s_args[++j].equals("}")) ++count; jq_Type elementType = ((jq_Array) type).getElementType(); if (elementType == PrimordialClassLoader.getJavaLangString()) { String[] array = new String[count]; for (int k = 0; k < count; ++k) array[k] = s_args[j - count + k]; args[m] = array; } else if (elementType == jq_Primitive.BOOLEAN) { boolean[] array = new boolean[count]; for (int k = 0; k < count; ++k) array[k] = Boolean.valueOf(s_args[j - count + k]).booleanValue(); args[m] = array; } else if (elementType == jq_Primitive.BYTE) { byte[] array = new byte[count]; for (int k = 0; k < count; ++k) array[k] = Byte.parseByte(s_args[j - count + k]); args[m] = array; } else if (elementType == jq_Primitive.SHORT) { short[] array = new short[count]; for (int k = 0; k < count; ++k) array[k] = Short.parseShort(s_args[j - count + k]); args[m] = array; } else if (elementType == jq_Primitive.CHAR) { char[] array = new char[count]; for (int k = 0; k < count; ++k) array[k] = s_args[j - count + k].charAt(0); args[m] = array; } else if (elementType == jq_Primitive.INT) { int[] array = new int[count]; for (int k = 0; k < count; ++k) array[k] = Integer.parseInt(s_args[j - count + k]); args[m] = array; } else if (elementType == jq_Primitive.LONG) { long[] array = new long[count]; for (int k = 0; k < count; ++k) array[k] = Long.parseLong(s_args[j - count + k]); args[m] = array; } else if (elementType == jq_Primitive.FLOAT) { float[] array = new float[count]; for (int k = 0; k < count; ++k) array[k] = Float.parseFloat(s_args[j - count + k]); args[m] = array; } else if (elementType == jq_Primitive.DOUBLE) { double[] array = new double[count]; for (int k = 0; k < count; ++k) array[k] = Double.parseDouble(s_args[j - count + k]); args[m] = array; } else Assert.UNREACHABLE("Parsing of type " + type + " is not implemented"); } else Assert.UNREACHABLE("Parsing of type " + type + " is not implemented"); return j; } ===================================================================== Found a 36 line (371 tokens) duplication in the following files: Starting at line 570 of /home/tom/data/pmd/pmd-web/src/joeq/Run_Time/ReflectionImpl.java Starting at line 509 of /home/tom/data/pmd/pmd-web/src/joeq/Run_Time/ReflectionImpl.java throw new IllegalArgumentException(args[i].getClass()+" is not assignable to "+c); Unsafe.pushArgA(HeapAddress.addressOf(args[i])); } else { if (c == jq_Primitive.BYTE) { int v = (int)Reflection.unwrapToByte(args[i]); Unsafe.pushArg(v); } else if (c == jq_Primitive.CHAR) { int v = (int)Reflection.unwrapToChar(args[i]); Unsafe.pushArg(v); } else if (c == jq_Primitive.DOUBLE) { long v = Double.doubleToRawLongBits(Reflection.unwrapToDouble(args[i])); Unsafe.pushArg((int)(v >> 32)); // hi Unsafe.pushArg((int)v); // lo } else if (c == jq_Primitive.FLOAT) { int v = Float.floatToRawIntBits(Reflection.unwrapToFloat(args[i])); Unsafe.pushArg(v); } else if (c == jq_Primitive.INT) { int v = Reflection.unwrapToInt(args[i]); Unsafe.pushArg(v); } else if (c == jq_Primitive.LONG) { long v = Reflection.unwrapToLong(args[i]); Unsafe.pushArg((int)(v >> 32)); // hi Unsafe.pushArg((int)v); // lo } else if (c == jq_Primitive.SHORT) { int v = (int)Reflection.unwrapToShort(args[i]); Unsafe.pushArg(v); } else if (c == jq_Primitive.BOOLEAN) { int v = Reflection.unwrapToBoolean(args[i])?1:0; Unsafe.pushArg(v); } else Assert.UNREACHABLE(c.toString()); } } } else { Assert._assert(params.length == offset); } try { ===================================================================== Found a 31 line (198 tokens) duplication in the following files: Starting at line 21 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/sun14_win32/java/lang/Class.java Starting at line 23 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/sun14_linux/java/lang/Class.java ++count; } java.lang.reflect.Field[] f2 = new java.lang.reflect.Field[count]; --count; for (int i=0, j=-1; j>8); bc[++k] = (byte)method_idx; jq_Type t = m.getReturnType(); if (t.isReferenceType()) { bc[++k] = (byte)0xb0; // areturn } else if (t == jq_Primitive.LONG) { bc[++k] = (byte)0xad; // lreturn } else if (t == jq_Primitive.FLOAT) { bc[++k] = (byte)0xae; // freturn } else if (t == jq_Primitive.DOUBLE) { bc[++k] = (byte)0xaf; // dreturn } else if (t == jq_Primitive.VOID) { bc[++k] = (byte)0xb1; // return } else { bc[++k] = (byte)0xac; // ireturn } jq_Method stubm = (jq_Method)getDeclaredMember(nd); ===================================================================== Found a 23 line (188 tokens) duplication in the following files: Starting at line 33 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/Common/java/io/RandomAccessFile.java Starting at line 29 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/Common/java/io/FileInputStream.java return b[0]&0xFF; } private int readBytes(byte b[], int off, int len) throws java.io.IOException { return readBytes(b, off, len, this.fd); } // IBM JDK has this extra fd argument here. private int readBytes(byte b[], int off, int len, FileDescriptor fd) throws java.io.IOException { int fdnum = fd.fd; // check for index out of bounds/null pointer if (len < 0) throw new IndexOutOfBoundsException(); // do bounds check byte b2 = b[off+len-1]; // BUG in Sun's implementation, which we mimic here. off=b.length and len=0 doesn't throw an error (?) if (off < 0) throw new IndexOutOfBoundsException(); if (len == 0) return 0; HeapAddress start = (HeapAddress) HeapAddress.addressOf(b).offset(off); int result = SystemInterface.file_readbytes(fdnum, start, len); if (result == 0) return -1; // EOF if (result == -1) throw new java.io.IOException(); return result; } ===================================================================== Found a 24 line (175 tokens) duplication in the following files: Starting at line 2855 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/Analysis/IPA/CSPAResults.java Starting at line 2897 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/Analysis/IPA/CSPAResults.java System.out.println(vPrelation.toStringWithDomains(ts)); visited.orWith(vPrelation.id()); // A: v2=v1; BDD b = A.relprod(vPrelation, V1set); System.out.println("Arguments/Return Values = "+b.satCount(V2set)); // L: v2=v1.f; vPrelation.replaceWith(V1toV2); BDD c = L.relprod(vPrelation, V2set); // V1xF vPrelation.free(); BDD d = vP.relprod(c, V1set); // H1xF c.free(); BDD e = hP.relprod(d, H1Fset); // H2 d.free(); e.replaceWith(H2toH1); BDD f = vP.relprod(e, H1set); // V1 System.out.println("Loads/Stores = "+f.satCount(V1set)); e.free(); vPrelation = b; vPrelation.replaceWith(V2toV1); vPrelation.orWith(f); vPrelation.applyWith(visited.id(), BDDFactory.diff); } } ===================================================================== Found a 19 line (171 tokens) duplication in the following files: Starting at line 55 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/Common/java/io/UnixFileSystem.java Starting at line 100 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/Common/java/io/Win32FileSystem.java if (i == s.length) { String[] s2 = new String[s.length<<1]; System.arraycopy(s, 0, s2, 0, s.length); s = s2; } s[i] = SystemInterface.fromCString(ptr.offset(SystemInterface.readdir_name_offset)); if (s[i].equals(".") || s[i].equals("..")) --i; } SystemInterface.fs_closedir(dir); String[] ret = new String[i]; System.arraycopy(s, 0, ret, 0, i); return ret; } public boolean createDirectory(java.io.File file) { int res = SystemInterface.fs_mkdir(file.getPath()); return res == 0; } ===================================================================== Found a 22 line (164 tokens) duplication in the following files: Starting at line 65 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/ibm13_linux/Interface.java Starting at line 65 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/ibm13_win32/Interface.java Object[] args = { } ; Clazz.jq_Method init_inflaters = k.getOrCreateStaticMethod("init_inflaters", "()V"); Bootstrap.MethodInvocation mi = new Bootstrap.MethodInvocation(init_inflaters, args); jq.on_vm_startup.add(mi); System.out.println("Added call to reinitialize java.util.zip.ZipFile.inflaters field on joeq startup: "+mi); } } public java.lang.Object mapInstanceField(java.lang.Object o, Clazz.jq_InstanceField f) { if (IGNORE_THREAD_LOCALS) { jq_Class c = f.getDeclaringClass(); if (c == PrimordialClassLoader.getJavaLangThread()) { String fieldName = f.getName().toString(); if (fieldName.equals("threadLocals")) return java.util.Collections.EMPTY_MAP; if (fieldName.equals("inheritableThreadLocals")) return java.util.Collections.EMPTY_MAP; } } return super.mapInstanceField(o, f); } } ===================================================================== Found a 17 line (158 tokens) duplication in the following files: Starting at line 133 of /home/tom/data/pmd/pmd-web/src/joeq/Run_Time/ExceptionDeliverer.java Starting at line 158 of /home/tom/data/pmd/pmd-web/src/joeq/Run_Time/ExceptionDeliverer.java CodeAddress ip = sf.ip; jq_CompiledCode cc = CodeAllocator.getCodeContaining(ip); String s; if (cc != null) { jq_Method m = cc.getMethod(); int code_offset = ip.difference(cc.getStart()); if (m != null) { Utf8 sourcefile = m.getDeclaringClass().getSourceFile(); int bc_index = cc.getBytecodeIndex(ip); int line_num = m.getLineNumber(bc_index); s = "\tat "+m+" ("+sourcefile+":"+line_num+" bc:"+bc_index+" off:"+Strings.hex(code_offset)+")"; } else { s = "\tat (start:"+cc.getStart().stringRep()+" off:"+Strings.hex(code_offset)+")"; } } else { s = "\tat (ip:"+ip.stringRep()+")"; } ===================================================================== Found a 19 line (157 tokens) duplication in the following files: Starting at line 408 of /home/tom/data/pmd/pmd-web/src/joeq/Linker/ELF/Section.java Starting at line 348 of /home/tom/data/pmd/pmd-web/src/joeq/Linker/ELF/Section.java StrTabSection ss = file.getSectionHeaderStringTable(); if (ss == null) throw new IOException(); this.name = ss.getString(s.sectionNameIndex); } this.stringTable = (StrTabSection)file.getSection(s.link); file.set_position(s.offset); int n = s.size / this.getEntSize(); if (s.size % this.getEntSize() != 0) throw new IOException(); this.localSymbols = new LinkedList(); // size is s.info this.globalSymbols = new LinkedList(); // size is n - s.info while (--n >= 0) { SymbolTableEntry e = SymbolTableEntry.read(file, this.stringTable); this.addSymbol(e); } if (this.getInfo() != s.info) throw new IOException(); } } ===================================================================== Found a 18 line (156 tokens) duplication in the following files: Starting at line 631 of /home/tom/data/pmd/pmd-web/src/joeq/Bootstrap/BootImage.java Starting at line 670 of /home/tom/data/pmd/pmd-web/src/joeq/Bootstrap/BootImage.java type = DT_ARY; } else if (t.isReferenceType()) { type = DT_PTR; } if (t.isPrimitiveType()) { if (t == jq_Primitive.INT) type |= T_LONG; else if (t == jq_Primitive.LONG) type |= T_LNGDBL; else if (t == jq_Primitive.FLOAT) type |= T_FLOAT; else if (t == jq_Primitive.DOUBLE) type |= T_DOUBLE; else if (t == jq_Primitive.BYTE) type |= T_CHAR; else if (t == jq_Primitive.BOOLEAN) type |= T_UCHAR; else if (t == jq_Primitive.SHORT) type |= T_SHORT; else if (t == jq_Primitive.CHAR) type |= T_USHORT; else Assert.UNREACHABLE(); } else { type |= T_STRUCT; } out.writeUShort(type); // e_type ===================================================================== Found a 28 line (149 tokens) duplication in the following files: Starting at line 31 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/ibm13_win32/java/lang/System.java Starting at line 32 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/sun13_win32/java/lang/System.java props.setProperty("java.vm.vendor", "joeq"); props.setProperty("java.vm.version", "1.3.0"); props.setProperty("os.arch", "x86"); props.setProperty("os.name", "Windows 2000"); props.setProperty("os.version", "5.0"); props.setProperty("file.encoding", "Cp1252"); props.setProperty("file.encoding.pkg", "sun.io"); props.setProperty("file.separator", "\\"); props.setProperty("line.separator", "\r\n"); props.setProperty("path.separator", ";"); props.setProperty("user.dir", "C:\\joeq"); props.setProperty("user.home", "C:\\Documents and Settings\\John Whaley"); props.setProperty("user.language", "en"); props.setProperty("user.name", "jwhaley"); props.setProperty("user.region", "US"); props.setProperty("user.timezone", ""); // must be at end: classpathToString() uses some properties from above. props.setProperty("java.class.path", PrimordialClassLoader.loader.classpathToString()); return props; } ===================================================================== Found a 18 line (148 tokens) duplication in the following files: Starting at line 4320 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/Analysis/FlowInsensitive/MethodSummary.java Starting at line 157 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/Analysis/IPA/ClassInvariantAnalysis.java FieldNode n2; if (o instanceof FieldNode) { n2 = (FieldNode)o; } else { Set s = (Set)NodeSet.FACTORY.makeSet((Set)o); if (s.size() == 0) { i.remove(); continue; } if (s.size() == 1) { n2 = (FieldNode)s.iterator().next(); e.setValue(n2); continue; } if (TRACE_INTRA) out.println("Node "+n+" has duplicate access path edges on field "+f+": "+s); n2 = FieldNode.unify(f, s); for (Iterator j=s.iterator(); j.hasNext(); ) { FieldNode n3 = (FieldNode)j.next(); ===================================================================== Found a 18 line (147 tokens) duplication in the following files: Starting at line 199 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/Quad/MethodInline.java Starting at line 310 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/Quad/MethodInline.java if (TRACE) out.println("Code to inline:"); if (TRACE) out.println(callee.fullDump()); if (TRACE) out.println(callee.getRegisterFactory().fullDump()); // copy the callee's control flow graph, renumbering the basic blocks, // registers and quads, and add the exception handlers. callee = caller.merge(callee); if (TRACE) out.println("After renumbering:"); if (TRACE) out.println(callee.fullDump()); if (TRACE) out.println(callee.getRegisterFactory().fullDump()); callee.appendExceptionHandlers(bb.getExceptionHandlers()); if (TRACE) out.println("Original basic block containing invoke:"); if (TRACE) out.println(bb.fullDump()); // split the basic block containing the invoke, and start splicing // in the callee's control flow graph. ===================================================================== Found a 20 line (147 tokens) duplication in the following files: Starting at line 77 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/Analysis/IPSSA/Apps/FindOwnership.java Starting at line 279 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/Analysis/IPSSA/Apps/FindCollectionImplementations.java list.add(s); } i = new AppendIterator(list.iterator(), i); }catch(IOException e) { e.printStackTrace(); System.exit(2); } } else if (args[x].endsWith("*")) { i = new AppendIterator(PrimordialClassLoader.loader.listPackage(args[x].substring(0, args[x].length()-1)), i); } else if(args[x].charAt(0) == '-'){ System.exit(2); }else { String classname = args[x]; i = new AppendIterator(Collections.singleton(classname).iterator(), i); } } ===================================================================== Found a 18 line (147 tokens) duplication in the following files: Starting at line 1024 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/Analysis/IPA/PAResults.java Starting at line 1451 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/Analysis/IPA/PAResults.java // A: v2=v1; BDD b = r.A.relprod(vPrelation, r.V1set); // V2 // L: v2=v1.f; vPrelation.replaceWith(r.V1toV2); // V2 BDD c = r.L.relprod(vPrelation, r.V2set); // V1xF vPrelation.free(); BDD d = r.vP.relprod(c, r.V1set); // H1xF c.free(); BDD e = r.hP.relprod(d, r.H1Fset); // H2 d.free(); e.replaceWith(r.H2toH1); BDD f = r.vP.relprod(e, r.H1set); // V1 e.free(); vPrelation = b; vPrelation.replaceWith(r.V2toV1); vPrelation.orWith(f); vPrelation.applyWith(visited.id(), BDDFactory.diff); } ===================================================================== Found a 14 line (144 tokens) duplication in the following files: Starting at line 377 of /home/tom/data/pmd/pmd-web/src/joeq/Clazz/jq_ClassFileConstants.java Starting at line 377 of /home/tom/data/pmd/pmd-web/src/joeq/Clazz/jq_ClassFileConstants.java 0/*istore_3*/, 0/*lstore_0*/, 0/*lstore_1*/, 0/*lstore_2*/, 0/*lstore_3*/, 0/*fstore_0*/, 0/*fstore_1*/, 0/*fstore_2*/, 0/*fstore_3*/, 0/*dstore_0*/, 0/*dstore_1*/, 0/*dstore_2*/, 0/*dstore_3*/, 0/*astore_0*/, 0/*astore_1*/, 0/*astore_2*/, 0/*astore_3*/, 0/*iastore*/, 0/*lastore*/, 0/*fastore*/, 0/*dastore*/, 0/*aastore*/, 0/*bastore*/, 0/*castore*/, 0/*sastore*/, 0/*pop*/, 0/*pop2*/, 0/*dup*/, 0/*dup_x1*/, 0/*dup_x2*/, 0/*dup2*/, 0/*dup2_x1*/, 0/*dup2_x2*/, 0/*swap*/, 0/*iadd*/, 0/*ladd*/, 0/*fadd*/, 0/*dadd*/, 0/*isub*/, 0/*lsub*/, 0/*fsub*/, 0/*dsub*/, 0/*imul*/, 0/*lmul*/, 0/*fmul*/, 0/*dmul*/, 0/*idiv*/, 0/*ldiv*/, 0/*fdiv*/, 0/*ddiv*/, 0/*irem*/, 0/*lrem*/, 0/*frem*/, 0/*drem*/, 0/*ineg*/, 0/*lneg*/, 0/*fneg*/, 0/*dneg*/, 0/*ishl*/, 0/*lshl*/, 0/*ishr*/, 0/*lshr*/, 0/*iushr*/, 0/*lushr*/, ===================================================================== Found a 17 line (141 tokens) duplication in the following files: Starting at line 499 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/BytecodeAnalysis/LiveRefAnalysis.java Starting at line 822 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/BytecodeAnalysis/LiveRefAnalysis.java if (stackDepth > 0) { sb.append(Strings.lineSep); sb.append("Stack: {"); for (int i=0; i src.length) || (dst_position+length > dst.length)) throw new ArrayIndexOutOfBoundsException(); if ((src == dst) && (src_position < dst_position) && (src_position+length > dst_position)) { // overlapping case for (int i=length-1; i>=0; --i) { dst[dst_position+i] = src[src_position+i]; } return; } for (int i=0; i 0) { sb.append(table[0]); for (int i=1; i= EAX && base <= EDI); Assert._assert(ind >= EAX && ind <= EDI); if (mc != null) { mc.add2(opcode | MOD_EA | RM_SIB); mc.add1((byte)(scale | (ind << 3) | base)); ===================================================================== Found a 16 line (100 tokens) duplication in the following files: Starting at line 96 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/BytecodeAnalysis/CallTargets.java Starting at line 147 of /home/tom/data/pmd/pmd-web/src/joeq/Compil3r/BytecodeAnalysis/CallTargets.java if (mtarget instanceof jq_StaticMethod) break; target = (jq_InstanceMethod)mtarget; if (target != null) { if (VerifyAssertions) Assert._assert(imethod.getNameAndDesc().equals(target.getNameAndDesc()), imethod+" != "+target); if (!target.isAbstract()) c.add(target); break; } rclass = rclass.getSuperclass(); if (rclass == null) { // method doesn't exist in this class or any of its superclasses. break; } } continue; ===================================================================== Found a 15 line (100 tokens) duplication in the following files: Starting at line 12 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/sun14_win32/java/util/zip/ZipFile.java Starting at line 12 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/sun14_linux/java/util/zip/ZipFile.java private String name; private java.util.Vector inflaters; private java.io.RandomAccessFile raf; private java.util.Hashtable entries; public void __init__(String name) throws java.io.IOException { this.name = name; java.io.RandomAccessFile raf = new java.io.RandomAccessFile(name, "r"); this.raf = raf; this.inflaters = new java.util.Vector(); this.readCEN(); } private native void readCEN() throws java.io.IOException; ===================================================================== Found a 15 line (100 tokens) duplication in the following files: Starting at line 12 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/apple13_osx/java/util/zip/ZipFile.java Starting at line 12 of /home/tom/data/pmd/pmd-web/src/joeq/ClassLib/sun13_win32/java/util/zip/ZipFile.java private String name; private java.util.Vector inflaters; private java.io.RandomAccessFile raf; private java.util.Hashtable entries; public void __init__(String name) throws java.io.IOException { this.name = name; java.io.RandomAccessFile raf = new java.io.RandomAccessFile(name, "r"); this.raf = raf; this.inflaters = new java.util.Vector(); this.readCEN(); } private native void readCEN() throws java.io.IOException; That took 17430 milliseconds