nus-yam/ex-repair huggingface dataset:
Buggy code:
public class HadoopFileSystemProvider extends FileSystemProvider { public static final String SCHEME = "hdfs" ; private Logger logger = LoggerFactory . getLogger ( getClass ( ) ) ; static final HadoopPath toHadoopPath ( Path path ) { } @ Override public void checkAccess ( Path path , AccessMode ... modes ) throws IOException { } @ Override public void copy ( Path source , Path target , CopyOption ... options ) throws IOException { } @ Override public void createDirectory ( Path dir , FileAttribute < ? > ... attrs ) throws IOException { } @ Override public void delete ( Path path ) throws IOException { } @ Override public < V extends FileAttributeView > V getFileAttributeView ( Path path , Class < V > type , LinkOption ... options ) { } public static HadoopFileAttributeView getView ( HadoopPath path , String type ) { if ( type == null ) throw new NullPointerException ( ) ; if ( type . equals ( "basic" ) ) return new HadoopFileAttributeView ( path , false ) ; if ( type . equals ( "hadoop" ) ) <START_BUG> return new HadoopFileAttributeView ( path , false ) ; <END_BUG> return null ; } @ SuppressWarnings ( "unchecked" ) static < V extends FileAttributeView > V getView ( HadoopPath path , Class < V > type ) { } @ Override public FileStore getFileStore ( Path path ) throws IOException { } @ Override public FileSystem getFileSystem ( URI uri ) { } @ Override public Path getPath ( URI uri ) { } @ Override public String getScheme ( ) { } @ Override public boolean isHidden ( Path path ) throws IOException { } @ Override public boolean isSameFile ( Path path , Path path2 ) throws IOException { } @ Override public void move ( Path source , Path target , CopyOption ... options ) throws IOException { } @ Override public SeekableByteChannel newByteChannel ( Path path , Set < ? extends OpenOption > options , FileAttribute < ? > ... attrs ) throws IOException { } @ Override public DirectoryStream < Path > newDirectoryStream ( Path dir , DirectoryStream . Filter < ? super Path > filter ) throws IOException { } @ Override public FileSystem newFileSystem ( URI uri , Map < String , ? > env ) throws IOException { } @ SuppressWarnings ( "unchecked" ) @ Override public < A extends BasicFileAttributes > A readAttributes ( Path path , Class < A > type , LinkOption ... options ) throws IOException { } @ Override public Map < String , Object > readAttributes ( Path path , String attributes , LinkOption ... options ) throws IOException { } @ Override public void setAttribute ( Path path , String attribute , Object value , LinkOption ... options ) throws IOException { } }

Fix:
return new HadoopFileAttributeView ( path , true ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class GuiComponentGallery extends JPanel { JTabbedPane tabPane ; public GuiComponentGallery ( ) { } private void initializeLayout ( ) { } private void initializeUiComponents ( ) { tabPane = new JTabbedPane ( ) ; tabPane . setTabLayoutPolicy ( JTabbedPane . WRAP_TAB_LAYOUT ) ; tabPane . addTab ( "intro" , createPanel ( "GUI<seq2seq4repair_space>Component<seq2seq4repair_space>Gallery" ) ) ; <START_BUG> tabPane . addTab ( "frets" , new FretBoardPanel ( false ) ) ; <END_BUG> tabPane . addTab ( "keys" , new KeyBoardPanel ( ) ) ; tabPane . addTab ( "rhythms" , new RhythmBoardPanel ( ) ) ; tabPane . addTab ( "sequences" , new SequenceBoardPanel ( ) ) ; } private JPanel createPanel ( String msg ) { } }

Fix:
tabPane . addTab ( "frets" , new FretBoardPanel ( true ) ) ;
Buggy code:
public class Tester { static final Logger log = LoggerFactory . getLogger ( Tester . class ) ; private Tester ( ) { } public static void main ( final String [ ] args ) { try { String host = "localhost" ; int port = 2947 ; switch ( args . length ) { case 0 : break ; case 1 : host = args [ 0 ] ; break ; case 2 : host = args [ 0 ] ; if ( args [ 1 ] . matches ( "\\d+" ) ) { port = Integer . parseInt ( args [ 1 ] ) ; } break ; default : break ; } final CSVtoTPV simulator = new CSVtoTPV ( ) ; simulator . addListener ( new ObjectListener ( ) { @ Override public void handleTPV ( final TPVObject tpv ) { Tester . log . info ( "TPV:<seq2seq4repair_space>{}" , tpv ) ; } } ) ; <START_BUG> simulator . read ( new File ( "file.csv" ) ) ; <END_BUG> Thread . sleep ( 60000 ) ; } catch ( final Exception e ) { Tester . log . error ( "Problem<seq2seq4repair_space>encountered" , e ) ; } } }

Fix:
simulator . read ( new File ( "//home//juzt3//Documentos//MyTracks//csv//Prueba.csv" ) ) ;
Buggy code:
@ NotThreadSafe public class DirectedAcyclicGraph < T > { private final List < DirectedAcyclicGraphNode < T > > mRoots ; private final Map < T , DirectedAcyclicGraphNode < T > > mIndex ; public DirectedAcyclicGraph ( ) { } public void add ( T payload , List < T > parents ) { } public void deleteLeaf ( T payload ) { } public boolean contains ( T payload ) { } public List < T > getChildren ( T payload ) { } public List < T > getParents ( T payload ) { } public boolean isRoot ( T payload ) { } public List < T > getRoots ( ) { } public List < T > sortTopologically ( Set < T > payloads ) { List < T > result = new ArrayList < > ( ) ; Set < T > input = new HashSet < > ( payloads ) ; Deque < DirectedAcyclicGraphNode < T > > toVisit = new java . util . ArrayDeque ( mRoots ) ; while ( ! ( toVisit . isEmpty ( ) ) ) { DirectedAcyclicGraphNode < T > visit = toVisit . removeFirst ( ) ; T payload = visit . getPayload ( ) ; if ( input . remove ( payload ) ) { result . add ( visit . getPayload ( ) ) ; } toVisit . addAll ( visit . getChildren ( ) ) ; } <START_BUG> Preconditions . checkState ( toVisit . isEmpty ( ) , "Not<seq2seq4repair_space>all<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>payloads<seq2seq4repair_space>are<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>DAG:<seq2seq4repair_space>" , input ) ; <END_BUG> return result ; } public List < T > getAllInTopologicalOrder ( ) { } }

Fix:
Preconditions . checkState ( input . isEmpty ( ) , "Not<seq2seq4repair_space>all<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>payloads<seq2seq4repair_space>are<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>DAG:<seq2seq4repair_space>" , input ) ;
Buggy code:
public class ViewController implements Initializable { private int deletedAppointmentIndex ; private Appointment deletedApppointment ; @ FXML private ListView listView ; public ViewController ( ) { } @ Override public void initialize ( URL location , ResourceBundle resources ) { } private void injectAppointments ( ) { } @ FXML public void btnAdd ( ActionEvent event ) { } @ FXML public void btnDelete ( ActionEvent event ) { } private int calculateAppointmentsindex ( int index ) { <START_BUG> int appindex = 0 ; <END_BUG> int nr = - 1 ; for ( Appointment a : DataManager . getAppointments ( ) ) { appindex ++ ; nr ++ ; int rep = a . getRepetisjon ( ) ; nr += rep ; if ( ( index >= ( nr - rep ) ) && ( index <= nr ) ) { return appindex ; } } System . out . println ( "Calculate<seq2seq4repair_space>appointments's<seq2seq4repair_space>index:<seq2seq4repair_space>NOT<seq2seq4repair_space>FOUND!" ) ; return - 1 ; } @ FXML public void btnEdit ( ActionEvent event ) { } private void editSelectedAppointment ( int index ) { } @ FXML public void btnUndo ( ActionEvent event ) { } @ FXML public void btnQuit ( ActionEvent event ) { } }

Fix:
int appindex = - 1 ;
Buggy code:
public class SaveMessageCommand extends FolderCommand { private MessageFolder folder ; public SaveMessageCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( WorkerStatusController worker ) throws Exception { ComposerCommandReference [ ] r = ( ( ComposerCommandReference [ ] ) ( getReferences ( ) ) ) ; ComposerController composerController = r [ 0 ] . getComposerController ( ) ; AccountItem item = ( ( ComposerModel ) ( composerController . getModel ( ) ) ) . getAccountItem ( ) ; SendableMessage message = ( ( SendableMessage ) ( r [ 0 ] . getMessage ( ) ) ) ; if ( message == null ) { message = new MessageComposer ( ( ( ComposerModel ) ( composerController . getModel ( ) ) ) ) . compose ( worker ) ; } folder = ( ( MessageFolder ) ( r [ 0 ] . getFolder ( ) ) ) ; InputStream sourceStream = message . getSourceStream ( ) ; <START_BUG> folder . addMessage ( sourceStream , message . getHeader ( ) . getAttributes ( ) , message . getFlags ( ) ) ; <END_BUG> sourceStream . close ( ) ; } }

Fix:
folder . addMessage ( sourceStream , message . getHeader ( ) . getAttributes ( ) , message . getHeader ( ) . getFlags ( ) ) ;
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 ( ) { } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } Widget [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { <START_BUG> return new String [ ] { "ToolTipText" } ; <END_BUG> } String getTabText ( ) { } void setTitleText ( ) { } void setExampleWidgetState ( ) { } }

