nus-yam/ex-repair huggingface dataset:
Buggy code:
public class TestExtension implements Extension { static final String SUBSYSTEM_NAME = "test-extension" ; @ Override public void initialize ( ExtensionContext context ) { System . out . println ( "Initializing<seq2seq4repair_space>TestExtension" ) ; <START_BUG> SubsystemRegistration registration = context . registerSubsystem ( TestExtension . SUBSYSTEM_NAME , 1 , 0 ) ; <END_BUG> ManagementResourceRegistration root = registration . registerSubsystemModel ( new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { ModelNode node = new ModelNode ( ) ; node . get ( DESCRIPTION ) . set ( "A<seq2seq4repair_space>test<seq2seq4repair_space>subsystem" ) ; node . get ( ATTRIBUTES , "attribute" , DESCRIPTION ) . set ( "An<seq2seq4repair_space>attribute" ) ; node . get ( ATTRIBUTES , "attribute" , TYPE ) . set ( STRING ) ; node . get ( CHILDREN , "child" ) . setEmptyObject ( ) ; return node ; } } ) ; root . registerOperationHandler ( ADD , new TestExtension . AddSubsystemHandler ( ) , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return new ModelNode ( ) ; } } ) ; root . registerReadWriteAttribute ( "attribute" , null , new WriteAttributeHandlers . StringLengthValidatingHandler ( 1 ) , CONFIGURATION ) ; root . registerOperationHandler ( REMOVE , new TestExtension . RemoveHandler ( ) , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return new ModelNode ( ) ; } } ) ; ManagementResourceRegistration child = root . registerSubModel ( PathElement . pathElement ( "child" ) , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { ModelNode node = new ModelNode ( ) ; node . get ( DESCRIPTION ) . set ( "A<seq2seq4repair_space>test<seq2seq4repair_space>child" ) ; node . get ( ATTRIBUTES , "child-attr" , DESCRIPTION ) . set ( "An<seq2seq4repair_space>attribute" ) ; node . get ( ATTRIBUTES , "child-attr" , TYPE ) . set ( STRING ) ; return node ; } } ) ; child . registerOperationHandler ( ADD , new TestExtension . AddChildHandler ( ) , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return new ModelNode ( ) ; } } ) ; child . registerOperationHandler ( REMOVE , new TestExtension . RemoveHandler ( ) , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return new ModelNode ( ) ; } } ) ; } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } private static class AddSubsystemHandler extends AbstractAddStepHandler { @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } } private static class RemoveHandler extends AbstractRemoveStepHandler { } private static class AddChildHandler extends AbstractAddStepHandler { @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } } }

Fix:
SubsystemRegistration registration = context . registerSubsystem ( TestExtension . SUBSYSTEM_NAME , 1 , 0 , 0 ) ;
Buggy code:
public final class AdditionalModuleProcessor implements DeploymentUnitProcessor { public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ! ( DeploymentTypeMarker . isType ( EAR , deploymentUnit ) ) ) { return ; } final ResourceRoot deploymentRoot = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) ; final AttachmentList < ResourceRoot > resourceRoots = deploymentUnit . getAttachment ( RESOURCE_ROOTS ) ; for ( ResourceRoot resourceRoot : resourceRoots ) { if ( ResourceRootTypeMarker . isType ( EAR_LIB_JAR , resourceRoot ) ) { continue ; } if ( ResourceRootTypeMarker . isSubDeployment ( resourceRoot ) ) { continue ; } String pathName = resourceRoot . getRoot ( ) . getPathNameRelativeTo ( deploymentRoot . getRoot ( ) ) ; ModuleIdentifier identifier = ModuleIdentifier . create ( ( ( ( ( ServiceModuleLoader . MODULE_PREFIX ) + ( deploymentUnit . getName ( ) ) ) + "." ) + pathName ) ) ; <START_BUG> AdditionalModuleImpl module = new AdditionalModuleImpl ( identifier , resourceRoot ) ; <END_BUG> deploymentUnit . addToAttachmentList ( ADDITIONAL_MODULES , module ) ; } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
AdditionalModuleSpecification module = new AdditionalModuleSpecification ( identifier , resourceRoot ) ;
Buggy code:
public class ResourceListSelectionDialog extends SelectionDialog { Text pattern ; Table resourceNames ; Table folderNames ; String patternString ; IContainer container ; int typeMask ; static Collator collator = Collator . getInstance ( ) ; boolean gatherResourcesDynamically = true ; StringMatcher stringMatcher ; ResourceListSelectionDialog . UpdateFilterThread updateFilterThread ; ResourceListSelectionDialog . UpdateGatherThread updateGatherThread ; ResourceListSelectionDialog . ResourceDescriptor [ ] descriptors ; int descriptorsSize ; WorkbenchLabelProvider labelProvider = new WorkbenchLabelProvider ( ) ; static class ResourceDescriptor implements Comparable { String label ; ArrayList resources = new ArrayList ( ) ; boolean resourcesSorted = true ; public int compareTo ( Object o ) { } } class UpdateFilterThread extends Thread { boolean stop = false ; int firstMatch = 0 ; int lastMatch = ( descriptorsSize ) - 1 ; public void run ( ) { } } class UpdateGatherThread extends Thread { boolean stop = false ; int lastMatch = - 1 ; int firstMatch = 0 ; boolean refilter = false ; public void run ( ) { } } public ResourceListSelectionDialog ( Shell parentShell , IResource [ ] resources ) { } public ResourceListSelectionDialog ( Shell parentShell , IContainer container , int typeMask ) { } protected String adjustPattern ( ) { } protected void cancelPressed ( ) { } public boolean close ( ) { } public void create ( ) { } protected Control createDialogArea ( Composite parent ) { } private void filterResources ( ) { } private int getFirstMatch ( ) { } private void gatherResources ( ) { } private Image getImage ( ResourceListSelectionDialog . ResourceDescriptor desc ) { } private int getLastMatch ( ) { } private void getMatchingResources ( final ArrayList resources ) { try { container . accept ( new IResourceProxyVisitor ( ) { public boolean visit ( IResourceProxy proxy ) { int type = proxy . getType ( ) ; if ( ( ( typeMask ) & type ) != 0 ) { if ( match ( proxy . getName ( ) ) ) { IResource res = proxy . requestResource ( ) ; if ( select ( res ) ) { resources . add ( res ) ; return true ; } else { return false ; } } } if ( type == ( IResource . FILE ) ) return false ; return true ; } <START_BUG> } , IResource . DEPTH_INFINITE ) ; <END_BUG> } catch ( CoreException e ) { } } private Image getParentImage ( IResource resource ) { } private String getParentLabel ( IResource resource ) { } private void initDescriptors ( final IResource [ ] resources ) { } private boolean match ( String label ) { } protected void okPressed ( ) { } protected boolean select ( IResource resource ) { } private void textChanged ( ) { } private void updateFolders ( final ResourceListSelectionDialog . ResourceDescriptor desc ) { } private void updateItem ( int index , int itemPos , int itemCount ) { } }

