nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Button extends Control { String text = "" ; Image image ; boolean grayed ; public Button ( Composite parent , int style ) { } int accessibilityAttributeValue ( int id , int sel , int arg0 ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } void click ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } NSAttributedString createString ( ) { } void createHandle ( ) { NSButton widget = ( ( NSButton ) ( new SWTButton ( ) . alloc ( ) ) ) ; <START_BUG> widget . initWithFrame ( new NSRect ( ) ) ; <END_BUG> int type = OS . NSMomentaryLightButton ; if ( ( ( style ) & ( SWT . PUSH ) ) != 0 ) { if ( ( ( style ) & ( SWT . FLAT ) ) != 0 ) { widget . setBezelStyle ( NSShadowlessSquareBezelStyle ) ; } else { widget . setBezelStyle ( NSRoundedBezelStyle ) ; } } else if ( ( ( style ) & ( SWT . CHECK ) ) != 0 ) { type = OS . NSSwitchButton ; widget . setAllowsMixedState ( true ) ; } else if ( ( ( style ) & ( SWT . RADIO ) ) != 0 ) { type = OS . NSRadioButton ; } else if ( ( ( style ) & ( SWT . TOGGLE ) ) != 0 ) { type = OS . NSPushOnPushOffButton ; if ( ( ( style ) & ( SWT . FLAT ) ) != 0 ) { widget . setBezelStyle ( NSShadowlessSquareBezelStyle ) ; } else { widget . setBezelStyle ( NSRoundedBezelStyle ) ; } } else if ( ( ( style ) & ( SWT . ARROW ) ) != 0 ) { widget . setBezelStyle ( NSRegularSquareBezelStyle ) ; } widget . setButtonType ( type ) ; widget . setTitle ( NSString . stringWith ( "" ) ) ; widget . setImagePosition ( NSImageLeft ) ; widget . setTarget ( widget ) ; widget . setAction ( sel_sendSelection ) ; view = widget ; _setAlignment ( style ) ; } void deregister ( ) { } void drawWidget ( int id , NSRect rect ) { } public int getAlignment ( ) { } public boolean getGrayed ( ) { } public Image getImage ( ) { } String getNameText ( ) { } public boolean getSelection ( ) { } public String getText ( ) { } void register ( ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } void sendSelection ( ) { } public void setAlignment ( int alignment ) { } void _setAlignment ( int alignment ) { } void setBackground ( float [ ] color ) { } void setDefault ( boolean value ) { } void setFont ( NSFont font ) { } void setForeground ( float [ ] color ) { } public void setGrayed ( boolean grayed ) { } public void setImage ( Image image ) { } boolean setRadioSelection ( boolean value ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } int traversalCode ( int key , NSEvent theEvent ) { } }

Fix:
widget . init ( ) ;
Buggy code:
public class Order { public static final String NAME = "order" ; private static RelationshipIndex INDEX ; public static void init ( IndexManager indexManager ) { } private static QueryContext sort ( String key , String ... additionalKeys ) { } public static void order ( Relationship r , int value ) { } public static void unorder ( Relationship r ) { } public static IndexHits < Relationship > queryDown ( Node node ) { } @ Deprecated public static IndexHits < Relationship > queryUp ( Node node ) { } public static Relationship [ ] first ( int qty , Node node ) { <START_BUG> IndexHits < Relationship > q = Order . context ( node ) ; <END_BUG> try { Relationship [ ] res = new Relationship [ qty ] ; for ( int i = 0 ; i < qty ; i ++ ) { if ( q . hasNext ( ) ) res [ i ] = q . next ( ) ; else throw new IndexOutOfBoundsException ( ( ( ( "Required:<seq2seq4repair_space>" + qty ) + ",<seq2seq4repair_space>have:<seq2seq4repair_space>" ) + ( i + 1 ) ) ) ; } return res ; } finally { q . close ( ) ; } } public static IndexHits < Relationship > context ( Node node ) { } No newline ; at end ; of file ; }

Fix:
IndexHits < Relationship > q = Order . queryDown ( node ) ;
Buggy code:
public class AppearanceOptionPane extends AbstractOptionPane { public AppearanceOptionPane ( ) { } protected void _init ( ) { addComponent ( new JLabel ( jEdit . getProperty ( "options.appearance.lf.note" ) ) ) ; lfs = UIManager . getInstalledLookAndFeels ( ) ; String [ ] names = new String [ lfs . length ] ; String lf = UIManager . getLookAndFeel ( ) . getClass ( ) . getName ( ) ; int index = 0 ; for ( int i = 0 ; i < ( names . length ) ; i ++ ) { names [ i ] = lfs [ i ] . getName ( ) ; if ( lf . equals ( lfs [ i ] . getClassName ( ) ) ) index = i ; } lookAndFeel = new JComboBox ( names ) ; lookAndFeel . setSelectedIndex ( index ) ; lookAndFeel . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent evt ) { updateEnabled ( ) ; } } ) ; addComponent ( jEdit . getProperty ( "options.appearance.lf" ) , lookAndFeel ) ; primaryFont = new FontSelector ( jEdit . getFontProperty ( "metal.primary.font" ) ) ; addComponent ( jEdit . getProperty ( "options.appearance.primaryFont" ) , primaryFont ) ; secondaryFont = new FontSelector ( jEdit . getFontProperty ( "metal.secondary.font" ) ) ; addComponent ( jEdit . getProperty ( "options.appearance.secondaryFont" ) , secondaryFont ) ; updateEnabled ( ) ; textColors = new JCheckBox ( jEdit . getProperty ( "options.appearance.textColors" ) ) ; textColors . setSelected ( jEdit . getBooleanProperty ( "textColors" ) ) ; addComponent ( textColors ) ; decorateFrames = new JCheckBox ( jEdit . getProperty ( "options.appearance.decorateFrames" ) ) ; decorateFrames . setSelected ( jEdit . getBooleanProperty ( "decorate.frames" ) ) ; decorateDialogs = new JCheckBox ( jEdit . getProperty ( "options.appearance.decorateDialogs" ) ) ; decorateDialogs . setSelected ( jEdit . getBooleanProperty ( "decorate.dialogs" ) ) ; <START_BUG> if ( ( System . getProperty ( "java.version" ) . compareTo ( "1.4" ) ) >= 0 ) { <END_BUG> addComponent ( decorateFrames ) ; addComponent ( decorateDialogs ) ; } } protected void _save ( ) { } private UIManager . LookAndFeelInfo [ ] lfs ; private JComboBox lookAndFeel ; private FontSelector primaryFont ; private FontSelector secondaryFont ; private JCheckBox textColors ; private JCheckBox decorateFrames ; private JCheckBox decorateDialogs ; private void updateEnabled ( ) { } }