Fix:
return new String [ ] { "Text" , "ToolTipText" } ;
Buggy code:
@ Component public class AuditLogGenerator { private static Logger log = LoggerFactory . getLogger ( AuditLogGenerator . class ) ; private JpaAuditLogItemRepo auditLogItemRepo ; private LogManager logManager ; @ Autowired public AuditLogGenerator ( JpaAuditLogItemRepo auditLogItemRepo , LogManager logManager ) { } public void execute ( ) { AuditLogGenerator . log . info ( "executing<seq2seq4repair_space>generator..." ) ; try { while ( true ) { <START_BUG> List < JpaAuditLogItem > items = auditLogItemRepo . findByWrittenFalse ( ) ; <END_BUG> if ( CollectionUtils . isEmpty ( items ) ) { AuditLogGenerator . log . info ( "No<seq2seq4repair_space>audit<seq2seq4repair_space>items<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>processing:<seq2seq4repair_space>nowhere<seq2seq4repair_space>to<seq2seq4repair_space>go,<seq2seq4repair_space>nothing<seq2seq4repair_space>to<seq2seq4repair_space>do." , items . size ( ) ) ; break ; } AuditLogGenerator . log . info ( "{}<seq2seq4repair_space>audit<seq2seq4repair_space>items<seq2seq4repair_space>read<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>the<seq2seq4repair_space>jpa<seq2seq4repair_space>repo." , items . size ( ) ) ; for ( JpaAuditLogItem item : items ) { write ( item ) ; } AuditLogGenerator . log . info ( "{}<seq2seq4repair_space>audit<seq2seq4repair_space>items<seq2seq4repair_space>written." , items . size ( ) ) ; } } catch ( Exception ex ) { AuditLogGenerator . log . error ( ex . getMessage ( ) , ex ) ; throw new RuntimeException ( ex ) ; } finally { try { logManager . flushLogs ( ) ; AuditLogGenerator . log . info ( "audit<seq2seq4repair_space>log<seq2seq4repair_space>run<seq2seq4repair_space>completed<seq2seq4repair_space>successfully." ) ; } catch ( Exception ex ) { AuditLogGenerator . log . error ( ex . getMessage ( ) , ex ) ; throw new RuntimeException ( ex ) ; } } } private void write ( JpaAuditLogItem item ) { } }

