Program: 172067
Project: 172067
Buggy source:
/** 
 * This method provides a <i>best guess</i> of where to store the values extracted from the documents.  The list of properties mapped by default need <b>not</b> include all properties extracted from the document; just the obvious set of mappings need be supplied. Implementations must either provide the default mapping properties in the expected location or override the method to provide the default mapping. <p> The default implementation looks for the default mapping file in the location given by the class name and <i>.properties</i>.  If the extracter's class is <b>x.y.z.MyExtracter</b> then the default properties will be picked up at <b>classpath:/alfresco/metadata/MyExtracter.properties</b>. The previous location of <b>classpath:/x/y/z/MyExtracter.properties</b> is still supported but may be removed in a future release. Inner classes are supported, but the '$' in the class name is replaced with '-', so default properties for <b>x.y.z.MyStuff$MyExtracter</b> will be located using <b>classpath:/alfresco/metadata/MyStuff-MyExtracter.properties</b>. <p> The default mapping implementation should include thorough Javadocs so that the system administrators can accurately determine how to best enhance or override the default mapping. <p> If the default mapping is declared in a properties file other than the one named after the class, then the   {@link #readMappingProperties(String)} method can be used to quicklygenerate the return value: <pre><code> protected Map<<String, Set<QName>> getDefaultMapping() { return readMappingProperties(DEFAULT_MAPPING); } </code></pre> The map can also be created in code either statically or during the call.
 * @return              Returns the default, static mapping.  It may not be null.
 * @see #setInheritDefaultMapping(boolean inherit)
 */
protected Map<String,Set<QName>> getDefaultMapping(){
  AlfrescoRuntimeException metadataLocationReadException=null;
  try {
    String className=this.getClass().getName();
    String shortClassName=className.split("String_Node_Str")[className.split("String_Node_Str").length - 1];
    shortClassName=shortClassName.replace('$','-');
    String metadataPropertiesUrl="String_Node_Str" + shortClassName + "String_Node_Str";
    return readMappingProperties(metadataPropertiesUrl);
  }
 catch (  AlfrescoRuntimeException e) {
    metadataLocationReadException=e;
  }
  try {
    String canonicalClassName=this.getClass().getName();
    canonicalClassName=canonicalClassName.replace('$','-');
    canonicalClassName=canonicalClassName.replace('.','/');
    String packagePropertiesUrl=canonicalClassName + "String_Node_Str";
    return readMappingProperties(packagePropertiesUrl);
  }
 catch (  AlfrescoRuntimeException e) {
    throw metadataLocationReadException;
  }
}

Fixed version (ground truth):
/** 
 * This method provides a <i>best guess</i> of where to store the values extracted from the documents.  The list of properties mapped by default need <b>not</b> include all properties extracted from the document; just the obvious set of mappings need be supplied. Implementations must either provide the default mapping properties in the expected location or override the method to provide the default mapping. <p> The default implementation looks for the default mapping file in the location given by the class name and <i>.properties</i>.  If the extracter's class is <b>x.y.z.MyExtracter</b> then the default properties will be picked up at <b>classpath:/alfresco/metadata/MyExtracter.properties</b>. The previous location of <b>classpath:/x/y/z/MyExtracter.properties</b> is still supported but may be removed in a future release. Inner classes are supported, but the '$' in the class name is replaced with '-', so default properties for <b>x.y.z.MyStuff$MyExtracter</b> will be located using <b>classpath:/alfresco/metadata/MyStuff-MyExtracter.properties</b>. <p> The default mapping implementation should include thorough Javadocs so that the system administrators can accurately determine how to best enhance or override the default mapping. <p> If the default mapping is declared in a properties file other than the one named after the class, then the   {@link #readMappingProperties(String)} method can be used to quicklygenerate the return value: <pre><code> { return readMappingProperties(DEFAULT_MAPPING); } </code></pre> The map can also be created in code either statically or during the call.
 * @return              Returns the default, static mapping.  It may not be null.
 * @see #setInheritDefaultMapping(boolean inherit)
 */
protected Map<String,Set<QName>> getDefaultMapping(){
  AlfrescoRuntimeException metadataLocationReadException=null;
  try {
    String className=this.getClass().getName();
    String shortClassName=className.split("String_Node_Str")[className.split("String_Node_Str").length - 1];
    shortClassName=shortClassName.replace('$','-');
    String metadataPropertiesUrl="String_Node_Str" + shortClassName + "String_Node_Str";
    return readMappingProperties(metadataPropertiesUrl);
  }
 catch (  AlfrescoRuntimeException e) {
    metadataLocationReadException=e;
  }
  try {
    String canonicalClassName=this.getClass().getName();
    canonicalClassName=canonicalClassName.replace('$','-');
    canonicalClassName=canonicalClassName.replace('.','/');
    String packagePropertiesUrl=canonicalClassName + "String_Node_Str";
    return readMappingProperties(packagePropertiesUrl);
  }
 catch (  AlfrescoRuntimeException e) {
    throw metadataLocationReadException;
  }
}