CloneSet495


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
13230.956method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1131144
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/axis/PeriodAxis.java
21383
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/time/RegularTimePeriod.java
Next
Last
Clone Instance
1
Line Count
13
Source Line
1144
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/axis/PeriodAxis.java

/**
 * A utility method used to create a particular subclass of the 
 * {@link RegularTimePeriod} class that includes the specified millisecond, 
 * assuming the specified time zone.
 * 
 * @param periodClass  the class.
 * @param millisecond  the time.
 * @param zone  the time zone.
 * 
 * @return The time period.
 */
private RegularTimePeriod createInstance(Class periodClass, Date millisecond, TimeZone zone) {
  RegularTimePeriod result = null;
  try {
    Constructor c = periodClass.getDeclaredConstructor(new Class[] {
                                                                     Date.class ,
                                                                     TimeZone.class
                                                                   } );
    result = (RegularTimePeriod) c.newInstance(new Object[] {
                                                              millisecond,
                                                              zone
                                                            } );
  }
  catch (Exception
         e) {
  // do nothing            
  }
  return result;
}


First
Previous
Clone Instance
2
Line Count
13
Source Line
83
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/time/RegularTimePeriod.java

/**
 * Creates a time period that includes the specified millisecond, assuming 
 * the given time zone.
 * 
 * @param c  the time period class.
 * @param millisecond  the time.
 * @param zone  the time zone.
 * 
 * @return The time period.
 */
public static RegularTimePeriod createInstance(Class c, Date millisecond, TimeZone zone) {
  RegularTimePeriod result = null;
  try {
    Constructor constructor = c.getDeclaredConstructor(new Class[] {
                                                                     Date.class ,
                                                                     TimeZone.class
                                                                   } );
    result = (RegularTimePeriod) constructor.newInstance(new Object[] {
                                                                        millisecond,
                                                                        zone
                                                                      } );
  }
  catch (Exception
         e) {
  // do nothing, so null is returned            
  }
  return result;
}


Clone AbstractionParameter Count: 3Parameter Bindings

 [[#variable1a9f5d40]]RegularTimePeriod createInstance(Class  [[#variable1a9f5ce0]], Date millisecond, TimeZone zone) {
  RegularTimePeriod result = null;
  try {
    Constructor  [[#variable1a9f5cc0]]= [[#variable1a9f5ce0]].getDeclaredConstructor(new Class[] {
                                                                                                   Date.class ,
                                                                                                   TimeZone.class
                                                                                                 } );
    result = (RegularTimePeriod)  [[#variable1a9f5cc0]].newInstance(new Object[] {
                                                                                   millisecond,
                                                                                   zone
                                                                                 } );
  }
  catch (Exception
         e) {
  // do nothing, so null is returned            
  // do nothing            
  }
  return result;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1a9f5d40]]
/**
 * A utility method used to create a particular subclass of the 
 * {@link RegularTimePeriod} class that includes the specified millisecond, 
 * assuming the specified time zone.
 * 
 * @param periodClass  the class.
 * @param millisecond  the time.
 * @param zone  the time zone.
 * 
 * @return The time period.
 */
private 
12[[#1a9f5d40]]
/**
 * Creates a time period that includes the specified millisecond, assuming 
 * the given time zone.
 * 
 * @param c  the time period class.
 * @param millisecond  the time.
 * @param zone  the time zone.
 * 
 * @return The time period.
 */
public static 
21[[#1a9f5ce0]]
periodClass 
22[[#1a9f5ce0]]
c 
31[[#1a9f5cc0]]
c 
32[[#1a9f5cc0]]
constructor