nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ActionNew extends UMLAction { public static ActionNew SINGLETON = new ActionNew ( ) ; protected ActionNew ( ) { } public void actionPerformed ( ActionEvent e ) { ProjectBrowser pb = ProjectBrowser . getInstance ( ) ; Project p = ProjectManager . getManager ( ) . getCurrentProject ( ) ; if ( ( p != null ) && ( p . needsSave ( ) ) ) { <START_BUG> String t = MessageFormat . format ( Argo . localize ( "Actions" , "template.new_project.save_changes_to" ) , new Object [ ] { p . getName ( ) } ) ; <END_BUG> int response = JOptionPane . showConfirmDialog ( pb , t , t , JOptionPane . YES_NO_CANCEL_OPTION ) ; if ( response == ( JOptionPane . CANCEL_OPTION ) ) return ; if ( response == ( JOptionPane . YES_OPTION ) ) { boolean safe = false ; if ( ActionSaveProject . SINGLETON . shouldBeEnabled ( ) ) { safe = ActionSaveProject . SINGLETON . trySave ( true ) ; } if ( ! safe ) { safe = ActionSaveProjectAs . SINGLETON . trySave ( false ) ; } if ( ! safe ) return ; } } Window [ ] windows = ProjectBrowser . getInstance ( ) . getOwnedWindows ( ) ; for ( int i = 0 ; i < ( windows . length ) ; i ++ ) { windows [ i ] . dispose ( ) ; } Designer . disableCritiquing ( ) ; Designer . clearCritiquing ( ) ; p = ProjectManager . getManager ( ) . makeEmptyProject ( ) ; FindDialog . getInstance ( ) . doClearTabs ( ) ; FindDialog . getInstance ( ) . doResetFields ( ) ; ProjectBrowser . getInstance ( ) . setTarget ( p . getDiagrams ( ) . toArray ( ) [ 0 ] ) ; Designer . enableCritiquing ( ) ; } }

