Samuel T . Cogley Samuel T . Cogley was a male Human civilian in the 23rd century . In 2267 , he was an attorney - at - law at Starbase 11 . That same year , Cogley defended James T . Kirk in a court martial , at the recommendation of Lieutenant Areel Shaw , after fellow Starfleet officer Lieutenant Commander Finney was apparently murder ed . Cogley was strong - willed and old - fashioned , preferring paper book s to computer s . He had an extensive collection of books , ranging from the Hebrew Bible to the work of the Tribunal of Alpha III in its original language . He claimed never to use the computer in his office . After Lieutenant Shaw recommended him to Kirk , Cogley moved into Kirk ' s room at the starbase , bringing many volumes of law books with him . Cogley ' s courtroom style was impassioned and dramatic . Shaw said Cogley was " well known for his theatrics . " Kirk was being tried for culpable negligence leading to the death of Ben Finney . The had been caught in an ion storm , and during the storm , Kirk had ejected an ion pod , with Finney apparently inside it . In his sworn account of the event , Kirk stated that he had ejected the pod several seconds after going to red alert . The computer log indicated that he had ejected the pod " before " going to red alert , while the ship was still on yellow alert . After Shaw , prosecuting at the court martial , presented a visual record of the log confirming the computer ' s account , Cogley privately asked Kirk if he wished to change his plea , claiming he could get Kirk off . Kirk , however , was certain , and decided to go forward with his plea of not guilty . Cogley ' s suspicions were aroused when he and Kirk received a visit from Finney ' s daughter , Jame . She had previously accused Kirk of murdering her father , but during this visit , she begged Cogley to help him , saying she did not blame Kirk for her father ' s death . Just before the trial was due to conclude – and after Cogley had rested his case – First Officer Spock entered the courtroom and informed Cogley that the " Enterprise " computer had shown signs of tampering . ( Specifically , Spock had been able to beat it in three - dimensional chess five times running , which should have been impossible , as Spock programmed it to the same level as his abilities , meaning that the best that could be hoped for was a stalemate . ) Cogley gave an impassioned plea to the court about Human rights , invoking the Bible , the Code of Hammurabi and of Justinian , the Magna Carta , the United States Constitution , the Fundamental Declarations of the Martian colonies , and the Statutes of Alpha III . He held that the court had denied Kirk the right to face his accuser , the " Enterprise " computer , and in so doing had elevated the machine above the Human . The court concurred , and reconvened aboard the " Enterprise " . While Doctor McCoy used a white - sound device to prove that Finney was still alive and aboard the " Enterprise " , Cogley returned to the surface and brought Jame Finney on board , believing that the presence of Finney ' s daughter might make Finney himself easier to handle . Kirk apprehended Finney , and the charges against Kirk were dismissed . After Kirk was acquitted , Cogley sent him a book as a farewell present . He planned to defend Finney against the charges related to his plot against Kirk , and was confident of an acquittal . ( ) Background info . Cogley was played by actor Elisha Cook , Jr . In the stage directions from the final draft and the revised final draft of the " Court Martial " script , Cogley was initially described as , " " A complete eccentric [ . . . ] Very old , but very spry . " " Later in the stage directions from Cogley ' s first scene , he was referred to ( in both drafts ) as a " headstrong old man . " Director Marc Daniels disliked directing Elisha Cook , Jr . ' s performance as Cogley . " " [ He ] wasn ' t very good with his lines [ . . . ] He had a terrible time with that , " " Daniels critiqued . Despite regarding Cook as " a fine actor , " Daniels also felt that his annoyance over Cook ' s delivery of Cogley ' s lines , which frequently required the actor to be filmed saying single lines of dialogue because he couldn ' t remember two , ruined the experience of directing the whole episode . ( " " , p . 37 ) Apocrypha . Cogley was the protagonist of the Pocket Books novel " The Case of the Colonist ' s Corpse " , and was a major character in the novel " Crisis on Centaurus " . His middle name was given as Thomas in " Who ' s Who in Star Trek 1 " . According to the DC Comics TOS comics , he and Shaw became friends after the events of the episode , eventually marrying and starting a law firm together . An alternate reality version of appears in the " " comic series .