Buggy code:
public class SiteWherePersistence { private static MessageDigestPasswordEncoder passwordEncoder = new ShaPasswordEncoder ( ) ; public static void initializeEntityMetadata ( MetadataProviderEntity entity ) throws SiteWhereException { } public static void setUpdatedEntityMetadata ( MetadataProviderEntity entity ) throws SiteWhereException { } public static DeviceSpecification deviceSpecificationCreateLogic ( IDeviceSpecificationCreateRequest request , String token ) throws SiteWhereException { } public static void deviceSpecificationUpdateLogic ( IDeviceSpecificationCreateRequest request , DeviceSpecification target ) throws SiteWhereException { } public static DeviceCommand deviceCommandCreateLogic ( IDeviceSpecification spec , IDeviceCommandCreateRequest request , String token , List < IDeviceCommand > existing ) throws SiteWhereException { } protected static void checkDuplicateCommand ( DeviceCommand command , List < IDeviceCommand > existing ) throws SiteWhereException { } public static void deviceCommandUpdateLogic ( IDeviceCommandCreateRequest request , DeviceCommand target , List < IDeviceCommand > existing ) throws SiteWhereException { } public static Device deviceCreateLogic ( IDeviceCreateRequest request ) throws SiteWhereException { } public static void deviceUpdateLogic ( IDeviceCreateRequest request , Device target ) throws SiteWhereException { } public static IDevice deviceElementMappingCreateLogic ( IDeviceManagement management , String hardwareId , IDeviceElementMapping request ) throws SiteWhereException { } public static IDevice deviceElementMappingDeleteLogic ( IDeviceManagement management , String hardwareId , String path ) throws SiteWhereException { } <START_BUG> public static Site siteCreateLogic ( ISiteCreateRequest request , String uuid ) throws SiteWhereException { <END_BUG> Site site = new Site ( ) ; if ( ( request . getToken ( ) ) != null ) { site . setToken ( request . getToken ( ) ) ; } else { site . setToken ( UUID . randomUUID ( ) . toString ( ) ) ; } site . setName ( request . getName ( ) ) ; site . setDescription ( request . getDescription ( ) ) ; site . setImageUrl ( request . getImageUrl ( ) ) ; site . setMap ( SiteMapData . copy ( request . getMap ( ) ) ) ; SiteWherePersistence . initializeEntityMetadata ( site ) ; MetadataProvider . copy ( request . getMetadata ( ) , site ) ; return site ; } public static void siteUpdateLogic ( ISiteCreateRequest request , Site target ) throws SiteWhereException { } public static DeviceAssignment deviceAssignmentCreateLogic ( IDeviceAssignmentCreateRequest source , IDevice device , String uuid ) throws SiteWhereException { } public static DeviceEventBatchResponse deviceEventBatchLogic ( String assignmentToken , IDeviceEventBatch batch , IDeviceManagement management ) throws SiteWhereException { } public static void deviceEventCreateLogic ( IDeviceEventCreateRequest request , IDeviceAssignment assignment , DeviceEvent target ) throws SiteWhereException { } public static DeviceMeasurements deviceMeasurementsCreateLogic ( IDeviceMeasurementsCreateRequest request , IDeviceAssignment assignment ) throws SiteWhereException { } public static DeviceLocation deviceLocationCreateLogic ( IDeviceAssignment assignment , IDeviceLocationCreateRequest request ) throws SiteWhereException { } public static DeviceAlert deviceAlertCreateLogic ( IDeviceAssignment assignment , IDeviceAlertCreateRequest request ) throws SiteWhereException { } public static DeviceCommandInvocation deviceCommandInvocationCreateLogic ( IDeviceAssignment assignment , IDeviceCommand command , IDeviceCommandInvocationCreateRequest request ) throws SiteWhereException { } protected static void checkData ( ICommandParameter parameter , Map < String , String > values ) throws SiteWhereException { } public static DeviceCommandResponse deviceCommandResponseCreateLogic ( IDeviceAssignment assignment , IDeviceCommandResponseCreateRequest request ) throws SiteWhereException { } public static DeviceStateChange deviceStateChangeCreateLogic ( IDeviceAssignment assignment , IDeviceStateChangeCreateRequest request ) throws SiteWhereException { } protected static DeviceAssignmentState assureState ( IDeviceAssignment assignment ) throws SiteWhereException { } public static DeviceAssignmentState assignmentStateLocationUpdateLogic ( IDeviceAssignment assignment , IDeviceLocation location ) throws SiteWhereException { } public static DeviceAssignmentState assignmentStateMeasurementsUpdateLogic ( IDeviceAssignment assignment , IDeviceMeasurements measurements ) throws SiteWhereException { } public static DeviceAssignmentState assignmentStateAlertUpdateLogic ( IDeviceAssignment assignment , IDeviceAlert alert ) throws SiteWhereException { } public static Zone zoneCreateLogic ( IZoneCreateRequest source , String siteToken , String uuid ) throws SiteWhereException { } public static void zoneUpdateLogic ( IZoneCreateRequest request , Zone target ) throws SiteWhereException { } public static DeviceGroup deviceGroupCreateLogic ( IDeviceGroupCreateRequest source , String uuid ) throws SiteWhereException { } public static void deviceGroupUpdateLogic ( IDeviceGroupCreateRequest request , DeviceGroup target ) throws SiteWhereException { } public static DeviceGroupElement deviceGroupElementCreateLogic ( IDeviceGroupElementCreateRequest source , String groupToken , long index ) throws SiteWhereException { } public static BatchOperation batchOperationCreateLogic ( IBatchOperationCreateRequest source , String uuid ) throws SiteWhereException { } public static void batchOperationUpdateLogic ( IBatchOperationUpdateRequest request , BatchOperation target ) throws SiteWhereException { } public static BatchElement batchElementCreateLogic ( String batchOperationToken , String hardwareId , long index ) throws SiteWhereException { } public static void batchElementUpdateLogic ( IBatchElementUpdateRequest request , BatchElement element ) throws SiteWhereException { } public static IBatchOperationCreateRequest batchCommandInvocationCreateLogic ( IBatchCommandInvocationRequest request , String uuid ) throws SiteWhereException { } public static User userCreateLogic ( IUserCreateRequest source ) throws SiteWhereException { } public static void userUpdateLogic ( IUserCreateRequest source , User target ) throws SiteWhereException { } public static GrantedAuthority grantedAuthorityCreateLogic ( IGrantedAuthorityCreateRequest source ) throws SiteWhereException { } public static String encodePassoword ( String plaintext ) { } No newline ; at end ; of file ; }

Fix:
public static Site siteCreateLogic ( ISiteCreateRequest request ) throws SiteWhereException {