Program: 190651
Project: 190651
Buggy source:
/** 
 * Returns a list of namespace URIs that should be declared at the root element. <p> By default, the JAXB RI 1.0.x produces namespace declarations only when they are necessary, only at where they are used. Because of this lack of look-ahead, sometimes the marshaller produces a lot of namespace declarations that look redundant to human eyes. For example, <pre><xmp> <?xml version="1.0"?> <root> <ns1:child xmlns:ns1="urn:foo"> ... </ns1:child> <ns2:child xmlns:ns2="urn:foo"> ... </ns2:child> <ns3:child xmlns:ns3="urn:foo"> ... </ns3:child> ... </root> <xmp></pre> <p> The JAXB RI 2.x mostly doesn't exhibit this behavior any more, as it declares all statically known namespace URIs (those URIs that are used as element/attribute names in JAXB annotations), but it may still declare additional namespaces in the middle of a document, for example when (i) a QName as an attribute/element value requires a new namespace URI, or (ii) DOM nodes as a portion of an object tree requires a new namespace URI. <p> If you know in advance that you are going to use a certain set of namespace URIs, you can override this method and have the marshaller declare those namespace URIs at the root element. <p> For example, by returning <code>new String[]{"urn:foo"}</code>, the marshaller will produce: <pre><xmp> <?xml version="1.0"?> <root xmlns:ns1="urn:foo"> <ns1:child> ... </ns1:child> <ns1:child> ... </ns1:child> <ns1:child> ... </ns1:child> ... </root> <xmp></pre> <p> To control prefixes assigned to those namespace URIs, use the  {@link #getPreferredPrefix(String,String,boolean)} method. 
 * @return A list of namespace URIs as an array of  {@link String}s. This method can return a length-zero array but not null. None of the array component can be null. To represent the empty namespace, use the empty string <code>""</code>.
 * @since JAXB RI 1.0.2 
 */
public String[] getPreDeclaredNamespaceUris(){
  return EMPTY_STRING;
}

Fixed version (ground truth):
/** 
 * Returns a list of namespace URIs that should be declared at the root element. <p> By default, the JAXB RI 1.0.x produces namespace declarations only when they are necessary, only at where they are used. Because of this lack of look-ahead, sometimes the marshaller produces a lot of namespace declarations that look redundant to human eyes. For example, <pre><xmp> <?xml version="1.0"?> <root> <ns1:child xmlns:ns1="urn:foo"> ... </ns1:child> <ns2:child xmlns:ns2="urn:foo"> ... </ns2:child> <ns3:child xmlns:ns3="urn:foo"> ... </ns3:child> ... </root> <xmp></pre> <p> The JAXB RI 2.x mostly doesn't exhibit this behavior any more, as it declares all statically known namespace URIs (those URIs that are used as element/attribute names in JAXB annotations), but it may still declare additional namespaces in the middle of a document, for example when (i) a QName as an attribute/element value requires a new namespace URI, or (ii) DOM nodes as a portion of an object tree requires a new namespace URI. <p> If you know in advance that you are going to use a certain set of namespace URIs, you can override this method and have the marshaller declare those namespace URIs at the root element. <p> For example, by returning <code>new String[]{"urn:foo"}</code>, the marshaller will produce: <pre><xmp> <?xml version="1.0"?> <root xmlns:ns1="urn:foo"> <ns1:child> ... </ns1:child> <ns1:child> ... </ns1:child> <ns1:child> ... </ns1:child> ... </root> </xmp></pre> <p> To control prefixes assigned to those namespace URIs, use the  {@link #getPreferredPrefix(String,String,boolean)} method. 
 * @return A list of namespace URIs as an array of  {@link String}s. This method can return a length-zero array but not null. None of the array component can be null. To represent the empty namespace, use the empty string <code>""</code>.
 * @since JAXB RI 1.0.2 
 */
public String[] getPreDeclaredNamespaceUris(){
  return EMPTY_STRING;
}