Buggy code:
public class HadoopDruidIndexerConfig { private static final Logger log = new Logger ( HadoopDruidIndexerConfig . class ) ; private static final Injector injector ; public static final String CONFIG_PROPERTY = "druid.indexer.config" ; public static final Charset javaNativeCharset = Charset . forName ( "Unicode" ) ; public static final Splitter tabSplitter = Splitter . on ( "\t" ) ; public static final Joiner tabJoiner = Joiner . on ( "\t" ) ; public static final ObjectMapper jsonMapper ; public static enum IndexJobCounters { INVALID_ROW_COUNTER ; } public static HadoopDruidIndexerConfig fromSpec ( HadoopIngestionSpec spec ) { } public static HadoopDruidIndexerConfig fromMap ( Map < String , Object > argSpec ) { <START_BUG> if ( argSpec . containsKey ( "schema" ) ) { <END_BUG> return HadoopDruidIndexerConfig . jsonMapper . convertValue ( argSpec , HadoopDruidIndexerConfig . class ) ; } else { return new HadoopDruidIndexerConfig ( HadoopDruidIndexerConfig . jsonMapper . convertValue ( argSpec , HadoopIngestionSpec . class ) , null ) ; } } @ SuppressWarnings ( "unchecked" ) public static HadoopDruidIndexerConfig fromFile ( File file ) { } @ SuppressWarnings ( "unchecked" ) public static HadoopDruidIndexerConfig fromString ( String str ) { } public static HadoopDruidIndexerConfig fromConfiguration ( Configuration conf ) { } private volatile HadoopIngestionSpec spec ; private volatile PathSpec pathSpec ; private volatile Map < DateTime , ShardSpecLookup > shardSpecLookups = Maps . newHashMap ( ) ; private volatile Map < ShardSpec , HadoopyShardSpec > hadoopShardSpecLookup = Maps . newHashMap ( ) ; private final QueryGranularity rollupGran ; @ JsonCreator public HadoopDruidIndexerConfig ( @ JsonProperty ( "spec" ) final HadoopIngestionSpec spec , @ JsonProperty ( "schema" ) final HadoopIngestionSpec schema ) { } @ JsonProperty public HadoopIngestionSpec getSpec ( ) { } public String getDataSource ( ) { } public GranularitySpec getGranularitySpec ( ) { } public void setGranularitySpec ( GranularitySpec granularitySpec ) { } public PartitionsSpec getPartitionsSpec ( ) { } public boolean isOverwriteFiles ( ) { } public boolean isIgnoreInvalidRows ( ) { } public void setVersion ( String version ) { } public void setShardSpecs ( Map < DateTime , List < HadoopyShardSpec > > shardSpecs ) { } public Optional < List < Interval > > getIntervals ( ) { } public boolean isDeterminingPartitions ( ) { } public Long getTargetPartitionSize ( ) { } public long getMaxPartitionSize ( ) { } public boolean isUpdaterJobSpecSet ( ) { } public boolean isCombineText ( ) { } public StringInputRowParser getParser ( ) { } public HadoopyShardSpec getShardSpec ( Bucket bucket ) { } public Job addInputPaths ( Job job ) throws IOException { } public Optional < Bucket > getBucket ( InputRow inputRow ) { } public Optional < Set < Interval > > getSegmentGranularIntervals ( ) { } public Optional < Iterable < Bucket > > getAllBuckets ( ) { } public Path makeIntermediatePath ( ) { } public Path makeSegmentPartitionInfoPath ( Interval bucketInterval ) { } public Path makeIntervalInfoPath ( ) { } public Path makeDescriptorInfoDir ( ) { } public Path makeGroupedDataDir ( ) { } public Path makeDescriptorInfoPath ( DataSegment segment ) { } public Path makeSegmentOutputPath ( FileSystem fileSystem , Bucket bucket ) { } public void addJobProperties ( Job job ) { } public void intoConfiguration ( Job job ) { } public void verify ( ) { } }

Fix:
if ( ( argSpec . containsKey ( "schema" ) ) || ( argSpec . containsKey ( "spec" ) ) ) {