Fix:
String t = MessageFormat . format ( Argo . localize ( "Actions" , "optionpane.new-project-save-changes-to" ) , new Object [ ] { p . getName ( ) } ) ;
Buggy code:
public class Ramp { double targetValue ; final double ratio ; public Ramp ( double ratio ) { } public double set ( double newValue ) { } public double get ( ) { <START_BUG> return targetValue ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return ( ( Math . sin ( ( ( ( targetValue ) - 0.5 ) // ( Math . PI ) ) ) ) + 1 ) // 2 ;
Buggy code:
public class EJB3SubsystemXMLPersister implements XMLElementWriter < SubsystemMarshallingContext > { public static final EJB3SubsystemXMLPersister INSTANCE = new EJB3SubsystemXMLPersister ( ) ; @ Override public void writeContent ( final XMLExtendedStreamWriter writer , final SubsystemMarshallingContext context ) throws XMLStreamException { } protected void writeElements ( final XMLExtendedStreamWriter writer , final SubsystemMarshallingContext context ) throws XMLStreamException { } private void writeIIOP ( final XMLExtendedStreamWriter writer , final ModelNode model ) throws XMLStreamException { } private void writeThreadPools ( final XMLExtendedStreamWriter writer , final ModelNode threadPoolsModel ) throws XMLStreamException { for ( Property threadPool : threadPoolsModel . asPropertyList ( ) ) { <START_BUG> ThreadsParser . getInstance ( ) . writeUnboundedQueueThreadPool ( writer , threadPool . getValue ( ) , THREAD_POOL . getLocalName ( ) , true ) ; <END_BUG> } } protected void writeRemote ( final XMLExtendedStreamWriter writer , final ModelNode model ) throws XMLStreamException { } private void writeAsync ( final XMLExtendedStreamWriter writer , final ModelNode model ) throws XMLStreamException { } private void writeMDB ( final XMLExtendedStreamWriter writer , final ModelNode mdbModelNode ) throws XMLStreamException { } private void writeEntityBean ( final XMLExtendedStreamWriter writer , final ModelNode entityModelNode ) throws XMLStreamException { } private void writeSingletonBean ( final XMLExtendedStreamWriter writer , final ModelNode singletonBeanModel ) throws XMLStreamException { } private void writeStatefulBean ( final XMLExtendedStreamWriter writer , final ModelNode statefulBeanModel ) throws XMLStreamException { } private void writeDefaultSLSBPool ( final XMLExtendedStreamWriter writer , final ModelNode model ) throws XMLStreamException { } private void writeBeanInstancePools ( final XMLExtendedStreamWriter writer , final ModelNode beanInstancePoolModelNode ) throws XMLStreamException { } private void writeStrictMaxPoolConfig ( final XMLExtendedStreamWriter writer , final Property strictMaxPoolModel ) throws XMLStreamException { } private void writeCaches ( XMLExtendedStreamWriter writer , ModelNode model ) throws XMLStreamException { } private void writeClusterPassivationStores ( XMLExtendedStreamWriter writer , ModelNode model ) throws XMLStreamException { } private void writeFilePassivationStores ( XMLExtendedStreamWriter writer , ModelNode model ) throws XMLStreamException { } private void writeTimerService ( final XMLExtendedStreamWriter writer , final ModelNode timerServiceModel ) throws XMLStreamException { } private void writeChannelCreationOptions ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } }

Fix:
ThreadsParser . getInstance ( ) . writeUnboundedQueueThreadPool ( writer , threadPool , THREAD_POOL . getLocalName ( ) , true ) ;
Buggy code:
public class ScriptSelector extends BaseSelector { private boolean initialized = false ; private ScriptRunner runner = new ScriptRunner ( ) ; private File basedir ; private String filename ; private File file ; private boolean selected ; public void setLanguage ( String language ) { } private void init ( ) throws BuildException { } public void setSrc ( File file ) { } public void addText ( String text ) { } public boolean isSelected ( File basedir , String filename , File file ) { init ( ) ; setSelected ( true ) ; this . file = file ; this . basedir = basedir ; this . filename = filename ; runner . addBean ( "basedir" , basedir ) ; runner . addBean ( "filename" , filename ) ; runner . addBean ( "file" , file ) ; <START_BUG> runner . executeScript ( "<ANT-Selector>" ) ; <END_BUG> return isSelected ( ) ; } public File getBasedir ( ) { } public String getFilename ( ) { } public File getFile ( ) { } public boolean isSelected ( ) { } public void setSelected ( boolean selected ) { } }

Fix:
runner . executeScript ( "ant_selector" ) ;
Buggy code:
public class dig { static Name name = null ; static short type = Type . A ; static short _class = DClass . IN ; static void usage ( ) { } static void doQuery ( Message query , Resolver res ) throws IOException { } static void doAXFR ( Message query , Resolver res ) throws IOException { } public static void main ( String [ ] argv ) throws IOException { String server ; int arg ; Message query ; Record rec ; Resolver res = null ; if ( ( argv . length ) < 1 ) { dig . usage ( ) ; } try { arg = 0 ; if ( argv [ arg ] . startsWith ( "@" ) ) { server = argv [ ( arg ++ ) ] . substring ( 1 ) ; res = new SimpleResolver ( server ) ; } else res = new ExtendedResolver ( ) ; String nameString = argv [ ( arg ++ ) ] ; if ( nameString . equals ( "-x" ) ) { dig . name = new Name ( dns . inaddrString ( argv [ ( arg ++ ) ] ) ) ; dig . type = Type . PTR ; dig . _class = DClass . IN ; } else { dig . name = new Name ( nameString ) ; dig . type = Type . value ( argv [ arg ] ) ; if ( ( dig . type ) < 0 ) dig . type = Type . A ; else arg ++ ; dig . _class = DClass . value ( argv [ arg ] ) ; if ( ( dig . _class ) < 0 ) dig . _class = DClass . IN ; else arg ++ ; } while ( ( argv [ arg ] . startsWith ( "-" ) ) && ( ( argv [ arg ] . length ( ) ) > 1 ) ) { switch ( argv [ arg ] . charAt ( 1 ) ) { case 'p' : String portStr ; int port ; if ( ( argv [ arg ] . length ( ) ) > 2 ) portStr = argv [ arg ] . substring ( 2 ) ; else portStr = argv [ ( ++ arg ) ] ; port = Integer . parseInt ( portStr ) ; if ( ( port < 0 ) || ( port > 65536 ) ) { System . out . println ( "Invalid<seq2seq4repair_space>port" ) ; return ; } res . setPort ( port ) ; break ; case 'k' : String key ; if ( ( argv [ arg ] . length ( ) ) > 2 ) key = argv [ arg ] . substring ( 2 ) ; else key = argv [ ( ++ arg ) ] ; int index = key . indexOf ( '//' ) ; if ( index < 0 ) res . setTSIGKey ( key ) ; else res . setTSIGKey ( key . substring ( 0 , index ) , key . substring ( ( index + 1 ) ) ) ; break ; case 't' : res . setTCP ( true ) ; break ; case 'i' : res . setIgnoreTruncation ( true ) ; break ; case 'e' : String ednsStr ; int edns ; if ( ( argv [ arg ] . length ( ) ) > 2 ) ednsStr = argv [ arg ] . substring ( 2 ) ; else ednsStr = argv [ ( ++ arg ) ] ; edns = Integer . parseInt ( ednsStr ) ; if ( ( edns < 0 ) || ( edns > 1 ) ) { <START_BUG> System . out . println ( ( ( "Unsupported<seq2seq4repair_space>" + "EDNS<seq2seq4repair_space>level<seq2seq4repair_space>" ) + edns ) ) ; <END_BUG> return ; } res . setEDNS ( edns ) ; break ; default : System . out . print ( "Invalid<seq2seq4repair_space>option" ) ; System . out . println ( argv [ arg ] ) ; } arg ++ ; } } catch ( ArrayIndexOutOfBoundsException e ) { if ( ( dig . name ) == null ) dig . usage ( ) ; } rec = Record . newRecord ( dig . name , dig . type , dig . _class ) ; query = Message . newQuery ( rec ) ; if ( ( dig . type ) == ( Type . AXFR ) ) dig . doAXFR ( query , res ) ; else dig . doQuery ( query , res ) ; } }

Fix:
System . out . println ( ( ( "Unsupported<seq2seq4repair_space>" + "EDNS<seq2seq4repair_space>level:<seq2seq4repair_space>" ) + edns ) ) ;
Buggy code:
class GroupTab extends Tab { Button titleButton ; Group group1 ; Group groupGroup ; Button shadowEtchedInButton ; Button shadowEtchedOutButton ; Button shadowInButton ; Button shadowOutButton ; Button shadowNoneButton ; GroupTab ( ControlExample instance ) { } void createOtherGroup ( ) { } void createExampleGroup ( ) { super . createExampleGroup ( ) ; groupGroup = new Group ( exampleGroup , SWT . NONE ) ; groupGroup . setLayout ( new GridLayout ( ) ) ; <START_BUG> groupGroup . setLayoutData ( new GridData ( ( ( ( GridData . GRAB_HORIZONTAL ) | ( GridData . HORIZONTAL_ALIGN_FILL ) ) | ( GridData . VERTICAL_ALIGN_FILL ) ) ) ) ; <END_BUG> groupGroup . setText ( "Group" ) ; } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } Control [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { } String getTabText ( ) { } void setTitleText ( ) { } void setExampleWidgetState ( ) { } }

Fix:
groupGroup . setLayoutData ( new GridData ( SWT . FILL , SWT . FILL , true , true ) ) ;
Buggy code:
public class ModuleRegisterProcessor implements DeploymentUnitProcessor { private final ModuleRegistrationTracker registrationTracker ; public ModuleRegisterProcessor ( ModuleRegistrationTracker tracker ) { } @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit depUnit = phaseContext . getDeploymentUnit ( ) ; if ( ( DeploymentTypeMarker . isType ( EAR , depUnit ) ) || ( DeploymentTypeMarker . isType ( WAR , depUnit ) ) ) return ; <START_BUG> if ( depUnit . hasAttachment ( BUNDLE_KEY ) ) <END_BUG> return ; final Module module = depUnit . getAttachment ( MODULE ) ; final ModuleSpecification moduleSpecification = depUnit . getAttachment ( MODULE_SPECIFICATION ) ; if ( ( module == null ) || ( moduleSpecification . isPrivateModule ( ) ) ) return ; OSGiMetaData metadata = depUnit . getAttachment ( OSGI_METADATA_KEY ) ; registrationTracker . registerModule ( module , metadata ) ; } @ Override public void undeploy ( final DeploymentUnit depUnit ) { } }

Fix:
if ( depUnit . hasAttachment ( BUNDLE_REVISION_KEY ) )
Buggy code:
public enum EnumAspect { BLOOD , BREATH , DOOM , HEART , HOPE , LIFE , LIGHT , MIND , RAGE , SPACE , TIME , VOID ; public static EnumAspect getRandomAspect ( EnumSet < EnumAspect > unavailableAspects , Random rand ) { if ( unavailableAspects == null ) unavailableAspects = EnumSet . noneOf ( EnumAspect . class ) ; if ( ! ( ( unavailableAspects . size ( ) ) < 12 ) ) return null ; int aspectInt = rand . nextInt ( ( 12 - ( unavailableAspects . size ( ) ) ) ) ; EnumAspect [ ] list = EnumAspect . values ( ) ; for ( int i = 0 ; i < ( list . length ) ; i ++ ) if ( ! ( unavailableAspects . contains ( list [ i ] ) ) ) { aspectInt -- ; if ( aspectInt == ( - 1 ) ) <START_BUG> return EnumAspect . HOPE ; <END_BUG> } return null ; } @ Override public String toString ( ) { } public String getDisplayName ( ) { } }

Fix:
return list [ i ] ;
Buggy code:
class XSDWildcardTraverser extends XSDAbstractTraverser { XSDWildcardTraverser ( XSDHandler handler , XSAttributeChecker gAttrCheck ) { } XSParticleDecl traverseAny ( Element elmNode , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { } XSWildcardDecl traverseAnyAttribute ( Element elmNode , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { } XSWildcardDecl traverseWildcardDecl ( Element elmNode , Object [ ] attrValues , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { XSWildcardDecl wildcard = new XSWildcardDecl ( ) ; XInt namespaceTypeAttr = ( ( XInt ) ( attrValues [ XSAttributeChecker . ATTIDX_NAMESPACE ] ) ) ; wildcard . fType = namespaceTypeAttr . shortValue ( ) ; wildcard . fNamespaceList = ( ( String [ ] ) ( attrValues [ XSAttributeChecker . ATTIDX_NAMESPACE_LIST ] ) ) ; XInt processContentsAttr = ( ( XInt ) ( attrValues [ XSAttributeChecker . ATTIDX_PROCESSCONTENTS ] ) ) ; wildcard . fProcessContents = processContentsAttr . shortValue ( ) ; Element child = DOMUtil . getFirstChildElement ( elmNode ) ; if ( child != null ) { if ( DOMUtil . getLocalName ( child ) . equals ( ELT_ANNOTATION ) ) { traverseAnnotationDecl ( child , attrValues , false , schemaDoc ) ; child = DOMUtil . getNextSiblingElement ( child ) ; } if ( child != null ) { <START_BUG> reportSchemaError ( "s4s-elt-must-match" , new Object [ ] { "wildcard" , "(annotation?)" } , elmNode ) ; <END_BUG> } } return wildcard ; } }

Fix:
reportSchemaError ( "s4s-elt-must-match.1" , new Object [ ] { "wildcard" , "(annotation?)" , DOMUtil . getLocalName ( child ) } , elmNode ) ;
Buggy code:
public class RosterSharedObject extends AbstractSharedObject { CollabRosterView view ; public RosterSharedObject ( CollabRosterView view ) { } protected boolean handleSharedObjectMsg ( SharedObjectMsg msg ) { } public void sendPrivateMessageTo ( ID targetID , String fromName , String message ) { } protected void handlePrivateMessage ( final String fromName , final String message ) { } public void sendGroupSizeMessageTo ( ID targetID , String fromName , String groupName , Integer activeSize , Integer totalSize ) { } protected void handleRosterSizeMessage ( final String fromName , final String groupName , final Integer activeSize , final Integer totalSize ) { Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { String from = ( fromName == null ) ? "<nobody>" : fromName ; <START_BUG> MessageDialog . openInformation ( Display . getCurrent ( ) . getActiveShell ( ) , ( "ECF<seq2seq4repair_space>Roster<seq2seq4repair_space>Size<seq2seq4repair_space>Message<seq2seq4repair_space>from<seq2seq4repair_space>" + from ) , ( ( ( ( ( "For<seq2seq4repair_space>Group<seq2seq4repair_space>'" + groupName ) + "'<seq2seq4repair_space>active=" ) + activeSize ) + "<seq2seq4repair_space>and<seq2seq4repair_space>total=" ) + totalSize ) ) ; <END_BUG> } } ) ; } public void sendShowViewWithID ( ID targetID , String viewID , String secID , Integer mode ) { } public void sendShowView ( ID targetID , String viewID ) { } protected void handleShowViewWithID ( final String viewID , final String secID , final Integer mode ) { } protected void handleShowView ( final String viewID ) { } }

Fix:
MessageDialog . openInformation ( Display . getCurrent ( ) . getActiveShell ( ) , ( "ECF<seq2seq4repair_space>Roster<seq2seq4repair_space>Size<seq2seq4repair_space>Message<seq2seq4repair_space>from<seq2seq4repair_space>" + from ) , ( ( ( ( ( ( ( from + "'s<seq2seq4repair_space>'" ) + groupName ) + "'<seq2seq4repair_space>group<seq2seq4repair_space>has<seq2seq4repair_space>" ) + activeSize ) + "<seq2seq4repair_space>active<seq2seq4repair_space>and<seq2seq4repair_space>" ) + totalSize ) + "<seq2seq4repair_space>total<seq2seq4repair_space>group<seq2seq4repair_space>members" ) ) ;
Buggy code:
public final class TarOutputStream extends FilterOutputStream { public static final int LONGFILE_ERROR = 0 ; public static final int LONGFILE_TRUNCATE = 1 ; public static final int LONGFILE_GNU = 2 ; private int m_longFileMode = TarOutputStream . LONGFILE_ERROR ; private byte [ ] m_assemBuf ; private int m_assemLen ; private TarBuffer m_buffer ; private long m_currBytes ; private long m_currSize ; private byte [ ] m_oneBuf ; private byte [ ] m_recordBuf ; public TarOutputStream ( final OutputStream output ) { } public TarOutputStream ( final OutputStream output , final int blockSize ) { } public TarOutputStream ( final OutputStream output , final int blockSize , final int recordSize ) { } public void setBufferDebug ( boolean debug ) { } public void setLongFileMode ( final int longFileMode ) { } public int getRecordSize ( ) { } public void close ( ) throws IOException { } public void closeEntry ( ) throws IOException { } public void finish ( ) throws IOException { } public void putNextEntry ( final TarEntry entry ) throws IOException { } void copyEntryContents ( final InputStream input ) throws IOException { } public void write ( final int data ) throws IOException { } public void write ( final byte [ ] buffer ) throws IOException { } public void write ( final byte [ ] buffer , final int offset , final int count ) throws IOException { int position = offset ; int numToWrite = count ; if ( ( ( m_currBytes ) + numToWrite ) > ( m_currSize ) ) { final String message = ( ( ( "request<seq2seq4repair_space>to<seq2seq4repair_space>write<seq2seq4repair_space>'" + numToWrite ) + "'<seq2seq4repair_space>bytes<seq2seq4repair_space>exceeds<seq2seq4repair_space>size<seq2seq4repair_space>in<seq2seq4repair_space>header<seq2seq4repair_space>of<seq2seq4repair_space>'" ) + ( m_currSize ) ) + "'<seq2seq4repair_space>bytes" ; throw new IOException ( message ) ; } if ( ( m_assemLen ) > 0 ) { if ( ( ( m_assemLen ) + numToWrite ) >= ( m_recordBuf . length ) ) { final int length = ( m_recordBuf . length ) - ( m_assemLen ) ; System . arraycopy ( m_assemBuf , 0 , m_recordBuf , 0 , m_assemLen ) ; System . arraycopy ( buffer , position , m_recordBuf , m_assemLen , length ) ; m_buffer . writeRecord ( m_recordBuf ) ; m_currBytes += m_recordBuf . length ; position += length ; numToWrite -= length ; m_assemLen = 0 ; } else { System . arraycopy ( buffer , position , m_assemBuf , m_assemLen , numToWrite ) ; position += numToWrite ; m_assemLen += numToWrite ; <START_BUG> numToWrite -= numToWrite ; <END_BUG> } } while ( numToWrite > 0 ) { if ( numToWrite < ( m_recordBuf . length ) ) { System . arraycopy ( buffer , position , m_assemBuf , m_assemLen , numToWrite ) ; m_assemLen += numToWrite ; break ; } m_buffer . writeRecord ( buffer , position ) ; int num = m_recordBuf . length ; m_currBytes += num ; numToWrite -= num ; position += num ; } } private void writeEOFRecord ( ) throws IOException { } }

Fix:
numToWrite = 0 ;
Buggy code:
public final class MutableCommandHandlerService extends AbstractCommandHandlerService implements IMutableCommandHandlerService { private Map handlersByCommandId = new HashMap ( ) ; public MutableCommandHandlerService ( ) { } public Map getHandlersByCommandId ( ) { } public void setHandlersByCommandId ( Map handlersByCommandId ) { <START_BUG> handlersByCommandId = Util . safeCopy ( handlersByCommandId , String . class , IHandler . class ) ; <END_BUG> boolean commandHandlerServiceChanged = false ; Map commandEventsByCommandId = null ; if ( ! ( this . handlersByCommandId . equals ( handlersByCommandId ) ) ) { this . handlersByCommandId = handlersByCommandId ; fireCommandHandlerServiceChanged ( new CommandHandlerServiceEvent ( this , true ) ) ; } } }

Fix:
handlersByCommandId = Util . safeCopy ( handlersByCommandId , String . class , IHandler . class , false , true ) ;
Buggy code:
public class Logger { public static void saveData ( Map < String , LocalServer > servers , String filename ) { } public static List < LocalServer > loadData ( String filename ) { } public static void writeToLog ( String s ) { } public static void writeToErr ( Exception e , String message ) { System . err . print ( ( ( "[" + ( LocalTime . now ( ) . toString ( ) ) ) + "]<seq2seq4repair_space>[StreamBot]<seq2seq4repair_space>" ) ) ; e . printStackTrace ( ) ; if ( ! ( message . isEmpty ( ) ) ) <START_BUG> System . err . print ( ( ( ( "[" + ( LocalTime . now ( ) . toString ( ) ) ) + "]<seq2seq4repair_space>[StreamBot]<seq2seq4repair_space>" ) + message ) ) ; <END_BUG> } }

Fix:
System . err . println ( ( ( ( "[" + ( LocalTime . now ( ) . toString ( ) ) ) + "]<seq2seq4repair_space>[StreamBot]<seq2seq4repair_space>" ) + message ) ) ;
Buggy code:
public class SearchBar extends JPanel { public SearchBar ( final View view , boolean temp ) { } public HistoryTextField getField ( ) { } public void setHyperSearch ( boolean hyperSearch ) { } public void update ( ) { } public void propertiesChanged ( ) { } private View view ; private HistoryTextField find ; private JCheckBox ignoreCase ; private JCheckBox regexp ; private JCheckBox hyperSearch ; private Timer timer ; private RolloverButton close ; private int searchStart ; private boolean searchReverse ; private boolean temp ; private void find ( boolean reverse ) { timer . stop ( ) ; String text = find . getText ( ) ; if ( ( text . length ( ) ) == 0 ) { jEdit . setBooleanProperty ( "search.hypersearch.toggle" , hyperSearch . isSelected ( ) ) ; <START_BUG> new SearchDialog ( view , null ) ; <END_BUG> } else if ( hyperSearch . isSelected ( ) ) { if ( temp ) { view . removeToolBar ( this ) ; } else find . setText ( null ) ; SearchAndReplace . setSearchString ( text ) ; SearchAndReplace . setSearchFileSet ( new CurrentBufferSet ( ) ) ; SearchAndReplace . hyperSearch ( view ) ; } else { int start ; JEditTextArea textArea = view . getTextArea ( ) ; Selection s = textArea . getSelectionAtOffset ( textArea . getCaretPosition ( ) ) ; if ( s == null ) start = textArea . getCaretPosition ( ) ; else if ( reverse ) start = s . getStart ( ) ; else start = s . getEnd ( ) ; if ( ! ( incrementalSearch ( start , reverse ) ) ) { if ( ! ( incrementalSearch ( ( reverse ? view . getBuffer ( ) . getLength ( ) : 0 ) , reverse ) ) ) { view . getStatus ( ) . setMessageAndClear ( jEdit . getProperty ( "view.status.search-not-found" ) ) ; } else { view . getStatus ( ) . setMessageAndClear ( jEdit . getProperty ( "view.status.auto-wrap" ) ) ; if ( jEdit . getBooleanProperty ( "search.beepOnSearchAutoWrap" ) ) { getToolkit ( ) . beep ( ) ; } } } } } private boolean incrementalSearch ( int start , boolean reverse ) { } private void timerIncrementalSearch ( int start , boolean reverse ) { } class ActionHandler implements ActionListener { public void actionPerformed ( ActionEvent evt ) { } } class DocumentHandler implements DocumentListener { public void insertUpdate ( DocumentEvent evt ) { } public void removeUpdate ( DocumentEvent evt ) { } public void changedUpdate ( DocumentEvent evt ) { } } class KeyHandler extends KeyAdapter { public void keyPressed ( KeyEvent evt ) { } } }

Fix:
SearchDialog . showSearchDialog ( view , null , CURRENT_BUFFER ) ;
Buggy code:
public class ResponseWrapperAttributeInitializer extends RequestWrapperAttributeInitializer { @ Override protected String getClassName ( IType type , IMethod method ) { try { String methodName = ( method . getElementName ( ) ) + ( RESPONSE_SUFFIX ) ; <START_BUG> return ( ( ( getPackageName ( type ) ) + ( methodName . substring ( 0 , 1 ) . toUpperCase ( Locale . getDefault ( ) ) ) ) + ( methodName . substring ( 1 ) ) ) + ( AnnotationUtils . accountForOverloadedMethods ( type , method ) ) ; <END_BUG> } catch ( JavaModelException jme ) { JAXWSCorePlugin . log ( jme . getStatus ( ) ) ; } return "" ; } @ Override protected String getLocalName ( IType type , IMethod method ) { } }

Fix:
return ( ( ( getPackageName ( type ) ) + ( methodName . substring ( 0 , 1 ) . toUpperCase ( ) ) ) + ( methodName . substring ( 1 ) ) ) + ( AnnotationUtils . accountForOverloadedMethods ( type , method ) ) ;
Buggy code:
public class PossibleMatch implements ICompilationUnit { public static final String NO_SOURCE_FILE_NAME = "NO<seq2seq4repair_space>SOURCE<seq2seq4repair_space>FILE<seq2seq4repair_space>NAME" ; public IResource resource ; public Openable openable ; public MatchingNodeSet nodeSet ; public char [ ] [ ] compoundName ; CompilationUnitDeclaration parsedUnit ; public SearchDocument document ; private String sourceFileName ; private char [ ] source ; public PossibleMatch ( MatchLocator locator , IResource resource , Openable openable , SearchDocument document , boolean mustResolve ) { } public void cleanUp ( ) { } public boolean equals ( Object obj ) { } public char [ ] getContents ( ) { if ( ( this . source ) != null ) return this . source ; if ( ( this . openable ) instanceof ClassFile ) { String fileName = getSourceFileName ( ) ; if ( fileName == ( PossibleMatch . NO_SOURCE_FILE_NAME ) ) <START_BUG> return null ; <END_BUG> SourceMapper sourceMapper = this . openable . getSourceMapper ( ) ; IType type = ( ( ClassFile ) ( this . openable ) ) . getType ( ) ; return this . source = sourceMapper . findSource ( type , fileName ) ; } return this . source = this . document . getCharContents ( ) ; } public char [ ] getFileName ( ) { } public char [ ] getMainTypeName ( ) { } public char [ ] [ ] getPackageName ( ) { } private char [ ] getQualifiedName ( ) { } private String getSourceFileName ( ) { } public int hashCode ( ) { } public String toString ( ) { } }

Fix:
return CharOperation . NO_CHAR ;
Buggy code:
public class ClearTable extends HttpServlet { private static final long serialVersionUID = 1L ; public ClearTable ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { System . out . println ( "SContactClearTable::doGet" ) ; ApplicationContext ac = WebApplicationContextUtils . getWebApplicationContext ( getServletContext ( ) ) ; <START_BUG> IDAOContact daoContact = ( ( IDAOContact ) ( ac . getBean ( "daocontact" ) ) ) ; <END_BUG> String dbOutput = daoContact . clearTable ( ) ; String responseUrl = ( "//" + "accueil.jsp" ) + ( ServerUtils . getNewParameter ( "dbOutput" , dbOutput ) ) ; System . out . println ( ( "output=" + responseUrl ) ) ; RequestDispatcher rd = getServletContext ( ) . getRequestDispatcher ( responseUrl ) ; rd . forward ( request , response ) ; } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } }

Fix:
IDAOContact daoContact = ( ( IDAOContact ) ( ac . getBean ( "daoContactProperty" ) ) ) ;
Buggy code:
public class EventHookImpl extends AbstractEventHookImpl { public EventHookImpl ( DistributionProviderImpl distributionProvider ) { } protected void registerRemoteService ( ServiceReference serviceReference , String [ ] remoteInterfaces , String [ ] remoteConfigurationType ) { } private void publishRemoteService ( final ServiceReference ref , final String [ ] remoteInterfaces , final Collection identifiers ) { } private Map getServiceProperties ( final ServiceReference ref ) { } private Map parseECFConfigurationType ( String [ ] remoteConfigurationType ) { } protected Collection registerRemoteService ( IRemoteServiceContainerAdapter [ ] rscas , String [ ] remoteInterfaces , ServiceReference sr ) { } protected Dictionary createPropertiesForRemoteService ( IRemoteServiceContainerAdapter iRemoteServiceContainerAdapter , String [ ] remotes , ServiceReference sr ) { } protected IRemoteServiceContainerAdapter [ ] findRemoteServiceContainerAdapters ( ServiceReference serviceReference , Map ecfConfiguration ) { } private IRemoteServiceContainerAdapter [ ] getRSCAsFromContainers ( IContainer [ ] containers , ServiceReference serviceReference , Map ecfConfiguration ) { } protected boolean includeContainer ( IContainer container , IRemoteServiceContainerAdapter rsca , ServiceReference serviceReference , Map ecfConfiguration ) { <START_BUG> Object cID = serviceReference . getProperty ( REMOTE_SERVICE_CONTAINER_ID ) ; <END_BUG> if ( ( cID == null ) || ( ! ( cID instanceof ID ) ) ) { Trace . trace ( PLUGIN_ID , DEBUG , this . getClass ( ) , "includeContainer" , ( ( ( ( "serviceReference=" + serviceReference ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>set<seq2seq4repair_space>remote<seq2seq4repair_space>service<seq2seq4repair_space>container<seq2seq4repair_space>id<seq2seq4repair_space>service<seq2seq4repair_space>property.<seq2seq4repair_space>INCLUDING<seq2seq4repair_space>containerID=" ) + ( container . getID ( ) ) ) + "<seq2seq4repair_space>in<seq2seq4repair_space>remote<seq2seq4repair_space>registration" ) ) ; return true ; } ID containerID = ( ( ID ) ( cID ) ) ; if ( container . getID ( ) . equals ( containerID ) ) { Trace . trace ( PLUGIN_ID , DEBUG , this . getClass ( ) , "includeContainer" , ( ( ( ( ( ( "serviceReference=" + serviceReference ) + "<seq2seq4repair_space>has<seq2seq4repair_space>MATCHING<seq2seq4repair_space>container<seq2seq4repair_space>id=" ) + containerID ) + ".<seq2seq4repair_space>INCLUDING<seq2seq4repair_space>rsca=" ) + rsca ) + "<seq2seq4repair_space>in<seq2seq4repair_space>remote<seq2seq4repair_space>registration" ) ) ; return true ; } Trace . trace ( PLUGIN_ID , DEBUG , this . getClass ( ) , "includeContainer" , ( ( ( ( ( ( "serviceReference=" + serviceReference ) + "<seq2seq4repair_space>has<seq2seq4repair_space>non-matching<seq2seq4repair_space>container<seq2seq4repair_space>id=" ) + containerID ) + ".<seq2seq4repair_space>EXCLUDING<seq2seq4repair_space>rsca=" ) + rsca ) + "<seq2seq4repair_space>in<seq2seq4repair_space>remote<seq2seq4repair_space>registration" ) ) ; return false ; } }

Fix:
Object cID = serviceReference . getProperty ( SERVICE_CONTAINER_ID ) ;
Buggy code:
public class VersionedValue implements Comparable < VersionedValue > { public static final ICompactSerializer < VersionedValue > serializer = new VersionedValue . VersionedValueSerializer ( ) ; public static final char DELIMITER = ',' ; public static final String DELIMITER_STR = new String ( new char [ ] { VersionedValue . DELIMITER } ) ; public static final String STATUS_BOOTSTRAPPING = "BOOT" ; public static final String STATUS_NORMAL = "NORMAL" ; public static final String STATUS_LEAVING = "LEAVING" ; public static final String STATUS_LEFT = "LEFT" ; public static final String STATUS_MOVING = "MOVING" ; public static final String REMOVING_TOKEN = "removing" ; public static final String REMOVED_TOKEN = "removed" ; public static final String REMOVAL_COORDINATOR = "REMOVER" ; public final int version ; public final String value ; private VersionedValue ( String value , int version ) { } private VersionedValue ( String value ) { } public int compareTo ( VersionedValue value ) { } @ Override public String toString ( ) { } public static class VersionedValueFactory { IPartitioner partitioner ; public VersionedValueFactory ( IPartitioner partitioner ) { } public VersionedValue bootstrapping ( Token token ) { } public VersionedValue normal ( Token token ) { } public VersionedValue load ( double load ) { } public VersionedValue migration ( UUID newVersion ) { } public VersionedValue leaving ( Token token ) { } public VersionedValue left ( Token token ) { } public VersionedValue moving ( Token token ) { } public VersionedValue removingNonlocal ( Token token ) { } public VersionedValue removedNonlocal ( Token token ) { } public VersionedValue removalCoordinator ( Token token ) { } public VersionedValue datacenter ( String dcId ) { } public VersionedValue rack ( String rackId ) { } public VersionedValue rpcaddress ( InetAddress endpoint ) { <START_BUG> return new VersionedValue ( endpoint . toString ( ) ) ; <END_BUG> } public VersionedValue releaseVersion ( ) { } } private static class VersionedValueSerializer implements ICompactSerializer < VersionedValue > { public void serialize ( VersionedValue value , DataOutputStream dos , int version ) throws IOException { } public VersionedValue deserialize ( DataInputStream dis , int version ) throws IOException { } } }

Fix:
return new VersionedValue ( endpoint . getHostAddress ( ) ) ;
Buggy code:
public class SavePropertyDialog extends JDialog implements ActionListener { protected static transient Logger log = LoggingManager . getLoggerForClass ( ) ; static Map functors = new HashMap ( ) ; static final long serialVersionUID = 1 ; SampleSaveConfiguration saveConfig ; public SavePropertyDialog ( Frame owner , String title , boolean modal , SampleSaveConfiguration s ) { } private int countMethods ( Method [ ] m ) { } protected void dialogInit ( ) { if ( ( saveConfig ) != null ) { super . dialogInit ( ) ; this . getContentPane ( ) . setLayout ( new BorderLayout ( ) ) ; Method [ ] methods = SampleSaveConfiguration . class . getMethods ( ) ; int x = ( ( countMethods ( methods ) ) // 3 ) + 1 ; SavePropertyDialog . log . info ( ( ( ( "grid<seq2seq4repair_space>panel<seq2seq4repair_space>is<seq2seq4repair_space>" + 3 ) + "<seq2seq4repair_space>by<seq2seq4repair_space>" ) + x ) ) ; JPanel checkPanel = new JPanel ( new GridLayout ( x , 3 ) ) ; for ( int i = 0 ; i < ( methods . length ) ; i ++ ) { String name = methods [ i ] . getName ( ) ; <START_BUG> if ( ( name . startsWith ( "save" ) ) && ( ( methods [ i ] . getParameterTypes ( ) . length ) == 0 ) ) { <END_BUG> try { name = name . substring ( 4 ) ; JCheckBox check = new JCheckBox ( JMeterUtils . getResString ( ( "save<seq2seq4repair_space>" + name ) ) , ( ( Boolean ) ( methods [ i ] . invoke ( saveConfig , new Object [ 0 ] ) ) ) . booleanValue ( ) ) ; checkPanel . add ( check , BorderLayout . NORTH ) ; check . addActionListener ( this ) ; check . setActionCommand ( ( "set" + name ) ) ; if ( ! ( SavePropertyDialog . functors . containsKey ( check . getActionCommand ( ) ) ) ) { SavePropertyDialog . functors . put ( check . getActionCommand ( ) , new Functor ( check . getActionCommand ( ) ) ) ; } } catch ( Exception e ) { SavePropertyDialog . log . warn ( "Problem<seq2seq4repair_space>creating<seq2seq4repair_space>save<seq2seq4repair_space>config<seq2seq4repair_space>dialog" , e ) ; } } } getContentPane ( ) . add ( checkPanel , BorderLayout . NORTH ) ; JButton exit = new JButton ( JMeterUtils . getResString ( "done" ) ) ; this . getContentPane ( ) . add ( exit , BorderLayout . SOUTH ) ; exit . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { dispose ( ) ; } } ) ; } } public void actionPerformed ( ActionEvent e ) { } public SampleSaveConfiguration getSaveConfig ( ) { } public void setSaveConfig ( SampleSaveConfiguration saveConfig ) { } }

Fix:
if ( name . startsWith ( "save" ) ) {
Buggy code:
public class ModelUpdater { HashSet projectsToUpdate = new HashSet ( ) ; protected void addToParentInfo ( Openable child ) { } protected static void close ( Openable element ) { } protected void elementAdded ( Openable element ) { } protected void elementChanged ( Openable element ) { } protected void elementRemoved ( Openable element ) { } public void processJavaDelta ( IJavaElementDelta delta ) { } protected void removeFromParentInfo ( Openable child ) { } protected void traverseDelta ( IJavaElementDelta delta , IPackageFragmentRoot root , IJavaProject project ) { boolean processChildren = true ; Openable element = ( ( Openable ) ( delta . getElement ( ) ) ) ; switch ( element . getElementType ( ) ) { case IJavaElement . JAVA_PROJECT : project = ( ( IJavaProject ) ( element ) ) ; break ; case IJavaElement . PACKAGE_FRAGMENT_ROOT : root = ( ( IPackageFragmentRoot ) ( element ) ) ; break ; case IJavaElement . COMPILATION_UNIT : <START_BUG> if ( ( ( IWorkingCopy ) ( element ) ) . isWorkingCopy ( ) ) { <END_BUG> return ; } case IJavaElement . CLASS_FILE : processChildren = false ; break ; } switch ( delta . getKind ( ) ) { case IJavaElementDelta . ADDED : elementAdded ( element ) ; break ; case IJavaElementDelta . REMOVED : elementRemoved ( element ) ; break ; case IJavaElementDelta . CHANGED : if ( ( ( delta . getFlags ( ) ) & ( IJavaElementDelta . F_CONTENT ) ) != 0 ) { elementChanged ( element ) ; } break ; } if ( processChildren ) { IJavaElementDelta [ ] children = delta . getAffectedChildren ( ) ; for ( int i = 0 ; i < ( children . length ) ; i ++ ) { IJavaElementDelta childDelta = children [ i ] ; this . traverseDelta ( childDelta , root , project ) ; } } } }

Fix:
if ( ( ( ICompilationUnit ) ( element ) ) . isWorkingCopy ( ) ) {
Buggy code:
public class ThemeAdapter extends PropertyMapAdapter { private ITheme targetTheme ; private IPropertyChangeListener listener = new IPropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent event ) { } } ; public ThemeAdapter ( ITheme targetTheme ) { } protected void attachListener ( ) { } protected void detachListener ( ) { } public Set keySet ( ) { } public Object getValue ( String propertyId , Class propertyType ) { } public static Set getKeySet ( ITheme targetTheme ) { } public static Object getValue ( ITheme targetTheme , String propertyId , Class propertyType ) { if ( propertyType . isAssignableFrom ( String . class ) ) { return targetTheme . getString ( propertyId ) ; } if ( propertyType . isAssignableFrom ( Color . class ) ) { Color result = targetTheme . getColorRegistry ( ) . get ( propertyId ) ; if ( result != null ) { return result ; } } if ( propertyType . isAssignableFrom ( Font . class ) ) { FontRegistry fonts = targetTheme . getFontRegistry ( ) ; if ( fonts . hasValueFor ( propertyId ) ) { return fonts . get ( propertyId ) ; } } if ( propertyType == ( Integer . class ) ) { return new Integer ( targetTheme . getInt ( propertyId ) ) ; } if ( propertyType == ( Boolean . class ) ) { <START_BUG> return new Boolean ( targetTheme . getBoolean ( propertyId ) ) ; <END_BUG> } return null ; } public boolean propertyExists ( String propertyId ) { } public void setValue ( String propertyId , Object newValue ) { } }

Fix:
return targetTheme . getBoolean ( propertyId ) ? Boolean . TRUE : Boolean . FALSE ;
Buggy code:
public class TypesLoaderVisitor < T > extends VoidVisitorAdapter < T > { private String contextName = null ; private String packageName = null ; private static SymbolTypesClassLoader classLoader = new SymbolTypesClassLoader ( Thread . currentThread ( ) . getContextClassLoader ( ) ) ; private static Set < String > defaultJavaLangClasses = new HashSet < String > ( ) ; private static Map < String , Class < ? > > primitiveClasses = new HashMap < String , Class < ? > > ( ) ; private static JarFile SDKJar ; private SymbolTable symbolTable = null ; private List < SymbolAction > actions ; private SymbolActionProvider actionProvider = null ; private Node startingNode = null ; public TypesLoaderVisitor ( SymbolTable symbolTable , SymbolActionProvider actionProvider , List < SymbolAction > actions ) { } private String getSymbolName ( String name , boolean imported ) { } public void setClassLoader ( ClassLoader cl ) { } public static SymbolTypesClassLoader getClassLoader ( ) { } private SymbolType buildSymbolType ( TypeDeclaration type ) { } private void pushCanonicalName ( Symbol < ? > added , SymbolType st ) { } private < K extends Node & SymbolDefinition > void overrideSymbol ( Symbol < K > symbol , K location , SymbolType st , Scope scope ) { } private String getInnerName ( SymbolType st ) { } @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private String getContext ( TypeDeclaration type , T context ) { } public void visit ( ClassOrInterfaceDeclaration type , T context ) { } public void visit ( EnumDeclaration type , T context ) { } public void visit ( AnnotationDeclaration type , T context ) { } public void processMembers ( List < BodyDeclaration > members , T context ) { } public void visit ( ObjectCreationExpr n , T context ) { } private Class < ? > lookForClass ( String className ) { Class < ? > result = null ; boolean finish = false ; while ( ( result == null ) && ( ! finish ) ) { try { result = Class . forName ( className , false , TypesLoaderVisitor . classLoader ) ; finish = true ; <START_BUG> } catch ( ClassNotFoundException e ) { <END_BUG> int index = className . lastIndexOf ( '.' ) ; if ( index != ( - 1 ) ) { String aux = ( ( className . substring ( 0 , index ) ) + "$" ) + ( className . substring ( ( index + 1 ) ) ) ; className = aux ; } else { finish = true ; } } } return result ; } public void visit ( ImportDeclaration id , T context ) { } private void loadNestedClasses ( Class < ? > clazz , boolean imported , Node node ) { } private void addType ( String name , boolean imported , Node node , List < SymbolAction > actions ) { } private void loadInnerClass ( String name , boolean imported , Node node , List < SymbolAction > actions ) { } private void loadClassesFromJar ( JarFile jar , String directory , Node node ) { } private void loadClassesFromPackage ( String packageName , List < SymbolAction > actions , Node node ) { } @ Override public void visit ( CompilationUnit cu , T context ) { } public Class < ? > loadClass ( Type t ) throws ClassNotFoundException { } public String getFullName ( TypeDeclaration type ) { } public void clear ( ) { } }

Fix:
} catch ( Throwable e ) {
Buggy code:
public abstract class Border extends HtmlContainer { private ComponentTag openTag ; public Border ( final String componentName ) { } protected final void handleBody ( final RequestCycle cycle , final MarkupStream markupStream , final ComponentTag openTag ) { } public final ComponentTag getOpenTag ( ) { } protected boolean resolveComponent ( final RequestCycle cycle , final MarkupStream markupStream , final ComponentTag tag ) { if ( ( ! ( tag . getComponentName ( ) . equals ( "[body]" ) ) ) && ( ! ( ( markupStream . atOpenCloseTag ( "body" ) ) && ( tag instanceof ComponentWicketTag ) ) ) ) { return false ; } if ( ! ( markupStream . atOpenCloseTag ( ) ) ) { <START_BUG> markupStream . throwMarkupException ( "A<seq2seq4repair_space><wicket:region<seq2seq4repair_space>name=body><seq2seq4repair_space>tag<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>an<seq2seq4repair_space>open-close<seq2seq4repair_space>tag." ) ; <END_BUG> } renderTag ( cycle , tag ) ; markupStream . next ( ) ; Border border = ( ( Border ) ( ( ( this ) instanceof Border ) ? this : findParent ( Border . class ) ) ) ; if ( ( border . getMarkupStream ( ) ) == null ) { Container borderParent = border . getParent ( ) ; border = ( ( Border ) ( ( borderParent instanceof Border ) ? borderParent : borderParent . findParent ( Border . class ) ) ) ; } final MarkupStream borderMarkup = border . findMarkupStream ( ) ; border . setMarkupStream ( null ) ; border . renderBody ( cycle , border . findMarkupStream ( ) , border . getOpenTag ( ) ) ; border . setMarkupStream ( borderMarkup ) ; return true ; } }

Fix:
markupStream . throwMarkupException ( "A<seq2seq4repair_space><wicket:body><seq2seq4repair_space>tag<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>an<seq2seq4repair_space>open-close<seq2seq4repair_space>tag." ) ;
Buggy code:
public class MarkAsReadAction extends FrameAction implements SelectionListener { public MarkAsReadAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameController ( ) ) ) . getTableSelection ( ) ; <END_BUG> r [ 0 ] . setMarkVariant ( MARK_AS_READ ) ; MarkMessageCommand c = new MarkMessageCommand ( r ) ; processor . addOp ( c ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ;
Buggy code:
public class MainActivity extends Activity { static ResponseCacheMiddleware cacher ; ImageView rommanager ; ImageView tether ; ImageView desksms ; ImageView chart ; @ SuppressLint ( "NewApi" ) @ Override public void onCreate ( Bundle savedInstanceState ) { } void showCacheToast ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } private void assignImageView ( final ImageView iv , final BitmapDrawable bd ) { } private void getFile ( final ImageView iv , String url , final String filename ) { } private void getChartFile ( ) { } @ SuppressWarnings ( "deprecation" ) private void chat ( ) { <START_BUG> SocketIOClient . connect ( AsyncHttpClient . getDefaultInstance ( ) , "http:////192.168.1.205:9093" , new ConnectCallback ( ) { <END_BUG> @ Override public void onConnectCompleted ( Exception ex , SocketIOClient client ) { if ( ex != null ) { ex . printStackTrace ( ) ; return ; } client . setStringCallback ( new StringCallback ( ) { @ Override public void onString ( String string , Acknowledge acknowledge ) { System . out . println ( string ) ; } } ) ; client . on ( "message" , new EventCallback ( ) { @ Override public void onEvent ( JSONArray argument , Acknowledge acknowledge ) { System . out . println ( ( "args:<seq2seq4repair_space>" + ( argument . toString ( ) ) ) ) ; } } ) ; client . setJSONCallback ( new JSONCallback ( ) { @ Override public void onJSON ( JSONObject json , Acknowledge acknowledge ) { System . out . println ( ( "json:<seq2seq4repair_space>" + ( json . toString ( ) ) ) ) ; } } ) ; client . on ( "connect" , new EventCallback ( ) { @ Override public void onEvent ( JSONArray argument , Acknowledge acknowledge ) { System . out . println ( ( "args:<seq2seq4repair_space>" + ( argument . toString ( ) ) ) ) ; } } ) ; client . on ( "disconnect" , new EventCallback ( ) { @ Override public void onEvent ( JSONArray argument , Acknowledge acknowledge ) { System . out . println ( ( "args:<seq2seq4repair_space>" + ( argument . toString ( ) ) ) ) ; } } ) ; client . on ( "ackevent2" , new EventCallback ( ) { @ Override public void onEvent ( JSONArray argument , Acknowledge acknowledge ) { System . out . println ( ( "args:<seq2seq4repair_space>" + ( argument . toString ( ) ) ) ) ; } } ) ; client . on ( "ackevent3" , new EventCallback ( ) { @ Override public void onEvent ( JSONArray argument , Acknowledge acknowledge ) { System . out . println ( ( "args:<seq2seq4repair_space>" + ( argument . toString ( ) ) ) ) ; } } ) ; JSONArray args = new JSONArray ( ) ; JSONObject json = new JSONObject ( ) ; try { json . put ( "username" , "201" ) ; json . put ( "message" , "ddddddd" ) ; } catch ( JSONException e ) { e . printStackTrace ( ) ; } args . put ( json ) ; client . emit ( "ackevent1" , args ) ; } } ) ; } private String randomFile ( ) { } private void refresh ( ) { } private static final String LOGTAG = "AsyncSample" ; }

Fix:
SocketIOClient . connect ( AsyncHttpClient . getDefaultInstance ( ) , "http:////192.168.1.189:9093" , new ConnectCallback ( ) {
Buggy code:
public abstract class Continuus extends Task { private String ccmDir = "" ; private String ccmAction = "" ; public String getCcmAction ( ) { } public void setCcmAction ( String v ) { } public final void setCcmDir ( String dir ) { } protected final String getCcmCommand ( ) { } protected int run ( Commandline cmd , ExecuteStreamHandler handler ) { try { Execute exe = new Execute ( handler ) ; exe . setAntRun ( getProject ( ) ) ; exe . setWorkingDirectory ( getProject ( ) . getBaseDir ( ) ) ; exe . setCommandline ( cmd . getCommandline ( ) ) ; return exe . execute ( ) ; } catch ( IOException e ) { <START_BUG> throw new org . apache . tools . ant . BuildException ( e , location ) ; <END_BUG> } } protected int run ( Commandline cmd ) { } private static final String CCM_EXE = "ccm" ; public static final String COMMAND_CREATE_TASK = "create_task" ; public static final String COMMAND_CHECKOUT = "co" ; public static final String COMMAND_CHECKIN = "ci" ; public static final String COMMAND_RECONFIGURE = "reconfigure" ; public static final String COMMAND_DEFAULT_TASK = "default_task" ; }

Fix:
throw new org . apache . tools . ant . BuildException ( e , getLocation ( ) ) ;
Buggy code:
public class CSVUtils { private static final String [ ] EMPTY_STRING_ARRAY = new String [ 0 ] ; private static final String [ ] [ ] EMPTY_DOUBLE_STRING_ARRAY = new String [ 0 ] [ 0 ] ; public CSVUtils ( ) { } <START_BUG> public static String printLine ( String [ ] values , CSVFormat format ) { <END_BUG> StringWriter stringWriter = new StringWriter ( ) ; CSVPrinter csvPrinter = new CSVPrinter ( stringWriter , format ) ; for ( int i = 0 ; i < ( values . length ) ; i ++ ) { if ( ( values [ i ] ) == null ) { values [ i ] = "null" ; } else if ( values [ i ] . equals ( "null" ) ) { values [ i ] = "\"null\"" ; } } try { csvPrinter . println ( values ) ; } catch ( IOException e ) { } return stringWriter . toString ( ) . trim ( ) ; } public static String [ ] [ ] parse ( String s ) throws IOException { } public static String [ ] parseLine ( String s ) throws IOException { } }

Fix:
public static String printLine ( CSVFormat format , String ... values ) {