Buggy code:
public class OperationServiceImpl implements IOperationService { private static IOperationRunnerService rservice ; public static void setOperationRunner ( IOperationRunnerService s ) { } private Map < String , IOperation < ? extends IOperationModel , ? extends OperationData > > operations ; private Map < String , Class < ? extends IOperationModel > > models ; private Map < String , OperationCategory > categoryId ; private Map < String , Collection < IOperation < ? extends IOperationModel , ? extends OperationData > > > categoryOp ; private Map < String , String > opIdCategory ; private static final Logger logger = LoggerFactory . getLogger ( OperationServiceImpl . class ) ; public OperationServiceImpl ( ) { } public IOperationContext createContext ( ) { } @ Override public void execute ( final IOperationContext context ) throws OperationException { } private static int count = 0 ; private void sendMacroCommands ( IOperationContext context ) { IMacroService mservice = ( ( IMacroService ) ( Activator . getService ( IMacroService . class ) ) ) ; if ( mservice == null ) return ; try { MacroEventObject evt = new MacroEventObject ( this ) ; evt . setJythonAllowed ( false ) ; evt . setPythonCommand ( "\n#<seq2seq4repair_space>Recording<seq2seq4repair_space>macro<seq2seq4repair_space>for<seq2seq4repair_space>operation<seq2seq4repair_space>pipeline,<seq2seq4repair_space>warning<seq2seq4repair_space>not<seq2seq4repair_space>all<seq2seq4repair_space>operations<seq2seq4repair_space>work<seq2seq4repair_space>from<seq2seq4repair_space>macro." ) ; evt . append ( ( ( "oservice<seq2seq4repair_space>=<seq2seq4repair_space>dnp.plot.getService('" + ( IOperationService . class . getName ( ) ) ) + "')" ) ) ; evt . append ( "context<seq2seq4repair_space>=<seq2seq4repair_space>oservice.createContext()" ) ; evt . append ( "\n#<seq2seq4repair_space>Create<seq2seq4repair_space>the<seq2seq4repair_space>data<seq2seq4repair_space>and<seq2seq4repair_space>slice<seq2seq4repair_space>information" ) ; String filePath = context . getFilePath ( ) ; String dataPath = context . getDatasetPath ( ) ; if ( ( context . getData ( ) ) != null ) { ILazyDataset lz = context . getData ( ) ; List < SliceFromSeriesMetadata > md = lz . getMetadata ( SliceFromSeriesMetadata . class ) ; <START_BUG> if ( md != null ) { <END_BUG> SourceInformation sinfo = md . get ( 0 ) . getSourceInfo ( ) ; if ( sinfo != null ) { filePath = sinfo . getFilePath ( ) ; dataPath = sinfo . getDatasetName ( ) ; } } } filePath = filePath . replace ( '\\' , '//' ) ; evt . append ( ( ( "context.setFilePath('" + filePath ) + "')" ) ) ; evt . append ( ( ( "context.setDatasetPath('" + dataPath ) + "')" ) ) ; evt . append ( ( ( "context.setSlicing(" + ( evt . getMap ( context . getSlicing ( ) ) ) ) + ")" ) ) ; createOperationCommands ( context , evt ) ; evt . append ( "\n#<seq2seq4repair_space>Setup<seq2seq4repair_space>the<seq2seq4repair_space>execution" ) ; evt . append ( ( ( "context.setParallelTimeout(" + ( context . getParallelTimeout ( ) ) ) + ")" ) ) ; evt . append ( ( ( "context.setPoolSize(" + ( context . getPoolSize ( ) ) ) + ")" ) ) ; evt . append ( ( ( "context.setExecutionType('" + ( context . getExecutionType ( ) ) ) + "')" ) ) ; evt . append ( ( ( "java_import(jvm,<seq2seq4repair_space>'" + ( HierarchicalFileExecutionVisitor . class . getPackage ( ) . getName ( ) ) ) + ".*\')\n" ) ) ; String outputPath = ( ( ( filePath . substring ( 0 , filePath . lastIndexOf ( '.' ) ) ) + "_processed" ) + ( ++ ( OperationServiceImpl . count ) ) ) + ".nxs" ; evt . append ( ( ( ( ( ( "visitor<seq2seq4repair_space>=<seq2seq4repair_space>jvm." + ( HierarchicalFileExecutionVisitor . class . getSimpleName ( ) ) ) + "('" ) + outputPath ) + "" ) + "')" ) ) ; evt . append ( "context.setVisitor(visitor)" ) ; evt . append ( "\n#<seq2seq4repair_space>Execute<seq2seq4repair_space>the<seq2seq4repair_space>pipeline<seq2seq4repair_space>(commented<seq2seq4repair_space>out<seq2seq4repair_space>for<seq2seq4repair_space>now)" ) ; evt . append ( "#<seq2seq4repair_space>oservice.execute(context)" ) ; mservice . publish ( evt ) ; } catch ( Exception ne ) { ne . printStackTrace ( ) ; } } private String createOperationCommands ( IOperationContext context , MacroEventObject evt ) throws Exception { } public void validate ( IDataset firstSlice , IOperation < ? extends IOperationModel , ? extends OperationData > ... series ) throws InvalidRankException , OperationException { } protected static boolean isCompatible ( final int [ ] ashape , final int [ ] bshape ) { } private synchronized void checkOperations ( ) throws CoreException { } @ Override public Class < ? extends IOperationModel > getModelClass ( String operationId ) throws Exception { } @ Override public OperationCategory getCategory ( String operationId ) { } @ Override public Collection < IOperation < ? extends IOperationModel , ? extends OperationData > > find ( String regex ) throws Exception { } @ Override public Collection < IOperation < ? extends IOperationModel , ? extends OperationData > > find ( OperationRank rank , boolean isInput ) throws Exception { } @ Override public IOperation < ? extends IOperationModel , ? extends OperationData > findFirst ( String regex ) throws Exception { } private boolean matches ( String id , IOperation < ? extends IOperationModel , ? extends OperationData > operation , String regex ) { } @ Override public Collection < String > getRegisteredOperations ( ) throws Exception { } @ Override public Map < String , Collection < IOperation < ? extends IOperationModel , ? extends OperationData > > > getCategorizedOperations ( ) throws Exception { } @ Override public IOperation < ? extends IOperationModel , ? extends OperationData > create ( String operationId ) throws Exception { } @ Override public void createOperations ( ClassLoader cl , String pakage ) throws Exception { } @ Override public String getName ( String id ) throws Exception { } @ Override public String getDescription ( String id ) throws Exception { } }

Fix:
if ( ( md != null ) && ( ! ( md . isEmpty ( ) ) ) ) {