Fix:
List < JpaAuditLogItem > items = auditLogItemRepo . findByWrittenFalseOrderByTimestampAsc ( ) ;
Buggy code:
public class TableItem extends Item { Table parent ; String [ ] strings ; Image [ ] images ; Font font ; Font [ ] cellFont ; boolean checked ; boolean grayed ; boolean cached ; int imageIndent ; int background = - 1 ; int foreground = - 1 ; int [ ] cellBackground ; int [ ] cellForeground ; public TableItem ( Table parent , int style ) { } public TableItem ( Table parent , int style , int index ) { } TableItem ( Table parent , int style , int index , boolean create ) { } static Table checkNull ( Table control ) { } protected void checkSubclass ( ) { } void clear ( ) { } void destroyWidget ( ) { } int fontHandle ( int index ) { } public Color getBackground ( ) { } public Color getBackground ( int index ) { } public Rectangle getBounds ( ) { } public Rectangle getBounds ( int index ) { } RECT getBounds ( int row , int column , boolean getText , boolean getImage , boolean fullText ) { } RECT getBounds ( int row , int column , boolean getText , boolean getImage , boolean fullText , boolean fullImage , int hDC ) { } public boolean getChecked ( ) { } public Font getFont ( ) { } public Font getFont ( int index ) { } public Color getForeground ( ) { } public Color getForeground ( int index ) { } public boolean getGrayed ( ) { } public Image getImage ( ) { } public Image getImage ( int index ) { } public Rectangle getImageBounds ( int index ) { } public int getImageIndent ( ) { } String getNameText ( ) { } public Table getParent ( ) { } public String getText ( ) { } public String getText ( int index ) { } public Rectangle getTextBounds ( int index ) { } void redraw ( ) { } void redraw ( int column , boolean drawText , boolean drawImage ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } public void setBackground ( Color color ) { } public void setBackground ( int index , Color color ) { } public void setChecked ( boolean checked ) { } void setChecked ( boolean checked , boolean notify ) { this . checked = checked ; if ( ( ( parent . style ) & ( SWT . VIRTUAL ) ) != 0 ) cached = true ; if ( notify ) { Event event = new Event ( ) ; event . item = this ; event . detail = SWT . CHECK ; <START_BUG> parent . postEvent ( Selection , event ) ; <END_BUG> } redraw ( ) ; } public void setFont ( Font font ) { } public void setFont ( int index , Font font ) { } public void setForeground ( Color color ) { } public void setForeground ( int index , Color color ) { } public void setGrayed ( boolean grayed ) { } public void setImage ( Image [ ] images ) { } public void setImage ( int index , Image image ) { } public void setImage ( Image image ) { } public void setImageIndent ( int indent ) { } public void setText ( String [ ] strings ) { } public void setText ( int index , String string ) { } public void setText ( String string ) { } }

Fix:
parent . sendSelectionEvent ( Selection , event , false ) ;
Buggy code:
public class Matrix { private double [ ] _data ; private final int _nbRows ; private final int _nbColumns ; public Matrix ( double [ ] backend , int p_nbRows , int p_nbColumns ) { } public static boolean compare ( double [ ] a , double [ ] b , double eps ) { } public static boolean compareArray ( double [ ] [ ] a , double [ ] [ ] b , double eps ) { } public double [ ] data ( ) { } public double [ ] exportRowMatrix ( ) { } public Matrix importRowMatrix ( double [ ] rowdata , int rows , int columns ) { } public void setData ( double [ ] data ) { } public int rows ( ) { } public int columns ( ) { } public double get ( int rowIndex , int columnIndex ) { } public double set ( int rowIndex , int columnIndex , double value ) { } public double add ( int rowIndex , int columnIndex , double value ) { } public void setAll ( double value ) { } public double getAtIndex ( int index ) { } public double setAtIndex ( int index , double value ) { } public double addAtIndex ( int index , double value ) { } public Matrix clone ( ) { } private static MatrixEngine _defaultEngine = null ; public static MatrixEngine defaultEngine ( ) { } public static Matrix multiply ( Matrix matA , Matrix matB ) { <START_BUG> return Matrix . defaultEngine ( ) . multiplyTransposeAlphaBeta ( NOTRANSPOSE , 1.0 , matA , NOTRANSPOSE , 0.0 , matB ) ; <END_BUG> } public static Matrix multiplyTransposeAlphaBeta ( TransposeType transA , double alpha , Matrix matA , TransposeType transB , double beta , Matrix matB ) { } public static Matrix invert ( Matrix mat , boolean invertInPlace ) { } public static Matrix pinv ( Matrix mat , boolean invertInPlace ) { } public static int leadingDimension ( Matrix matA ) { } public static Matrix random ( int rows , int columns , double min , double max ) { } public static void scale ( double alpha , Matrix matA ) { } public static Matrix transpose ( Matrix matA ) { } private static void transposeSquare ( Matrix matA , Matrix result ) { } private static void transposeStandard ( Matrix matA , Matrix result ) { } private static void transposeBlock ( Matrix matA , Matrix result ) { } public double [ ] saveToState ( ) { } public static Matrix loadFromState ( Object o ) { } public static Matrix createIdentity ( int rows , int columns ) { } public static double compareMatrix ( Matrix matA , Matrix matB ) { } public static boolean testDimensionsAB ( TransposeType transA , TransposeType transB , Matrix matA , Matrix matB ) { } public static Matrix identity ( int rows , int columns ) { } }

Fix:
return Matrix . defaultEngine ( ) . multiplyTransposeAlphaBeta ( NOTRANSPOSE , 1.0 , matA , NOTRANSPOSE , 1.0 , matB ) ;
Buggy code:
public class PerThisOrTargetPointcutVisitor extends IdentityPointcutVisitor { private static final TypePattern MAYBE = new PerThisOrTargetPointcutVisitor . TypePatternMayBe ( ) ; private final boolean m_isTarget ; private final ResolvedType m_fromAspectType ; public PerThisOrTargetPointcutVisitor ( boolean isTarget , ResolvedType fromAspectType ) { } public TypePattern getPerTypePointcut ( Pointcut perClausePointcut ) { } public Object visit ( WithinPointcut node , Object data ) { } public Object visit ( WithincodePointcut node , Object data ) { } public Object visit ( WithinAnnotationPointcut node , Object data ) { } public Object visit ( WithinCodeAnnotationPointcut node , Object data ) { } public Object visit ( KindedPointcut node , Object data ) { } public Object visit ( AndPointcut node , Object data ) { } public Object visit ( OrPointcut node , Object data ) { } public Object visit ( NotPointcut node , Object data ) { } public Object visit ( ThisOrTargetAnnotationPointcut node , Object data ) { } public Object visit ( ThisOrTargetPointcut node , Object data ) { } public Object visit ( ReferencePointcut node , Object data ) { ResolvedPointcutDefinition pointcutDec ; ResolvedType searchStart = m_fromAspectType ; if ( ( node . onType ) != null ) { searchStart = node . onType . resolve ( m_fromAspectType . getWorld ( ) ) ; <START_BUG> if ( searchStart == ( ResolvedType . MISSING ) ) { <END_BUG> return PerThisOrTargetPointcutVisitor . MAYBE ; } } pointcutDec = searchStart . findPointcut ( node . name ) ; return getPerTypePointcut ( pointcutDec . getPointcut ( ) ) ; } public Object visit ( IfPointcut node , Object data ) { } public Object visit ( HandlerPointcut node , Object data ) { } public Object visit ( CflowPointcut node , Object data ) { } public Object visit ( ConcreteCflowPointcut node , Object data ) { } public Object visit ( ArgsPointcut node , Object data ) { } public Object visit ( ArgsAnnotationPointcut node , Object data ) { } public Object visit ( AnnotationPointcut node , Object data ) { } public Object visit ( Pointcut . MatchesNothingPointcut node , Object data ) { } private static class TypePatternMayBe extends AnyTypePattern { } }

