nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Board { private static final String [ ] COLUMNS = new String [ ] { "A" , "B" , "C" , "D" , "E" , "F" , "G" , "H" } ; private final LowLevelBoard board ; private final Stack < Move > history ; private final int size ; public Board ( ) { } public boolean isValidMove ( int r , int c , int tr , int tc ) { } public boolean canPromote ( int r , int c ) { } public void promote ( int r , int c ) { } private boolean inRange ( int x ) { } public List < Move > validMoves ( int r , int c ) { } private boolean isJump ( int r , int c , int tr , int tc ) { } boolean isOponent ( CheckerType type , int r , int c ) { } private boolean isSimpleMove ( int r , int c , int tr , int tc ) { } private boolean targetEmpty ( int tr , int tc ) { } private boolean sourceNotEmpty ( int r , int c ) { } public Move move ( int r , int c , int tr , int tc ) { } public void revert ( ) { Move move = history . pop ( ) ; board . move ( move . getTr ( ) , move . getTc ( ) , move . getR ( ) , move . getC ( ) ) ; CheckerType jumped = move . getJumped ( ) ; if ( jumped != null ) { <START_BUG> board . setCell ( move . getJc ( ) , move . getJc ( ) , jumped ) ; <END_BUG> } } private void init ( ) { } private void setRow ( int r , CheckerType type ) { } public CheckerType getCell ( int r , int c ) { } public void revert ( int k ) { } @ Override public String toString ( ) { } public int getSize ( ) { } public static int [ ] columns ( int r , int size ) { } public Iterator < int [ ] > allowedPositionsIterator ( ) { } class AllowedPositionsIterator implements Iterator < int [ ] > { int row = 0 ; int col = - 1 ; final int size ; private AllowedPositionsIterator ( int size ) { } @ Override public boolean hasNext ( ) { } @ Override public int [ ] next ( ) { } } public int getScore ( boolean white ) { } public static String getColumn ( int c ) { } public static String getRow ( int r ) { } public static String printBoards ( Board board , int [ ] from , int [ ] to ) { } private static void appendPiece ( Board board , StringBuilder s , int r , int c ) { } No newline ; at end ; of file ; }

Fix:
board . setCell ( move . getJr ( ) , move . getJc ( ) , jumped ) ;
Buggy code:
public class SplashActivity extends Activity { Client CurrentEagleUser ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; CurrentEagleUser = ( ( com . example . paulchidi . eaglesconnect . EagleKinvey ) ( getApplication ( ) ) ) . getmKinveyClient ( ) ; setContentView ( activity_splash ) ; Thread splash = new Thread ( ) { public void run ( ) { try { <START_BUG> Thread . sleep ( ( 1 * 1000 ) ) ; <END_BUG> if ( CurrentEagleUser . user ( ) . isUserLoggedIn ( ) ) { Intent intentMain = new Intent ( SplashActivity . this , MainActivity . class ) ; intentMain . addFlags ( FLAG_ACTIVITY_CLEAR_TASK ) ; intentMain . addFlags ( FLAG_ACTIVITY_NEW_TASK ) ; startActivity ( intentMain ) ; } else { Intent intentLogin = new Intent ( SplashActivity . this , LoginActivity . class ) ; intentLogin . addFlags ( FLAG_ACTIVITY_CLEAR_TASK ) ; intentLogin . addFlags ( FLAG_ACTIVITY_NEW_TASK ) ; startActivity ( intentLogin ) ; } } catch ( Exception e ) { } } } ; splash . start ( ) ; } }

Fix:
Thread . sleep ( ( 3 * 1000 ) ) ;
Buggy code:
public class JsonpPollingTransportHandler extends AbstractHttpSendingTransportHandler { @ Override public TransportType getTransportType ( ) { } @ Override protected MediaType getContentType ( ) { } @ Override public PollingSockJsSession createSession ( String sessionId , WebSocketHandler handler ) { <START_BUG> Assert . state ( ( ( getSockJsConfig ( ) ) != null ) , "This<seq2seq4repair_space>transport<seq2seq4repair_space>requires<seq2seq4repair_space>SockJsConfiguration" ) ; <END_BUG> return new PollingSockJsSession ( sessionId , getSockJsConfig ( ) , handler ) ; } @ Override public void handleRequestInternal ( ServerHttpRequest request , ServerHttpResponse response , AbstractHttpSockJsSession session ) throws TransportErrorException { } @ Override protected FrameFormat getFrameFormat ( ServerHttpRequest request ) { } }

Fix:
Assert . notNull ( getSockJsConfig ( ) , "This<seq2seq4repair_space>transport<seq2seq4repair_space>requires<seq2seq4repair_space>SockJsConfiguration" ) ;
Buggy code:
public class FractionFormat extends AbstractFormat { private static final long serialVersionUID = 3008655719530972611L ; public FractionFormat ( ) { } public FractionFormat ( final NumberFormat format ) { } public FractionFormat ( final NumberFormat numeratorFormat , final NumberFormat denominatorFormat ) { } public static Locale [ ] getAvailableLocales ( ) { } public static String formatFraction ( Fraction f ) { } public static FractionFormat getImproperInstance ( ) { } public static FractionFormat getImproperInstance ( final Locale locale ) { } public static FractionFormat getProperInstance ( ) { } public static FractionFormat getProperInstance ( final Locale locale ) { } protected static NumberFormat getDefaultNumberFormat ( ) { } public StringBuffer format ( final Fraction fraction , final StringBuffer toAppendTo , final FieldPosition pos ) { } @ Override public StringBuffer format ( final Object obj , final StringBuffer toAppendTo , final FieldPosition pos ) { } @ Override public Fraction parse ( final String source ) throws ParseException { final ParsePosition parsePosition = new ParsePosition ( 0 ) ; final Fraction result = parse ( source , parsePosition ) ; if ( ( parsePosition . getIndex ( ) ) == 0 ) { <START_BUG> throw MathRuntimeException . createParseException ( parsePosition . getErrorIndex ( ) , "unparseable<seq2seq4repair_space>fraction<seq2seq4repair_space>number:<seq2seq4repair_space>\"{0}\"" , source ) ; <END_BUG> } return result ; } @ Override public Fraction parse ( final String source , final ParsePosition pos ) { } }

