Buggy code:
class HiveUtils { static final String DEFAULT_DB = "default" ; static final String HDFS_SCHEME = "hdfs" ; private static final String CUSTOM_PROPERTIES_PROPERTY_NAME = "kite.custom.property.names" ; private static final String PARTITION_EXPRESSION_PROPERTY_NAME = "kite.partition.expression" ; private static final String OLD_CUSTOM_PROPERTIES_PROPERTY_NAME = "cdk.custom.property.names" ; private static final String OLD_PARTITION_EXPRESSION_PROPERTY_NAME = "cdk.partition.expression" ; private static final String AVRO_SCHEMA_URL_PROPERTY_NAME = "avro.schema.url" ; private static final String AVRO_SCHEMA_LITERAL_PROPERTY_NAME = "avro.schema.literal" ; private static final Splitter NAME_SPLITTER = Splitter . on ( ',' ) ; private static final Joiner NAME_JOINER = Joiner . on ( ',' ) ; private static final BiMap < Format , String > FORMAT_TO_SERDE = HashBiMap . create ( 2 ) ; private static final BiMap < String , Format > SERDE_TO_FORMAT = HiveUtils . FORMAT_TO_SERDE . inverse ( ) ; private static final Map < Format , String > FORMAT_TO_INPUT_FORMAT = Maps . newHashMap ( ) ; private static final Map < Format , String > FORMAT_TO_OUTPUT_FORMAT = Maps . newHashMap ( ) ; static DatasetDescriptor descriptorForTable ( Configuration conf , Table table ) { } private static boolean isPartitioned ( Table table ) { <START_BUG> return ( ( HiveUtils . getPartCols ( table ) ) != null ) && ( ( HiveUtils . getPartCols ( table ) . size ( ) ) != 0 ) ; <END_BUG> } private static List < FieldSchema > getPartCols ( Table table ) { } private static < T > T coalesce ( T ... values ) { } static Table tableForDescriptor ( String name , DatasetDescriptor descriptor , boolean external ) { } static Table createEmptyTable ( String name ) { } public static void updateTableSchema ( Table table , DatasetDescriptor descriptor ) { } static FileSystem fsForPath ( Configuration conf , Path path ) { } private static void addPropertiesForDescriptor ( Table table , DatasetDescriptor descriptor ) { } static Path pathForDataset ( Path root , String name ) { } static List < FieldSchema > partitionColumns ( PartitionStrategy strategy , Schema schema ) { } static PartitionStrategy fromPartitionColumns ( List < FieldSchema > fields ) { } private static String getHiveType ( Class < ? > type ) { } static List < FieldSchema > convertSchema ( Schema avroSchema ) { } public static TypeInfo convert ( Schema schema ) { } static class Converter extends SchemaUtil . SchemaVisitor < TypeInfo > { private static StaticMethod hiveTypeForName = new DynMethods . Builder ( "getPrimitiveTypeInfo" ) . impl ( TypeInfoFactory . class , String . class ) . buildStatic ( ) ; static final ImmutableMap < Schema . Type , TypeInfo > TYPE_TO_TYPEINFO = ImmutableMap . < Schema . Type , TypeInfo > builder ( ) . put ( BOOLEAN , HiveUtils . Converter . hiveTypeForName . < TypeInfo > invoke ( "boolean" ) ) . put ( INT , HiveUtils . Converter . hiveTypeForName . < TypeInfo > invoke ( "int" ) ) . put ( LONG , HiveUtils . Converter . hiveTypeForName . < TypeInfo > invoke ( "bigint" ) ) . put ( FLOAT , HiveUtils . Converter . hiveTypeForName . < TypeInfo > invoke ( "float" ) ) . put ( DOUBLE , HiveUtils . Converter . hiveTypeForName . < TypeInfo > invoke ( "double" ) ) . put ( STRING , HiveUtils . Converter . hiveTypeForName . < TypeInfo > invoke ( "string" ) ) . put ( ENUM , HiveUtils . Converter . hiveTypeForName . < TypeInfo > invoke ( "string" ) ) . put ( BYTES , HiveUtils . Converter . hiveTypeForName . < TypeInfo > invoke ( "binary" ) ) . put ( FIXED , HiveUtils . Converter . hiveTypeForName . < TypeInfo > invoke ( "binary" ) ) . build ( ) ; public TypeInfo record ( Schema record , List < String > names , List < TypeInfo > types ) { } @ Override public TypeInfo union ( Schema union , List < TypeInfo > options ) { } @ Override public TypeInfo array ( Schema array , TypeInfo element ) { } @ Override public TypeInfo map ( Schema map , TypeInfo value ) { } @ Override public TypeInfo primitive ( Schema primitive ) { } } }

Fix:
return ( HiveUtils . getPartCols ( table ) . size ( ) ) != 0 ;