LYNN – A judge ordered $500 cash bail for a city man who allegedly used a chain to beat a homeless man on Union Street Saturday morning.But the defendant’s attorney said his client was attacked.”You do understand there are witnesses?” Judge Stephen Abany asked in Lynn District Court Monday. “The witnesses are saying (the defendant) was striking him with the chain.”Jorge Luis Barbosa Jr., 44, of 75 Silsbee St., was arrested and charged with assault and battery with a dangerous weapon; at 8:25 a.m. Saturday.He pleaded not guilty to the charge Monday in Lynn District Court.Police reported responding to the area of Silsbee and Mt. Vernon streets early Saturday morning and meeting both the defendant and alleged victim.The alleged victim said he was sitting outside when Barbosa came across the street swinging a chain, Lynn Police Officer Benjamin Chez wrote in a report. The alleged victim said Barbosa hit him with the chain in the head, neck and chest, and police reported that the defendant had injuries consistent with such an alleged attack.Two witnesses each told police they saw Barbosa and the alleged victim arguing and then saw Barbosa swing a chain and hit the alleged victim, police reported. Police recovered the chain beneath the railroad bridge, where one of the witnesses told police Barbosa had thrown the weapon.Essex Assistant District Attorney Brendan Kelley requested Barbosa be held on $10,000 cash bail. He said Barbosa had a known alias and “a lengthy board of probation record” that included serving six years on a Superior Court breaking-and-entering case. Kelley said the commonwealth had not been able to contact the alleged victim, and there was no indication of any motive for the alleged attack.Defense attorney Jim O’Shea, however, said the alleged victim was in violation of his probation so he would not be contacting law-enforcement officials. Moreover, O’Shea said Barbosa said the alleged victim attacked him for money to buy drugs. Barbosa said he simply was able to get control of the chain in the course of the fight.O’Shea requested $250 cash bail.Abany noted that witnesses told a different story than Barbosa, but that this discrepancy could be debated at a later time. Abany ordered Barbosa held on $500 cash bail and to return to court Aug. 28.