Fix:
} , IResource . NONE ) ;
Buggy code:
public class LevenshteinStep implements Comparable < LevenshteinStep > { private int index ; private LevenshteinStep . Operation op ; private char letter ; private char letter2 ; public LevenshteinStep ( int position , LevenshteinStep . Operation operation , char letter ) { } public LevenshteinStep ( int position , LevenshteinStep . Operation operation , char letter , char letter2 ) { } public static enum Operation { INSERT , DELETE , SUBSTITUTION , NONOP ; } private String operationToString ( LevenshteinStep . Operation op ) { } public String getAdjustedString ( String source , int modifier ) { switch ( op ) { case INSERT : if ( ( this . index ) == 0 ) return ( this . letter ) + source ; else return ( ( source . substring ( 0 , ( ( this . index ) + modifier ) ) ) + ( this . letter ) ) + ( source . substring ( ( ( this . index ) + modifier ) ) ) ; case DELETE : if ( ( this . index ) == 0 ) return source . substring ( 1 ) ; else return ( source . substring ( 0 , ( ( this . index ) + modifier ) ) ) + ( source . substring ( ( ( ( index ) + 1 ) + modifier ) ) ) ; case SUBSTITUTION : <START_BUG> if ( ( this . index ) == 0 ) <END_BUG> return ( this . letter ) + ( source . substring ( 1 ) ) ; else return ( ( source . substring ( 0 , ( ( this . index ) + modifier ) ) ) + ( this . letter ) ) + ( source . substring ( ( ( ( this . index ) + 1 ) + modifier ) ) ) ; case NONOP : return source ; default : return "Case<seq2seq4repair_space>not<seq2seq4repair_space>set." ; } } @ Override public String toString ( ) { } public int compareTo ( LevenshteinStep o ) { } public LevenshteinStep . Operation getOp ( ) { } public int getIndex ( ) { } public char getLetter ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } public char getLetter2 ( ) { } }

Fix:
if ( ( ( this . index ) + modifier ) == 0 )
Buggy code:
public class EuclidianViewJPanel extends JPanel implements geogebra . common . euclidian . EuclidianViewJPanel { EuclidianView view ; public EuclidianViewJPanel ( EuclidianView view ) { } protected Color bgColor ; @ Override public Color getBackground ( ) { } @ Override public void setBackground ( Color bgColor ) { } @ Override public void paintChildren ( Graphics g ) { } public int temporaryWidth = - 1 ; public int temporaryHeight = - 1 ; @ Override public int getWidth ( ) { } @ Override public int getHeight ( ) { } @ Override public Rectangle getBounds ( ) { } @ Override public void setToolTipText ( String plain ) { <START_BUG> view . setToolTipText ( plain ) ; <END_BUG> } @ Override public final void paint ( Graphics g ) { } public void processMouseEventImpl ( MouseEvent e ) { } }