Fix:
if ( searchStart . isMissing ( ) ) {
Buggy code:
public class ItemVoidTearEmpty extends ItemBase { public ItemVoidTearEmpty ( ) { } @ Override public ItemStack onItemRightClick ( ItemStack ist , World world , EntityPlayer player ) { } @ Override public boolean onItemUseFirst ( ItemStack ist , EntityPlayer player , World world , BlockPos pos , EnumFacing side , float hitX , float hitY , float hitZ ) { } protected void addItemToInventory ( EntityPlayer player , ItemStack ist ) { } protected ItemStack buildTear ( ItemStack ist , EntityPlayer player , IInventory inventory , boolean isPlayerInventory ) { ItemStack target = InventoryHelper . getTargetItem ( ist , inventory , false ) ; if ( target == null ) return null ; ItemStack filledTear = new ItemStack ( ModItems . filledVoidTear , 1 , 0 ) ; NBTHelper . setTagCompound ( "item" , filledTear , target . writeToNBT ( new NBTTagCompound ( ) ) ) ; int quantity = InventoryHelper . getItemQuantity ( target , inventory ) ; if ( isPlayerInventory ) { if ( ( quantity - ( target . getMaxStackSize ( ) ) ) > 0 ) { InventoryHelper . consumeItem ( target , player , target . getMaxStackSize ( ) , ( quantity - ( target . getMaxStackSize ( ) ) ) ) ; quantity = quantity - ( target . getMaxStackSize ( ) ) ; } else { quantity = 0 ; } } else { <START_BUG> InventoryHelper . removeItem ( target , inventory , quantity ) ; <END_BUG> } NBTHelper . setInteger ( "itemQuantity" , filledTear , quantity ) ; NBTHelper . setBoolean ( "enabled" , filledTear , absorbWhenCreated ) ; return filledTear ; } }

Fix:
quantity = InventoryHelper . tryToRemoveFromInventory ( target , inventory , itemLimit ) ;
Buggy code:
public class JcaBeanValidationDefinition extends SimpleResourceDefinition { protected static final PathElement PATH_BEAN_VALIDATION = PathElement . pathElement ( Constants . BEAN_VALIDATION , Constants . BEAN_VALIDATION ) ; static final JcaBeanValidationDefinition INSTANCE = new JcaBeanValidationDefinition ( ) ; private JcaBeanValidationDefinition ( ) { } @ Override public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { super . registerAttributes ( resourceRegistration ) ; for ( final JcaBeanValidationDefinition . BeanValidationParameters parameter : JcaBeanValidationDefinition . BeanValidationParameters . values ( ) ) { <START_BUG> resourceRegistration . registerReadWriteAttribute ( parameter . getAttribute ( ) , null , JcaAttributeWriteHandler . INSTANCE ) ; <END_BUG> } } public static enum BeanValidationParameters { BEAN_VALIDATION_ENABLED ( SimpleAttributeDefinitionBuilder . create ( "enabled" , BOOLEAN ) . setAllowExpression ( true ) . setAllowNull ( true ) . setDefaultValue ( new ModelNode ( ) . set ( true ) ) . setMeasurementUnit ( NONE ) . setRestartAllServices ( ) . setXmlName ( "enabled" ) . build ( ) ) ; private BeanValidationParameters ( SimpleAttributeDefinition attribute ) { } public SimpleAttributeDefinition getAttribute ( ) { } private SimpleAttributeDefinition attribute ; } }

Fix:
resourceRegistration . registerReadWriteAttribute ( parameter . getAttribute ( ) , null , JcaBeanValidationWriteHandler . INSTANCE ) ;
Buggy code:
public class Erf { private static final double X_CRIT = 0.4769362762044697 ; private Erf ( ) { } public static double erf ( double x ) { } public static double erfc ( double x ) { } public static double erf ( double x1 , double x2 ) { } public static double erfInv ( final double x ) { double w = - ( FastMath . log ( ( ( 1.0 - x ) * ( 1.0 + x ) ) ) ) ; double p ; if ( w < 6.25 ) { <START_BUG> w = w - 3.125 ; <END_BUG> p = - 3.64441206401782E-21 ; p = ( - 1.6850591381820166E-19 ) + ( p * w ) ; p = 1.28584807152564E-18 + ( p * w ) ; p = 1.1157877678025181E-17 + ( p * w ) ; p = ( - 1.333171662854621E-16 ) + ( p * w ) ; p = 2.0972767875968562E-17 + ( p * w ) ; p = 6.637638134358324E-15 + ( p * w ) ; p = ( - 4.054566272975207E-14 ) + ( p * w ) ; p = ( - 8.151934197605472E-14 ) + ( p * w ) ; p = 2.6335093153082323E-12 + ( p * w ) ; p = ( - 1.2975133253453532E-11 ) + ( p * w ) ; p = ( - 5.415412054294628E-11 ) + ( p * w ) ; p = 1.0512122733215323E-9 + ( p * w ) ; p = ( - 4.112633980346984E-9 ) + ( p * w ) ; p = ( - 2.9070369957882005E-8 ) + ( p * w ) ; p = 4.2347877827932404E-7 + ( p * w ) ; p = ( - 1.3654692000834679E-6 ) + ( p * w ) ; p = ( - 1.3882523362786469E-5 ) + ( p * w ) ; p = 1.8673420803405714E-4 + ( p * w ) ; p = ( - 7.40702534166267E-4 ) + ( p * w ) ; p = ( - 0.006033670871430149 ) + ( p * w ) ; p = 0.24015818242558962 + ( p * w ) ; p = 1.6536545626831027 + ( p * w ) ; } else if ( w < 16.0 ) { w = ( FastMath . sqrt ( w ) ) - 3.25 ; p = 2.2137376921775787E-9 ; p = 9.075656193888539E-8 + ( p * w ) ; p = ( - 2.7517406297064545E-7 ) + ( p * w ) ; p = 1.8239629214389228E-8 + ( p * w ) ; p = 1.5027403968909828E-6 + ( p * w ) ; p = ( - 4.013867526981546E-6 ) + ( p * w ) ; p = 2.9234449089955446E-6 + ( p * w ) ; p = 1.2475304481671779E-5 + ( p * w ) ; p = ( - 4.7318229009055734E-5 ) + ( p * w ) ; p = 6.828485145957318E-5 + ( p * w ) ; p = 2.4031110387097894E-5 + ( p * w ) ; p = ( - 3.550375203628475E-4 ) + ( p * w ) ; p = 9.532893797373805E-4 + ( p * w ) ; p = ( - 0.0016882755560235047 ) + ( p * w ) ; p = 0.002491442096107851 + ( p * w ) ; p = ( - 0.003751208507569241 ) + ( p * w ) ; p = 0.005370914553590064 + ( p * w ) ; p = 1.0052589676941592 + ( p * w ) ; p = 3.0838856104922208 + ( p * w ) ; } else if ( ! ( Double . isInfinite ( w ) ) ) { w = ( FastMath . sqrt ( w ) ) - 5.0 ; p = - 2.7109920616438573E-11 ; p = ( - 2.555641816996525E-10 ) + ( p * w ) ; p = 1.5076572693500548E-9 + ( p * w ) ; p = ( - 3.789465440126737E-9 ) + ( p * w ) ; p = 7.61570120807834E-9 + ( p * w ) ; p = ( - 1.496002662714924E-8 ) + ( p * w ) ; p = 2.914795345090108E-8 + ( p * w ) ; p = ( - 6.771199775845234E-8 ) + ( p * w ) ; p = 2.2900482228026655E-7 + ( p * w ) ; p = ( - 9.9298272942317E-7 ) + ( p * w ) ; p = 4.526062597223154E-6 + ( p * w ) ; p = ( - 1.968177810553167E-5 ) + ( p * w ) ; p = 7.599527703001776E-5 + ( p * w ) ; p = ( - 2.1503011930044477E-4 ) + ( p * w ) ; p = ( - 1.3871931833623122E-4 ) + ( p * w ) ; p = 1.0103004648645344 + ( p * w ) ; p = 4.849906401408584 + ( p * w ) ; } else { p = Double . POSITIVE_INFINITY ; } return p * x ; } public static double erfcInv ( final double x ) { } }

Fix:
w -= 3.125 ;
Buggy code:
public class RemoteServiceTest extends AbstractRemoteServiceTest { protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } protected String getClientContainerName ( ) { } IRemoteService remoteService ; boolean done ; public void testServiceListener ( ) throws Exception { final IRemoteServiceContainerAdapter [ ] adapters = getRemoteServiceAdapters ( ) ; done = false ; final Object lock = new Object ( ) ; adapters [ 1 ] . addRemoteServiceListener ( new IRemoteServiceListener ( ) { public void handleServiceEvent ( IRemoteServiceEvent event ) { if ( event instanceof IRemoteServiceRegisteredEvent ) { IRemoteServiceRegisteredEvent e = ( ( IRemoteServiceRegisteredEvent ) ( event ) ) ; IRemoteServiceReference ref = e . getReference ( ) ; remoteService = adapters [ 1 ] . getRemoteService ( ref ) ; assertNotNull ( remoteService ) ; synchronized ( lock ) { done = true ; lock . notify ( ) ; } } } } ) ; adapters [ 0 ] . registerRemoteService ( new String [ ] { IConcatService . class . getName ( ) } , createService ( ) , customizeProperties ( null ) ) ; int count = 0 ; synchronized ( lock ) { while ( ( ! ( done ) ) && ( ( count ++ ) < 10 ) ) { try { lock . wait ( 1000 ) ; } catch ( InterruptedException e ) { fail ( ) ; } } } assertTrue ( done ) ; if ( ( remoteService ) == null ) return ; assertTrue ( ( ( remoteService ) != null ) ) ; traceCallStart ( "callAsynchResult" ) ; final IFuture result = remoteService . callAsync ( createRemoteConcat ( "ECF<seq2seq4repair_space>AsynchResults<seq2seq4repair_space>" , "are<seq2seq4repair_space>cool" ) ) ; traceCallEnd ( "callAsynch" ) ; assertNotNull ( result ) ; <START_BUG> Thread . sleep ( ASYNC_WAITTIME ) ; <END_BUG> } }

