Program: 35818
Project: 35818
Buggy source:
/** 
 * Returns a   {@code Constructor} object that reflects the specifiedconstructor of the class or interface represented by this {@code Class} object.  The {@code parameterTypes} parameter isan array of  {@code Class} objects that identify the constructor'sformal parameter types, in declared order. If this  {@code Class} object represents an inner classdeclared in a non-static context, the formal parameter types include the explicit enclosing instance as the first parameter.
 * @param parameterTypes the parameter array
 * @return  The {@code Constructor} object for the constructor with thespecified parameter list
 * @throws NoSuchMethodException if a matching method is not found.
 * @throws SecurityException If a security manager, <i>s</i>, is present and any of the following conditions is met: <ul> <li> the caller's class loader is not the same as the class loader of this class and invocation of {@link SecurityManager#checkPermission s.checkPermission} method with{@code RuntimePermission("accessDeclaredMembers")}denies access to the declared constructor <li> the caller's class loader is not the same as or an ancestor of the class loader for the current class and invocation of   {@link SecurityManager#checkPackageAccess s.checkPackageAccess()} denies access to the packageof this class </ul>
 * @since 1.1
 */
@CallerSensitive public Constructor<T> getDeclaredConstructor(Class<?>... parameterTypes) throws NoSuchMethodException, SecurityException {
  checkMemberAccess(Member.DECLARED,Reflection.getCallerClass(),true);
  return getConstructor0(parameterTypes,Member.DECLARED);
}

Fixed version (ground truth):
/** 
 * Returns a   {@code Constructor} object that reflects the specifiedconstructor of the class or interface represented by this {@code Class} object.  The {@code parameterTypes} parameter isan array of  {@code Class} objects that identify the constructor'sformal parameter types, in declared order. If this  {@code Class} object represents an inner classdeclared in a non-static context, the formal parameter types include the explicit enclosing instance as the first parameter.
 * @param parameterTypes the parameter array
 * @return  The {@code Constructor} object for the constructor with thespecified parameter list
 * @throws NoSuchMethodException if a matching method is not found.
 * @throws SecurityException If a security manager, <i>s</i>, is present and any of the following conditions is met: <ul> <li> the caller's class loader is not the same as the class loader of this class and invocation of {@link SecurityManager#checkPermission s.checkPermission} method with{@code RuntimePermission("accessDeclaredMembers")}denies access to the declared constructor <li> the caller's class loader is not the same as or an ancestor of the class loader for the current class and invocation of   {@link SecurityManager#checkPackageAccess s.checkPackageAccess()} denies access to the packageof this class </ul>
 * @since 1.1
 */
@CallerSensitive public Constructor<T> getDeclaredConstructor(Class<?>... parameterTypes) throws NoSuchMethodException, SecurityException {
  checkMemberAccess(Member.DECLARED,Reflection.getCallerClass(),true);
  return getReflectionFactory().copyConstructor(getConstructor0(parameterTypes,Member.DECLARED));
}