While the Enterprise is visiting Starbase 173 for routine maintenance, cyberneticist Commander Bruce Maddox comes aboard to pay a visit to Lt. Commander Data, wishing to better understand Data’s positronic brain. It quickly becomes clear that Maddox has an ulterior motive of transferring the contents of Data’s memory to the starbase mainframe computer and shutting down and disassembling him to learn how to recreate the technology. Though Maddox promises to restore Data following his analysis and assures him his memories will be intact, Data is concerned that the procedure is riskier than Maddox is letting on, and argues that while the factual details of his memories will be preserved, the nuances of his experiences may not be. Data refuses, causing Maddox to turn to Starfleet to order him to comply. Captain Jean-Luc Picard supports Data’s position, and is advised that the only way for Data to evade the order is to resign from Starfleet, which Data does. Maddox, however, argues that Data is Starfleet property, not a sentient being, and as such does not have the right to choose to resign.
The presiding Judge Advocate General for the sector, Captain Philippa Louvois, rules for Maddox, so Picard requests a formal hearing to challenge the ruling. Louvois agrees, and allows Picard to represent Data during the proceedings. However, due to a shortage of qualified legal staff, Louvois compels Commander William Riker to represent Maddox. Riker’s arguments portray Data as merely a machine constructed by man, and no more than the sum of his parts. In a striking final demonstration, Riker activates Data’s “off switch”, causing the android to shut down. Picard calls for a recess, during which he meets in Ten Forward with Guinan, who suggests that regardless of whether Data is a machine or not, Maddox’s plans for reproducing him would lead to a situation tantamount to slavery. Picard uses this to defuse Riker’s arguments, and turns the discussion to metaphysical matters of Data’s sentience. Picard points out that Data meets two of the three criteria that Maddox uses to define sentient life. Data is intelligent and self-aware, and Picard asks anyone in the court to show a means of measuring consciousness.
With no one able to answer this, Louvois acknowledges that neither she nor anyone else can measure this in Data and rules that he has the right to choose. Upon the court’s ruling, Data formally refuses to undergo the procedure. After the hearing, Data clearly holds no ill will against Maddox; Data reminds the scientist that his work remains intriguing, and offers to assist in further research after Maddox has had more time to study and perfect his techniques. Maddox, for his part, refers to Data for the first time as “he” rather than “it”. (Source: Wikipedia)