Buggy code:
public class OnPremiseWorkflowServiceImpl extends AbstractWorkflowService { private static final String TAG = OnPremiseWorkflowServiceImpl . class . getName ( ) ; public OnPremiseWorkflowServiceImpl ( AlfrescoSession repositorySession ) { } @ SuppressWarnings ( "unchecked" ) public PagingResult < ProcessDefinition > getProcessDefinitions ( ListingContext listingContext ) { } @ SuppressWarnings ( "unchecked" ) public ProcessDefinition getProcessDefinition ( String processDefinitionIdentifier ) { } public Process startProcess ( ProcessDefinition processDefinition , List < Person > assignees , Map < String , Serializable > variables , List < Document > items ) { } protected UrlBuilder getProcessUrl ( Process process ) { } @ SuppressWarnings ( "unchecked" ) public PagingResult < Process > getProcesses ( ListingContext listingContext ) { } @ SuppressWarnings ( "unchecked" ) public Process getProcess ( String processId ) { } public PagingResult < Task > getTasks ( Process process , ListingContext listingContext ) { } public Process refresh ( Process process ) { } @ Override public Map < String , Property > getVariables ( Process process ) { } public PagingResult < Document > getDocuments ( Task task , ListingContext listingContext ) { } public PagingResult < Document > getDocuments ( Process process , ListingContext listingContext ) { } @ SuppressWarnings ( "unchecked" ) protected PagingResult < Document > getItems ( String id , ListingContext listingContext ) { } public void addDocuments ( Task task , List < Document > items ) { } public void removeDocuments ( Task task , List < Document > items ) { } private void updateDocuments ( Task task , List < Document > items , boolean isAddition ) { } @ SuppressWarnings ( "unchecked" ) private PagingResult < Task > getTasks ( String link , ListingContext listingContext ) { } @ SuppressWarnings ( "unchecked" ) public Task getTask ( String taskIdentifier ) { } public PagingResult < Task > getTasks ( ListingContext listingContext ) { } public Task completeTask ( Task task , Map < String , Serializable > variables ) { } public Task refresh ( Task task ) { } public Task claimTask ( Task task ) { } public Task unclaimTask ( Task task ) { } public Task reassignTask ( Task task , Person assignee ) { } @ SuppressWarnings ( "unchecked" ) private Task changeAssignee ( String taskId , String assigneeId ) { Task updatedTask = null ; try { String link = OnPremiseUrlRegistry . getTaskUrl ( session , taskId ) ; UrlBuilder url = new UrlBuilder ( link ) ; JSONObject jobject = new JSONObject ( ) ; <START_BUG> jobject . put ( PROP_OWNER , assigneeId ) ; <END_BUG> final JsonDataWriter dataWriter = new JsonDataWriter ( jobject ) ; Response resp = put ( url , dataWriter . getContentType ( ) , null , new Output ( ) { public void write ( OutputStream out ) throws IOException { dataWriter . write ( out ) ; } } , WORKFLOW_GENERIC ) ; Map < String , Object > json = JsonUtils . parseObject ( resp . getStream ( ) , resp . getCharset ( ) ) ; if ( json != null ) { Map < String , Object > jo = ( ( Map < String , Object > ) ( json . get ( DATA_VALUE ) ) ) ; updatedTask = TaskImpl . parseJson ( jo ) ; } } catch ( Exception e ) { convertException ( e ) ; } return updatedTask ; } @ Override public Map < String , Property > getVariables ( Task task ) { } @ Override public Process updateVariables ( Process process , Map < String , Serializable > variables ) { } public Task updateVariables ( Task task , Map < String , Serializable > variables ) { } @ Override public UrlBuilder getProcessDiagramUrl ( String processId ) { } public ContentStream getProcessDiagram ( Process process ) { } public ContentStream getProcessDiagram ( String processId ) { } @ SuppressWarnings ( "unchecked" ) private String getPersonGUID ( Person person ) { } private static final String FORM_PREFIX = "prop_" ; private static final Map < String , String > ALFRESCO_TO_WORKFLOW = new HashMap < String , String > ( ) ; public static final Parcelable . Creator < OnPremiseWorkflowServiceImpl > CREATOR = new Parcelable . Creator < OnPremiseWorkflowServiceImpl > ( ) { public OnPremiseWorkflowServiceImpl createFromParcel ( Parcel in ) { } public OnPremiseWorkflowServiceImpl [ ] newArray ( int size ) { } } ; public OnPremiseWorkflowServiceImpl ( Parcel o ) { } }

Fix:
jobject . put ( encodeKey ( PROP_OWNER ) , assigneeId ) ;