Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
8 | 2 | 3 | 0.972 | method_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 8 | 315 | E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/time/Hour.java |
2 | 8 | 335 | E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/time/Hour.java |
| |||||
/** * Returns the first millisecond of the hour. * * @param calendar the calendar/timezone (<code>null</code> not permitted). * * @return The first millisecond. * * @throws NullPointerException if <code>calendar</code> is * <code>null</code>. */ public long getFirstMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int dom = this.day.getDayOfMonth(); calendar.set(year, month, dom, this.hour, 0, 0); calendar.set(Calendar.MILLISECOND, 0); //return calendar.getTimeInMillis(); // this won't work for JDK 1.3 return calendar.getTime().getTime(); } |
| |||||
/** * Returns the last millisecond of the hour. * * @param calendar the calendar/timezone (<code>null</code> not permitted). * * @return The last millisecond. * * @throws NullPointerException if <code>calendar</code> is * <code>null</code>. */ public long getLastMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int dom = this.day.getDayOfMonth(); calendar.set(year, month, dom, this.hour, 59, 59); calendar.set(Calendar.MILLISECOND, 999); //return calendar.getTimeInMillis(); // this won't work for JDK 1.3 return calendar.getTime().getTime(); } |
| |||
/** * Returns the last millisecond of the hour. * * @param calendar the calendar/timezone (<code>null</code> not permitted). * * @return The last millisecond. * * @throws NullPointerException if <code>calendar</code> is * <code>null</code>. */ /** * Returns the first millisecond of the hour. * * @param calendar the calendar/timezone (<code>null</code> not permitted). * * @return The first millisecond. * * @throws NullPointerException if <code>calendar</code> is * <code>null</code>. */ public long [[#variable1a9fb920]](Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int dom = this.day.getDayOfMonth(); calendar.set(year, month, dom, this.hour, [[#variable1a9fb880]], [[#variable1a9fb880]]); calendar.set(Calendar.MILLISECOND, [[#variable1a9fb760]]); //return calendar.getTimeInMillis(); // this won't work for JDK 1.3 return calendar.getTime().getTime(); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#1a9fb920]] | getFirstMillisecond |
1 | 2 | [[#1a9fb920]] | getLastMillisecond |
2 | 1 | [[#1a9fb880]] | 0 |
2 | 2 | [[#1a9fb880]] | 59 |
3 | 1 | [[#1a9fb760]] | 0 |
3 | 2 | [[#1a9fb760]] | 999 |