Fix:
throw MathRuntimeException . createParseException ( parsePosition . getErrorIndex ( ) , UNPARSEABLE_FRACTION_NUMBER , source ) ;
Buggy code:
public class BinaryMaterialDAO extends CorePluginsDAO < BinaryMaterial > { private static final long serialVersionUID = 1L ; public BinaryMaterial create ( String title , String contentType , byte [ ] content ) { } public BinaryMaterial create ( String title , String contentType , byte [ ] content , BinaryMaterial originMaterial ) { } public BinaryMaterial updateContent ( BinaryMaterial binaryMaterial , byte [ ] content ) { } public void delete ( BinaryMaterial binaryMaterial ) { <START_BUG> delete ( binaryMaterial ) ; <END_BUG> } }

Fix:
super . delete ( binaryMaterial ) ;
Buggy code:
public abstract class AbstractDataSourceAdd extends AbstractAddStepHandler { @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final Resource resource = createResource ( context ) ; populateModel ( context , operation , resource ) ; final ModelNode model = resource . getModel ( ) ; if ( requiresRuntime ( context ) ) { context . addStep ( new OperationStepHandler ( ) { public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final List < ServiceController < ? > > controllers = new ArrayList < ServiceController < ? > > ( ) ; final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler ( ) ; performRuntime ( context , operation , resource , model , verificationHandler , controllers ) ; if ( requiresRuntimeVerification ( ) ) { context . addStep ( verificationHandler , VERIFY ) ; } context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { rollbackRuntime ( context , operation , model , controllers ) ; } } ) ; } } , RUNTIME ) ; } <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } @ Override protected final void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } private void performRuntime ( final OperationContext context , final ModelNode operation , final Resource resource , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > controllers ) throws OperationFailedException { } static String cleanupJavaContext ( String jndiName ) { } protected abstract void startConfigAndAddDependency ( ServiceBuilder < ? > dataSourceServiceBuilder , AbstractDataSourceService dataSourceService , String jndiName , ServiceTarget serviceTarget , final ModelNode operation , final ServiceVerificationHandler serviceVerificationHandler ) throws OperationFailedException { } protected abstract void populateModel ( final ModelNode operation , final ModelNode model ) throws OperationFailedException { } protected abstract AbstractDataSourceService createDataSourceService ( final String jndiName ) throws OperationFailedException { } static void populateAddModel ( final ModelNode operation , final ModelNode modelNode , final String connectionPropertiesProp , final SimpleAttributeDefinition [ ] attributes ) throws OperationFailedException { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class PayInTransactionDAO { private static Logger LOGGER = Logger . getLogger ( PayInTransactionDAO . class ) ; private static Session openSession ( ) { } public static void createPayInTransaction ( PayInTransaction tx ) throws UserAccountNotFoundException , HibernateException { Session session = PayInTransactionDAO . openSession ( ) ; Transaction transaction = null ; try { transaction = session . beginTransaction ( ) ; session . save ( tx ) ; UserAccount userAccount = UserAccountDAO . getById ( tx . getUserID ( ) ) ; userAccount . setBalance ( userAccount . getBalance ( ) . add ( tx . getAmount ( ) ) ) ; session . update ( userAccount ) ; transaction . commit ( ) ; <START_BUG> PayInTransactionDAO . LOGGER . info ( ( ( ( "PayTransaction<seq2seq4repair_space>created<seq2seq4repair_space>and<seq2seq4repair_space>balance<seq2seq4repair_space>for<seq2seq4repair_space>user<seq2seq4repair_space>with<seq2seq4repair_space>ID<seq2seq4repair_space>" + ( tx . getUserID ( ) ) ) + "<seq2seq4repair_space>updated:<seq2seq4repair_space>" ) + ( tx . toString ( ) ) ) ) ; <END_BUG> } catch ( HibernateException e ) { PayInTransactionDAO . LOGGER . error ( ( ( ( "Problem<seq2seq4repair_space>creating<seq2seq4repair_space>PayInTransaction:<seq2seq4repair_space>" + ( tx . toString ( ) ) ) + "ErrorMessage:<seq2seq4repair_space>" ) + ( e . getMessage ( ) ) ) ) ; if ( transaction != null ) transaction . rollback ( ) ; throw e ; } finally { session . close ( ) ; } } public static boolean isNew ( PayInTransaction pit ) { } public static ArrayList < HistoryPayInTransaction > getHistory ( String username , int page ) throws UserAccountNotFoundException { } public static long getHistoryCount ( String username ) throws UserAccountNotFoundException { } }

Fix:
PayInTransactionDAO . LOGGER . info ( ( ( ( "PayInTransaction<seq2seq4repair_space>created<seq2seq4repair_space>and<seq2seq4repair_space>balance<seq2seq4repair_space>for<seq2seq4repair_space>user<seq2seq4repair_space>with<seq2seq4repair_space>ID<seq2seq4repair_space>" + ( tx . getUserID ( ) ) ) + "<seq2seq4repair_space>updated:<seq2seq4repair_space>" ) + ( tx . toString ( ) ) ) ) ;
Buggy code:
public abstract class AbstractMailCheckingAction extends AbstractColumbaAction { private static final int ONE_SECOND = 1000 ; private AccountItem accountItem ; private Timer timer ; public AbstractMailCheckingAction ( AccountItem accountItem ) { } private void createName ( ) { } public void restartTimer ( ) { createName ( ) ; IDefaultItem item = null ; if ( accountItem . isPopAccount ( ) ) { XmlElement e = accountItem . getRoot ( ) . getElement ( "popserver" ) ; item = new org . columba . core . config . DefaultItem ( e ) ; } else { XmlElement e = accountItem . getRoot ( ) . getElement ( "imapserver" ) ; item = new org . columba . core . config . DefaultItem ( e ) ; } if ( item . getBoolean ( "enable_mailcheck" ) ) { <START_BUG> int interval = item . getInteger ( "mailcheck_interval" , 10 ) ; <END_BUG> timer = new Timer ( ( ( ( AbstractMailCheckingAction . ONE_SECOND ) * interval ) * 60 ) , this ) ; timer . restart ( ) ; } else { if ( ( timer ) != null ) { timer . stop ( ) ; timer = null ; } } } public void actionPerformed ( ActionEvent arg0 ) { } public abstract void check ( ) { } public AccountItem getAccountItem ( ) { } public abstract boolean isCheckAll ( ) { } }

Fix:
int interval = item . getIntegerWithDefault ( "mailcheck_interval" , 10 ) ;
Buggy code:
public class ModuleDeploymentTestCaseSetup extends JcaMgmtServerSetupTask { protected File testModuleRoot ; protected File slot ; public static ModelNode address ; protected final String defaultPath = "org//jboss//ironjacamar//ra16out" ; public void addModule ( final String moduleName ) throws Exception { } public void addModule ( final String moduleName , String moduleXml ) throws Exception { } public void removeModule ( final String moduleName ) throws Exception { } private void deleteRecursively ( File file ) { } private void createTestModule ( String moduleXml ) throws IOException { } protected void copyFile ( File target , InputStream src ) throws IOException { } private File getModulePath ( ) { String modulePath = System . getProperty ( "module.path" , null ) ; if ( modulePath == null ) { String jbossHome = System . getProperty ( "jboss.home" , null ) ; if ( jbossHome == null ) { throw new IllegalStateException ( "Neither<seq2seq4repair_space>-Dmodule.path<seq2seq4repair_space>nor<seq2seq4repair_space>-Djboss.home<seq2seq4repair_space>were<seq2seq4repair_space>set" ) ; } modulePath = ( jbossHome + ( File . separatorChar ) ) + "modules" ; } else { <START_BUG> modulePath = modulePath . split ( File . pathSeparator ) [ 1 ] ; <END_BUG> } File moduleDir = new File ( modulePath ) ; if ( ! ( moduleDir . exists ( ) ) ) { throw new IllegalStateException ( "Determined<seq2seq4repair_space>module<seq2seq4repair_space>path<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ) ; } if ( ! ( moduleDir . isDirectory ( ) ) ) { throw new IllegalStateException ( "Determined<seq2seq4repair_space>module<seq2seq4repair_space>path<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>dir" ) ; } return moduleDir ; } @ Override public void tearDown ( ManagementClient managementClient , String containerId ) throws Exception { } @ Override protected void doSetup ( ManagementClient managementClient ) throws Exception { } protected void setConfiguration ( String fileName ) throws Exception { } protected void fillModuleWithFlatClasses ( String raFile ) throws Exception { } protected void fillModuleWithJar ( String raFile ) throws Exception { } public static ModelNode getAddress ( ) { } }

Fix:
modulePath = modulePath . split ( File . pathSeparator ) [ 0 ] ;
Buggy code:
public class ConnectionAddHandler extends AbstractAddStepHandler implements DescriptionProvider { public static final ConnectionAddHandler INSTANCE = new ConnectionAddHandler ( ) ; public static final String OPERATION_NAME = ModelDescriptionConstants . ADD ; protected void populateModel ( ModelNode operation , ModelNode model ) { } @ Override protected boolean requiresRuntime ( OperationContext context ) { <START_BUG> return ( ( context . getType ( ) ) == ( Type . SERVER ) ) || ( ( context . getType ( ) ) == ( Type . HOST ) ) ; <END_BUG> } protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) { } public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
return true ;
Buggy code:
public class WeightEntry { private Integer bodyWeightInt10 ; private Integer fatWeightInt10 ; private Integer waterWeightInt10 ; private Integer muscleWeightInt10 ; private Integer boneWeightInt10 ; public Long TimeStamp ; public Float BodyWeight ( ) { } public Float FatWeight ( ) { } public Float WaterWeight ( ) { } public Float MuscleWeight ( ) { } public Float BoneWeight ( ) { } public ContentValues GetContent10Values ( ) { ContentValues percent10Values = new ContentValues ( ) ; percent10Values . put ( COLUMN_NAME_TIMESTAMP , this . TimeStamp ) ; <START_BUG> percent10Values . put ( COLUMN_NAME_TOTAL , fatWeightInt10 ) ; <END_BUG> percent10Values . put ( COLUMN_NAME_FAT , fatWeightInt10 ) ; percent10Values . put ( COLUMN_NAME_WATER , waterWeightInt10 ) ; percent10Values . put ( COLUMN_NAME_MUSCLE , muscleWeightInt10 ) ; percent10Values . put ( COLUMN_NAME_BONE , boneWeightInt10 ) ; return percent10Values ; } public WeightEntry ( InputEntry entry ) { } }

Fix:
percent10Values . put ( COLUMN_NAME_TOTAL , bodyWeightInt10 ) ;
Buggy code:
public class ReportClose implements Command { private static final Set < String > commands = new HashSet < String > ( ) ; public ReportClose ( ) { } @ Override public Set < String > getActionNames ( ) { } @ Override public void doAction ( ActionEvent e ) { ReportActionRouter . getInstance ( ) . doActionNow ( new ActionEvent ( e . getSource ( ) , e . getID ( ) , ReportCheckDirty . CHECK_DIRTY ) ) ; ReportGuiPackage guiPackage = ReportGuiPackage . getInstance ( ) ; if ( guiPackage . isDirty ( ) ) { <START_BUG> if ( ( JOptionPane . showConfirmDialog ( ReportGuiPackage . getInstance ( ) . getMainFrame ( ) , JMeterUtils . getResString ( "cancel_new_to_save" ) , JMeterUtils . getResString ( "Save?" ) , JOptionPane . YES_NO_OPTION , JOptionPane . QUESTION_MESSAGE ) ) == ( JOptionPane . YES_OPTION ) ) { <END_BUG> ReportActionRouter . getInstance ( ) . doActionNow ( new ActionEvent ( e . getSource ( ) , e . getID ( ) , ActionNames . SAVE ) ) ; } } guiPackage . getTreeModel ( ) . clearTestPlan ( ) ; guiPackage . getTreeListener ( ) . getJTree ( ) . setSelectionRow ( 1 ) ; ReportGuiPackage . getInstance ( ) . setReportPlanFile ( null ) ; ReportActionRouter . getInstance ( ) . actionPerformed ( new ActionEvent ( e . getSource ( ) , e . getID ( ) , ActionNames . ADD_ALL ) ) ; } }

Fix:
if ( ( JOptionPane . showConfirmDialog ( ReportGuiPackage . getInstance ( ) . getMainFrame ( ) , JMeterUtils . getResString ( "cancel_new_to_save" ) , JMeterUtils . getResString ( "save?" ) , JOptionPane . YES_NO_OPTION , JOptionPane . QUESTION_MESSAGE ) ) == ( JOptionPane . YES_OPTION ) ) {
Buggy code:
public class Trash { protected static Category cat = Category . getInstance ( Trash . class ) ; public static Trash SINGLETON = new Trash ( ) ; public Vector _contents = new Vector ( ) ; public MModel Trash_Model = UmlFactory . getFactory ( ) . getModelManagement ( ) . createModel ( ) ; protected Trash ( ) { } public void addItemFrom ( Object obj , Vector places ) { } public boolean contains ( Object obj ) { } public void recoverItem ( Object obj ) { } public void removeItem ( Object obj ) { } public void emptyTrash ( ) { Trash . cat . debug ( "needs-more-work:<seq2seq4repair_space>emptyTheTrash<seq2seq4repair_space>not<seq2seq4repair_space>implemented<seq2seq4repair_space>yet" ) ; <START_BUG> if ( Trash . cat . getPriority ( ) . equals ( Priority . DEBUG ) ) { <END_BUG> StringBuffer buf = new StringBuffer ( "Trash<seq2seq4repair_space>contents:" ) ; buf . append ( "\n" ) ; Enumeration keys = _contents . elements ( ) ; while ( keys . hasMoreElements ( ) ) { Object k = keys . nextElement ( ) ; buf . append ( ( ( "|<seq2seq4repair_space>" + ( ( ( TrashItem ) ( k ) ) . _item ) ) + "\n" ) ) ; } Trash . cat . debug ( buf . toString ( ) ) ; } } public int getSize ( ) { } }

Fix:
if ( ( ( Trash . cat . getPriority ( ) ) != null ) && ( Trash . cat . getPriority ( ) . equals ( Priority . DEBUG ) ) ) {
Buggy code:
public final class BlockListener extends org . bukkit . event . block . BlockListener { private final Deadbolt plugin = Deadbolt . instance ; public BlockListener ( ) { } @ Override public void onBlockBreak ( BlockBreakEvent event ) { } @ Override public void onBlockPlace ( BlockPlaceEvent event ) { } @ Override public void onBlockBurn ( BlockBurnEvent event ) { if ( event . isCancelled ( ) ) { return ; } Block block = event . getBlock ( ) ; Deadbolted db = Deadbolted . get ( block ) ; <START_BUG> if ( ( db . isProtected ( ) ) && ( ! ( ListenerManager . canEndermanPickup ( db , event ) ) ) ) { <END_BUG> event . setCancelled ( true ) ; } } private String getPermission ( Material type ) { } No newline ; at end ; of file ; }

Fix:
if ( ( db . isProtected ( ) ) && ( ! ( ListenerManager . canBlockBurn ( db , event ) ) ) ) {
Buggy code:
public class ContextRelativeResource extends AbstractResource { private static final long serialVersionUID = 1L ; private static final Logger log = LoggerFactory . getLogger ( ContextRelativeResource . class ) ; private final String path ; public ContextRelativeResource ( String pathRelativeToContextRoot ) { } @ Override protected ResourceResponse newResourceResponse ( final Attributes attributes ) { final ResourceResponse resourceResponse = new ResourceResponse ( ) ; if ( resourceResponse . dataNeedsToBeWritten ( attributes ) ) { final WebExternalResourceStream webExternalResourceStream = new WebExternalResourceStream ( path ) ; resourceResponse . setContentType ( webExternalResourceStream . getContentType ( ) ) ; <START_BUG> resourceResponse . setLastModified ( webExternalResourceStream . lastModifiedTime ( ) . toDate ( ) ) ; <END_BUG> resourceResponse . setFileName ( path ) ; resourceResponse . setWriteCallback ( new WriteCallback ( ) { @ Override public void writeData ( final Attributes attributes ) { InputStream inputStream = null ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; try { inputStream = webExternalResourceStream . getInputStream ( ) ; Streams . copy ( inputStream , baos ) ; attributes . getResponse ( ) . write ( baos . toByteArray ( ) ) ; } catch ( ResourceStreamNotFoundException rsnfx ) { throw new WicketRuntimeException ( rsnfx ) ; } catch ( IOException iox ) { throw new WicketRuntimeException ( iox ) ; } finally { IOUtils . closeQuietly ( inputStream ) ; IOUtils . closeQuietly ( baos ) ; } } } ) ; } return resourceResponse ; } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
resourceResponse . setLastModified ( webExternalResourceStream . lastModifiedTime ( ) ) ;
Buggy code:
public class OSGiDeploymentInstallProcessor implements DeploymentUnitProcessor { @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; Deployment deployment = OSGiDeploymentAttachment . getDeployment ( deploymentUnit ) ; ServiceRegistry serviceRegistry = phaseContext . getServiceRegistry ( ) ; <START_BUG> String location = InstallBundleInitiatorService . getLocation ( serviceRegistry , deploymentUnit . getName ( ) ) ; <END_BUG> VirtualFile virtualFile = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; BundleInfo info = BundleInfoAttachment . getBundleInfo ( deploymentUnit ) ; if ( ( deployment == null ) && ( info != null ) ) { deployment = DeploymentFactory . createDeployment ( info ) ; deployment . addAttachment ( BundleInfo . class , info ) ; OSGiDeploymentAttachment . attachDeployment ( deploymentUnit , deployment ) ; } OSGiMetaData metadata = OSGiMetaDataAttachment . getOSGiMetaData ( deploymentUnit ) ; if ( ( deployment == null ) && ( metadata != null ) ) { String symbolicName = metadata . getBundleSymbolicName ( ) ; Version version = metadata . getBundleVersion ( ) ; deployment = DeploymentFactory . createDeployment ( AbstractVFS . adapt ( virtualFile ) , location , symbolicName , version ) ; deployment . addAttachment ( OSGiMetaData . class , metadata ) ; OSGiDeploymentAttachment . attachDeployment ( deploymentUnit , deployment ) ; } XModule resModule = XModuleAttachment . getXModuleAttachment ( deploymentUnit ) ; if ( ( deployment == null ) && ( resModule != null ) ) { String symbolicName = resModule . getName ( ) ; Version version = resModule . getVersion ( ) ; deployment = DeploymentFactory . createDeployment ( AbstractVFS . adapt ( virtualFile ) , location , symbolicName , version ) ; deployment . addAttachment ( XModule . class , resModule ) ; OSGiDeploymentAttachment . attachDeployment ( deploymentUnit , deployment ) ; } if ( deployment != null ) { MountHandle mount = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) . getMountHandle ( ) ; deployment . addAttachment ( MountHandle . class , mount ) ; deployment . setAutoStart ( true ) ; OSGiDeploymentService . addService ( phaseContext ) ; } } @ Override public void undeploy ( final DeploymentUnit deploymentUnit ) { } }

Fix:
String location = DeploymentHolderService . getLocation ( serviceRegistry , deploymentUnit . getName ( ) ) ;
Buggy code:
public class PerspectiveDescriptor implements IPerspectiveDescriptor { private String id ; private String originalId ; private String label ; private String className ; private String description ; private boolean singleton ; private ImageDescriptor image ; private IConfigurationElement configElement ; private static final String ATT_ID = "id" ; private static final String ATT_DEFAULT = "default" ; private static final String ATT_DESC = "description" ; private static final String ATT_NAME = "name" ; private static final String ATT_ICON = "icon" ; private static final String ATT_CLASS = "class" ; private static final String ATT_SINGLETON = "singleton" ; public PerspectiveDescriptor ( String id , String label , PerspectiveDescriptor originalDescriptor ) { } public PerspectiveDescriptor ( IConfigurationElement configElement ) throws CoreException { } public IPerspectiveFactory createFactory ( ) throws CoreException { <START_BUG> if ( ( className ) == null ) <END_BUG> return null ; Object obj = WorkbenchPlugin . createExtension ( configElement , PerspectiveDescriptor . ATT_CLASS ) ; return ( ( IPerspectiveFactory ) ( obj ) ) ; } public void deleteCustomDefinition ( ) { } public String getDescription ( ) { } public String getId ( ) { } public ImageDescriptor getImageDescriptor ( ) { } public String getLabel ( ) { } public String getOriginalId ( ) { } public boolean hasCustomDefinition ( ) { } public boolean hasDefaultFlag ( ) { } public boolean isPredefined ( ) { } public boolean isSingleton ( ) { } public IStatus restoreState ( IMemento memento ) { } public void revertToPredefined ( ) { } public IStatus saveState ( IMemento memento ) { } }

Fix:
if ( ( ( className ) == null ) || ( ( configElement ) == null ) )
Buggy code:
public class IDFactory implements IIDFactory { public static final String SECURITY_PROPERTY = ( IDFactory . class . getName ( ) ) + ".security" ; private static final int IDENTITY_CREATION_ERRORCODE = 2001 ; private static Hashtable namespaces = new Hashtable ( ) ; private static boolean securityEnabled = false ; protected static IIDFactory instance = null ; protected IDFactory ( ) { } public static IIDFactory getDefault ( ) { } public Namespace addNamespace ( Namespace namespace ) throws SecurityException { } protected static final Namespace addNamespace0 ( Namespace namespace ) { } protected static final void checkPermission ( NamespacePermission namespacepermission ) throws SecurityException { } public boolean containsNamespace ( Namespace namespace ) throws SecurityException { } public List getNamespaces ( ) { } protected static final boolean containsNamespace0 ( Namespace n ) { } public Namespace getNamespace ( Namespace namespace ) throws SecurityException { } public Namespace getNamespaceByName ( String name ) throws SecurityException { } protected static final Namespace getNamespace0 ( Namespace n ) { } protected static final Namespace getNamespace0 ( String name ) { } public ID createGUID ( ) throws IDCreateException { } public ID createGUID ( int length ) throws IDCreateException { } protected static void logAndThrow ( String s , Throwable t ) throws IDCreateException { IDCreateException e = null ; if ( t != null ) { e = new IDCreateException ( ( ( ( ( s + ":<seq2seq4repair_space>" ) + ( t . getClass ( ) . getName ( ) ) ) + ":<seq2seq4repair_space>" ) + ( t . getMessage ( ) ) ) , t ) ; } else { e = new IDCreateException ( s ) ; } Trace . throwing ( PLUGIN_ID , EXCEPTIONS_THROWING , IDFactory . class , "logAndThrow" , e ) ; <START_BUG> Activator . getDefault ( ) . getLog ( ) . log ( new Status ( IStatus . ERROR , Activator . PLUGIN_ID , IDFactory . IDENTITY_CREATION_ERRORCODE , s , e ) ) ; <END_BUG> throw e ; } public ID createID ( Namespace n , Object [ ] args ) throws IDCreateException { } public ID createID ( String namespaceName , Object [ ] args ) throws IDCreateException { } public ID createID ( Namespace namespace , String uri ) throws IDCreateException { } public ID createID ( String namespace , String uri ) throws IDCreateException { } public ID createStringID ( String idstring ) throws IDCreateException { } public ID createLongID ( long l ) throws IDCreateException { } public Namespace removeNamespace ( Namespace n ) throws SecurityException { } protected static final Namespace removeNamespace0 ( Namespace n ) { } }

Fix:
Activator . getDefault ( ) . log ( new Status ( IStatus . ERROR , Activator . PLUGIN_ID , IDFactory . IDENTITY_CREATION_ERRORCODE , s , e ) ) ;
Buggy code:
public class RegisterTasklet extends AbstractResourceRegisterer { protected void registerResource ( final String name , final String classname , final URL url ) throws AntException , RegistryException { if ( null == classname ) { try { <START_BUG> m_engine . getTskDeployer ( ) . deployTasklet ( name , url . toString ( ) , url ) ; <END_BUG> } catch ( final DeploymentException de ) { throw new AntException ( ( ( ( "Failed<seq2seq4repair_space>deploying<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>from<seq2seq4repair_space>" ) + url ) , de ) ; } } else { final DefaultLocator locator = new DefaultLocator ( classname , url ) ; m_engine . getRegistry ( ) . register ( name , locator ) ; } } }

Fix:
m_tskDeployer . deployTasklet ( name , url . toString ( ) , url ) ;
Buggy code:
public class InfuserRecipeHandler extends TemplateRecipeHandler { @ Override public String getGuiTexture ( ) { } @ Override public String getRecipeName ( ) { } @ Override public void drawBackground ( int recipe ) { } @ Override public void drawExtras ( int recipe ) { } @ Override public void loadUsageRecipes ( ItemStack ingredient ) { for ( Map . Entry < ItemStack , ItemStack > recipe : infusingList . entrySet ( ) ) { if ( NEIServerUtils . areStacksSameTypeCrafting ( recipe . getKey ( ) , ingredient ) ) { <START_BUG> if ( ( ItemStack . areItemStacksEqual ( ingredient , recipe . getKey ( ) ) ) && ( ItemStack . areItemStackTagsEqual ( ingredient , recipe . getKey ( ) ) ) ) { <END_BUG> arecipes . add ( new InfuserRecipeHandler . InfuserCachedRecipe ( recipe . getKey ( ) , recipe . getValue ( ) ) ) ; } } } } @ Override public void loadCraftingRecipes ( ItemStack result ) { } @ Override public Class < ? extends GuiContainer > getGuiClass ( ) { } public class InfuserCachedRecipe extends CachedRecipe { public ItemStack input ; public ItemStack output ; public InfuserCachedRecipe ( ItemStack input , ItemStack output ) { } @ Override public PositionedStack getResult ( ) { } @ Override public PositionedStack getIngredient ( ) { } } No newline ; at end ; of file ; }

Fix:
if ( ( ingredient . isItemEqual ( recipe . getKey ( ) ) ) && ( ItemStack . areItemStackTagsEqual ( ingredient , recipe . getKey ( ) ) ) ) {
Buggy code:
public class SpeculateCommand extends AbstractCommand { public SpeculateCommand ( ) { } @ Override public void run ( final String cmd , final String parameters ) { Speculation spec = new Speculation ( ) ; boolean quiet = spec . parse ( parameters ) ; Modifiers mods = spec . calculate ( ) ; <START_BUG> Modifiers . overrideModifier ( "_spec" , mods ) ; <END_BUG> if ( quiet ) { return ; } String table = SpeculateCommand . getHTML ( mods , "" ) ; if ( table != null ) { RequestLogger . printLine ( ( table + "<br>" ) ) ; } else { RequestLogger . printLine ( "No<seq2seq4repair_space>modifiers<seq2seq4repair_space>changed." ) ; } } public static String getHTML ( Modifiers mods , String attribs ) { } private static void doNumeric ( final String mod , final Modifiers mods , final StringBuffer buf ) { } }

Fix:
Modifiers . overrideModifier ( "Generated:_spec" , mods ) ;
Buggy code:
public class GrabKeyDialog extends JDialog { public static String toString ( KeyEvent evt ) { } public GrabKeyDialog ( Dialog parent , GrabKeyDialog . KeyBinding binding , Vector allBindings , Buffer debugBuffer ) { } public GrabKeyDialog ( Frame parent , GrabKeyDialog . KeyBinding binding , Vector allBindings , Buffer debugBuffer ) { } public String getShortcut ( ) { } public boolean isOK ( ) { } public boolean isManagingFocus ( ) { } public boolean getFocusTraversalKeysEnabled ( ) { } protected void processKeyEvent ( KeyEvent evt ) { shortcut . processKeyEvent ( evt ) ; } private GrabKeyDialog . InputPane shortcut ; private JLabel assignedTo ; private JButton ok ; private JButton remove ; private JButton cancel ; private JButton clear ; private boolean isOK ; private GrabKeyDialog . KeyBinding binding ; private Vector allBindings ; private Buffer debugBuffer ; private void init ( GrabKeyDialog . KeyBinding binding , Vector allBindings , Buffer debugBuffer ) { } private String getSymbolicName ( int keyCode ) { } private void updateAssignedTo ( String shortcut ) { } private GrabKeyDialog . KeyBinding getKeyBinding ( String shortcut ) { } public static class KeyBinding { public KeyBinding ( String name , String label , String shortcut , boolean isPrefix ) { } public String name ; public String label ; public String shortcut ; public boolean isPrefix ; public boolean isAssigned ( ) { } } class InputPane extends JTextField { public boolean getFocusTraversalKeysEnabled ( ) { } protected void processKeyEvent ( KeyEvent _evt ) { KeyEvent evt = KeyEventWorkaround . processKeyEvent ( _evt ) ; <START_BUG> if ( KeyEventWorkaround . isModifier ( _evt ) ) <END_BUG> evt = null ; if ( ( debugBuffer ) != null ) { debugBuffer . insert ( debugBuffer . getLength ( ) , ( ( "Event<seq2seq4repair_space>" + ( GrabKeyDialog . toString ( _evt ) ) ) + ( evt == null ? "<seq2seq4repair_space>filtered\n" : "<seq2seq4repair_space>passed\n" ) ) ) ; } if ( evt == null ) return ; evt . consume ( ) ; KeyEventTranslator . Key key = KeyEventTranslator . translateKeyEvent ( evt ) ; if ( key == null ) return ; if ( ( debugBuffer ) != null ) { debugBuffer . insert ( debugBuffer . getLength ( ) , ( ( "==><seq2seq4repair_space>Translated<seq2seq4repair_space>to<seq2seq4repair_space>" + key ) + "\n" ) ) ; } StringBuffer keyString = new StringBuffer ( getText ( ) ) ; if ( ( getDocument ( ) . getLength ( ) ) != 0 ) keyString . append ( '<seq2seq4repair_space>' ) ; if ( ( key . modifiers ) != null ) keyString . append ( key . modifiers ) . append ( '+' ) ; if ( ( key . input ) == '<seq2seq4repair_space>' ) keyString . append ( "SPACE" ) ; else if ( ( key . input ) != '' ) keyString . append ( key . input ) ; else { String symbolicName = getSymbolicName ( key . key ) ; if ( symbolicName == null ) return ; keyString . append ( symbolicName ) ; } setText ( keyString . toString ( ) ) ; if ( ( debugBuffer ) == null ) updateAssignedTo ( keyString . toString ( ) ) ; } } class ActionHandler implements ActionListener { public void actionPerformed ( ActionEvent evt ) { } private boolean canClose ( ) { } } }

Fix:
if ( KeyEventWorkaround . isModifier ( _evt . getKeyCode ( ) ) )
Buggy code:
public class DNSSECVerifier implements Verifier { public class ByteArrayComparator implements Comparator { public int compare ( Object o1 , Object o2 ) throws ClassCastException { byte [ ] b1 = ( ( byte [ ] ) ( o1 ) ) ; byte [ ] b2 = ( ( byte [ ] ) ( o2 ) ) ; for ( int i = 0 ; ( i < ( b1 . length ) ) && ( i < ( b2 . length ) ) ; i ++ ) if ( ( b1 [ i ] ) != ( b2 [ i ] ) ) <START_BUG> return ( b1 [ i ] ) - ( b2 [ i ] ) ; <END_BUG> return ( b1 . length ) - ( b2 . length ) ; } } private Hashtable trustedKeys ; public DNSSECVerifier ( ) { } public synchronized void addTrustedKey ( KEYRecord key ) { } public void addTrustedKey ( Name name , PublicKey key ) { } private PublicKey findMatchingKey ( Enumeration e , int algorithm , int footprint ) { } private synchronized PublicKey findTrustedKey ( Name name , int algorithm , int footprint ) { } private PublicKey findCachedKey ( Cache cache , Name name , int algorithm , int footprint ) { } private PublicKey findKey ( Cache cache , Name name , int algorithm , int footprint ) { } private byte verifySIG ( RRset set , SIGRecord sigrec , Cache cache ) { } public byte verify ( RRset set , Cache cache ) { } }

Fix:
return ( ( b1 [ i ] ) & 255 ) - ( ( b2 [ i ] ) & 255 ) ;
Buggy code:
public class MSVSSCHECKOUT extends MSVSS { private String m_LocalPath = null ; private boolean m_Recursive = false ; private String m_Version = null ; private String m_Date = null ; private String m_Label = null ; private String m_AutoResponse = null ; public void setAutoresponse ( String response ) { } public void setDate ( String date ) { } public void setLabel ( String label ) { } public void setLocalpath ( Path localPath ) { } public void setRecursive ( boolean recursive ) { } public void setVersion ( String version ) { } public void getAutoresponse ( Commandline cmd ) { } public void getLocalpathCommand ( Commandline cmd ) throws TaskException { if ( ( m_LocalPath ) == null ) { return ; } else { File dir = resolveFile ( m_LocalPath ) ; if ( ! ( dir . exists ( ) ) ) { boolean done = dir . mkdirs ( ) ; if ( done == false ) { String msg = ( ( "Directory<seq2seq4repair_space>" + ( m_LocalPath ) ) + "<seq2seq4repair_space>creation<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>" ) + "succesful<seq2seq4repair_space>for<seq2seq4repair_space>an<seq2seq4repair_space>unknown<seq2seq4repair_space>reason" ; throw new TaskException ( msg ) ; } <START_BUG> log ( ( "Created<seq2seq4repair_space>dir:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ; <END_BUG> } cmd . createArgument ( ) . setValue ( ( ( FLAG_OVERRIDE_WORKING_DIR ) + ( m_LocalPath ) ) ) ; } } public void getRecursiveCommand ( Commandline cmd ) { } public void getVersionCommand ( Commandline cmd ) { } public void execute ( ) throws TaskException { } }

Fix:
getLogger ( ) . info ( ( "Created<seq2seq4repair_space>dir:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ;
Buggy code:
public class RenameExtensions extends MatchingTask { private String fromExtension = "" ; private String toExtension = "" ; private boolean replace = false ; private File srcDir ; private MapperType globType ; public RenameExtensions ( ) { } public void setFromExtension ( String from ) { } public void setToExtension ( String to ) { } public void setReplace ( boolean replace ) { } public void setSrcDir ( File srcDir ) { } public void execute ( ) throws BuildException { if ( ( ( ( fromExtension ) == null ) || ( ( toExtension ) == null ) ) || ( ( srcDir ) == null ) ) { throw new BuildException ( ( "srcDir,<seq2seq4repair_space>fromExtension<seq2seq4repair_space>and<seq2seq4repair_space>toExtension<seq2seq4repair_space>" + "attributes<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set!" ) ) ; } log ( "DEPRECATED<seq2seq4repair_space>-<seq2seq4repair_space>The<seq2seq4repair_space>renameext<seq2seq4repair_space>task<seq2seq4repair_space>is<seq2seq4repair_space>deprecated.<seq2seq4repair_space>Use<seq2seq4repair_space>move<seq2seq4repair_space>instead." , MSG_WARN ) ; log ( "Replace<seq2seq4repair_space>this<seq2seq4repair_space>with:" , MSG_INFO ) ; log ( ( ( ( ( "<move<seq2seq4repair_space>todir=\"" + ( srcDir ) ) + "\"<seq2seq4repair_space>overwrite=\"" ) + ( replace ) ) + "\">" ) , MSG_INFO ) ; log ( ( ( "<seq2seq4repair_space><fileset<seq2seq4repair_space>dir=\"" + ( srcDir ) ) + "\"<seq2seq4repair_space>//>" ) , MSG_INFO ) ; log ( "<seq2seq4repair_space><mapper<seq2seq4repair_space>type=\"glob\"" , MSG_INFO ) ; log ( ( ( "<seq2seq4repair_space>from=\"*" + ( fromExtension ) ) + "\"" ) , MSG_INFO ) ; log ( ( ( "<seq2seq4repair_space>to=\"*" + ( toExtension ) ) + "\"<seq2seq4repair_space>//>" ) , MSG_INFO ) ; log ( "<//move>" , MSG_INFO ) ; log ( "using<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>patterns<seq2seq4repair_space>on<seq2seq4repair_space><fileset><seq2seq4repair_space>as<seq2seq4repair_space>you\'ve<seq2seq4repair_space>used<seq2seq4repair_space>here" , MSG_INFO ) ; Move move = ( ( Move ) ( getProject ( ) . createTask ( "move" ) ) ) ; <START_BUG> move . setOwningTarget ( target ) ; <END_BUG> move . setTaskName ( getTaskName ( ) ) ; move . setLocation ( getLocation ( ) ) ; move . setTodir ( srcDir ) ; move . setOverwrite ( replace ) ; fileset . setDir ( srcDir ) ; move . addFileset ( fileset ) ; Mapper me = move . createMapper ( ) ; me . setType ( globType ) ; me . setFrom ( ( "*" + ( fromExtension ) ) ) ; me . setTo ( ( "*" + ( toExtension ) ) ) ; move . execute ( ) ; } }

Fix:
move . setOwningTarget ( getOwningTarget ( ) ) ;
Buggy code:
public class BeanValidationAdd extends AbstractBoottimeAddStepHandler { public static final BeanValidationAdd INSTANCE = new BeanValidationAdd ( ) ; 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 ; } @ Override protected void populateModel ( final ModelNode operation , final ModelNode model ) throws OperationFailedException { } @ Override protected void performBoottime ( final OperationContext context , final ModelNode operation , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { <START_BUG> final boolean enabled = BeanValidationAdd . BeanValidationParameters . BEAN_VALIDATION_ENABLED . getAttribute ( ) . validateResolvedOperation ( model ) . asBoolean ( ) ; <END_BUG> ServiceName serviceName = ConnectorServices . BEAN_VALIDATION_CONFIG_SERVICE ; ServiceName jcaConfigServiceName = ConnectorServices . CONNECTOR_CONFIG_SERVICE ; final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; final BeanValidationService . BeanValidation config = new BeanValidationService . BeanValidation ( enabled ) ; final BeanValidationService service = new BeanValidationService ( config ) ; ServiceController < ? > controller = serviceTarget . addService ( serviceName , service ) . setInitialMode ( ACTIVE ) . addDependency ( jcaConfigServiceName , JcaSubsystemConfiguration . class , service . getJcaConfigInjector ( ) ) . addListener ( verificationHandler ) . install ( ) ; context . addStep ( verificationHandler , VERIFY ) ; } }

Fix:
final boolean enabled = BeanValidationAdd . BeanValidationParameters . BEAN_VALIDATION_ENABLED . getAttribute ( ) . resolveModelAttribute ( context , model ) . asBoolean ( ) ;
Buggy code:
public class DoStatement extends Statement { public Expression condition ; public Statement action ; private Label breakLabel ; private Label continueLabel ; int mergedInitStateIndex = - 1 ; public DoStatement ( Expression condition , Statement action , int s , int e ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resolve ( BlockScope scope ) { <START_BUG> TypeBinding type = condition . resolveTypeExpecting ( scope , BooleanBinding ) ; <END_BUG> condition . computeConversion ( scope , type , type ) ; if ( ( action ) != null ) action . resolve ( scope ) ; } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
TypeBinding type = condition . resolveTypeExpecting ( scope , TypeBinding . BOOLEAN ) ;
Buggy code:
public final class HtmlHandler extends AbstractMarkupFilter { private static final Log log = LogFactory . getLog ( HtmlHandler . class ) ; private final ArrayListStack < ComponentTag > stack = new ArrayListStack < ComponentTag > ( ) ; private static final Map < String , Boolean > doesNotRequireCloseTag = new HashMap < String , Boolean > ( ) ; public HtmlHandler ( final IMarkupFilter parent ) { } public MarkupElement nextTag ( ) throws ParseException { <START_BUG> final ComponentTag tag = ( ( ComponentTag ) ( getParent ( ) . nextTag ( ) ) ) ; <END_BUG> if ( tag == null ) { while ( ( stack . size ( ) ) > 0 ) { final ComponentTag top = stack . peek ( ) ; if ( ! ( HtmlHandler . requiresCloseTag ( top . getName ( ) ) ) ) { stack . pop ( ) ; } else { throw new ParseException ( ( ( ( ( "Tag<seq2seq4repair_space>" + top ) + "<seq2seq4repair_space>at<seq2seq4repair_space>" ) + ( top . getPos ( ) ) ) + "<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>a<seq2seq4repair_space>close<seq2seq4repair_space>tag" ) , top . getPos ( ) ) ; } } return tag ; } if ( HtmlHandler . log . isDebugEnabled ( ) ) { HtmlHandler . log . debug ( ( ( ( "tag:<seq2seq4repair_space>" + ( tag . toUserDebugString ( ) ) ) + ",<seq2seq4repair_space>stack:<seq2seq4repair_space>" ) + ( stack ) ) ) ; } if ( tag . isOpen ( ) ) { stack . push ( tag ) ; } else if ( tag . isClose ( ) ) { if ( ( stack . size ( ) ) > 0 ) { ComponentTag top = stack . pop ( ) ; boolean mismatch = ! ( top . hasEqualTagName ( tag ) ) ; if ( mismatch ) { top . setHasNoCloseTag ( true ) ; while ( mismatch && ( ! ( HtmlHandler . requiresCloseTag ( top . getName ( ) ) ) ) ) { top . setHasNoCloseTag ( true ) ; top = stack . pop ( ) ; mismatch = ! ( top . hasEqualTagName ( tag ) ) ; } if ( mismatch ) { throw new ParseException ( ( ( ( "Tag<seq2seq4repair_space>" + ( top . toUserDebugString ( ) ) ) + "<seq2seq4repair_space>has<seq2seq4repair_space>a<seq2seq4repair_space>mismatched<seq2seq4repair_space>close<seq2seq4repair_space>tag<seq2seq4repair_space>at<seq2seq4repair_space>" ) + ( tag . toUserDebugString ( ) ) ) , top . getPos ( ) ) ; } } tag . setOpenTag ( top ) ; } else { throw new ParseException ( ( ( "Tag<seq2seq4repair_space>" + ( tag . toUserDebugString ( ) ) ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>a<seq2seq4repair_space>matching<seq2seq4repair_space>open<seq2seq4repair_space>tag" ) , tag . getPos ( ) ) ; } } else if ( tag . isOpenClose ( ) ) { tag . setOpenTag ( tag ) ; } return tag ; } public static boolean requiresCloseTag ( final String name ) { } }

Fix:
final ComponentTag tag = nextComponentTag ( ) ;