CloneSet370


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
34201.000class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
134482
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/time/Month.java
234585
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/time/Week.java
Next
Last
Clone Instance
1
Line Count
34
Source Line
482
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/time/Month.java

/**
 * Finds the first occurrence of ' ', '-', ',' or '.'
 *
 * @param s  the string to parse.
 * 
 * @return <code>-1</code> if none of the characters where found, the
 *      position of the first occurence otherwise.
 */
private static int findSeparator(String s) {
  int result = s.indexOf('-');
  if (result == -1) {
    result = s.indexOf(',');
  }
  if (result == -1) {
    result = s.indexOf(' ');
  }
  if (result == -1) {
    result = s.indexOf('.');
  }
  return result;
}

/**
 * Creates a year from a string, or returns null (format exceptions 
 * suppressed).
 *
 * @param s  the string to parse.
 *
 * @return <code>null</code> if the string is not parseable, the year 
 *         otherwise.
 */
private static Year evaluateAsYear(String s) {
  Year result = null;
  try {
    result = Year.parseYear(s);
  }
  catch (TimePeriodFormatException
         e) {
  // suppress
  }
  return result;
}


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

/**
 * Finds the first occurrence of ' ', '-', ',' or '.'
 *
 * @param s  the string to parse.
 *
 * @return <code>-1</code> if none of the characters was found, the
 *      index of the first occurrence otherwise.
 */
private static int findSeparator(String s) {
  int result = s.indexOf('-');
  if (result == -1) {
    result = s.indexOf(',');
  }
  if (result == -1) {
    result = s.indexOf(' ');
  }
  if (result == -1) {
    result = s.indexOf('.');
  }
  return result;
}

/**
 * Creates a year from a string, or returns null (format exceptions
 * suppressed).
 *
 * @param s  string to parse.
 *
 * @return <code>null</code> if the string is not parseable, the year 
 *         otherwise.
 */
private static Year evaluateAsYear(String s) {
  Year result = null;
  try {
    result = Year.parseYear(s);
  }
  catch (TimePeriodFormatException
         e) {
  // suppress
  }
  return result;
}


Clone AbstractionParameter Count: 0Parameter Bindings

/**
     * Finds the first occurrence of ' ', '-', ',' or '.'
     *
     * @param s  the string to parse.
     *
     * @return <code>-1</code> if none of the characters was found, the
     *      index of the first occurrence otherwise.
     */
/**
     * Finds the first occurrence of ' ', '-', ',' or '.'
     *
     * @param s  the string to parse.
     * 
     * @return <code>-1</code> if none of the characters where found, the
     *      position of the first occurence otherwise.
     */
private static int findSeparator(String s) {
  int result = s.indexOf('-');
  if (result == -1) {
    result = s.indexOf(',');
  }
  if (result == -1) {
    result = s.indexOf(' ');
  }
  if (result == -1) {
    result = s.indexOf('.');
  }
  return result;
}

/**
     * Creates a year from a string, or returns null (format exceptions
     * suppressed).
     *
     * @param s  string to parse.
     *
     * @return <code>null</code> if the string is not parseable, the year 
     *         otherwise.
     */
/**
     * Creates a year from a string, or returns null (format exceptions 
     * suppressed).
     *
     * @param s  the string to parse.
     *
     * @return <code>null</code> if the string is not parseable, the year 
     *         otherwise.
     */
private static Year evaluateAsYear(String s) {
  Year result = null;
  try {
    result = Year.parseYear(s);
  }
  catch (TimePeriodFormatException
         e) {
  // suppress
  }
  return result;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None