Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
14 | 2 | 3 | 0.965 | method_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 14 | 273 | E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/ComparableObjectSeries.java |
2 | 12 | 595 | E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/xy/XYSeries.java |
| |||||
/** * Returns the index of the item with the specified x-value, or a negative * index if the series does not contain an item with that x-value. Be * aware that for an unsorted series, the index is found by iterating * through all items in the series. * * @param x the x-value (<code>null</code> not permitted). * * @return The index. */ public int indexOf(Comparable x) { if (this.autoSort) { return Collections.binarySearch(this.data, new ComparableObjectItem(x, null)); } else { for (int i = 0; i < this.data.size(); i++) { ComparableObjectItem item = (ComparableObjectItem) this.data.get(i); if (item.getComparable().equals(x)) { return i; } } return -1; } } |
| |||||
/** * Returns the index of the item with the specified x-value, or a negative * index if the series does not contain an item with that x-value. Be * aware that for an unsorted series, the index is found by iterating * through all items in the series. * * @param x the x-value (<code>null</code> not permitted). * * @return The index. */ public int indexOf(Number x) { if (this.autoSort) { return Collections.binarySearch(this.data, new XYDataItem(x, null)); } else { for (int i = 0; i < this.data.size(); i++) { XYDataItem item = (XYDataItem) this.data.get(i); if (item.getX().equals(x)) { return i; } } return -1; } } |
| |||
/** * Returns the index of the item with the specified x-value, or a negative * index if the series does not contain an item with that x-value. Be * aware that for an unsorted series, the index is found by iterating * through all items in the series. * * @param x the x-value (<code>null</code> not permitted). * * @return The index. */ /** * Returns the index of the item with the specified x-value, or a negative * index if the series does not contain an item with that x-value. Be * aware that for an unsorted series, the index is found by iterating * through all items in the series. * * @param x the x-value (<code>null</code> not permitted). * * @return The index. */ public int indexOf( [[#variable18c111a0]] x) { if (this.autoSort) { return Collections.binarySearch(this.data, new [[#variable18c11120]](x, null)); } else { for (int i = 0; i < this.data.size(); i++) { [[#variable18c11120]] item = ( [[#variable18c11120]]) this.data.get(i); if (item. [[#variable18c11020]]().equals(x)) { return i; } } return -1; } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#18c111a0]] | Comparable |
1 | 2 | [[#18c111a0]] | Number |
2 | 1 | [[#18c11120]] | ComparableObjectItem |
2 | 2 | [[#18c11120]] | XYDataItem |
3 | 1 | [[#18c11020]] | getComparable |
3 | 2 | [[#18c11020]] | getX |