Program: 27
Project: 27
Buggy source:
/** 
 * Converts this time to milliseconds. Suitable for interacting with the standard java libraries. The time is in UTC milliseconds since the epoch. This does an implicit normalization to compute the milliseconds but does <em>not</em> change any of the fields in this Time object.  If you want to normalize the fields in this Time object and also get the milliseconds then use   {@link #normalize(boolean)}. <p> If "ignoreDst" is false, then this method uses the current setting of the "isDst" field and will adjust the returned time if the "isDst" field is wrong for the given time.  See the sample code below for an example of this. <p> If "ignoreDst" is true, then this method ignores the current setting of the "isDst" field in this Time object and will instead figure out the correct value of "isDst" (as best it can) from the fields in this Time object.  The only case where this method cannot figure out the correct value of the "isDst" field is when the time is inherently ambiguous because it falls in the hour that is repeated when switching from Daylight-Saving Time to Standard Time. <p> Here is an example where <tt>toMillis(true)</tt> adjusts the time, assuming that DST changes at 2am on Sunday, Nov 4, 2007. <pre> Time time = new Time(); time.set(4, 10, 2007);  // set the date to Nov 4, 2007, 12am time.normalize();       // this sets isDst = 1 time.monthDay += 1;     // changes the date to Nov 5, 2007, 12am millis = time.toMillis(false);   // millis is Nov 4, 2007, 11pm millis = time.toMillis(true);    // millis is Nov 5, 2007, 12am </pre> <p> To avoid this problem, use <tt>toMillis(true)</tt> after adding or subtracting days or explicitly setting the "monthDay" field.  On the other hand, if you are adding or subtracting hours or minutes, then you should use <tt>toMillis(false)</tt>. <p> You should also use <tt>toMillis(false)</tt> if you want to read back the same milliseconds that you set with   {@link #set(long)}or   {@link #set(Time)} or after parsing a date string.
 */
native public long toMillis(boolean ignoreDst);

Fixed version (ground truth):
/** 
 * Converts this time to milliseconds. Suitable for interacting with the standard java libraries. The time is in UTC milliseconds since the epoch. This does an implicit normalization to compute the milliseconds but does <em>not</em> change any of the fields in this Time object.  If you want to normalize the fields in this Time object and also get the milliseconds then use   {@link #normalize(boolean)}. <p> If "ignoreDst" is false, then this method uses the current setting of the "isDst" field and will adjust the returned time if the "isDst" field is wrong for the given time.  See the sample code below for an example of this. <p> If "ignoreDst" is true, then this method ignores the current setting of the "isDst" field in this Time object and will instead figure out the correct value of "isDst" (as best it can) from the fields in this Time object.  The only case where this method cannot figure out the correct value of the "isDst" field is when the time is inherently ambiguous because it falls in the hour that is repeated when switching from Daylight-Saving Time to Standard Time. <p> Here is an example where <tt>toMillis(true)</tt> adjusts the time, assuming that DST changes at 2am on Sunday, Nov 4, 2007. <pre> Time time = new Time(); time.set(4, 10, 2007);  // set the date to Nov 4, 2007, 12am time.normalize(false);       // this sets isDst = 1 time.monthDay += 1;     // changes the date to Nov 5, 2007, 12am millis = time.toMillis(false);   // millis is Nov 4, 2007, 11pm millis = time.toMillis(true);    // millis is Nov 5, 2007, 12am </pre> <p> To avoid this problem, use <tt>toMillis(true)</tt> after adding or subtracting days or explicitly setting the "monthDay" field.  On the other hand, if you are adding or subtracting hours or minutes, then you should use <tt>toMillis(false)</tt>. <p> You should also use <tt>toMillis(false)</tt> if you want to read back the same milliseconds that you set with   {@link #set(long)}or   {@link #set(Time)} or after parsing a date string.
 */
native public long toMillis(boolean ignoreDst);