Fix:
Thread . sleep ( SLEEPTIME ) ;
Buggy code:
public final class ManagedBeanDeploymentItem implements Serializable , DeploymentItem { private final String name ; private final String className ; private final String postConstructMethodName ; private final String preDestroyMethodName ; private final List < ManagedBeanDeploymentItem . Resource > resources ; public static final ServiceName JBOSS_MANAGEDBEAN = JBOSS . append ( "managedbean" ) ; private static final String BINDING = "binding" ; private static final long serialVersionUID = - 2132700755920008127L ; protected ManagedBeanDeploymentItem ( final String name , final String className , final String postConstructMethodName , final String preDestroyMethodName , final List < ManagedBeanDeploymentItem . Resource > resources ) { } public String getName ( ) { } public String getClassName ( ) { } public String getPostConstructMethodName ( ) { } public String getPreDestroyMethodName ( ) { } <START_BUG> public void install ( final BatchBuilder builder ) { <END_BUG> } protected abstract static class Resource { } }

Fix:
public void install ( final DeploymentItemContext context ) {
Buggy code:
public class EnglishWrittenNumbers2Digits extends Normalizer { @ Override public List < Token > normalize ( List < Token > tokens ) { } public static Pair < String , Integer > findBestMatch ( String m , Collection < String > c ) { } private static List < Token > parseWrittenNumbers ( NLUConfig nluConfig , List < Token > tokens ) { <START_BUG> File grammar = new File ( new File ( nluConfig . nlBusConfig . getContentRoot ( ) ) . getParent ( ) , "preprocessing//written-numbers-grammar.txt" ) ; <END_BUG> if ( ! ( grammar . exists ( ) ) ) return tokens ; else { try { ChartParser parser = ChartParser . getParserForGrammar ( grammar ) ; ArrayList < String > input = new ArrayList < String > ( ) ; for ( Token t : tokens ) { input . add ( t . getName ( ) ) ; } Collection < Item > result = parser . parseAndFilter ( input , "<N>" ) ; return EnglishWrittenNumbers2Digits . replaceItemsInTokens ( tokens , result ) ; } catch ( Exception e ) { logger . error ( e ) ; } } return tokens ; } private static List < Token > replaceItemsInTokens ( List < Token > tokens , Collection < Item > numbers ) { } public static void main ( String [ ] args ) throws Exception { } }

Fix:
File grammar = new File ( new File ( nluConfig . getNlBusConfigNC ( ) . getContentRoot ( ) ) . getParent ( ) , "preprocessing//written-numbers-grammar.txt" ) ;
Buggy code:
class ConsoleHandlerAdd extends FlushingHandlerAddProperties < ConsoleHandlerService > { static final ConsoleHandlerAdd INSTANCE = new ConsoleHandlerAdd ( ) ; private ConsoleHandlerAdd ( ) { } @ Override protected ConsoleHandlerService createHandlerService ( OperationContext context , final ModelNode model ) throws OperationFailedException { } @ Override protected void updateRuntime ( final OperationContext context , final ServiceBuilder < Handler > serviceBuilder , final String name , final ConsoleHandlerService service , final ModelNode model ) throws OperationFailedException { super . updateRuntime ( context , serviceBuilder , name , service , model ) ; final ModelNode target = CommonAttributes . TARGET . resolveModelAttribute ( context , model ) ; if ( target . isDefined ( ) ) { <START_BUG> service . setTarget ( Target . fromString ( TargetValidator . properCase ( target . asString ( ) ) ) ) ; <END_BUG> } } }

Fix:
service . setTarget ( Target . fromString ( target . asString ( ) ) ) ;
Buggy code:
public class JDateField extends JTextField { private static final long serialVersionUID = 240L ; private final DateFormat dateFormat = new SimpleDateFormat ( "yyyy//MM//dd<seq2seq4repair_space>HH:mm:ss" ) ; private static final int [ ] fieldPositions = new int [ ] { Calendar . YEAR , Calendar . YEAR , Calendar . YEAR , Calendar . YEAR , Calendar . YEAR , Calendar . MONTH , Calendar . MONTH , Calendar . MONTH , Calendar . DAY_OF_MONTH , Calendar . DAY_OF_MONTH , Calendar . DAY_OF_MONTH , Calendar . HOUR_OF_DAY , Calendar . HOUR_OF_DAY , Calendar . HOUR_OF_DAY , Calendar . MINUTE , Calendar . MINUTE , Calendar . MINUTE , Calendar . SECOND , Calendar . SECOND , Calendar . SECOND } ; public JDateField ( Date date ) { } public JDateField ( ) { } public void setDate ( Date date ) { } public Date getDate ( ) { } private static int posToField ( int pos ) { } private Calendar parseDate ( String datetime ) { } private void update ( int addend , boolean shifted ) { } class KeyFocus extends KeyAdapter { KeyFocus ( ) { } @ Override public void keyPressed ( KeyEvent e ) { } } class FocusClass implements FocusListener { FocusClass ( ) { } @ Override public void focusGained ( FocusEvent e ) { } @ Override public void focusLost ( FocusEvent e ) { try { dateFormat . parse ( getText ( ) ) ; } catch ( ParseException e1 ) { <START_BUG> requestFocus ( ) ; <END_BUG> } } } }

Fix:
requestFocusInWindow ( ) ;
Buggy code:
public class TypedDependencyEngine { private static ArrayList < String > relationList = new ArrayList < String > ( ) ; private static StanfordCoreNLP pipeline ; private static StanfordCoreNLP sentimentPipeline ; private static StanfordCoreNLP tokenizer ; public TypedDependencyEngine ( ) { } public static void main ( String [ ] args ) throws Exception { } public static Integer findSentimentScore ( String line ) { int mainSentiment = 0 ; if ( ( line != null ) && ( ( line . length ( ) ) > 0 ) ) { int longest = 0 ; Annotation annotation = TypedDependencyEngine . sentimentPipeline . process ( line ) ; for ( CoreMap sentence : annotation . get ( SentencesAnnotation . class ) ) { Tree tree = sentence . get ( AnnotatedTree . class ) ; int sentiment = RNNCoreAnnotations . getPredictedClass ( tree ) ; String partText = sentence . toString ( ) ; if ( ( partText . length ( ) ) > longest ) { mainSentiment = sentiment ; longest = partText . length ( ) ; } } } <START_BUG> return mainSentiment ; <END_BUG> } public static ArrayList < String > sentimentAnalysis ( String review ) { } public static List < List < MyWord > > sentiTyped ( String inText ) { } public static List < ArrayList < TypedDependency > > generateTypedDependency ( List < List < Word > > theseSentences ) { } public static List < List < Word > > segmentText ( String text ) { } public static String generateSentence ( List < MyWord > myWordList ) { } }

Fix:
return mainSentiment + 1 ;
Buggy code:
public class FlightManager { private ManoeuvreCatalogue manoeuvreCatalogue ; private Scene scene ; private Flight currentFlight ; public FlightManager ( Context context ) { } public Flight buildFlight ( String olan ) { if ( ( ( olan . length ( ) ) >= 1 ) && ( olan . substring ( 0 , 1 ) . equals ( "<seq2seq4repair_space>" ) ) ) { olan = olan . substring ( 1 ) ; } String [ ] figures = olan . trim ( ) . toLowerCase ( ) . split ( "<seq2seq4repair_space>" ) ; Manoeuvre [ ] manoeuvres = new Manoeuvre [ figures . length ] ; for ( int i = 0 ; i < ( figures . length ) ; i ++ ) { <START_BUG> manoeuvres [ i ] = Manoeuvre . getNewInstance ( manoeuvreCatalogue . get ( figures [ i ] ) ) ; <END_BUG> } return new Flight ( manoeuvres ) ; } public boolean validOLAN ( String olan ) { } public void setCurrentFlight ( Flight currentFlight ) { } public void setManoeuvreCatalogue ( ManoeuvreCatalogue manoeuvreCatalogue ) { } public Scene getScene ( ) { } public Flight getCurrentFlight ( ) { } }

Fix:
manoeuvres [ i ] = new Manoeuvre ( manoeuvreCatalogue . get ( figures [ i ] ) ) ;
Buggy code:
public final class MarkerAnnotation extends Annotation { public static final ChildPropertyDescriptor TYPE_NAME_PROPERTY = Annotation . internalTypeNamePropertyFactory ( MarkerAnnotation . class ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } MarkerAnnotation ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final ChildPropertyDescriptor internalTypeNameProperty ( ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { MarkerAnnotation result = new MarkerAnnotation ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setTypeName ( ( ( Name ) ( ASTNode . copySubtree ( target , getTypeName ( ) ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class InfinispanBean < G , I , T > implements Bean < G , I , T > { private final I id ; private final BeanEntry < G > entry ; private final BeanGroup < G , I , T > group ; private final Mutator mutator ; private final BeanRemover < I , T > remover ; private final Time timeout ; private final PassivationListener < T > listener ; private final AtomicBoolean valid = new AtomicBoolean ( true ) ; public InfinispanBean ( I id , BeanEntry < G > entry , BeanGroup < G , I , T > group , Mutator mutator , BeanRemover < I , T > remover , Time timeout , PassivationListener < T > listener ) { } @ Override public I getId ( ) { } @ Override public G getGroupId ( ) { } @ Override public boolean isExpired ( ) { if ( ( this . timeout ) == null ) return false ; Date lastAccessedTime = this . entry . getLastAccessedTime ( ) ; long timeout = this . timeout . convert ( TimeUnit . MILLISECONDS ) ; <START_BUG> return ( lastAccessedTime != null ) && ( timeout > 0 ) ? ( ( System . currentTimeMillis ( ) ) - ( lastAccessedTime . getTime ( ) ) ) >= timeout : false ; <END_BUG> } @ Override public void remove ( RemoveListener < T > listener ) { } @ Override public T acquire ( ) { } @ Override public boolean release ( ) { } @ Override public void close ( ) { } }

Fix:
return ( lastAccessedTime != null ) && ( timeout > 0 ) ? ( ( System . currentTimeMillis ( ) ) - ( lastAccessedTime . getTime ( ) ) ) > timeout : false ;
Buggy code:
public class StandaloneServer extends AbstractServer { private static final String STANDALONE_XML = "standalone.xml" ; private final StandardElementReaderRegistrar extensionRegistrar ; protected StandaloneServer ( ServerEnvironment environment ) { } public void start ( ) throws ServerStartException { } Callback createListenerCallback ( ) { return new ServerStartupListener . Callback ( ) { public void run ( Map < ServiceName , StartException > serviceFailures , long elapsedTime , int totalServices , int onDemandServices , int startedServices ) { if ( serviceFailures . isEmpty ( ) ) { <START_BUG> log . infof ( "JBoss<seq2seq4repair_space>AS<seq2seq4repair_space>started<seq2seq4repair_space>in<seq2seq4repair_space>%dms.<seq2seq4repair_space>-<seq2seq4repair_space>Services<seq2seq4repair_space>[Total:<seq2seq4repair_space>%d,<seq2seq4repair_space>On-demand:<seq2seq4repair_space>%d.<seq2seq4repair_space>Started:<seq2seq4repair_space>%d]" , elapsedTime , totalServices , onDemandServices , startedServices ) ; <END_BUG> } else { final StringBuilder buff = new StringBuilder ( String . format ( "JBoss<seq2seq4repair_space>AS<seq2seq4repair_space>server<seq2seq4repair_space>start<seq2seq4repair_space>failed.<seq2seq4repair_space>Attempted<seq2seq4repair_space>to<seq2seq4repair_space>start<seq2seq4repair_space>%d<seq2seq4repair_space>services<seq2seq4repair_space>in<seq2seq4repair_space>%dms" , totalServices , elapsedTime ) ) ; buff . append ( "\nThe<seq2seq4repair_space>following<seq2seq4repair_space>services<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>start:\n" ) ; for ( Map . Entry < ServiceName , StartException > entry : serviceFailures . entrySet ( ) ) { buff . append ( String . format ( "\t%s<seq2seq4repair_space>=><seq2seq4repair_space>%s\n" , entry . getKey ( ) , entry . getValue ( ) . getMessage ( ) ) ) ; } log . error ( buff . toString ( ) ) ; } } } ; } }

Fix:
log . infof ( "JBoss<seq2seq4repair_space>AS<seq2seq4repair_space>started<seq2seq4repair_space>-<seq2seq4repair_space>Installed<seq2seq4repair_space>%d<seq2seq4repair_space>and<seq2seq4repair_space>started<seq2seq4repair_space>%d<seq2seq4repair_space>services<seq2seq4repair_space>in<seq2seq4repair_space>%dms." , totalServices , startedServices , elapsedTime ) ;
Buggy code:
public abstract class BeanModel implements IModel { private final IModel nestedModel ; public BeanModel ( IModel nestedModel ) { } protected final BeanInfo getBeanInfo ( Component component ) { } protected final Object getBean ( Component component ) { } protected final Class getBeanClass ( Component component ) { } <START_BUG> public Object getNestedModel ( ) { <END_BUG> return nestedModel ; } public void detach ( ) { } }

Fix:
public IModel getNestedModel ( ) {
Buggy code:
public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { private ReactInstanceManager mReactInstanceManager ; private ReactRootView mReactRootView ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onKeyUp ( int keyCode , KeyEvent event ) { } @ Override public void onBackPressed ( ) { } @ Override public void invokeDefaultOnBackPressed ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onResume ( ) { super . onResume ( ) ; if ( ( mReactInstanceManager ) != null ) { <START_BUG> mReactInstanceManager . onResume ( this ) ; <END_BUG> } } }

Fix:
mReactInstanceManager . onResume ( this , this ) ;
Buggy code:
public class EncounterReadConverterTest { @ Test public void testConvert ( ) { DateTime date = new DateTime ( 99999L ) ; <START_BUG> Long patientId = 765L ; <END_BUG> Observation observation1 = mock ( Observation . class ) ; Observation observation2 = mock ( Observation . class ) ; List < Observation > observations = new ArrayList < Observation > ( ) { } ; DBObject observation1Obj = mock ( BasicDBObject . class ) ; DBObject observation2Obj = mock ( BasicDBObject . class ) ; BasicDBList observationObjs = new BasicDBList ( ) { } ; ObservationReadConverter observationReadConverter = mock ( ObservationReadConverter . class ) ; DBObject dbObject = new BasicDBObject ( ) { } ; when ( observationReadConverter . convert ( observation1Obj ) ) . thenReturn ( observation1 ) ; when ( observationReadConverter . convert ( observation2Obj ) ) . thenReturn ( observation2 ) ; EncounterReadConverter encounterReadConverter = new EncounterReadConverter ( observationReadConverter ) ; Encounter encounter = encounterReadConverter . convert ( dbObject ) ; assertEquals ( ( ( Long ) ( 123L ) ) , encounter . getId ( ) ) ; assertEquals ( patientId , encounter . getPatientId ( ) ) ; assertEquals ( date , encounter . getDate ( ) ) ; assertEquals ( ( ( Integer ) ( 1 ) ) , encounter . getType ( ) ) ; assertEquals ( "hernia" , encounter . getReasonForVisit ( ) ) ; assertEquals ( observations , encounter . getObservations ( ) ) ; } }

Fix:
Long patientId = 456L ;
Buggy code:
public final class CommandContributionItem extends ContributionItem { public static final int STYLE_PUSH = SWT . PUSH ; public static final int STYLE_CHECK = SWT . CHECK ; public static final int STYLE_RADIO = SWT . RADIO ; public static final int STYLE_PULLDOWN = SWT . DROP_DOWN ; private LocalResourceManager localResourceManager ; private Listener menuItemListener ; private Widget widget ; private IMenuService menuService ; private ICommandService commandService ; private IHandlerService handlerService ; private IBindingService bindingService ; private ParameterizedCommand command ; private ImageDescriptor icon ; private String label ; private String tooltip ; private ImageDescriptor disabledIcon ; private ImageDescriptor hoverIcon ; private String mnemonic ; private IElementReference elementRef ; private boolean checkedState ; private int style ; private ICommandListener commandListener ; private String dropDownMenuOverride ; private IWorkbenchHelpSystem workbenchHelpSystem ; private String helpContextId ; private boolean visibleEnabled ; public CommandContributionItem ( CommandContributionItemParameter contributionParameters ) { } public CommandContributionItem ( IServiceLocator serviceLocator , String id , String commandId , Map parameters , ImageDescriptor icon , ImageDescriptor disabledIcon , ImageDescriptor hoverIcon , String label , String mnemonic , String tooltip , int style ) { } private void setImages ( IServiceLocator locator , String iconStyle ) { } private ICommandListener getCommandListener ( ) { } private void updateCommandProperties ( final CommandEvent commandEvent ) { } ParameterizedCommand getCommand ( ) { } void createCommand ( String commandId , Map parameters ) { } public void fill ( Menu parent , int index ) { } public void fill ( ToolBar parent , int index ) { } public void update ( ) { } public void update ( String id ) { } private String updateMnemonic ( String s ) { } private void handleWidgetDispose ( Event event ) { } public void dispose ( ) { } private void disposeOldImages ( ) { } private Listener getItemListener ( ) { } private void handleWidgetSelection ( Event event ) { } private boolean openDropDownMenu ( Event event ) { } private void setIcon ( ImageDescriptor desc ) { } private void updateIcons ( ) { } private void setText ( String text ) { } private void setChecked ( boolean checked ) { } private void setTooltip ( String text ) { } private void setDisabledIcon ( ImageDescriptor desc ) { } private void setHoverIcon ( ImageDescriptor desc ) { } public boolean isEnabled ( ) { if ( ( command ) != null ) { <START_BUG> command . getCommand ( ) . setEnabled ( handlerService . getCurrentState ( ) ) ; <END_BUG> return command . getCommand ( ) . isEnabled ( ) ; } return false ; } public boolean isVisible ( ) { } }

Fix:
command . getCommand ( ) . setEnabled ( menuService . getCurrentState ( ) ) ;
Buggy code:
class TableModelTransByProps extends TableModelComposite { public TableModelTransByProps ( ) { } public void initColumns ( ) { } public Vector rowObjectsFor ( Object t ) { System . out . println ( ( "rowObjectsFor<seq2seq4repair_space>" + t ) ) ; if ( ! ( t instanceof UMLStateDiagram ) ) return new Vector ( ) ; UMLStateDiagram d = ( ( UMLStateDiagram ) ( t ) ) ; <START_BUG> Vector edges = d . getGraphModel ( ) . getEdges ( ) ; <END_BUG> Vector res = new Vector ( ) ; int size = edges . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { Object edge = edges . elementAt ( i ) ; if ( edge instanceof Transition ) res . addElement ( edge ) ; } return res ; } public String toString ( ) { } }

Fix:
Vector edges = d . getEdges ( ) ;
Buggy code:
public class AboutDialog extends TrayDialog { private static final int MAX_IMAGE_WIDTH_FOR_TEXT = 250 ; private static final int DETAILS_ID = ( IDialogConstants . CLIENT_ID ) + 1 ; private String productName ; private IProduct product ; private AboutBundleGroupData [ ] bundleGroupInfos ; private ArrayList images = new ArrayList ( ) ; private AboutFeaturesButtonManager buttonManager = new AboutFeaturesButtonManager ( ) ; private StyledText text ; private AboutTextManager aboutTextManager ; public AboutDialog ( Shell parentShell ) { } protected void buttonPressed ( int buttonId ) { } public boolean close ( ) { } protected void configureShell ( Shell newShell ) { } protected void createButtonsForButtonBar ( Composite parent ) { } protected Control createDialogArea ( Composite parent ) { } private void createTextMenu ( ) { final MenuManager textManager = new MenuManager ( ) ; textManager . add ( new CommandContributionItem ( new org . eclipse . ui . menus . CommandContributionItemParameter ( PlatformUI . getWorkbench ( ) , null , IWorkbenchCommandConstants . EDIT_COPY , CommandContributionItem . STYLE_PUSH ) ) ) ; <START_BUG> textManager . add ( new CommandContributionItem ( new org . eclipse . ui . menus . CommandContributionItemParameter ( PlatformUI . getWorkbench ( ) , null , IWorkbenchCommandConstants . EDIT_SELECTALL , CommandContributionItem . STYLE_PUSH ) ) ) ; <END_BUG> text . setMenu ( textManager . createContextMenu ( text ) ) ; text . addDisposeListener ( new DisposeListener ( ) { public void widgetDisposed ( DisposeEvent e ) { textManager . dispose ( ) ; } } ) ; } private void createFeatureImageButtonRow ( Composite parent ) { } private Button createFeatureButton ( Composite parent , final AboutBundleGroupData info ) { } }

Fix:
textManager . add ( new CommandContributionItem ( new org . eclipse . ui . menus . CommandContributionItemParameter ( PlatformUI . getWorkbench ( ) , null , IWorkbenchCommandConstants . EDIT_SELECT_ALL , CommandContributionItem . STYLE_PUSH ) ) ) ;