Fix:
super . setToolTipText ( plain ) ;
Buggy code:
public class DriveTrain extends PIDSubsystem { private static final double Kp = 1.0 // 360.0 ; private static final double Ki = 0.0 ; private static final double Kd = 0.0 ; private Jaguar leftJaguars ; private Jaguar rightJaguars ; private RobotDrive robotDrive ; private Gyro balanceGyro ; private double gyroSpeed ; private double gyroAngle ; private final String dashSpace = "Drive<seq2seq4repair_space>Train" ; private final String dashLeft = "Left<seq2seq4repair_space>Speed" ; private final String dashRight = "Right<seq2seq4repair_space>Speed" ; public DriveTrain ( ) { } public void initDefaultCommand ( ) { } protected double returnPIDInput ( ) { } protected void usePIDOutput ( double output ) { } public void tankDrive ( double leftSpeed , double rightSpeed ) { robotDrive . tankDrive ( leftSpeed , rightSpeed ) ; SmartDashboard . putDouble ( dashLeft , ( ( leftJaguars . getSpeed ( ) ) * ( - 10 ) ) ) ; <START_BUG> SmartDashboard . putDouble ( "dashRight" , ( ( rightJaguars . getSpeed ( ) ) * 10 ) ) ; <END_BUG> SmartDashboard . putString ( dashSpace , "Tank<seq2seq4repair_space>Drive" ) ; } public void arcadeDrive ( double forward , double turn ) { } public void balanceDrive ( double speed ) { } }

Fix:
SmartDashboard . putDouble ( dashRight , ( ( rightJaguars . getSpeed ( ) ) * 10 ) ) ;
Buggy code:
public class ReturnStatement extends Statement { public Expression expression ; public SubRoutineStatement [ ] subroutines ; public LocalVariableBinding saveValueVariable ; public int initStateIndex = - 1 ; public ReturnStatement ( Expression expression , int sourceStart , int sourceEnd ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { if ( ( ( this . bits ) & ( ASTNode . IsReachable ) ) == 0 ) { return ; } int pc = codeStream . position ; boolean alreadyGeneratedExpression = false ; if ( needValueStore ( ) ) { alreadyGeneratedExpression = true ; this . expression . generateCode ( currentScope , codeStream , needValue ( ) ) ; generateStoreSaveValueIfNecessary ( codeStream ) ; } if ( ( this . subroutines ) != null ) { Object reusableJSRTarget = ( ( this . expression ) == null ) ? ( ( Object ) ( TypeBinding . VOID ) ) : this . expression . reusableJSRTarget ( ) ; for ( int i = 0 , max = this . subroutines . length ; i < max ; i ++ ) { SubRoutineStatement sub = this . subroutines [ i ] ; boolean didEscape = sub . generateSubRoutineInvocation ( currentScope , codeStream , reusableJSRTarget , this . initStateIndex , this . saveValueVariable ) ; if ( didEscape ) { codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; SubRoutineStatement . reenterAllExceptionHandlers ( this . subroutines , i , codeStream ) ; return ; } } } if ( ( this . saveValueVariable ) != null ) { codeStream . addVariable ( this . saveValueVariable ) ; codeStream . load ( this . saveValueVariable ) ; } if ( ( ( this . expression ) != null ) && ( ! alreadyGeneratedExpression ) ) { this . expression . generateCode ( currentScope , codeStream , true ) ; generateStoreSaveValueIfNecessary ( codeStream ) ; } <START_BUG> this . generateReturnBytecode ( codeStream ) ; <END_BUG> if ( ( this . saveValueVariable ) != null ) { codeStream . removeVariable ( this . saveValueVariable ) ; } if ( ( this . initStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , this . initStateIndex ) ; codeStream . addDefinitelyAssignedVariables ( currentScope , this . initStateIndex ) ; } codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; SubRoutineStatement . reenterAllExceptionHandlers ( this . subroutines , ( - 1 ) , codeStream ) ; } public void generateReturnBytecode ( CodeStream codeStream ) { } public void generateStoreSaveValueIfNecessary ( CodeStream codeStream ) { } private boolean needValueStore ( ) { } public boolean needValue ( ) { } public void prepareSaveValueLocation ( TryStatement targetTryStatement ) { } public StringBuffer printStatement ( int tab , StringBuffer output ) { } public void resolve ( BlockScope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
generateReturnBytecode ( codeStream ) ;
Buggy code:
public class Vector2 { public static final float TO_RADIANS = ( 1 // 180.0F ) * ( ( float ) ( Math . PI ) ) ; public static final float TO_DEGREES = ( 1 // ( ( float ) ( Math . PI ) ) ) * 180 ; public float x ; public float y ; public Vector2 ( ) { } public Vector2 ( float pX , float pY ) { } public Vector2 ( Vector2 pOther ) { } public Vector2 copy ( ) { } public Vector2 set ( float pX , float pY ) { } public Vector2 set ( Vector2 pOther ) { } public Vector2 add ( float pX , float pY ) { } public Vector2 add ( Vector2 pOther ) { } public Vector2 sub ( float pX , float pY ) { } public Vector2 sub ( Vector2 pOther ) { } public Vector2 mul ( float pScalar ) { } public float len ( ) { } public Vector2 nor ( ) { } public float angle ( ) { } public Vector2 rotate ( float pAngle ) { float rad = pAngle * ( Vector2 . TO_RADIANS ) ; float cos = ( ( float ) ( Math . cos ( rad ) ) ) ; float sin = ( ( float ) ( Math . sin ( rad ) ) ) ; float newX = ( ( this . x ) * cos ) - ( ( this . y ) * sin ) ; <START_BUG> float newY = ( ( this . y ) * sin ) - ( ( this . y ) * cos ) ; <END_BUG> this . x = newX ; this . y = newY ; return this ; } public float dist ( float pX , float pY ) { } public float dist ( Vector2 pOther ) { } public float distSquared ( float pX , float pY ) { } public float distSquared ( Vector2 pOther ) { } }

Fix:
float newY = ( ( this . y ) * sin ) + ( ( this . y ) * cos ) ;
Buggy code:
public class CCUnCheckout extends ClearCase { public static final String FLAG_KEEPCOPY = "-keep" ; public static final String FLAG_RM = "-rm" ; private boolean m_Keep = false ; public void setKeepCopy ( boolean keep ) { } public boolean getKeepCopy ( ) { } public void execute ( ) throws TaskException { Commandline commandLine = new Commandline ( ) ; Project aProj = getProject ( ) ; int result = 0 ; if ( ( getViewPath ( ) ) == null ) { <START_BUG> setViewPath ( aProj . getBaseDir ( ) . getPath ( ) ) ; <END_BUG> } commandLine . setExecutable ( getClearToolCommand ( ) ) ; commandLine . createArgument ( ) . setValue ( COMMAND_UNCHECKOUT ) ; checkOptions ( commandLine ) ; result = run ( commandLine ) ; if ( result != 0 ) { String msg = "Failed<seq2seq4repair_space>executing:<seq2seq4repair_space>" + ( commandLine . toString ( ) ) ; throw new TaskException ( msg ) ; } } private void checkOptions ( Commandline cmd ) { } }

Fix:
setViewPath ( getBaseDirectory ( ) . getPath ( ) ) ;
Buggy code:
public class GUI extends JFrame { private GamePanel gamePanel ; private JLabel msgLabel ; private JButton [ ] columnButtons ; private Game game ; public static void main ( String [ ] args ) { Solver p1 = new AI ( Player . RED , 5 ) ; <START_BUG> Solver p2 = new Human ( Player . YELLOW ) ; <END_BUG> Game game = new Game ( p1 , p2 ) ; game . setGUI ( new GUI ( game ) ) ; game . runGame ( ) ; } public GUI ( Game game ) { } private JToolBar setUpToolBar ( ) { } public void notifyGameOver ( Player winner ) { } public void setMsg ( String s ) { } public void updateGUI ( Board b , Move m ) { } No newline ; at end ; of file ; }

Fix:
Solver p2 = new AI ( Player . YELLOW , 4 ) ;
Buggy code:
public class TestTopScoreDocCollector extends LuceneTestCase { public void testOutOfOrderCollection ( ) throws Exception { Directory dir = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , dir ) ; for ( int i = 0 ; i < 10 ; i ++ ) { writer . addDocument ( new Document ( ) ) ; } boolean [ ] inOrder = new boolean [ ] { false , true } ; String [ ] actualTSDCClass = new String [ ] { "OutOfOrderTopScoreDocCollector" , "InOrderTopScoreDocCollector" } ; BooleanQuery bq = new BooleanQuery ( ) ; bq . add ( new MatchAllDocsQuery ( ) , SHOULD ) ; bq . setMinimumNumberShouldMatch ( 1 ) ; IndexReader reader = writer . getReader ( ) ; IndexSearcher searcher = newSearcher ( reader ) ; for ( int i = 0 ; i < ( inOrder . length ) ; i ++ ) { TopDocsCollector < ScoreDoc > tdc = TopScoreDocCollector . create ( 3 , inOrder [ i ] ) ; assertEquals ( ( "org.apache.lucene.search.TopScoreDocCollector$" + ( actualTSDCClass [ i ] ) ) , tdc . getClass ( ) . getName ( ) ) ; searcher . search ( new MatchAllDocsQuery ( ) , tdc ) ; ScoreDoc [ ] sd = tdc . topDocs ( ) . scoreDocs ; assertEquals ( 3 , sd . length ) ; for ( int j = 0 ; j < ( sd . length ) ; j ++ ) { assertEquals ( ( ( ( "expected<seq2seq4repair_space>doc<seq2seq4repair_space>Id<seq2seq4repair_space>" + j ) + "<seq2seq4repair_space>found<seq2seq4repair_space>" ) + ( sd [ j ] . doc ) ) , j , sd [ j ] . doc ) ; } } <START_BUG> writer . close ( ) ; <END_BUG> reader . close ( ) ; dir . close ( ) ; } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class View { VisPanel P ; Graphics2D g ; static final double SCALE_FACTOR = 1.2 ; static final double MIN_ZOOM = 0.16 ; static final double MAX_ZOOM = 5.5 ; int W ; int H ; int minx ; int miny ; int maxx ; int maxy ; double viewX ; double viewY ; double viewW ; double viewH ; double f ; public View ( VisPanel P ) { } public void setGraphics ( Graphics2D g ) { } public void setWH ( int w , int h ) { } public void setX ( int x ) { } public void setY ( int y ) { } public void setBounds ( int minx , int miny , int maxx , int maxy ) { } static int map ( double x , double a , double b , double c , double d ) { } public int v2rX ( double x ) { } public int v2rY ( double y ) { } public int v2rF ( int fs ) { } public int r2vX ( double x ) { } public int r2vY ( double y ) { } public void moveLeft ( ) { } public void moveRight ( ) { } public void moveUp ( ) { } public void moveDown ( ) { } public void zoomIn ( ) { } public void zoomOut ( ) { } public boolean inside ( int x , int y ) { } public void setColor ( Color c ) { } public void fillSqr ( int x , int y , int a ) { } public void drawSqr ( int x , int y , int a ) { } public void fillOval ( int x , int y , int a , int b ) { } public void drawOval ( int x , int y , int a , int b ) { } public void fillCircle ( int x , int y , int r ) { } public void drawCircle ( int x , int y , int r ) { } public void drawLine ( int x1 , int y1 , int x2 , int y2 ) { } public void drawSquare ( int x , int y , int a ) { } public int stringWidth ( String str , int fs ) { } public void drawString ( String str , int x , int y , int fs ) { } public void drawStringLeft ( String str , int x , int y , int fs ) { } public void drawStringTop ( String str , int x , int y , int fs ) { } public void fillArc ( int x , int y , int w , int h , int a1 , int a2 ) { } public void drawRoundRectangle ( int x , int y , double w , double h , double arcw , double arch ) { } public void fillRoundRectangle ( int x , int y , double w , double h , double arcw , double arch ) { } private void arrowHead ( int x , int y , int xx , int yy ) { } public void drawArrow ( int x1 , int y1 , int x2 , int y2 ) { } public void drawArcArrow ( int x , int y , int w , int h , int a1 , int a2 ) { } public void drawImage ( Image img , int x , int y , int w , int h ) { <START_BUG> g . drawImage ( img , x , y , w , h , null ) ; <END_BUG> } }

Fix:
g . drawImage ( img , v2rX ( x ) , v2rY ( y ) , w , h , null ) ;
Buggy code:
public class AppModel extends Observable implements IAppModel { private final DBAccessExtended data ; private Map < Integer , Long > actualIndexMap ; private final int numOfFeilds = 7 ; private final int ownerIndex = ( numOfFeilds ) - 1 ; private int totalRecords ; private static List < Observer > observers = new ArrayList < Observer > ( ) ; public AppModel ( final DBAccessExtended dbAccess ) { } @ Override public List < HotelRoom > getAllRecords ( ) { } @ Override public Map < Integer , HotelRoom > queryRecords ( final String name , final String location ) { } @ Override public String [ ] getRoomFeilds ( ) throws NewRuntimeException { } @ Override public void updateRecord ( final long recNo , final String owner , final long cookie ) throws SecurityException , RecordNotAvailableException , RecordNotFoundException { } public long create ( final HotelRoom room ) throws DuplicateKeyException { } @ Override public void addObserver ( final Observer observer ) { } @ Override public void removeObserver ( final Observer observer ) { } protected void fireNotification ( ) { } @ Override <START_BUG> public Long getActualIndexMap ( final long selection ) { <END_BUG> return actualIndexMap . get ( selection ) ; } @ Override public int getTotalNumberRecords ( ) { } private Map < Integer , HotelRoom > getMultipleRecords ( final long [ ] recNumbers ) { } private List < HotelRoom > getAllRecordsFromCache ( ) { } private boolean alreadyBooked ( final long recNo ) throws RecordNotFoundException { } @ Override public long getCookie ( ) { } No newline ; at end ; of file ; }

Fix:
public Long getActualIndexMap ( final int selection ) {
Buggy code:
public final class ServletHandler extends Handler { public static final int STATE_DELAYED_INIT = 2 ; public static final int STATE_READY = 3 ; private ServletInfo sw ; private String servletClassName ; protected Class servletClass ; protected Servlet servlet ; protected Context context ; long unavailableTime = - 1 ; public ServletHandler ( ) { } public String toString ( ) { } public void setServletInfo ( ServletInfo sw ) { } public ServletInfo getServletInfo ( ) { } public void setContext ( Context context ) { } public Context getContext ( ) { } public void setServletClassName ( String servletClassName ) { servlet = null ; servletClass = null ; this . servletClassName = servletClassName ; <START_BUG> if ( ( ( debug ) > 0 ) && ( ( sw . getJspFile ( ) ) != null ) ) <END_BUG> log ( context , ( ( ( "setServletClassName<seq2seq4repair_space>for<seq2seq4repair_space>" + ( sw . getJspFile ( ) ) ) + ":<seq2seq4repair_space>" ) + servletClassName ) ) ; } public String getServletClassName ( ) { } public final void destroy ( ) { } public final void init ( ) { } private void log ( Context ctx , String s ) { } private void log ( Context ctx , String s , Throwable t ) { } public void reload ( ) { } public Servlet getServlet ( ) throws ClassNotFoundException , IllegalAccessException , InstantiationException { } protected void doDestroy ( ) throws TomcatException { } protected void preInit ( ) throws Exception { } protected void doInit ( ) throws Exception { } public void service ( Request req , Response res ) throws Exception { } protected void doService ( Request req , Response res ) throws Exception { } private void handleError ( Request req , Response res , Throwable t ) { } protected void handleInitError ( Request req , Response res , Throwable t ) { } protected void handleServiceError ( Request req , Response res , Throwable t ) throws Exception { } private void setServletUnavailable ( UnavailableException ex ) { } private boolean checkAvailable ( ) { } private boolean checkAvailable ( Request req , Response res ) { } public String [ ] _getDepends ( ) { } }

Fix:
if ( ( ( ( debug ) > 0 ) && ( ( sw ) != null ) ) && ( ( sw . getJspFile ( ) ) != null ) )
Buggy code:
public class SimplePageTest extends WicketTestCase { public SimplePageTest ( String name ) { } public void testRenderHomePage ( ) throws Exception { } public void testRenderHomePage_2 ( ) throws Exception { } public void testRenderHomePage_2a ( ) throws Exception { } public void testRenderHomePage_2b ( ) throws Exception { } public void testRenderHomePage_3 ( ) throws Exception { } public void testRenderHomePage_4 ( ) throws Exception { } public void testRenderHomePage_5 ( ) throws Exception { } public void testRenderHomePage_6 ( ) throws Exception { boolean hit = false ; try { executeTest ( SimplePage_6 . class , "SimplePageExpectedResult_6.html" ) ; <START_BUG> } catch ( MarkupNotFoundException ex ) { <END_BUG> hit = true ; } assertTrue ( "Did<seq2seq4repair_space>expect<seq2seq4repair_space>a<seq2seq4repair_space>MarkupException" , hit ) ; } public void testRenderHomePage_7 ( ) throws Exception { } public void testRenderHomePage_8 ( ) throws Exception { } public void testRenderHomePage_9 ( ) throws Exception { } public void testRenderHomePage_10 ( ) throws Exception { } public void testRenderHomePage_11 ( ) throws Exception { } public void testRenderHomePage_12 ( ) throws Exception { } }

Fix:
} catch ( MarkupException ex ) {
Buggy code:
public abstract class SimpleSyslogServer implements Runnable { protected final AtomicBoolean closed = new AtomicBoolean ( false ) ; protected final BlockingQueue < byte [ ] > receivedData = new LinkedBlockingQueue < byte [ ] > ( ) ; SimpleSyslogServer ( ) { } static SimpleSyslogServer createUdp ( int port ) throws IOException { } static SimpleSyslogServer createTcp ( int port , boolean octetCounting ) throws IOException { } static SimpleSyslogServer createTls ( int port , boolean octetCounting , File keystorePath , String keystorePassword , File clientCertPath , String clientCertPwd ) throws IOException , GeneralSecurityException { KeyManager [ ] keyManagers ; <START_BUG> final KeyManagerFactory kmf = KeyManagerFactory . getInstance ( "SunX509" ) ; <END_BUG> final FileInputStream in = new FileInputStream ( keystorePath ) ; try { final KeyStore ks = KeyStore . getInstance ( "JKS" ) ; ks . load ( in , keystorePassword . toCharArray ( ) ) ; kmf . init ( ks , keystorePassword . toCharArray ( ) ) ; keyManagers = kmf . getKeyManagers ( ) ; } finally { IoUtils . safeClose ( in ) ; } boolean requireClientAuth = false ; TrustManager [ ] trustManagers = null ; if ( clientCertPath != null ) { requireClientAuth = true ; final TrustManagerFactory tmf = TrustManagerFactory . getInstance ( TrustManagerFactory . getDefaultAlgorithm ( ) ) ; final FileInputStream clientIn = new FileInputStream ( clientCertPath ) ; try { final KeyStore ks = KeyStore . getInstance ( "JKS" ) ; ks . load ( clientIn , clientCertPwd . toCharArray ( ) ) ; tmf . init ( ks ) ; trustManagers = tmf . getTrustManagers ( ) ; } finally { IoUtils . safeClose ( in ) ; } } final SSLContext context = SSLContext . getInstance ( "TLS" ) ; context . init ( keyManagers , trustManagers , null ) ; SSLServerSocket socket = ( ( SSLServerSocket ) ( context . getServerSocketFactory ( ) . createServerSocket ( port ) ) ) ; socket . setNeedClientAuth ( requireClientAuth ) ; SimpleSyslogServer server = new SimpleSyslogServer . Tcp ( socket , octetCounting ) ; Thread t = new Thread ( server ) ; t . start ( ) ; return server ; } abstract void close ( ) { } byte [ ] receiveData ( ) throws InterruptedException { } byte [ ] pollData ( ) { } private static class Udp extends SimpleSyslogServer { private final DatagramSocket socket ; Udp ( int port ) throws IOException { } @ Override void close ( ) { } @ Override public void run ( ) { } } private static class Tcp extends SimpleSyslogServer { private final boolean octetCounting ; private final ServerSocket serverSocket ; private volatile Socket socket ; Tcp ( ServerSocket servetSocket , boolean octetCounting ) { } @ Override void close ( ) { } Socket accept ( ServerSocket serverSocket ) throws IOException { } @ Override public void run ( ) { } } }

Fix:
final KeyManagerFactory kmf = KeyManagerFactory . getInstance ( KeyManagerFactory . getDefaultAlgorithm ( ) ) ;
Buggy code:
public class ResultListFragment extends ListFragment { static ResultListFragment mResultListFragment ; MainActivity mMainActivity = null ; protected ListResultAdapter mResultAdapter ; protected List < Competitor > mAllCompetitor = new ArrayList < Competitor > ( ) ; protected List < Competitor > mCompetitor = new ArrayList < Competitor > ( ) ; private static final String ARG_SECTION_NUMBER = "section_number" ; public void onActivityCreated ( Bundle savedInstanceState ) { } protected void FetchItems ( ) { } protected void FillList ( ) { } protected void PopulateList ( ) { } public static ResultListFragment getInstance ( int sectionNumber ) { } public void displayNewCard ( Card newCard ) { mMainActivity . competition . processNewCard ( newCard ) ; <START_BUG> mMainActivity . UpdateFragments ( ) ; <END_BUG> } }

Fix:
mMainActivity . updateFragments ( ) ;
Buggy code:
public class AssertStatement extends Statement { public Expression assertExpression ; public Expression exceptionArgument ; int preAssertInitStateIndex = - 1 ; private FieldBinding assertionSyntheticFieldBinding ; public AssertStatement ( Expression exceptionArgument , Expression assertExpression , int startPosition ) { } public AssertStatement ( Expression assertExpression , int startPosition ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { this . preAssertInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( flowInfo ) ; Constant cst = this . assertExpression . optimizedBooleanConstant ( ) ; if ( ( ( this . assertExpression . implicitConversion ) & ( TypeIds . UNBOXING ) ) != 0 ) { this . assertExpression . checkNPE ( currentScope , flowContext , flowInfo ) ; } boolean isOptimizedTrueAssertion = ( cst != ( Constant . NotAConstant ) ) && ( ( cst . booleanValue ( ) ) == true ) ; boolean isOptimizedFalseAssertion = ( cst != ( Constant . NotAConstant ) ) && ( ( cst . booleanValue ( ) ) == false ) ; flowContext . tagBits |= FlowContext . HIDE_NULL_COMPARISON_WARNING ; FlowInfo conditionFlowInfo = this . assertExpression . analyseCode ( currentScope , flowContext , flowInfo . copy ( ) ) ; flowContext . tagBits &= ~ ( FlowContext . HIDE_NULL_COMPARISON_WARNING ) ; UnconditionalFlowInfo assertWhenTrueInfo = conditionFlowInfo . initsWhenTrue ( ) . unconditionalInits ( ) ; FlowInfo assertInfo = conditionFlowInfo . initsWhenFalse ( ) ; if ( isOptimizedTrueAssertion ) { <START_BUG> assertInfo . setReachMode ( FlowInfo . UNREACHABLE ) ; <END_BUG> } if ( ( this . exceptionArgument ) != null ) { FlowInfo exceptionInfo = this . exceptionArgument . analyseCode ( currentScope , flowContext , assertInfo . copy ( ) ) ; if ( isOptimizedTrueAssertion ) { currentScope . problemReporter ( ) . fakeReachable ( this . exceptionArgument ) ; } else { flowContext . checkExceptionHandlers ( currentScope . getJavaLangAssertionError ( ) , this , exceptionInfo , currentScope ) ; } } if ( ! isOptimizedTrueAssertion ) { manageSyntheticAccessIfNecessary ( currentScope , flowInfo ) ; } if ( isOptimizedFalseAssertion ) { return flowInfo ; } else { CompilerOptions compilerOptions = currentScope . compilerOptions ( ) ; if ( ! ( compilerOptions . includeNullInfoFromAsserts ) ) { return flowInfo . nullInfoLessUnconditionalCopy ( ) . mergedWith ( assertInfo . nullInfoLessUnconditionalCopy ( ) ) . addNullInfoFrom ( flowInfo ) ; } return flowInfo . mergedWith ( assertInfo . nullInfoLessUnconditionalCopy ( ) ) . addInitializationsFrom ( assertWhenTrueInfo . discardInitializationInfo ( ) ) ; } } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public void resolve ( BlockScope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public StringBuffer printStatement ( int tab , StringBuffer output ) { } }

Fix:
assertInfo . setReachMode ( FlowInfo . UNREACHABLE_OR_DEAD ) ;
Buggy code:
public class Caret extends Widget { Canvas parent ; int x ; int y ; int width ; int height ; boolean moved ; boolean resized ; boolean isVisible ; Image image ; Font font ; LOGFONT oldFont ; public Caret ( Canvas parent , int style ) { } void createWidget ( ) { } int defaultFont ( ) { } public Rectangle getBounds ( ) { } public Font getFont ( ) { } public Image getImage ( ) { } public Point getLocation ( ) { } public Canvas getParent ( ) { } public Point getSize ( ) { } public boolean getVisible ( ) { } boolean hasFocus ( ) { } boolean isFocusCaret ( ) { } public boolean isVisible ( ) { } void killFocus ( ) { } void move ( ) { } void releaseChild ( ) { } void releaseWidget ( ) { } void resize ( ) { } void restoreIMEFont ( ) { } void saveIMEFont ( ) { if ( ! ( OS . IsDBLocale ) ) return ; if ( ( oldFont ) != null ) return ; int hwnd = parent . handle ; int hIMC = OS . ImmGetContext ( hwnd ) ; oldFont = ( OS . IsUnicode ) ? ( ( LOGFONT ) ( new LOGFONTW ( ) ) ) : new LOGFONTA ( ) ; <START_BUG> if ( OS . ImmGetCompositionFont ( hIMC , oldFont ) ) <END_BUG> oldFont = null ; OS . ImmReleaseContext ( hwnd , hIMC ) ; } public void setBounds ( int x , int y , int width , int height ) { } public void setBounds ( Rectangle rect ) { } void setFocus ( ) { } public void setFont ( Font font ) { } public void setImage ( Image image ) { } void setIMEFont ( int hFont ) { } public void setLocation ( int x , int y ) { } public void setLocation ( Point location ) { } public void setSize ( int width , int height ) { } public void setSize ( Point size ) { } public void setVisible ( boolean visible ) { } }

Fix:
if ( ! ( OS . ImmGetCompositionFont ( hIMC , oldFont ) ) )
Buggy code:
public class WarDeploymentInitializingProcessor implements DeploymentUnitProcessor { static final String WAR_EXTENSION = ".war" ; public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { <START_BUG> VirtualFile virtualFile = phaseContext . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; <END_BUG> if ( virtualFile . getName ( ) . toLowerCase ( ) . endsWith ( WarDeploymentInitializingProcessor . WAR_EXTENSION ) ) { WarDeploymentMarker . markDeployment ( phaseContext . getDeploymentUnit ( ) ) ; } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
VirtualFile virtualFile = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ;
Buggy code:
public final class MarkupStream { private MarkupElement current ; private int currentIndex = 0 ; private final IMarkup markup ; protected MarkupStream ( ) { } public MarkupStream ( final IMarkup markup ) { } public boolean atCloseTag ( ) { } public boolean atOpenCloseTag ( ) { } public boolean atOpenCloseTag ( final String componentId ) { } public boolean atOpenTag ( ) { } public boolean atOpenTag ( final String id ) { } public boolean atTag ( ) { } public MarkupElement get ( ) { } public ComponentTag getTag ( ) { } public ComponentTag getTag ( final boolean throwException ) { } public int getCurrentIndex ( ) { } public IResourceStream getResource ( ) { } public boolean hasMore ( ) { } public boolean hasMoreComponentTags ( ) { while ( hasMore ( ) ) { <START_BUG> MarkupElement elem = next ( ) ; <END_BUG> if ( elem instanceof ComponentTag ) { return true ; } } return false ; } public MarkupElement next ( ) { } public void setCurrentIndex ( final int currentIndex ) { } public final void skipComponent ( ) { } public void skipRawMarkup ( ) { } public void skipUntil ( final String wicketTagName ) { } public void throwMarkupException ( final String message ) { } public String toHtmlDebugString ( ) { } @ Override public String toString ( ) { } private MarkupElement get ( final int index ) { } private void skipToMatchingCloseTag ( final ComponentTag openTag ) { } public String getXmlDeclaration ( ) { } public final String getEncoding ( ) { } public final Class getContainerClass ( ) { } public final String getWicketNamespace ( ) { } public final boolean equalMarkup ( final MarkupStream markupStream ) { } public final int findComponentIndex ( final String path , final String id ) { } public final boolean isMergedMarkup ( ) { } }

Fix:
final MarkupElement elem = next ( ) ;
Buggy code:
class SkillCalculator { private static float [ ] k = new float [ ] { 0.0F , 0.05F , 0.06F , 0.08F , 0.1F , 0.12F , 0.14F , 0.16F , 0.18F , 0.2F , 0.22F , 0.24F , 0.26F , 0.28F , 0.3F , 0.32F , 0.34F , 0.36F , 0.38F , 0.4F , 0.5F , 0.52F , 0.54F , 0.56F , 0.58F , 0.6F , 0.63F , 0.66F , 0.69F , 0.72F , 0.82F , 0.85F , 0.88F , 0.91F , 0.94F , 0.98F , 1.02F , 1.06F , 1.1F , 1.15F , 1.25F } ; private static byte parseLevel ( String sLevel ) throws IllegalArgumentException { } public static int auraDellaSpada ( String sLevel , int pgLiv , int pgStr ) throws IllegalArgumentException { } public static int lamaMagica ( String sLevel , int pgLiv , int pgInt ) throws IllegalArgumentException { } public static int attaccoPiu ( String sLevel , int pgInt ) throws IllegalArgumentException { } public static int frenzy ( String sLevel ) throws IllegalArgumentException { byte level = SkillCalculator . parseLevel ( sLevel ) ; if ( level < 1 ) return 0 ; <START_BUG> return ( ( int ) ( ( ( ( int ) ( 50 ) ) * ( SkillCalculator . k [ level ] ) ) // 2.0F ) ) ; <END_BUG> } public static float fear ( String sLevel ) throws IllegalArgumentException { } public static float blessing ( String sLevel , int iq ) { } public static float darkProtection ( String sLevel , int iq ) { } }

Fix:
return ( ( int ) ( ( ( int ) ( 50 ) ) * ( SkillCalculator . k [ level ] ) ) ) ;
Buggy code:
public class WhereisHelperTest extends TestCase { public WhereisHelperTest ( String testName ) { } @ Override protected void setUp ( ) throws Exception { } @ Override protected void tearDown ( ) throws Exception { } public void testWhereis ( ) { WhereisHelper helper = getHelper ( ) ; String result = helper . whereis ( ) ; <START_BUG> assertEquals ( "soffice:<seq2seq4repair_space>//usr//bin//soffice<seq2seq4repair_space>//usr//bin//X11//soffice" , result ) ; <END_BUG> } public void testFindOpenOffice ( ) throws Exception { } protected WhereisHelper getHelper ( ) { } }

Fix:
assertEquals ( result . startsWith ( "soffice:<seq2seq4repair_space>//usr//bin//soffice" ) , true ) ;
Buggy code:
public class ResultListIterator extends AbstractListIterator { private static final Localizer _loc = Localizer . forPackage ( ResultListIterator . class ) ; private final ListIterator _li ; private final ResultList _rl ; public ResultListIterator ( ListIterator li , ResultList rl ) { } public ResultList getResultList ( ) { } public boolean hasNext ( ) { } public boolean hasPrevious ( ) { } public Object next ( ) { if ( _rl . isClosed ( ) ) <START_BUG> throw new NoSuchElementException ( ResultListIterator . _loc . get ( "closed" ) ) ; <END_BUG> return _li . next ( ) ; } public int nextIndex ( ) { } public Object previous ( ) { } public int previousIndex ( ) { } }

Fix:
throw new NoSuchElementException ( ResultListIterator . _loc . get ( "closed" ) . getMessage ( ) ) ;
Buggy code:
public class AttributeCodePiece extends NamedCodePiece { private CompositeCodePiece attributeDef ; private Vector attributeNames ; private boolean typeFullyQualified ; public AttributeCodePiece ( CodePiece modifiers , CodePiece type , Vector names ) { } public StringBuffer getText ( ) { } public int getStartPosition ( ) { } public int getEndPosition ( ) { } public int getStartLine ( ) { } public int getEndLine ( ) { } public void write ( Writer writer , Stack parseStateStack , int column ) throws Exception { ParseState parseState = ( ( ParseState ) ( parseStateStack . peek ( ) ) ) ; Vector features = parseState . getNewFeatures ( ) ; for ( Iterator i = attributeNames . iterator ( ) ; i . hasNext ( ) ; ) { String name = ( ( String ) ( i . next ( ) ) ) ; for ( Iterator j = features . iterator ( ) ; j . hasNext ( ) ; ) { MFeature mFeature = ( ( MFeature ) ( j . next ( ) ) ) ; if ( mFeature . getName ( ) . equals ( name ) ) { parseState . newFeature ( mFeature ) ; MAttribute mAttribute = ( ( MAttribute ) ( mFeature ) ) ; <START_BUG> String docComment = GeneratorJava . generateConstraintEnrichedDocComment ( mAttribute ) ; <END_BUG> if ( docComment != null ) { writer . write ( docComment ) ; writer . write ( "\n" ) ; for ( int k = 0 ; k < column ; k ++ ) { writer . write ( "<seq2seq4repair_space>" ) ; } } if ( ( mAttribute . getChangeability ( ) ) == ( MChangeableKind . FROZEN ) ) { writer . write ( "final<seq2seq4repair_space>" ) ; } if ( ( mAttribute . getOwnerScope ( ) ) == ( MScopeKind . CLASSIFIER ) ) { writer . write ( "static<seq2seq4repair_space>" ) ; } if ( ( mAttribute . getVisibility ( ) ) == ( MVisibilityKind . PUBLIC ) ) { writer . write ( "public<seq2seq4repair_space>" ) ; } else if ( ( mAttribute . getVisibility ( ) ) == ( MVisibilityKind . PROTECTED ) ) { writer . write ( "protected<seq2seq4repair_space>" ) ; } else if ( ( mAttribute . getVisibility ( ) ) == ( MVisibilityKind . PRIVATE ) ) { writer . write ( "private<seq2seq4repair_space>" ) ; } if ( typeFullyQualified ) { writer . write ( ( ( mAttribute . getType ( ) . getNamespace ( ) . getName ( ) ) + "." ) ) ; } writer . write ( ( ( ( mAttribute . getType ( ) . getName ( ) ) + "<seq2seq4repair_space>" ) + ( mAttribute . getName ( ) ) ) ) ; } } } } }

Fix:
String docComment = GeneratorJava . generateConstraintEnrichedDocComment ( mAttribute , false , INDENT ) ;
Buggy code:
public final class MarkupParser implements IMarkupParser { private static final Log log = LogFactory . getLog ( MarkupParser . class ) ; private String componentNameAttribute ; private String wicketTagName ; private int inputPosition ; private String input ; private boolean stripComments ; private boolean compressWhitespace ; private int lineNumber = 1 ; private int columnNumber = 1 ; private int lastLineCountIndex ; private String encoding ; private static final Pattern encodingPattern = Pattern . compile ( "<\\?xml\\s+(.*\\s)?encoding\\s*=\\s*([\"\'](.*?)[\"\']|(\\S]*)).*\\?>" ) ; private boolean stripWicketParamTag ; private boolean autolinking ; private Stack autolinkStatus ; private Page page ; public MarkupParser ( ) { } public MarkupParser ( final String componentNameAttribute , final String wicketTagName ) { } public void setComponentNameAttribute ( final String name ) { } public void setWicketNamespace ( final String name ) { this . wicketTagName = name ; <START_BUG> if ( ! ( WICKET_NAMESPACE . equals ( wicketTagName ) ) ) { <END_BUG> MarkupParser . log . info ( ( "You<seq2seq4repair_space>are<seq2seq4repair_space>using<seq2seq4repair_space>a<seq2seq4repair_space>non-standard<seq2seq4repair_space>wicket<seq2seq4repair_space>tag<seq2seq4repair_space>name:<seq2seq4repair_space>" + ( wicketTagName ) ) ) ; } } public void setStripWicketParamTag ( boolean remove ) { } public String getEncoding ( ) { } public void setStripComments ( boolean stripComments ) { } public void setCompressWhitespace ( boolean compressWhitespace ) { } public void setAutolinking ( final boolean enable ) { } public void setAutolinkBasePage ( final Page page ) { } public Markup read ( final Resource resource ) throws IOException , ParseException , ResourceNotFoundException { } private final String determineEncoding ( final InputStream in , final int readAheadSize ) throws IOException { } Markup parse ( final String string ) throws ParseException { } private List parseMarkup ( final String markup ) throws ParseException { } private boolean handleAutolinks ( final ComponentTag tag ) throws ParseException { } private boolean resolveAutomaticLink ( final ComponentTag tag ) throws ParseException { } private final void validateWicketTags ( final List markupElements ) throws ParseException { } private void removePreviewComponents ( final List list ) { } private void setInput ( final String input ) { } private void countLinesTo ( final String string , final int end ) { } private ComponentTag nextTag ( ) throws ParseException { } private ComponentTag parseTagText ( final String tagText ) throws ParseException { } }

Fix:
if ( ! ( DEFAULT_WICKET_NAMESPACE . equals ( wicketTagName ) ) ) {
Buggy code:
public abstract class MergePolicy implements Closeable { public static class OneMerge { SegmentInfo info ; boolean optimize ; boolean registerDone ; long mergeGen ; boolean isExternal ; int maxNumSegmentsOptimize ; SegmentReader [ ] readers ; SegmentReader [ ] readersClone ; public final SegmentInfos segments ; boolean aborted ; Throwable error ; boolean paused ; public OneMerge ( SegmentInfos segments ) { } synchronized void setException ( Throwable error ) { } synchronized Throwable getException ( ) { } synchronized void abort ( ) { } synchronized boolean isAborted ( ) { } synchronized void checkAborted ( Directory dir ) throws MergePolicy . MergeAbortedException { } public synchronized void setPause ( boolean paused ) { } public synchronized boolean getPause ( ) { } public String segString ( Directory dir ) { } public long totalBytesSize ( ) throws IOException { long total = 0 ; for ( SegmentInfo info : segments ) { <START_BUG> total += info . sizeInBytes ( ) ; <END_BUG> } return total ; } public int totalNumDocs ( ) throws IOException { } } public static class MergeSpecification { public final List < MergePolicy . OneMerge > merges = new ArrayList < MergePolicy . OneMerge > ( ) ; public void add ( MergePolicy . OneMerge merge ) { } public String segString ( Directory dir ) { } } public static class MergeException extends RuntimeException { private Directory dir ; public MergeException ( String message , Directory dir ) { } public MergeException ( Throwable exc , Directory dir ) { } public Directory getDirectory ( ) { } } public static class MergeAbortedException extends IOException { public MergeAbortedException ( ) { } public MergeAbortedException ( String message ) { } } protected final SetOnce < IndexWriter > writer ; public MergePolicy ( ) { } public void setIndexWriter ( IndexWriter writer ) { } public abstract MergePolicy . MergeSpecification findMerges ( SegmentInfos segmentInfos ) throws IOException , CorruptIndexException { } public abstract MergePolicy . MergeSpecification findMergesForOptimize ( SegmentInfos segmentInfos , int maxSegmentCount , Set < SegmentInfo > segmentsToOptimize ) throws IOException , CorruptIndexException { } public abstract MergePolicy . MergeSpecification findMergesToExpungeDeletes ( SegmentInfos segmentInfos ) throws IOException , CorruptIndexException { } public abstract void close ( ) { } public abstract boolean useCompoundFile ( SegmentInfos segments , SegmentInfo newSegment ) throws IOException { } }

Fix:
total += info . sizeInBytes ( true ) ;