Fix:
if ( OperatingSystem . hasJava14 ( ) ) {
Buggy code:
public class flagGameApplication extends Application { static final String TAG = "MyApp" ; @ Override public void onCreate ( ) { super . onCreate ( ) ; Parse . initialize ( this , getString ( parse_app_id ) , getString ( parse_client_id ) ) ; ParseFacebookUtils . initialize ( getApplicationContext ( ) ) ; ParseInstallation . getCurrentInstallation ( ) . saveInBackground ( ) ; <START_BUG> ParsePush . subscribeInBackground ( "ChallengePush" , new SaveCallback ( ) { <END_BUG> @ Override public void done ( ParseException e ) { if ( e == null ) { Log . d ( "com.parse.push" , "successfully<seq2seq4repair_space>subscribed<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>broadcast<seq2seq4repair_space>channel." ) ; } else { Log . e ( "com.parse.push" , "failed<seq2seq4repair_space>to<seq2seq4repair_space>subscribe<seq2seq4repair_space>for<seq2seq4repair_space>push" , e ) ; } } } ) ; PushService . setDefaultPushCallback ( this , OfflineGame . class ) ; } }

Fix:
ParsePush . subscribeInBackground ( "" , new SaveCallback ( ) {
Buggy code:
public class ExceptionUncheckUtility { @ FunctionalInterface public interface BiConsumerThrowsExceptions < T , U > { void accept ( T t , U u ) throws Exception { } } @ FunctionalInterface public interface ConsumerThrowsExceptions < T > { void accept ( T t ) throws Exception { } } @ FunctionalInterface public interface FunctionThrowsExceptions < T , R > { R apply ( T t ) throws Exception { } } @ FunctionalInterface public interface PredicateThrowsExceptions < T > { Boolean test ( T t ) throws Exception { } } @ FunctionalInterface public interface SupplierThrowsExceptions < T > { T get ( ) throws Exception { } } @ FunctionalInterface public interface RunnableThrowsExceptions { void run ( ) throws Exception { } } public static < T > Consumer < T > consumerThrowsUnchecked ( ExceptionUncheckUtility . ConsumerThrowsExceptions < T > consumer ) { } public static < T , R > Function < T , R > functionThrowsUnchecked ( ExceptionUncheckUtility . FunctionThrowsExceptions < T , R > function ) { } public static < T > Predicate < T > predicateThrowsUnchecked ( ExceptionUncheckUtility . PredicateThrowsExceptions < T > function ) { } public static < T > Supplier < T > supplierThrowsUnchecked ( ExceptionUncheckUtility . SupplierThrowsExceptions < T > function ) { } public static void runThrowingUnchecked ( ExceptionUncheckUtility . RunnableThrowsExceptions runnable ) { } public static < R > R getThrowingUnchecked ( ExceptionUncheckUtility . SupplierThrowsExceptions < R > supplier ) { } public static < T , R > R applyThrowingUnchecked ( ExceptionUncheckUtility . FunctionThrowsExceptions < T , R > function , T t ) { } public static < T > Boolean testThrowingUnchecked ( ExceptionUncheckUtility . PredicateThrowsExceptions < T > function , T t ) { try { return function . test ( t ) ; } catch ( Exception exception ) { ExceptionUncheckUtility . throwAsUnchecked ( exception ) ; <START_BUG> return null ; <END_BUG> } } public static < T > void acceptThrowingUnchecked ( ExceptionUncheckUtility . ConsumerThrowsExceptions < T > function , T t ) { } @ SuppressWarnings ( "unchecked" ) private static < E extends Throwable > void throwAsUnchecked ( Exception exception ) throws E { } }

Fix:
return false ;
Buggy code:
public abstract class OperatingSystem { public abstract String getInstallDirectory ( String name , String version ) { } public abstract static class OSTask { protected Install installer ; protected String name ; protected String label ; protected String directory ; protected boolean enabled ; public OSTask ( Install installer , String name ) { } public String getName ( ) { } public String getLabel ( ) { } public String getDefaultDirectory ( Install installer ) { } public String getDirectory ( ) { } public boolean isEnabled ( ) { } public void setEnabled ( boolean enabled ) { } public void setDirectory ( String directory ) { } public abstract void perform ( String installDir ) throws IOException { } } public OperatingSystem . OSTask [ ] getOSTasks ( Install installer ) { <START_BUG> return null ; <END_BUG> } public void mkdirs ( String directory ) throws IOException { } public static OperatingSystem getOperatingSystem ( ) { } public static class Unix extends OperatingSystem { public String getInstallDirectory ( String name , String version ) { } public class ScriptOSTask extends OperatingSystem . OSTask { public ScriptOSTask ( Install installer ) { } public String getDefaultDirectory ( Install installer ) { } public void perform ( String installDir ) throws IOException { } } public class ManPageOSTask extends OperatingSystem . OSTask { public ManPageOSTask ( Install installer ) { } public String getDefaultDirectory ( Install installer ) { } public void perform ( String installDir ) throws IOException { } } public OperatingSystem . OSTask [ ] getOSTasks ( Install installer ) { return new OperatingSystem . OSTask [ ] { new OperatingSystem . Unix . ScriptOSTask ( installer ) , new OperatingSystem . Unix . ManPageOSTask ( installer ) } ; } public void mkdirs ( String directory ) throws IOException { } public void exec ( String [ ] args ) throws IOException { } } public static class MacOS extends OperatingSystem . Unix { public String getInstallDirectory ( String name , String version ) { } } public static class Windows extends OperatingSystem { public String getInstallDirectory ( String name , String version ) { } public class JEditLauncherOSTask extends OperatingSystem . OSTask { public JEditLauncherOSTask ( Install installer ) { } public String getDefaultDirectory ( Install installer ) { } public void perform ( String installDir ) { } } public OperatingSystem . OSTask [ ] getOSTasks ( Install installer ) { return new OperatingSystem . OSTask [ ] { new OperatingSystem . Windows . JEditLauncherOSTask ( installer ) } ; } } public static class HalfAnOS extends OperatingSystem { public String getInstallDirectory ( String name , String version ) { } } private static OperatingSystem os ; }

Fix:
return new OperatingSystem . OSTask [ 0 ] ;
Buggy code:
public class dnsSOARecord extends dnsRecord { dnsName host ; dnsName admin ; int serial ; int refresh ; int retry ; int expire ; int minimum ; public dnsSOARecord ( dnsName _name , short _dclass , int _ttl , dnsName _host , dnsName _admin , int _serial , int _refresh , int _retry , int _expire , int _minimum ) throws IOException { } public dnsSOARecord ( dnsName _name , short _dclass , int _ttl , int length , CountedDataInputStream in , dnsCompression c ) throws IOException { } public dnsSOARecord ( dnsName _name , short _dclass , int _ttl , MyStringTokenizer st , dnsName origin ) throws IOException { } public String toString ( ) { StringBuffer sb = toStringNoData ( ) ; if ( ( host ) != null ) { sb . append ( host ) ; sb . append ( "<seq2seq4repair_space>" ) ; sb . append ( admin ) ; sb . append ( "<seq2seq4repair_space>(\n\t\t\t\t\t" ) ; sb . append ( serial ) ; sb . append ( "\t;<seq2seq4repair_space>serial\n\t\t\t\t\t" ) ; sb . append ( refresh ) ; sb . append ( "\t;<seq2seq4repair_space>refresh\n\t\t\t\t\t" ) ; sb . append ( retry ) ; sb . append ( "\t;<seq2seq4repair_space>retry\n\t\t\t\t\t" ) ; <START_BUG> sb . append ( refresh ) ; <END_BUG> sb . append ( "\t;<seq2seq4repair_space>refresh\n\t\t\t\t\t" ) ; sb . append ( minimum ) ; sb . append ( ")\t;<seq2seq4repair_space>minimum" ) ; } return sb . toString ( ) ; } byte [ ] rrToWire ( dnsCompression c ) throws IOException { } }

Fix:
sb . append ( expire ) ;
Buggy code:
public class Search { Queue < State > queue ; Queue < State > partial ; Queue < State > queue2 ; ArrayList < String > seen ; boolean fullSearch ; Map m1 ; Map m2 ; public Search ( Map m1 , Map m2 , boolean full ) { } public State getEndState ( ) { State far = null ; boolean endGame = ( ! ( m1 . isStillExplorable ( ) ) ) && ( ! ( m2 . isStillExplorable ( ) ) ) ; if ( ( fullSearch ) || endGame ) { while ( ! ( queue2 . isEmpty ( ) ) ) { State current = queue2 . poll ( ) ; far = current ; ArrayList < State > neighbors = current . findNeighbors ( ) ; for ( State s : neighbors ) { if ( ! ( seen . contains ( s . encoded ( ) ) ) ) if ( s . isFull ( ) ) return s ; else if ( ( s . isPartial ( ) ) && endGame ) partial . add ( s ) ; else <START_BUG> if ( ( ! ( s . isUnseen ( ) ) ) && ( ! endGame ) ) <END_BUG> queue2 . add ( s ) ; seen . add ( s . encoded ( ) ) ; } } if ( endGame ) while ( ! ( partial . isEmpty ( ) ) ) { State current = partial . poll ( ) ; ArrayList < State > neighbors = current . findNeighbors ( ) ; for ( State s : neighbors ) if ( ! ( seen . contains ( s . encoded ( ) ) ) ) { partial . add ( s ) ; if ( s . isFull ( ) ) return s ; seen . add ( s . encoded ( ) ) ; } } } seen . removeAll ( seen ) ; while ( ! ( queue . isEmpty ( ) ) ) { State current = queue . poll ( ) ; far = current ; if ( current . isFull ( ) ) return current ; if ( current . isUnseen ( ) ) return current ; else if ( ! ( current . isPartial ( ) ) ) { ArrayList < State > neighbors = current . findNeighbors ( ) ; for ( State s : neighbors ) if ( ! ( seen . contains ( s . encoded ( ) ) ) ) { if ( ! ( s . isPartial ( ) ) ) queue . add ( s ) ; seen . add ( s . encoded ( ) ) ; } } } return far ; } class CompareStates implements Comparator < State > { public int compare ( State s1 , State s2 ) { } } No newline ; at end ; of file ; }

Fix:
if ( ( ! ( s . isUnseen ( ) ) ) && ( ! ( s . isPartial ( ) ) ) )
Buggy code:
public class InfinispanSubsystemAdd implements ModelAddOperationHandler , DescriptionProvider { private static final Logger log = Logger . getLogger ( InfinispanSubsystemAdd . class . getPackage ( ) . getName ( ) ) ; static ModelNode createOperation ( ModelNode address , ModelNode existing ) { } private static void populate ( ModelNode source , ModelNode target ) { } @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public OperationResult execute ( OperationContext context , final ModelNode operation , final ResultHandler resultHandler ) throws OperationFailedException { InfinispanSubsystemAdd . log . info ( "Activating<seq2seq4repair_space>Infinispan<seq2seq4repair_space>subsystem." ) ; InfinispanSubsystemAdd . populate ( operation , context . getSubModel ( ) ) ; RuntimeOperationContext runtime = context . getRuntimeContext ( ) ; if ( runtime != null ) { RuntimeTask task = new RuntimeTask ( ) { @ Override public void execute ( RuntimeTaskContext context ) throws OperationFailedException { ServiceTarget target = context . getServiceTarget ( ) ; target . addService ( SERVICE_NAME , new EmbeddedCacheManagerDefaultsService ( ) ) . setInitialMode ( ON_DEMAND ) . install ( ) ; String defaultContainer = operation . require ( DEFAULT_CACHE_CONTAINER ) . asString ( ) ; InjectedValue < EmbeddedCacheManager > container = new InjectedValue < EmbeddedCacheManager > ( ) ; ValueService < EmbeddedCacheManager > service = new ValueService < EmbeddedCacheManager > ( container ) ; <START_BUG> target . addService ( EmbeddedCacheManagerService . getServiceName ( ) , service ) . addDependency ( EmbeddedCacheManagerService . getServiceName ( defaultContainer ) , EmbeddedCacheManager . class , container ) . setInitialMode ( ON_DEMAND ) . install ( ) ; <END_BUG> } } ; runtime . setRuntimeTask ( task ) ; } else { } BasicOperationResult operationResult = new BasicOperationResult ( Util . getResourceRemoveOperation ( operation . require ( OP_ADDR ) ) ) ; resultHandler . handleResultComplete ( ) ; return operationResult ; } }

Fix:
target . addService ( EmbeddedCacheManagerService . getServiceName ( null ) , service ) . addDependency ( EmbeddedCacheManagerService . getServiceName ( defaultContainer ) , EmbeddedCacheManager . class , container ) . setInitialMode ( ON_DEMAND ) . install ( ) ;
Buggy code:
public class ComponentInstLight extends AbstractI18NBean < ComponentI18N > implements Serializable { private static final long serialVersionUID = 4859368422448142768L ; private String m_sId ; private String m_sDomainFatherId ; private String m_sName ; private Date createDate = null ; private Date updateDate = null ; private Date removeDate = null ; private String status = null ; private int createdBy = - 1 ; private int updatedBy = - 1 ; private int removedBy = - 1 ; private int orderNum = - 1 ; private String creatorName = null ; private String updaterName = null ; private String removerName = null ; private List < SpaceInstLight > path = null ; private boolean isInheritanceBlocked = false ; private boolean hidden = false ; private boolean publicApp = false ; public ComponentInstLight ( ) { } public ComponentInstLight ( ComponentInstanceRow compo ) { } public String getId ( ) { <START_BUG> return ( m_sId ) + ( m_sName ) ; <END_BUG> } public int getLocalId ( ) { } public void setLocalId ( int id ) { } public void setDomainFatherId ( String sDomainFatherId ) { } public String getDomainFatherId ( ) { } @ Override public String getName ( ) { } public String getLabel ( ) { } public void setLabel ( String label ) { } public Date getCreateDate ( ) { } public Date getRemoveDate ( ) { } public String getStatus ( ) { } public Date getUpdateDate ( ) { } public String getCreatorName ( ) { } public void setCreatorName ( String creatorName ) { } public String getRemoverName ( ) { } public void setRemoverName ( String removerName ) { } public String getUpdaterName ( ) { } public void setUpdaterName ( String updaterName ) { } public int getCreatedBy ( ) { } public int getRemovedBy ( ) { } public int getUpdatedBy ( ) { } public String getPath ( String separator ) { } public void setPath ( List < SpaceInstLight > path ) { } public String getLabel ( String language ) { } @ Override public void setName ( String name ) { } @ Override public int hashCode ( ) { } public void setOrderNum ( int orderNum ) { } public int getOrderNum ( ) { } public boolean isInheritanceBlocked ( ) { } public void setInheritanceBlocked ( boolean isInheritanceBlocked ) { } public boolean isHidden ( ) { } public boolean isPublic ( ) { } public boolean isWorkflow ( ) { } public String getIcon ( boolean bigOne ) { } @ Override public boolean equals ( Object obj ) { } No newline ; at end ; of file ; }

Fix:
return ( m_sName ) + ( m_sId ) ;
Buggy code:
public class DefaultLoader implements Loader { private Disk disk ; private int ID ; private int instructionSize ; private int priority ; private int inputBuffer ; private int outputBuffer ; private int tempBuffer ; private int instructionStartPosition ; private int dataStartPosition ; public DefaultLoader ( Disk disk ) { } @ Override public boolean load ( String fileName ) { try { InputStream fis = new FileInputStream ( fileName ) ; BufferedReader br = new BufferedReader ( new InputStreamReader ( fis ) ) ; for ( String s = br . readLine ( ) ; s != null ; s = br . readLine ( ) ) { if ( s . startsWith ( "0x" ) ) { <START_BUG> disk . addToDisk ( s ) ; <END_BUG> } else { int currentDiskPosition = disk . getCurrentPositionOnDisk ( ) ; if ( s . contains ( "JOB" ) ) { String [ ] sVals = s . split ( "<seq2seq4repair_space>" ) ; ID = Integer . decode ( ( "0x" + ( sVals [ 2 ] ) ) ) ; instructionSize = ( Integer . decode ( ( "0x" + ( sVals [ 3 ] ) ) ) ) * 8 ; priority = Integer . decode ( ( "0x" + ( sVals [ 4 ] ) ) ) ; instructionStartPosition = currentDiskPosition ; } else if ( s . contains ( "Data" ) ) { String [ ] sVals = s . split ( "<seq2seq4repair_space>" ) ; inputBuffer = ( Integer . decode ( ( "0x" + ( sVals [ 2 ] ) ) ) ) * 8 ; outputBuffer = ( Integer . decode ( ( "0x" + ( sVals [ 3 ] ) ) ) ) * 8 ; tempBuffer = ( Integer . decode ( ( "0x" + ( sVals [ 4 ] ) ) ) ) * 8 ; dataStartPosition = currentDiskPosition ; } else if ( s . contains ( "END" ) ) { ProcessControlBlock processControlBlock = new ProcessControlBlock ( ) ; processControlBlock . setID ( ID ) ; processControlBlock . setInstructionSize ( instructionSize ) ; processControlBlock . setPriority ( priority ) ; processControlBlock . setInputBuffer ( inputBuffer ) ; processControlBlock . setOutputBuffer ( outputBuffer ) ; processControlBlock . setTemporaryBuffer ( tempBuffer ) ; processControlBlock . setInstructionLocationOnDisk ( instructionStartPosition ) ; processControlBlock . setDataLocationOnDisk ( dataStartPosition ) ; disk . addProgramToProgramList ( processControlBlock ) ; } } } br . close ( ) ; } catch ( FileNotFoundException fnfe ) { System . out . println ( "File<seq2seq4repair_space>not<seq2seq4repair_space>found." ) ; return false ; } catch ( Exception e ) { System . out . println ( ( "Something<seq2seq4repair_space>went<seq2seq4repair_space>wrong." + e ) ) ; return false ; } return true ; } }

Fix:
disk . addToDisk ( s . trim ( ) ) ;
Buggy code:
public class Cylinder extends Surface { protected final Point3 center = new Point3 ( ) ; public void setCenter ( Point3 center ) { } protected double radius = 1.0 ; public void setRadius ( double radius ) { } protected double height = 1.0 ; public void setHeight ( double height ) { } public Cylinder ( ) { } public boolean intersect ( IntersectionRecord outRecord , Ray rayIn ) { Point3 p = new Point3 ( rayIn . origin ) ; Vector3 d = new Vector3 ( rayIn . direction ) ; Point3 c = center ; double R = radius ; double H = height ; Point3 pc = new Point3 ( ( ( p . x ) - ( c . x ) ) , ( ( p . y ) - ( c . y ) ) , ( ( p . z ) - ( c . z ) ) ) ; double A = ( Math . pow ( d . x , 2 ) ) + ( Math . pow ( d . y , 2 ) ) ; double B = 2 * ( ( ( pc . x ) * ( d . x ) ) + ( ( pc . y ) * ( d . y ) ) ) ; double C = ( ( Math . pow ( pc . x , 2 ) ) + ( Math . pow ( pc . y , 2 ) ) ) - ( Math . pow ( R , 2 ) ) ; double discriminant = ( Math . pow ( B , 2 ) ) - ( ( 4 * A ) * C ) ; if ( discriminant < 0.0 ) { return false ; } else { double t0 = ( ( - B ) + ( Math . sqrt ( discriminant ) ) ) // ( 2 * A ) ; double t1 = ( ( - B ) - ( Math . sqrt ( discriminant ) ) ) // ( 2 * A ) ; double t = 0.0 ; Point3 q0 = new Point3 ( ) ; Point3 q1 = new Point3 ( ) ; rayIn . evaluate ( q0 , t0 ) ; rayIn . evaluate ( q1 , t1 ) ; if ( ( ( ( q0 . z ) >= ( ( c . z ) - ( H // 2 ) ) ) && ( ( q0 . z ) <= ( ( c . z ) + ( H // 2 ) ) ) ) && ( ( ( q1 . z ) >= ( ( c . z ) - ( H // 2 ) ) ) && ( ( q1 . z ) <= ( ( c . z ) + ( H // 2 ) ) ) ) ) { if ( t0 < t1 ) { t = t0 ; } else { t = t1 ; } } else if ( ( ( ( q0 . z ) >= ( ( c . z ) - ( H // 2 ) ) ) && ( ( q0 . z ) <= ( ( c . z ) + ( H // 2 ) ) ) ) && ( ! ( ( ( q1 . z ) >= ( ( c . z ) - ( H // 2 ) ) ) & ( ( q1 . z ) <= ( ( c . z ) + ( H // 2 ) ) ) ) ) ) { t = t0 ; } else if ( ( ! ( ( ( q0 . z ) >= ( ( c . z ) - ( H // 2 ) ) ) && ( ( q0 . z ) <= ( ( c . z ) + ( H // 2 ) ) ) ) ) && ( ( ( q1 . z ) >= ( ( c . z ) - ( H // 2 ) ) ) && ( ( q1 . z ) <= ( ( c . z ) + ( H // 2 ) ) ) ) ) { t = t1 ; } else { return false ; } Point3 q = new Point3 ( ) ; rayIn . evaluate ( q , t ) ; outRecord . location . set ( q ) ; outRecord . surface = this ; outRecord . t = t ; <START_BUG> outRecord . normal . set ( new Vector3 ( q . x , q . y , 0.0 ) ) ; <END_BUG> outRecord . normal . normalize ( ) ; outRecord . normal . scale ( ( - 1 ) ) ; return true ; } } public String toString ( ) { } }

Fix:
outRecord . normal . set ( new Vector3 ( ( ( q . x ) - ( c . x ) ) , ( ( q . y ) - ( c . y ) ) , 0 ) ) ;
Buggy code:
public class Global extends GlobalSettings { public void onStart ( Application app ) { if ( ( User . find ( 1 ) ) == null ) { User u = new User ( "admin@bitter.ba" , "123456" , "admin" , true ) ; User . create ( u ) ; Post p = new Post ( ) ; p . author = u ; p . content = "The<seq2seq4repair_space>very<seq2seq4repair_space>first<seq2seq4repair_space>post" ; <START_BUG> u . posts . add ( p ) ; <END_BUG> User . create ( "test@mail.com" , "123456" , "test" ) ; } } }

Fix:
p . save ( ) ;
Buggy code:
public class DB_View { public static final String copyrightNotice = Copyright . SHORT_2004 ; public static void doViews ( Connection conn ) throws SQLException { Statement stmt = conn . createStatement ( ) ; ResultSet rs = stmt . executeQuery ( ( "SELECT<seq2seq4repair_space>V.VIEWDEFINITION,<seq2seq4repair_space>" + ( "T.TABLENAME,<seq2seq4repair_space>T.SCHEMAID,<seq2seq4repair_space>V.COMPILATIONSCHEMAID<seq2seq4repair_space>FROM<seq2seq4repair_space>SYS.SYSVIEWS<seq2seq4repair_space>V,<seq2seq4repair_space>" + "SYS.SYSTABLES<seq2seq4repair_space>T<seq2seq4repair_space>WHERE<seq2seq4repair_space>T.TABLEID<seq2seq4repair_space>=<seq2seq4repair_space>V.TABLEID" ) ) ) ; boolean firstTime = true ; while ( rs . next ( ) ) { String viewSchema = dblook . lookupSchemaId ( rs . getString ( 3 ) ) ; if ( dblook . isIgnorableSchema ( viewSchema ) ) continue ; if ( ! ( dblook . stringContainsTargetTable ( rs . getString ( 1 ) ) ) ) continue ; if ( firstTime ) { Logs . reportString ( "----------------------------------------------" ) ; <START_BUG> Logs . reportMessage ( "CSLOOK_Header" , "views" ) ; <END_BUG> Logs . reportString ( "----------------------------------------------\n" ) ; } Logs . writeToNewDDL ( "SET<seq2seq4repair_space>SCHEMA<seq2seq4repair_space>" ) ; Logs . writeToNewDDL ( dblook . lookupSchemaId ( rs . getString ( 4 ) ) ) ; Logs . writeStmtEndToNewDDL ( ) ; Logs . writeToNewDDL ( dblook . removeNewlines ( rs . getString ( 1 ) ) ) ; Logs . writeStmtEndToNewDDL ( ) ; Logs . writeNewlineToNewDDL ( ) ; firstTime = false ; } if ( ! firstTime ) { Logs . reportMessage ( "CSLOOK_DefaultSchema" ) ; Logs . writeToNewDDL ( "SET<seq2seq4repair_space>SCHEMA<seq2seq4repair_space>\"APP\"" ) ; Logs . writeStmtEndToNewDDL ( ) ; Logs . writeNewlineToNewDDL ( ) ; } rs . close ( ) ; stmt . close ( ) ; return ; } }

Fix:
Logs . reportMessage ( "CSLOOK_ViewsHeader" ) ;
Buggy code:
public class BlocksIndexInput extends IndexInput { public static final int CACHE_SIZE = 16 ; protected FileListBlock currentFileListBlock ; protected int currentFileListBlockNum ; protected int currentIndexBlockNum ; protected IndexBlock currentIndexBlock ; private RandomAccessFile raf ; protected File indexFile ; protected LRUCache blockCache ; protected boolean opened = false ; protected IndexSummary summary ; public BlocksIndexInput ( File inputFile ) { } public void clearCache ( ) { } public void close ( ) throws IOException { } public IndexedFile getCurrentFile ( ) throws IOException { } protected WordEntry getEntry ( char [ ] word ) throws IOException { } protected FileListBlock getFileListBlock ( int blockNum ) throws IOException { } protected IndexBlock getIndexBlock ( int blockNum ) throws IOException { } public IndexedFile getIndexedFile ( int fileNum ) throws IOException { } public IndexedFile getIndexedFile ( IDocument document ) throws IOException { } protected int [ ] getMatchingFileNumbers ( char [ ] word ) throws IOException { } public int getNumFiles ( ) { } public int getNumWords ( ) { } public Object getSource ( ) { } protected void init ( ) throws IOException { } public void moveToNextFile ( ) throws IOException { } public void moveToNextWordEntry ( ) throws IOException { } public void open ( ) throws IOException { } public IQueryResult [ ] query ( String word ) throws IOException { } public IEntryResult [ ] queryEntriesMatching ( char [ ] pattern ) throws IOException { } public IEntryResult [ ] queryEntriesPrefixedBy ( char [ ] prefix ) throws IOException { } public IEntryResult [ ] queryEntriesPrefixedBy ( char [ ] prefix , boolean isCaseSensitive ) throws IOException { open ( ) ; <START_BUG> int blockLoc = summary . getFirstBlockLocationForPrefix ( prefix ) ; <END_BUG> if ( blockLoc < 0 ) return null ; IEntryResult [ ] entries = new IEntryResult [ 5 ] ; int count = 0 ; while ( blockLoc >= 0 ) { IndexBlock block = getIndexBlock ( summary . getBlockNum ( blockLoc ) ) ; block . reset ( ) ; boolean found = false ; WordEntry entry = new WordEntry ( ) ; while ( block . nextEntry ( entry ) ) { if ( CharOperation . prefixEquals ( prefix , entry . getWord ( ) , isCaseSensitive ) ) { if ( count == ( entries . length ) ) { System . arraycopy ( entries , 0 , ( entries = new IEntryResult [ count * 2 ] ) , 0 , count ) ; } entries [ ( count ++ ) ] = new EntryResult ( entry . getWord ( ) , entry . getRefs ( ) ) ; found = true ; } else { if ( found ) break ; } } blockLoc = summary . getNextBlockLocationForPrefix ( prefix , blockLoc ) ; } if ( count == 0 ) return null ; if ( count != ( entries . length ) ) { System . arraycopy ( entries , 0 , ( entries = new IEntryResult [ count ] ) , 0 , count ) ; } return entries ; } public IQueryResult [ ] queryFilesReferringToPrefix ( char [ ] prefix ) throws IOException { } public IQueryResult [ ] queryInDocumentNames ( String word ) throws IOException { } protected void setFirstFile ( ) throws IOException { } protected void setFirstWord ( ) throws IOException { } }

Fix:
int blockLoc = summary . getFirstBlockLocationForPrefix ( prefix , isCaseSensitive ) ;
Buggy code:
public class StackTest { private Stack < Integer > stack ; private static Integer nodeData = 5 ; private static Integer nodeData2 = 6 ; private static Integer nodeData3 = 7 ; @ Before public void setUp ( ) { } @ Test public void testEmptyStack ( ) { } @ Test public void testPush ( ) { } private void createArbitraryStack ( ) { } @ Test public void testPopEmptyStack ( ) { <START_BUG> assertNull ( stack . top ( ) ) ; <END_BUG> } @ Test public void testPop ( ) { } }

Fix:
assertNull ( stack . pop ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ Ignore ( "JBQA-5119" ) public class MySqlDsDriverInEarReauthTestCase { private static String user1 = "dsreauth1" ; private static String user2 = "dsreauth2" ; @ Deployment public static Archive < ? > deploy ( ) throws Exception { File jdbcJar = new File ( System . getProperty ( "jbossas.ts.integ.dir" , "." ) , "//basic//src//test//resources//mysql-connector-java-5.1.15.jar" ) ; JavaArchive ja = ShrinkWrap . createFromZipFile ( JavaArchive . class , jdbcJar ) ; JavaArchive jt = ShrinkWrap . create ( JavaArchive . class , "test.jar" ) . addClasses ( MySqlDsDriverInEarReauthTestCase . class , DsUtil . class ) ; <START_BUG> final EnterpriseArchive ear = ShrinkWrap . create ( EnterpriseArchive . class , "test.ear" ) . addAsLibrary ( ja ) . addAsLibrary ( jt ) . addAsManifestResource ( "jca//mysql-ds.xml" , "mysql-ds.xml" ) . addAsManifestResource ( new StringAsset ( "Dependencies:<seq2seq4repair_space>org.jboss.ironjacamar.jdbcadapters\n" ) , "MANIFEST.MF" ) ; <END_BUG> return ear ; } @ Resource ( mappedName = "java:jboss//UserTransaction" ) private UserTransaction trans ; @ Resource ( mappedName = "java:jboss//datasources//MySqlDs" ) private DataSource ds ; @ Test public void testDataSourceDefinition ( ) throws Exception { } }

Fix:
final EnterpriseArchive ear = ShrinkWrap . create ( EnterpriseArchive . class , "test.ear" ) . addAsLibrary ( ja ) . addAsLibrary ( jt ) . addAsManifestResource ( MySqlDsDriverInEarReauthTestCase . class . getPackage ( ) , "mysql-ds.xml" , "mysql-ds.xml" ) . addAsManifestResource ( new StringAsset ( "Dependencies:<seq2seq4repair_space>org.jboss.ironjacamar.jdbcadapters\n" ) , "MANIFEST.MF" ) ;
Buggy code:
public class SimpleName extends Name { private static final String MISSING_IDENTIFIER = "MISSING" ; private String identifier = SimpleName . MISSING_IDENTIFIER ; SimpleName ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { <START_BUG> boolean visitChildren = visitor . visit ( this ) ; <END_BUG> visitor . endVisit ( this ) ; } public String getIdentifier ( ) { } public void setIdentifier ( String identifier ) { } public boolean isDeclaration ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
visitor . visit ( this ) ;
Buggy code:
@ RestController @ RequestMapping ( "//copynumbergenecentric" ) public class CopyNumberGeneCentricController { private static final Log log = LogFactory . getLog ( CopyNumberGeneCentricController . class ) ; @ Autowired private CopyNumberGeneCentricService copyNumberGeneCentricService ; @ RequestMapping ( value = "//all" , method = { RequestMethod . GET , RequestMethod . HEAD } ) public Iterable < CopyNumberGeneCentric > findAll ( ) { } @ RequestMapping ( value = "//geneId//{geneId}" , method = { RequestMethod . GET , RequestMethod . HEAD } ) public ResponseEntity < List < CopyNumberGeneCentric > > findCopyNumberGeneCentricByGeneId ( @ PathVariable ( "geneId" ) Integer geneId ) { } @ RequestMapping ( value = "//sampleId//{sampleId}" , method = { RequestMethod . GET , RequestMethod . HEAD } ) public List < CopyNumberGeneCentric > findCopyNumberGeneCentricBySampleId ( @ PathVariable ( "sampleId" ) String sampleId ) { } @ RequestMapping ( value = "" , method = { RequestMethod . GET , RequestMethod . HEAD } ) public ResponseEntity < List < CopyNumberGeneCentric > > findCopyNumberGeneCentric ( @ RequestParam ( value = "geneId" , required = false ) Integer geneId , @ RequestParam ( value = "sampleId" , required = false ) String sampleId ) { try { long startTime = System . nanoTime ( ) ; HashMap < String , String > param = new HashMap < > ( ) ; if ( geneId != null ) { String geneIdString = Integer . toString ( geneId ) ; param . put ( "geneId" , geneIdString ) ; } param . put ( "sampleId" , sampleId ) ; List < CopyNumberGeneCentric > queryResult = copyNumberGeneCentricService . find ( param ) ; long endTime = System . nanoTime ( ) ; long execTime_nano = endTime - startTime ; CopyNumberGeneCentricController . log . info ( ( ( ( ( ( "findCopyNumberGeneCentric()<seq2seq4repair_space>query<seq2seq4repair_space>finished;<seq2seq4repair_space>execution<seq2seq4repair_space>time:<seq2seq4repair_space>" + ( TimeUnit . NANOSECONDS . toSeconds ( execTime_nano ) ) ) + "s" ) + "(" ) + execTime_nano ) + "ns)" ) ) ; HttpHeaders responseHeaders = new HttpHeaders ( ) ; <START_BUG> responseHeaders . set ( "Query<seq2seq4repair_space>time" , ( ( Long . toString ( ( execTime_nano // 1000 ) ) ) + "ms" ) ) ; <END_BUG> return new ResponseEntity < List < CopyNumberGeneCentric > > ( queryResult , responseHeaders , HttpStatus . OK ) ; } catch ( Exception e ) { CopyNumberGeneCentricController . log . error ( ( "Exception<seq2seq4repair_space>caught:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; return null ; } } }

Fix:
responseHeaders . set ( "Query<seq2seq4repair_space>time" , ( ( Long . toString ( ( execTime_nano // 1000000 ) ) ) + "ms" ) ) ;
Buggy code:
public class Game { public static boolean frustum ; public static Transform world_transform ; public static ChunksWorkersExecutorService chunks_workers_executor_service ; public static Shader current_shader ; public static Shader world_shader ; public static Shader gui_shader ; public static Player player ; public static Vector2f world_shader_texture_info = new Vector2f ( TextureAtlas . atlas_size , TextureAtlas . crop_size ) ; public static void init ( ) { ResourceUtil . load_textures ( "atlas.png" ) ; Camera . init ( 70 , ( ( ( float ) ( Window . width ) ) // ( ( float ) ( Window . height ) ) ) , 0.01F , 512.0F ) ; Game . world_shader = new Shader ( "world.vs" , "world.fs" ) . compile ( ) ; Game . world_shader . save_attrs ( "attr_pos" , "attr_tex_offset" , "attr_tex_coord" , "attr_color" ) ; Game . gui_shader = new Shader ( "gui.vs" , "gui.fs" ) . compile ( ) ; Game . gui_shader . save_attrs ( "attr_pos" ) . save_attr ( "attr_color" ) ; Game . current_shader = Game . gui_shader ; GUI . init ( ) ; Game . current_shader = Game . world_shader ; Game . world_transform = new Transform ( ) ; Game . chunks_workers_executor_service = new ChunksWorkersExecutorService ( ) ; <START_BUG> World . init ( 16 , 1 , 16 , 16 , 16 ) ; <END_BUG> World . gen ( ) ; Game . player = new Player ( ) ; } private static boolean was_input = false ; public static void before_render ( ) { } public static void render ( ) { } public static void after_render ( ) { } public static void destroy ( ) { } }

Fix:
World . init ( 8 , 4 , 32 , 32 , 64 ) ;
Buggy code:
public class Skin { public static final int SINGLE_SKIN_SIZE = ( 64 * 32 ) * 4 ; public static final int DOUBLE_SKIN_SIZE = ( 64 * 64 ) * 4 ; public static final String MODEL_STEVE = "Standard_Steve" ; public static final String MODEL_ALEX = "Standard_Alex" ; private byte [ ] data = new byte [ Skin . SINGLE_SKIN_SIZE ] ; private String model ; public Skin ( byte [ ] data ) { } public Skin ( InputStream inputStream ) { } public Skin ( ImageInputStream inputStream ) { } public Skin ( File file ) { } public Skin ( URL url ) { } public Skin ( BufferedImage image ) { } public Skin ( byte [ ] data , String model ) { } public Skin ( InputStream inputStream , String model ) { } public Skin ( ImageInputStream inputStream , String model ) { } public Skin ( File file , String model ) { } public Skin ( URL url , String model ) { } public Skin ( BufferedImage image , String model ) { } public void parseBufferedImage ( BufferedImage image ) { } public byte [ ] getData ( ) { } public String getModel ( ) { } public void setData ( byte [ ] data ) { <START_BUG> if ( ! ( this . isValid ( ) ) ) { <END_BUG> throw new IllegalArgumentException ( "Invalid<seq2seq4repair_space>skin" ) ; } this . data = data ; } public void setModel ( String model ) { } public boolean isValid ( ) { } }

Fix:
if ( ( ( data . length ) != ( Skin . SINGLE_SKIN_SIZE ) ) && ( ( this . data . length ) != ( Skin . DOUBLE_SKIN_SIZE ) ) ) {
Buggy code:
public class DriverTest extends MahoutTestCase { private File indexDir ; private File outputDir ; private Configuration conf ; @ Before @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; indexDir = getTestTempDir ( "intermediate" ) ; indexDir . delete ( ) ; outputDir = getTestTempDir ( "output" ) ; outputDir . delete ( ) ; <START_BUG> conf = new Configuration ( ) ; <END_BUG> } private Document asDocument ( String line ) { } static class TextFieldWithTermVectors extends Field { public static final FieldType TYPE = new FieldType ( ) ; public TextFieldWithTermVectors ( String name , String value ) { } } @ Test public void sequenceFileDictionary ( ) throws IOException { } }

Fix:
conf = getConfiguration ( ) ;
Buggy code:
public class NotificationBootService extends IntentService { final int CURRENT_ANDROID_VERSION = VERSION . SDK_INT ; int priority ; int repeatTime = 0 ; boolean pref_expand ; boolean pref_swipe ; boolean pref_share_action ; String clickNotif ; String intentType ; String pref_priority ; String noteString ; PendingIntent alarmPendingIntent ; public NotificationBootService ( ) { } @ TargetApi ( VERSION_CODES . JELLY_BEAN ) @ Override public void onStart ( Intent intent , int startId ) { } @ TargetApi ( VERSION_CODES . JELLY_BEAN ) private void initializeSettings ( ) { SharedPreferences sharedPreferences = PreferenceManager . getDefaultSharedPreferences ( getBaseContext ( ) ) ; if ( ( CURRENT_ANDROID_VERSION ) >= 16 ) { pref_expand = sharedPreferences . getBoolean ( "pref_expand" , true ) ; pref_swipe = sharedPreferences . getBoolean ( "pref_swipe" , false ) ; pref_priority = sharedPreferences . getString ( "pref_priority" , "normal" ) ; switch ( pref_priority ) { case "high" : priority = Notification . PRIORITY_MAX ; break ; case "low" : priority = Notification . PRIORITY_LOW ; break ; case "minimum" : priority = Notification . PRIORITY_MIN ; break ; default : priority = Notification . PRIORITY_DEFAULT ; break ; } } else { pref_expand = false ; pref_swipe = sharedPreferences . getBoolean ( "pref_swipe" , true ) ; } <START_BUG> clickNotif = sharedPreferences . getString ( "clickNotif" , "edit" ) ; <END_BUG> pref_share_action = sharedPreferences . getBoolean ( "pref_share_action" , true ) ; } private PendingIntent createOnDismissedIntent ( int notificationId ) { } private PendingIntent createEditIntent ( NoteyNote n ) { } private PendingIntent createShareIntent ( NoteyNote n ) { } private PendingIntent createInfoScreenIntent ( NoteyNote n ) { } private PendingIntent onNotifClickPI ( String clickNotif , NoteyNote n ) { } @ Override protected void onHandleIntent ( Intent intent ) { } No newline ; at end ; of file ; }

Fix:
clickNotif = sharedPreferences . getString ( "clickNotif" , "info" ) ;
Buggy code:
public class BcelCflowStackFieldAdder extends BcelTypeMunger { private ResolvedMember cflowStackField ; public BcelCflowStackFieldAdder ( ResolvedMember cflowStackField ) { } public boolean munge ( BcelClassWeaver weaver ) { LazyClassGen gen = weaver . getLazyClassGen ( ) ; if ( ! ( gen . getType ( ) . equals ( cflowStackField . getDeclaringType ( ) ) ) ) return false ; Field f = new org . apache . bcel . generic . FieldGen ( cflowStackField . getModifiers ( ) , BcelWorld . makeBcelType ( cflowStackField . getReturnType ( ) ) , cflowStackField . getName ( ) , gen . getConstantPoolGen ( ) ) . getField ( ) ; <START_BUG> gen . addField ( f ) ; <END_BUG> LazyMethodGen clinit = gen . getAjcPreClinit ( ) ; InstructionList setup = new InstructionList ( ) ; InstructionFactory fact = gen . getFactory ( ) ; setup . append ( fact . createNew ( new org . apache . bcel . generic . ObjectType ( NameMangler . CFLOW_STACK_TYPE ) ) ) ; setup . append ( InstructionFactory . createDup ( 1 ) ) ; setup . append ( fact . createInvoke ( CFLOW_STACK_TYPE , "<init>" , VOID , new Type [ 0 ] , INVOKESPECIAL ) ) ; setup . append ( Utility . createSet ( fact , cflowStackField ) ) ; clinit . getBody ( ) . insert ( setup ) ; return true ; } public ResolvedMember getMatchingSyntheticMember ( Member member ) { } public ResolvedMember getSignature ( ) { } public boolean matches ( ResolvedTypeX onType ) { } }

Fix:
gen . addField ( f , getSourceLocation ( ) ) ;
Buggy code:
public class StringLiteral extends Expression { private static final String SPECIALS = "\b\t\n\f\r\"\'\\" ; private static final String QUOTED_SPECIALS = "btnfr\"\'\\" ; private String escapedValue = "\"\"" ; StringLiteral ( AST ast ) { } ASTNode clone ( AST target ) { } boolean equalSubtrees ( Object other ) { } void accept0 ( ASTVisitor visitor ) { } public String getEscapedValue ( ) { } public void setEscapedValue ( String token ) { if ( token == null ) { throw new IllegalArgumentException ( ) ; } <START_BUG> Scanner scanner = this . getAST ( ) . scanner ; <END_BUG> char [ ] source = token . toCharArray ( ) ; scanner . setSourceBuffer ( source ) ; scanner . resetTo ( 0 , source . length ) ; try { int tokenType = scanner . getNextToken ( ) ; switch ( tokenType ) { case Scanner . TokenNameStringLiteral : break ; default : throw new IllegalArgumentException ( ) ; } } catch ( InvalidInputException e ) { throw new IllegalArgumentException ( ) ; } modifying ( ) ; this . escapedValue = token ; } public String getLiteralValue ( ) { } public void setLiteralValue ( String value ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
Scanner scanner = getAST ( ) . scanner ;
Buggy code:
@ RestController public class CaseController { @ Autowired CaseRepository caseRepository ; @ Autowired private NotificationService notificationService ; @ RequestMapping ( value = "//cases" , method = RequestMethod . GET ) @ AccessUser public CaseList listCases ( @ CurrentUser User user ) { } @ RequestMapping ( value = "//cases//open" , method = RequestMethod . GET ) @ AccessPhysician public CaseList listOpenCases ( ) { } @ RequestMapping ( value = "//cases//{caseId}" , method = RequestMethod . GET ) @ AccessUser public Case listCases ( @ CurrentUser User user , @ PathVariable long caseId ) { } @ RequestMapping ( value = "//cases//{caseId}//accept" , method = RequestMethod . POST ) @ AccessPhysician public Case acceptCase ( @ CurrentUser User user , @ PathVariable long caseId ) { Case c = caseRepository . getCaseById ( caseId ) ; if ( Access . canAccess ( user , c ) ) { Physician physician = ( ( Physician ) ( user ) ) ; <START_BUG> if ( ( c . getStatus ( ) ) == ( CaseStatus . LookingForPhysician ) ) { <END_BUG> c . setStatus ( Active ) ; c . setPhysician ( physician ) ; c = caseRepository . save ( c ) ; notificationService . notifyCase ( c , user , ( ( user . getName ( ) ) + "<seq2seq4repair_space>accepted<seq2seq4repair_space>your<seq2seq4repair_space>case" ) ) ; return c ; } else { throw new at . tuwien . telemedizin . dermadoc . server . exceptions . InvalidCaseStatusException ( c ) ; } } else { throw new EntityNotFoundException ( "user<seq2seq4repair_space>has<seq2seq4repair_space>no<seq2seq4repair_space>access" ) ; } } @ RequestMapping ( value = "//cases" , method = RequestMethod . POST ) @ AccessPatient public Case addCase ( @ CurrentUser User user , @ RequestBody Case newCase ) { } }

Fix:
if ( ( LookingForPhysician . equals ( c . getStatus ( ) ) ) || ( WaitingForAccept . equals ( c . getStatus ( ) ) ) ) {
Buggy code:
public class ToOrCcFilter extends HeaderfieldFilter { public ToOrCcFilter ( ) { } public Object [ ] getAttributes ( ) { } public boolean process ( Object [ ] args , Folder folder , Object uid ) throws Exception { <START_BUG> ColumbaHeader header = folder . getMessageHeader ( uid ) ; <END_BUG> if ( header == null ) return false ; int condition = FilterCriteria . getCriteria ( ( ( String ) ( args [ 0 ] ) ) ) ; String pattern = ( ( String ) ( args [ 1 ] ) ) ; String to = ( ( String ) ( header . get ( "To" ) ) ) ; String cc = ( ( String ) ( header . get ( "Cc" ) ) ) ; boolean result = match ( to , condition , pattern ) ; result |= match ( cc , condition , pattern ) ; return result ; } }

Fix:
Header header = folder . getHeaderFields ( uid , new String [ ] { "To" , "Cc" } ) ;
Buggy code:
public class FileDialog extends Dialog { String [ ] filterNames = new String [ 0 ] ; String [ ] filterExtensions = new String [ 0 ] ; String [ ] fileNames = new String [ 0 ] ; String filterPath = "" ; String fileName = "" ; public FileDialog ( Shell parent ) { } public FileDialog ( Shell parent , int style ) { } String createJavaString ( int ptr ) { int charArray = OS . String_ToCharArray ( ptr ) ; char [ ] chars = new char [ OS . String_Length ( ptr ) ] ; <START_BUG> OS . memmove ( chars , charArray , ( ( chars . length ) * 2 ) ) ; <END_BUG> return new String ( chars ) ; } public String getFileName ( ) { } public String [ ] getFileNames ( ) { } public String [ ] getFilterExtensions ( ) { } public String [ ] getFilterNames ( ) { } public String getFilterPath ( ) { } public String open ( ) { } public void setFileName ( String string ) { } public void setFilterExtensions ( String [ ] extensions ) { } public void setFilterNames ( String [ ] names ) { } public void setFilterPath ( String string ) { } }

Fix:
OS . memcpy ( chars , charArray , ( ( chars . length ) * 2 ) ) ;