Buggy code:
public class StreamConfig implements Serializable { private static final long serialVersionUID = 1L ; private static final String INPUT_TYPE = "inputType_" ; private static final String NUMBER_OF_OUTPUTS = "numberOfOutputs" ; private static final String NUMBER_OF_INPUTS = "numberOfInputs" ; private static final String CHAINED_OUTPUTS = "chainedOutputs" ; private static final String CHAINED_TASK_CONFIG = "chainedTaskConfig_" ; private static final String IS_CHAINED_VERTEX = "isChainedSubtask" ; private static final String OUTPUT_NAME = "outputName_" ; private static final String PARTITIONER_OBJECT = "partitionerObject_" ; private static final String VERTEX_NAME = "vertexID" ; private static final String ITERATION_ID = "iteration-id" ; private static final String OUTPUT_SELECTOR = "outputSelector" ; private static final String DIRECTED_EMIT = "directedEmit" ; private static final String SERIALIZEDUDF = "serializedudf" ; private static final String USER_FUNCTION = "userfunction" ; private static final String BUFFER_TIMEOUT = "bufferTimeout" ; private static final String OPERATOR_STATES = "operatorStates" ; private static final String TYPE_SERIALIZER_IN_1 = "typeSerializer_in_1" ; private static final String TYPE_SERIALIZER_IN_2 = "typeSerializer_in_2" ; private static final String TYPE_SERIALIZER_OUT_1 = "typeSerializer_out_1" ; private static final String TYPE_SERIALIZER_OUT_2 = "typeSerializer_out_2" ; private static final String ITERATON_WAIT = "iterationWait" ; private static final String OUTPUTS = "outvertexIDs" ; private static final String EDGES_IN_ORDER = "rwOrder" ; private static final long DEFAULT_TIMEOUT = 100 ; private Configuration config ; public StreamConfig ( Configuration config ) { } public Configuration getConfiguration ( ) { } public void setVertexID ( Integer vertexID ) { } public Integer getVertexID ( ) { } public void setTypeSerializerIn1 ( StreamRecordSerializer < ? > serializer ) { } public void setTypeSerializerIn2 ( StreamRecordSerializer < ? > serializer ) { } public void setTypeSerializerOut1 ( StreamRecordSerializer < ? > serializer ) { } public void setTypeSerializerOut2 ( StreamRecordSerializer < ? > serializer ) { } @ SuppressWarnings ( "unchecked" ) public < T > StreamRecordSerializer < T > getTypeSerializerIn1 ( ClassLoader cl ) { } @ SuppressWarnings ( "unchecked" ) public < T > StreamRecordSerializer < T > getTypeSerializerIn2 ( ClassLoader cl ) { } @ SuppressWarnings ( "unchecked" ) public < T > StreamRecordSerializer < T > getTypeSerializerOut1 ( ClassLoader cl ) { } @ SuppressWarnings ( "unchecked" ) public < T > StreamRecordSerializer < T > getTypeSerializerOut2 ( ClassLoader cl ) { } private void setTypeSerializer ( String key , StreamRecordSerializer < ? > typeWrapper ) { } public void setBufferTimeout ( long timeout ) { } public long getBufferTimeout ( ) { } public void setUserInvokable ( StreamInvokable < ? , ? > invokableObject ) { } @ SuppressWarnings ( { "unchecked" } ) public < T > T getUserInvokable ( ClassLoader cl ) { } public void setDirectedEmit ( boolean directedEmit ) { } public boolean isDirectedEmit ( ) { } public void setOutputSelectors ( List < OutputSelector < ? > > outputSelector ) { try { <START_BUG> if ( outputSelector != null ) { <END_BUG> setDirectedEmit ( true ) ; config . setBytes ( StreamConfig . OUTPUT_SELECTOR , SerializationUtils . serialize ( ( ( Serializable ) ( outputSelector ) ) ) ) ; } } catch ( SerializationException e ) { throw new RuntimeException ( "Cannot<seq2seq4repair_space>serialize<seq2seq4repair_space>OutputSelector" ) ; } } @ SuppressWarnings ( "unchecked" ) public < T > List < OutputSelector < T > > getOutputSelectors ( ClassLoader cl ) { } public void setIterationId ( Integer iterationId ) { } public Integer getIterationId ( ) { } public void setIterationWaitTime ( long time ) { } public long getIterationWaitTime ( ) { } public < T > void setPartitioner ( Integer output , StreamPartitioner < T > partitionerObject ) { } @ SuppressWarnings ( "unchecked" ) public < T > StreamPartitioner < T > getPartitioner ( ClassLoader cl , Integer output ) { } public void setSelectedNames ( Integer output , List < String > selected ) { } @ SuppressWarnings ( "unchecked" ) public List < String > getSelectedNames ( Integer output ) { } public void setNumberOfInputs ( int numberOfInputs ) { } public int getNumberOfInputs ( ) { } public void setNumberOfOutputs ( int numberOfOutputs ) { } public int getNumberOfOutputs ( ) { } public void setOutputs ( List < Integer > outputvertexIDs ) { } @ SuppressWarnings ( "unchecked" ) public List < Integer > getOutputs ( ClassLoader cl ) { } public void setOutEdgesInOrder ( List < Tuple2 < Integer , Integer > > outEdgeList ) { } @ SuppressWarnings ( "unchecked" ) public List < Tuple2 < Integer , Integer > > getOutEdgesInOrder ( ClassLoader cl ) { } public void setInputIndex ( int inputNumber , Integer inputTypeNumber ) { } public int getInputIndex ( int inputNumber ) { } public void setOperatorStates ( Map < String , OperatorState < ? > > states ) { } @ SuppressWarnings ( "unchecked" ) public Map < String , OperatorState < ? > > getOperatorStates ( ClassLoader cl ) { } public void setChainedOutputs ( List < Integer > chainedOutputs ) { } @ SuppressWarnings ( "unchecked" ) public List < Integer > getChainedOutputs ( ClassLoader cl ) { } public void setTransitiveChainedTaskConfigs ( Map < Integer , StreamConfig > chainedTaskConfigs ) { } @ SuppressWarnings ( "unchecked" ) public Map < Integer , StreamConfig > getTransitiveChainedTaskConfigs ( ClassLoader cl ) { } public void setChainStart ( ) { } public boolean isChainStart ( ) { } @ Override public String toString ( ) { } }

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