Buggy code:
public class AddDatasetMetadata implements ConfigKeys , MetKeys , WorkflowTaskInstance { private static final Logger LOG = Logger . getLogger ( AddDatasetMetadata . class . getName ( ) ) ; private static final String CPTAC_CLASSIFICATION_VALUE = "Processed" ; public void run ( Metadata met , WorkflowTaskConfiguration config ) throws WorkflowTaskInstanceException { XmlRpcFileManagerClient fmClient = null ; String fmURLValue = config . getProperty ( FILE_MANAGER_URL ) ; try { URL fmURL = new URL ( fmURLValue ) ; fmClient = new XmlRpcFileManagerClient ( fmURL ) ; AddDatasetMetadata . LOG . info ( ( ( "Successfully<seq2seq4repair_space>connected<seq2seq4repair_space>to<seq2seq4repair_space>CAS<seq2seq4repair_space>FileManager<seq2seq4repair_space>at<seq2seq4repair_space>URL<seq2seq4repair_space>[" + fmURL ) + "]" ) ) ; } catch ( MalformedURLException e ) { AddDatasetMetadata . LOG . severe ( ( ( "CAS<seq2seq4repair_space>FileManager<seq2seq4repair_space>URL<seq2seq4repair_space>[" + fmURLValue ) + "]<seq2seq4repair_space>is<seq2seq4repair_space>invalid" ) ) ; AddDatasetMetadata . LOG . severe ( e . toString ( ) ) ; } catch ( ConnectionException e ) { AddDatasetMetadata . LOG . severe ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>connect<seq2seq4repair_space>to<seq2seq4repair_space>CAS<seq2seq4repair_space>FileManager<seq2seq4repair_space>at<seq2seq4repair_space>URL<seq2seq4repair_space>[" + fmURLValue ) + "]" ) ) ; AddDatasetMetadata . LOG . severe ( e . toString ( ) ) ; } List rawFileProductNames = met . getAllMetadata ( RAW_FILE_NAMES_MET_KEY ) ; if ( ! ( rawFileProductNames . isEmpty ( ) ) ) { String rawFileProductNameString = ( ( String ) ( rawFileProductNames . get ( 0 ) ) ) ; AddDatasetMetadata . LOG . info ( ( ( "Examining<seq2seq4repair_space>RAW<seq2seq4repair_space>ProductName<seq2seq4repair_space>[" + rawFileProductNameString ) + "]" ) ) ; Product rawProd = null ; try { rawProd = fmClient . getProductByName ( rawFileProductNameString ) ; } catch ( CatalogException e ) { AddDatasetMetadata . LOG . severe ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>issue<seq2seq4repair_space>filemanager<seq2seq4repair_space>" + ( RAW_FILES_MET_KEY ) ) + "<seq2seq4repair_space>prod<seq2seq4repair_space>query" ) ) ; AddDatasetMetadata . LOG . severe ( e . toString ( ) ) ; AddDatasetMetadata . LOG . warning ( ( "Stopping<seq2seq4repair_space>" + ( AddDatasetMetadata . class . getName ( ) ) ) ) ; return ; } Metadata rawProdMet = null ; try { rawProdMet = fmClient . getMetadata ( rawProd ) ; } catch ( CatalogException e ) { <START_BUG> AddDatasetMetadata . LOG . severe ( ( ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>obtain<seq2seq4repair_space>metadata<seq2seq4repair_space>for<seq2seq4repair_space>" + ( RAW_FILES_MET_KEY ) ) + "<seq2seq4repair_space>file<seq2seq4repair_space>[" ) + ( rawFileProductIdString ) ) + "]" ) ) ; <END_BUG> AddDatasetMetadata . LOG . severe ( e . toString ( ) ) ; AddDatasetMetadata . LOG . warning ( ( "Stopping<seq2seq4repair_space>" + ( AddDatasetMetadata . class . getName ( ) ) ) ) ; return ; } if ( StringUtils . hasText ( rawProdMet . getMetadata ( DATASET_NAME ) ) ) met . addMetadata ( DATASET_NAME , ( ( ( rawProdMet . getMetadata ( DATASET_NAME ) ) + "-" ) + ( AddDatasetMetadata . CPTAC_CLASSIFICATION_VALUE ) ) ) ; try { met . addMetadata ( DATASET_DATE , DateUtils . toString ( DateUtils . getCurrentUtcTime ( ) ) ) ; } catch ( Exception e ) { AddDatasetMetadata . LOG . warning ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>met<seq2seq4repair_space>key<seq2seq4repair_space>[" + ( MetKeys . DATASET_DATE ) ) + "]" ) ) ; AddDatasetMetadata . LOG . warning ( e . getMessage ( ) ) ; } met . addMetadata ( CPTAC_CLASSIFICATION , AddDatasetMetadata . CPTAC_CLASSIFICATION_VALUE ) ; if ( StringUtils . hasText ( rawProdMet . getMetadata ( LEAD_PI ) ) ) met . addMetadata ( LEAD_PI , rawProdMet . getAllMetadata ( LEAD_PI ) ) ; if ( StringUtils . hasText ( rawProdMet . getMetadata ( UPLOADED_BY ) ) ) met . addMetadata ( UPLOADED_BY , rawProdMet . getMetadata ( UPLOADED_BY ) ) ; if ( StringUtils . hasText ( rawProdMet . getMetadata ( ACCESS_GRANTED_TO ) ) ) met . addMetadata ( ACCESS_GRANTED_TO , rawProdMet . getAllMetadata ( ACCESS_GRANTED_TO ) ) ; } for ( String key : met . getAllKeys ( ) ) { AddDatasetMetadata . LOG . info ( ( ( ( ( "==><seq2seq4repair_space>key:<seq2seq4repair_space>[" + key ) + "]<seq2seq4repair_space>value:<seq2seq4repair_space>[" ) + ( met . getMetadata ( key ) ) ) + "]" ) ) ; } } }

Fix:
AddDatasetMetadata . LOG . severe ( ( ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>obtain<seq2seq4repair_space>metadata<seq2seq4repair_space>for<seq2seq4repair_space>" + ( RAW_FILES_MET_KEY ) ) + "<seq2seq4repair_space>file<seq2seq4repair_space>[" ) + rawFileProductNameString ) + "]" ) ) ;