Question: Who logged more hours in space, James P. Bagian or Edward Avedisian
Context: Rex Joseph Walheim (born October 10, 1962) is a United States Air Force officer, engineer and a NASA astronaut.  He has flown three space shuttle missions, STS-110, STS-122, and STS-135.  Rex has logged over 566 hours in space, including 36 hours and 23 minutes of spacewalk (EVA) time.  He was assigned as mission specialist and flight engineer on STS-135, the final space shuttle mission. James P. McAnulty (sometimes McNulty) is the U.S. Envoy to Somalia.  Since the U.S. officially recognized the government of Somalia and reopened its Mission there in 2013 after some 22 years, the United States has continued to be represented in Somalia by a special envoy based at its embassy in Nairobi, Kenya and titled a Special Representative rather than by a U.S. Ambassador.  The US appointed James P. McAnulty, a career foreign service officer (FSO), who joined the U.S. Foreign Service in 1983, as the Mission’s Special Representative to Somalia, and he was received as such by the Somalia government on August 26, 2013.  McAnulty was last prior to being appointed the U.S. Special Representative to Somalia, the U.S. Deputy Chief of Missions in Nigeria.  A graduate of the United States Air Force Academy at Colorado Springs, Colorado, James McAnulty served as a commissioned officer in the U.S. Air Force before joining the U.S. Foreign Service. Robert Louis "Bob" Behnken (born July 28, 1970 in Creve Coeur, Missouri) is a United States Air Force officer, NASA astronaut and former Chief of the Astronaut Office.  Behnken holds a Ph.D in Mechanical Engineering and holds the rank of Colonel in the U.S. Air Force.  Col. Behnken has logged over 1,000 flight hours in 25 different aircraft.  He flew aboard Space Shuttle missions STS-123 and STS-130 as a Mission Specialist, accumulating over 378 hours in space, including 19 hours of spacewalk time.  Behnken was also assigned as Mission Specialist 1 to the STS-400 rescue mission.  He is married to fellow astronaut K. Megan McArthur. James Craig Adamson (born March 3, 1946) is a former NASA astronaut and retired Colonel of the United States Army.  He is married with 3 children.  James Adamson flew on two missions, STS-28 and STS-43, and completed 263 orbits and 334 hours in space.  After retiring from NASA, he was recruited by Allied Signal (later merged with Honeywell) where he retired in 2001.  Adamson has logged over 3,000 hours in over 30 different types of helicopters and airplanes. James Philip Bagian, MD, PE (born 22 February 1952), is an American physician, engineer, and former NASA astronaut of Armenian descent.  During his career as an astronaut, he logged 337 hours of space-flight, over two missions, STS-29 (in 1989) and STS-40 (in 1991).  After leaving NASA in 1995, Bagian was elected as a member of both the National Academy of Engineering and of the Institute of Medicine.  Bagian is currently the Director of the Center for Healthcare Engineering and Patient Safety at the University of Michigan. Michael Richard Uram "Rich" Clifford (born October 13, 1952), is a former United States Army officer and NASA astronaut.  Clifford is considered a Master Army Aviator and has logged over 3,400 hours flying in a wide variety of fixed and rotary winged aircraft.  Clifford retired from the U.S. Army at the rank of lieutenant colonel.  He has logged over 12 hours of spacewalk time over three Space Shuttle missions.  He is also one of the first people to conduct a spacewalk while docked to an orbiting space station.  The spacewalk was conducted during STS-76, while docked at the Russian space station Mir. James P. Wilmot (1911–1980) was a pioneer aviation executive, landowner, philanthropist and horse breeder who served as Finance Chairman of the Democratic National Committee.  The James P. Wilmot Cancer Center at the University of Rochester is named in his honor. Edward Avedisian (June 15, 1936, Lowell, Massachusetts – August 17, 2007, Philmont, New York) was an American abstract painter who came into prominence during the 1960s.  His work was initially associated with Color field painting and in the late 1960s with Lyrical Abstraction. Robert Clyde "Bob" Springer (born May 21, 1942) is a retired American astronaut and test pilot who flew as a Mission Specialist on two NASA Space Shuttle missions in 1989 and 1990.  A decorated aviator in the United States Marine Corps, Springer also flew more than 500 combat sorties during the Vietnam War.  He has logged over 237 hours in space and 4,500 hours flying time, including 3,500 hours in jet aircraft. Steven Ray Swanson (born December 3, 1960 in Syracuse, New York) is an American engineer and a retired NASA astronaut.  He is married and has three children.  He has received numerous awards and honors.  These include the NASA Exceptional Achievement Medal and the JSC Certificate of Accommodation and many others.  Prior to becoming a NASA astronaut, Swanson worked for GTE in Phoenix, Arizona, as a software engineer.  Swanson has flown 2 shuttle flights, STS-117 and STS-119.  He has logged over 643 hours in space and completed 4 spacewalks totaling 26 hours and 14 minutes.  Swanson has also served in other roles at NASA, such as a CAPCOM for both International Space Station and Space Shuttle missions.
Answer: James Philip Bagian