nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ActionExit extends UMLAction { public static ActionExit SINGLETON = new ActionExit ( ) ; private boolean active = false ; protected ActionExit ( ) { } public void actionPerformed ( ActionEvent ae ) { ProjectBrowser pb = ProjectBrowser . TheInstance ; <START_BUG> Project p = pb . getProject ( ) ; <END_BUG> if ( ( ( p != null ) && ( p . needsSave ( ) ) ) && ( ! ( active ) ) ) { active = true ; String t = MessageFormat . format ( Argo . localize ( "Actions" , "template.exit.save_changes_to" ) , new Object [ ] { p . getName ( ) } ) ; int response = JOptionPane . showConfirmDialog ( pb , t , t , JOptionPane . YES_NO_CANCEL_OPTION ) ; if ( response == ( JOptionPane . CANCEL_OPTION ) ) { active = false ; return ; } if ( response == ( JOptionPane . YES_OPTION ) ) { boolean safe = false ; if ( ActionSaveProject . SINGLETON . shouldBeEnabled ( ) ) { safe = ActionSaveProject . SINGLETON . trySave ( true ) ; } if ( ! safe ) { safe = ActionSaveProjectAs . SINGLETON . trySave ( false ) ; } if ( ! safe ) { active = false ; return ; } } active = false ; } if ( ! ( active ) ) { Configuration . save ( ) ; ArgoSecurityManager . getInstance ( ) . setAllowExit ( true ) ; System . exit ( 0 ) ; } } }

Fix:
Project p = ProjectManager . getManager ( ) . getCurrentProject ( ) ;
Buggy code:
@ Deprecated class Lucene3xPostingsFormat extends PostingsFormat { public static final String TERMS_EXTENSION = "tis" ; public static final String TERMS_INDEX_EXTENSION = "tii" ; public static final String FREQ_EXTENSION = "frq" ; public static final String PROX_EXTENSION = "prx" ; public Lucene3xPostingsFormat ( ) { } @ Override public FieldsConsumer fieldsConsumer ( SegmentWriteState state ) throws IOException { } @ Override public FieldsProducer fieldsProducer ( SegmentReadState state ) throws IOException { <START_BUG> return new Lucene3xFields ( state . dir , state . fieldInfos , state . segmentInfo , state . context , state . termsIndexDivisor ) ; <END_BUG> } }

Fix:
return new Lucene3xFields ( state . directory , state . fieldInfos , state . segmentInfo , state . context , state . termsIndexDivisor ) ;
Buggy code:
public class ComponentResolvingPage extends WebPage implements IComponentResolver { private static final long serialVersionUID = 1L ; public boolean onEndRequestWasCalledOnAutoAddedComponent = false ; public ComponentResolvingPage ( ) { } public boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( "test" . equals ( tag . getId ( ) ) ) { <START_BUG> autoAdd ( new Label ( this , "test" , "TEST" ) { <END_BUG> private static final long serialVersionUID = 1L ; protected void onEndRequest ( ) { onEndRequestWasCalledOnAutoAddedComponent = true ; } } ) ; return true ; } return false ; } }

Fix:
autoAdd ( new Label ( "test" , "TEST" ) {
Buggy code:
public class GameFragment extends Fragment { public static View rootView ; public static Game gameObject ; public static Context context ; public RecyclerView mCardHand ; public RecyclerView mTableView ; public static CardHandAdapter mCardHandAdapter ; public static TableViewAdapter mTableViewAdapter ; public static Player thisPlayer = null ; public static Socket socket ; protected LayoutManager mCardLayoutManager ; protected LayoutManager mTableLayoutManager ; public GameFragment ( Game gameObject , Socket socket ) { } public GameFragment ( Game gameObject ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void setCardFaceUp ( int position , boolean isFaceUp ) { } public static void updatePlayers ( ) { } public static void updateTable ( ) { } public static void updatePlayerStatus ( ) { List < Player > playerList = GameFragment . gameObject . players ; ImageView playerImage ; for ( int i = 1 ; i <= ( playerList . size ( ) ) ; i ++ ) { <START_BUG> playerImage = ( ( ImageView ) ( GameFragment . rootView . findViewById ( GameFragment . context . getResources ( ) . getIdentifier ( ( ( "R.id.player" + i ) + "Image" ) , "drawable" , GameFragment . context . getPackageName ( ) ) ) ) ) ; <END_BUG> if ( playerList . get ( ( i - 1 ) ) . isActive ) { playerImage . setImageResource ( active_icon ) ; } else { playerImage . setImageResource ( inactive_icon ) ; } } } public static void updateHand ( ) { } }

Fix:
playerImage = ( ( ImageView ) ( GameFragment . rootView . findViewById ( GameFragment . context . getResources ( ) . getIdentifier ( ( ( "player" + i ) + "Image" ) , "drawable" , GameFragment . context . getPackageName ( ) ) ) ) ) ;
Buggy code:
public class Partition extends ModelElementImpl { public ActivityModel _activityModel ; public Vector _contents ; public Partition ( ) { } public Partition ( Name name , ActivityModel am ) { } public Partition ( String nameStr ) { } public ActivityModel getActivityModel ( ) { } public void setActivityModel ( ActivityModel x ) throws PropertyVetoException { } public Vector getContents ( ) { } public void setContents ( Vector x ) throws PropertyVetoException { if ( ( _contents ) == null ) _contents = new Vector ( ) ; <START_BUG> fireVetoableChange ( "contents" , _contents , x ) ; <END_BUG> _contents = x ; } public void addContents ( ModelElement x ) throws PropertyVetoException { } public void removeContents ( ModelElement x ) throws PropertyVetoException { } }

Fix:
fireVetoableChangeNoCompare ( "contents" , _contents , x ) ;
Buggy code:
public class SFSBDestroyInterceptor implements Interceptor { private final SFSBXPCMap sfsbxpcMap ; private SFSBDestroyInterceptor ( final SFSBXPCMap sfsbxpcMap ) { } @ Override public Object processInvocation ( InterceptorContext interceptorContext ) throws Exception { try { return interceptorContext . proceed ( ) ; } finally { StatefulSessionComponentInstance sfsb = ( ( StatefulSessionComponentInstance ) ( interceptorContext . getPrivateData ( ComponentInstance . class ) ) ) ; <START_BUG> SFSBContextHandleImpl sfsbContextHandle = new SFSBContextHandleImpl ( sfsb ) ; <END_BUG> List < EntityManager > readyToClose = sfsbxpcMap . remove ( sfsbContextHandle ) ; if ( ( readyToClose != null ) && ( ( readyToClose . size ( ) ) > 0 ) ) { for ( EntityManager entityManager : readyToClose ) { if ( entityManager instanceof ExtendedEntityManager ) { ( ( ExtendedEntityManager ) ( entityManager ) ) . containerClose ( ) ; } else { throw JpaMessages . MESSAGES . cannotCloseNonExtendedEntityManager ( entityManager . getClass ( ) . getName ( ) ) ; } } } } } public static class Factory implements InterceptorFactory { private final SFSBXPCMap sfsbxpcMap ; public Factory ( final SFSBXPCMap sfsbxpcMap ) { } @ Override public Interceptor create ( final InterceptorFactoryContext context ) { } } }

Fix:
SFSBContextHandleImpl sfsbContextHandle = new SFSBContextHandleImpl ( sfsb . getId ( ) ) ;
Buggy code:
public class TestCachingTokenFilter extends BaseTokenStreamTestCase { private String [ ] tokens = new String [ ] { "term1" , "term2" , "term3" , "term2" } ; public void testCaching ( ) throws IOException { Directory dir = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , dir ) ; Document doc = new Document ( ) ; TokenStream stream = new TokenStream ( ) { private int index = 0 ; private CharTermAttribute termAtt = addAttribute ( CharTermAttribute . class ) ; private OffsetAttribute offsetAtt = addAttribute ( OffsetAttribute . class ) ; @ Override public boolean incrementToken ( ) { if ( ( index ) == ( tokens . length ) ) { return false ; } else { clearAttributes ( ) ; termAtt . append ( tokens [ ( ( index ) ++ ) ] ) ; offsetAtt . setOffset ( 0 , 0 ) ; return true ; } } } ; stream = new CachingTokenFilter ( stream ) ; doc . add ( new org . apache . lucene . document . TextField ( "preanalyzed" , stream ) ) ; checkTokens ( stream ) ; stream . reset ( ) ; checkTokens ( stream ) ; writer . addDocument ( doc ) ; IndexReader reader = writer . getReader ( ) ; DocsAndPositionsEnum termPositions = MultiFields . getTermPositionsEnum ( reader , MultiFields . getLiveDocs ( reader ) , "preanalyzed" , new BytesRef ( "term1" ) ) ; assertTrue ( ( ( termPositions . nextDoc ( ) ) != ( DocIdSetIterator . NO_MORE_DOCS ) ) ) ; assertEquals ( 1 , termPositions . freq ( ) ) ; assertEquals ( 0 , termPositions . nextPosition ( ) ) ; termPositions = MultiFields . getTermPositionsEnum ( reader , MultiFields . getLiveDocs ( reader ) , "preanalyzed" , new BytesRef ( "term2" ) ) ; assertTrue ( ( ( termPositions . nextDoc ( ) ) != ( DocIdSetIterator . NO_MORE_DOCS ) ) ) ; assertEquals ( 2 , termPositions . freq ( ) ) ; assertEquals ( 1 , termPositions . nextPosition ( ) ) ; assertEquals ( 3 , termPositions . nextPosition ( ) ) ; termPositions = MultiFields . getTermPositionsEnum ( reader , MultiFields . getLiveDocs ( reader ) , "preanalyzed" , new BytesRef ( "term3" ) ) ; assertTrue ( ( ( termPositions . nextDoc ( ) ) != ( DocIdSetIterator . NO_MORE_DOCS ) ) ) ; assertEquals ( 1 , termPositions . freq ( ) ) ; assertEquals ( 2 , termPositions . nextPosition ( ) ) ; reader . close ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> stream . reset ( ) ; checkTokens ( stream ) ; dir . close ( ) ; } private void checkTokens ( TokenStream stream ) throws IOException { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public abstract class AbstractTaskTestCase { protected File tempDir ; protected DirectoryStructure env ; private String storedModulesPath ; @ Before public void setup ( ) throws Exception { } @ After public void tearDown ( ) { } PatchingResult executePatch ( final PatchInfo info , final File file ) throws FileNotFoundException , PatchingException { } PatchingResult rollback ( final PatchInfo info , final String patchId ) throws PatchingException { final PatchingTaskRunner runner = new PatchingTaskRunner ( info , env ) ; <START_BUG> final PatchingResult result = runner . rollback ( patchId , false ) ; <END_BUG> result . commit ( ) ; return result ; } }

Fix:
final PatchingResult result = runner . rollback ( patchId , STRICT , false , true ) ;
Buggy code:
public class GraphVertex { private String name = "" ; private String label = "" ; private String tooltip = "" ; private Color color = Color . GREEN ; private GraphVertex . Shape shape = GraphVertex . Shape . DISC ; private boolean auxiliary = false ; private Position position = new Position ( ) ; private int id = 0 ; private boolean isSource = false ; private float degree = 0.0F ; private float degreeOut = 0.0F ; private NameVisibility showName = new NameVisibility ( ) ; private boolean showVertex = true ; private boolean fixedPos = false ; private boolean hasSelfLoop = false ; public enum Shape { DISC , BOX , RBOX , FIXED_SIZE_BOX , FILLER_RECT ; } public GraphVertex ( String name ) { } public GraphVertex ( String name , int id ) { } public GraphVertex ( String name , boolean auxiliary ) { } public GraphVertex ( String name , Position position , float degree ) { } public GraphVertex ( GraphVertex oldVertex ) { } public int getId ( ) { } public void setId ( int id ) { } public Position getPosition ( ) { } public void setPosition ( Position pos ) { } public float distanceTo ( GraphVertex vertex ) { } public float distanceTo ( Position pos ) { } public String getLabel ( ) { } public void setLabel ( String label ) { } public String getName ( ) { } public Color getColor ( ) { } public void setColor ( Color color ) { } public float getDegree ( ) { } public void setDegree ( float degree ) { } public float getDegreeOut ( ) { } public void setDegreeOut ( float degreeOut ) { <START_BUG> this . degree = degreeOut ; <END_BUG> } public GraphVertex . Shape getShape ( ) { } public void setShape ( GraphVertex . Shape shape ) { } public boolean isShowName ( ) { } public boolean isShowVertex ( ) { } public void setShowVertex ( boolean showVertex ) { } public boolean isAuxiliaryEdge ( ) { } public boolean isSource ( ) { } public void setSource ( boolean isSource ) { } public void setShowName ( NameVisibility . Priority priority , boolean showName ) { } public void setShowName ( GraphVertex vertex ) { } public void unsetShowName ( NameVisibility . Priority priority ) { } public void resetShowName ( ) { } public void setTooltip ( String tooltip ) { } public String getTooltip ( ) { } public boolean hasFixedPos ( ) { } public void setFixedPos ( boolean fixedPos ) { } public boolean hasSelfLoop ( ) { } }

Fix:
this . degreeOut = degreeOut ;
Buggy code:
public class Menu extends Widget { public int handle ; int x ; int y ; int hwndCB ; int id0 ; int id1 ; boolean hasLocation ; MenuItem cascade ; Decorations parent ; ImageList imageList ; static final int ID_PPC = 100 ; static final int ID_SPMM = 102 ; static final int ID_SPBM = 103 ; static final int ID_SPMB = 104 ; static final int ID_SPBB = 105 ; static final int ID_SPSOFTKEY0 = 106 ; static final int ID_SPSOFTKEY1 = 107 ; public Menu ( Control parent ) { } public Menu ( Decorations parent , int style ) { } public Menu ( Menu parentMenu ) { } public Menu ( MenuItem parentItem ) { } Menu ( Decorations parent , int style , int handle ) { } void _setVisible ( boolean visible ) { } public void addHelpListener ( HelpListener listener ) { } public void addMenuListener ( MenuListener listener ) { } static Control checkNull ( Control control ) { } static Menu checkNull ( Menu menu ) { } static MenuItem checkNull ( MenuItem item ) { } static int checkStyle ( int style ) { } void createHandle ( ) { } void createItem ( MenuItem item , int index ) { } void createWidget ( ) { } int defaultBackground ( ) { } int defaultForeground ( ) { } void destroyAccelerators ( ) { } void destroyItem ( MenuItem item ) { } void destroyWidget ( ) { } void fixMenus ( Decorations newParent ) { } Rectangle getBounds ( ) { } public MenuItem getDefaultItem ( ) { } public boolean getEnabled ( ) { } public MenuItem getItem ( int index ) { } public int getItemCount ( ) { } public MenuItem [ ] getItems ( ) { } int GetMenuItemCount ( int handle ) { } String getNameText ( ) { } public Decorations getParent ( ) { } public MenuItem getParentItem ( ) { } public Menu getParentMenu ( ) { } public Shell getShell ( ) { } public boolean getVisible ( ) { } int imageIndex ( Image image ) { if ( ( ( hwndCB ) == 0 ) || ( image == null ) ) return OS . I_IMAGENONE ; if ( ( imageList ) == null ) { int hOldList = OS . SendMessage ( hwndCB , TB_GETIMAGELIST , 0 , 0 ) ; if ( hOldList != 0 ) OS . ImageList_Destroy ( hOldList ) ; Rectangle bounds = image . getBounds ( ) ; <START_BUG> imageList = display . getImageList ( bounds . width , bounds . height ) ; <END_BUG> int hImageList = imageList . getHandle ( ) ; OS . SendMessage ( hwndCB , TB_SETIMAGELIST , 0 , hImageList ) ; } int index = imageList . indexOf ( image ) ; if ( index == ( - 1 ) ) { index = imageList . add ( image ) ; } else { imageList . put ( index , image ) ; } return index ; } public int indexOf ( MenuItem item ) { } public boolean isEnabled ( ) { } public boolean isVisible ( ) { } void redraw ( ) { } void releaseChild ( ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } public void removeHelpListener ( HelpListener listener ) { } public void removeMenuListener ( MenuListener listener ) { } public void setDefaultItem ( MenuItem item ) { } public void setEnabled ( boolean enabled ) { } public void setLocation ( int x , int y ) { } public void setLocation ( Point location ) { } public void setVisible ( boolean visible ) { } void update ( ) { } }

Fix:
imageList = display . getImageList ( ( ( style ) & ( SWT . RIGHT_TO_LEFT ) ) , bounds . width , bounds . height ) ;
Buggy code:
public class TestTreeResourceBundle extends TestCase { public TestTreeResourceBundle ( String name ) { } public void testMain ( ) { <START_BUG> CheckResourceBundle . checkResourceBundle ( this , new TreeResourceBundle ( ) ) ; <END_BUG> } }

Fix:
CheckResourceBundle . checkResourceBundle ( this , "org.argouml.i18n.TreeResourceBundle" ) ;
Buggy code:
public class FeedController extends Controller { static final String JDBC_DRIVER = "com.mysql.jdbc.Driver" ; static final String DB_URL = "jdbc:mysql:////localhost:3306//CacheU" ; static final String USER = "root" ; static final String PASS = "password" ; Connection connection = null ; PreparedStatement statement = null ; public static ALogger logger = Logger . of ( "application.controllers.FeedController" ) ; private RuntimeEnvironment env ; public FeedController ( RuntimeEnvironment env ) { } @ SecuredAction public Result post ( DoubleW mLatitude , DoubleW mLongitude ) throws SQLException { RequestBody body = request ( ) . body ( ) ; FeedController . logger . info ( body . asJson ( ) . get ( "status" ) . asText ( ) ) ; DateFormat dateFormat = new SimpleDateFormat ( "yyyy//MM//dd<seq2seq4repair_space>HH:mm:ss" ) ; Date date = new Date ( ) ; java . sql . Date dateDB = new java . sql . Date ( date . getTime ( ) ) ; String postId = "testPostId" ; String userId = "10203373126632130" ; String timestamp = dateDB . toString ( ) ; String latitude = mLatitude . javascriptUnbind ( ) ; String longitude = mLongitude . javascriptUnbind ( ) ; <START_BUG> String pointOfInterest = "Avant<seq2seq4repair_space>Gardeners" ; <END_BUG> String postType = "1" ; String anonymous = "0" ; connection = DriverManager . getConnection ( FeedController . DB_URL , FeedController . USER , FeedController . PASS ) ; statement = connection . prepareStatement ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>Posts<seq2seq4repair_space>" + ( "(postId,<seq2seq4repair_space>userId,<seq2seq4repair_space>timestamp,<seq2seq4repair_space>latitude,<seq2seq4repair_space>longitude,<seq2seq4repair_space>pointofinterest,<seq2seq4repair_space>postType)<seq2seq4repair_space>VALUES<seq2seq4repair_space>(" + "'" ) ) + postId ) + "'," ) + "'" ) + userId ) + "'," ) + "'" ) + timestamp ) + "'," ) + "" ) + latitude ) + "," ) + "" ) + longitude ) + "," ) + "'" ) + pointOfInterest ) + "'," ) + "" ) + postType ) + ");" ) ) ; statement . executeUpdate ( ) ; statement . close ( ) ; connection . close ( ) ; return ok ( ) ; } }

Fix:
String pointOfInterest = "MyHouseID" ;
Buggy code:
public class Level { private List < SpaceInvader > invaders ; private List < Bullet > bullets ; private Ufo ufo ; private Player player ; private double speed ; private Direction invaderDirection = Direction . EAST ; private Game game ; private boolean inProgress ; private int invaderSpeed ; private int ufoSpeed ; private int playerBulletSpeed ; private int invaderBulletSpeed ; public Level ( Game game , double speed , Player player ) { } private List < SpaceInvader > createInvaders ( ) { } public void process ( long tick ) { checkCompletion ( ) ; processPlayer ( ) ; if ( ( tick % ( invaderSpeed ) ) == 0 ) { processInvaders ( ) ; } if ( ( tick % ( ufoSpeed ) ) == 0 ) { processUfo ( ) ; } if ( ( tick % ( playerBulletSpeed ) ) == 0 ) { processPlayerBullets ( ) ; } if ( ( tick % ( invaderBulletSpeed ) ) == 0 ) { processInvaderBullets ( ) ; } handleCollisions ( tick ) ; <START_BUG> if ( ( tick % ( 10 * ( Game . ONE_SECOND ) ) ) == 0 ) { <END_BUG> increaseDifficulty ( ) ; } } public void processInvaders ( ) { } public void processUfo ( ) { } public void processPlayerBullets ( ) { } public void processInvaderBullets ( ) { } public void processPlayer ( ) { } private void handleCollisions ( long tick ) { } private void checkCompletion ( ) { } private void win ( ) { } private void lose ( ) { } private void increaseDifficulty ( ) { } public List < SpaceInvader > getInvaders ( ) { } public List < Bullet > getBullets ( ) { } public Player getPlayer ( ) { } public List < Entity > getEntities ( ) { } public void setPlayer ( Player newPlayer ) { } public double getSpeed ( ) { } public void setSpeed ( double newSpeed ) { } public Direction getNextDirection ( ) { } public Direction getInvaderDirection ( ) { } public void setBullets ( Bullet bullet ) { } public Game getGame ( ) { } public boolean inProgress ( ) { } public void setInProgress ( boolean active ) { } public void createUfo ( ) { } public void setUfo ( Ufo newUfo ) { } }

Fix:
if ( ( ( tick % ( 10 * ( Game . ONE_SECOND ) ) ) == 0 ) && ( ( invaderSpeed ) > 2 ) ) {
Buggy code:
public abstract class AbstractAjaxTimerBehavior extends AbstractDefaultAjaxBehavior { private final Duration updateInterval ; private boolean stopped = false ; public AbstractAjaxTimerBehavior ( final Duration updateInterval ) { } public final void stop ( ) { } public void renderHead ( IHeaderResponse response ) { } protected final String getJsTimeoutCall ( final Duration updateInterval ) { <START_BUG> return ( ( ( "setTimeout(\"" + ( getCallbackScript ( false , true ) ) ) + "\",<seq2seq4repair_space>" ) + ( updateInterval . getMilliseconds ( ) ) ) + ");" ; <END_BUG> } protected final void respond ( final AjaxRequestTarget target ) { } protected abstract void onTimer ( final AjaxRequestTarget target ) { } }

Fix:
return ( ( ( "setTimeout(\"" + ( getCallbackScript ( true ) ) ) + "\",<seq2seq4repair_space>" ) + ( updateInterval . getMilliseconds ( ) ) ) + ");" ;
Buggy code:
public abstract class StringValidator extends AbstractValidator { public void onValidate ( ) { <START_BUG> onValidate ( getStringValue ( ) ) ; <END_BUG> } public abstract void onValidate ( String value ) { } }

Fix:
onValidate ( getInput ( ) ) ;
Buggy code:
public class StartExamples { private static final Log log = LogFactory . getLog ( StartExamples . class ) ; public static void main ( String [ ] args ) { Server server = new Server ( ) ; SelectChannelConnector connector = new SelectChannelConnector ( ) ; connector . setPort ( 8080 ) ; server . setConnectors ( new Connector [ ] { connector } ) ; WebAppContext web = new WebAppContext ( ) ; <START_BUG> web . setContextPath ( "//org.apache.wicket-examples" ) ; <END_BUG> web . setWar ( "src//main//webapp" ) ; server . addHandler ( web ) ; MBeanServer mBeanServer = ManagementFactory . getPlatformMBeanServer ( ) ; MBeanContainer mBeanContainer = new MBeanContainer ( mBeanServer ) ; server . getContainer ( ) . addEventListener ( mBeanContainer ) ; mBeanContainer . start ( ) ; try { server . start ( ) ; server . join ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; System . exit ( 100 ) ; } } StartExamples ( ) { } }

Fix:
web . setContextPath ( "//wicket-examples" ) ;
Buggy code:
public class WindowsFilenameTabCompleter extends FilenameTabCompleter { public WindowsFilenameTabCompleter ( CommandContext ctx ) { } @ Override public int complete ( CommandContext ctx , String buffer , int cursor , List < String > candidates ) { } @ Override protected boolean startsWithRoot ( String path ) { <START_BUG> return path . contains ( ":\\" ) ; <END_BUG> } }

Fix:
return ( path . contains ( ":\\" ) ) || ( path . startsWith ( "\\\\" ) ) ;
Buggy code:
public class SynchronizedStatement extends SubRoutineStatement { public Expression expression ; public Block block ; public BlockScope scope ; boolean blockExit ; public LocalVariableBinding synchroVariable ; static final char [ ] SecretLocalDeclarationName = "<seq2seq4repair_space>syncValue" . toCharArray ( ) ; public SynchronizedStatement ( Expression expression , Block statement , int s , int e ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { synchroVariable . useFlag = LocalVariableBinding . USED ; flowInfo = block . analyseCode ( scope , new InsideSubRoutineFlowContext ( flowContext , this ) , expression . analyseCode ( scope , flowContext , flowInfo ) ) ; <START_BUG> this . blockExit = ! ( flowInfo . isReachable ( ) ) ; <END_BUG> return flowInfo ; } public boolean isSubRoutineEscaping ( ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public void generateSubRoutineInvocation ( BlockScope currentScope , CodeStream codeStream ) { } public void resolve ( BlockScope upperScope ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } }

Fix:
this . blockExit = ( ( flowInfo . tagBits ) & ( FlowInfo . UNREACHABLE ) ) != 0 ;
Buggy code:
public class Vector2D implements Vector { double [ ] vector ; public Vector2D ( double x , double y ) { } public double getX ( ) { } public double getY ( ) { } public void setX ( double x ) { } public void setY ( double y ) { } public double getLength ( ) { } public double getLengthSquared ( ) { <START_BUG> return ( Math . pow ( getX ( ) , 2 ) ) + ( Math . pow ( getY ( ) , 2 ) ) ; <END_BUG> } public void makePositive ( ) { } public void makeNegative ( ) { } public void scaleUp ( double scale ) { } public void scaleDown ( double scale ) { } public Vector2D add ( Vector2D b ) { } public Vector2D subtract ( Vector2D b ) { } public Vector2D multiply ( Vector2D b ) { } public Vector2D divide ( Vector2D b ) { } }

Fix:
return Math . pow ( getLength ( ) , 2 ) ;
Buggy code:
public class AbstractDAO implements IAbstractDAO { private static final Logger LOG = Logger . getLogger ( AbstractDAO . class ) ; protected EntityManager em ; public static String PERSISTENCE_UNIT = "ticketsystem" ; public AbstractDAO ( ) { } @ Override public void saveOrUpdate ( Object obj ) { } @ Override public < T > T find ( Class < T > clazz , Long id ) { } @ Override public < T > List < T > findAll ( Class < T > clazz ) { } @ Override public < T > List < T > findAll ( Class < T > clazz , String orderBy ) { } public EntityManager getManager ( ) { try { if ( ( ( em ) == null ) || ( ! ( em . isOpen ( ) ) ) ) { if ( AbstractDAO . LOG . isDebugEnabled ( ) ) AbstractDAO . LOG . debug ( "Erstelle<seq2seq4repair_space>EntityManagerFactory" ) ; EntityManagerFactory entityManagerFactory = Persistence . createEntityManagerFactory ( AbstractDAO . PERSISTENCE_UNIT ) ; if ( AbstractDAO . LOG . isDebugEnabled ( ) ) AbstractDAO . LOG . debug ( "Erstelle<seq2seq4repair_space>EntityManager" ) ; em = entityManagerFactory . createEntityManager ( ) ; if ( AbstractDAO . LOG . isDebugEnabled ( ) ) AbstractDAO . LOG . debug ( "EntityManager<seq2seq4repair_space>erstellt" ) ; } AbstractDAO . LOG . debug ( "EntityManager<seq2seq4repair_space>erhalten" ) ; return em ; } catch ( Throwable ex ) { AbstractDAO . LOG . fatal ( ( "Initial<seq2seq4repair_space>SessionFactory<seq2seq4repair_space>creation<seq2seq4repair_space>failed." + ex ) ) ; <START_BUG> throw new ExceptionInInitializerError ( ex ) ; <END_BUG> } } }

Fix:
throw ex ;
Buggy code:
public class RModuleOption extends BaseRModuleOption implements Persistent { private int level ; private static final Comparator comparator = new Comparator ( ) { public int compare ( Object obj1 , Object obj2 ) { } } ; public static Comparator getComparator ( ) { } public AttributeOption getAttributeOption ( ) throws Exception { } public String getDisplayValue ( ) { } public int getLevel ( ) { } public void setLevel ( int v ) { } public RModuleAttribute getRModuleAttribute ( IssueType issueType ) throws Exception { } public void delete ( ScarabUser user ) throws Exception { <START_BUG> ScarabModule module = ( ( ScarabModule ) ( getScarabModule ( ) ) ) ; <END_BUG> if ( user . hasPermission ( MODULE__EDIT , module ) ) { Criteria c = new Criteria ( ) . add ( MODULE_ID , getModuleId ( ) ) . add ( ISSUE_TYPE_ID , getIssueTypeId ( ) ) . add ( OPTION_ID , getOptionId ( ) ) ; RModuleOptionPeer . doDelete ( c ) ; } else { throw new org . tigris . scarab . util . ScarabException ( ScarabConstants . NO_PERMISSION_MESSAGE ) ; } } }

Fix:
ModuleEntity module = getScarabModule ( ) ;
Buggy code:
public class Issue520Test extends ZSSTestCase { @ Ignore ( "Chart" ) @ Test public void testZSS524 ( ) throws Exception { } @ Ignore ( "Chart" ) @ Test public void testZSS525 ( ) throws Exception { } @ Ignore ( "Bug<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>fixed<seq2seq4repair_space>yet" ) @ Test public void testZSS526_XLS ( ) throws Exception { } @ Ignore ( "Bug<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>fixed<seq2seq4repair_space>yet" ) @ Test public void testZSS526_XLST ( ) throws Exception { } @ Test public void testZSS528 ( ) throws Exception { getTo ( "//issue3//528-wrap.zul" ) ; click ( jq ( "@button:eq(1)" ) ) ; <START_BUG> waitUntil ( 2 , ExpectedConditions . textToBePresentInElement ( ZSSBy . javascript ( "jq($msgArea)[0]" ) , "resize" ) ) ; <END_BUG> } }

Fix:
waitUntil ( 2 , ExpectedConditions . textToBePresentInElement ( ZSSBy . javascript ( "jq('$msgArea')[0]" ) , "resize" ) ) ;
Buggy code:
public class LaunchTest extends AbstractTest { public static String currentKicksBeforeLogin ; public static String currentKicksAfterLogin ; @ Test public void FirstUseFlow ( ) { } @ Test public void GooglePlusFlow ( ) { SignInPage . clicksignInGooglePlusSignIn ( ) ; CustomHooks . dismissMultiLoginMessage ( ) ; LandingPage . clicktabTitleStores ( ) ; StoresPage . clickStoresPageNameAndKickInformation ( ) ; CustomHooks . waitFor ( 10 ) ; ToolTipsPage . clickToolTipCloseButton ( ) ; driver . scrollTo ( "Trending<seq2seq4repair_space>on<seq2seq4repair_space>shopkick" ) ; StoresPage . clickStoresPageOfferCellLeft ( ) ; RelatedOfferPage . clickRelatedOfferSaveOffer ( ) ; CustomHooks . pressBack ( ) ; CustomHooks . pressBack ( ) ; LandingPage . clicktabTitleDeals ( ) ; CustomHooks . waitFor ( 3 ) ; <START_BUG> DealsPage . clickOnSerahcBar ( ) ; <END_BUG> driver . hideKeyboard ( ) ; if ( ! ( driver . findElement ( By . name ( "Deals<seq2seq4repair_space>Available" ) ) . isDisplayed ( ) ) ) { driver . scrollTo ( "Deals<seq2seq4repair_space>available" ) ; } DealsPage . clickOnDealsAvailable ( ) ; DealAggregationPage . clickOnDealTile ( ) ; if ( ! ( driver . findElement ( By . name ( "SAVE" ) ) . isDisplayed ( ) ) ) { DealDetailpage . clickOnSaveDeal ( ) ; } else { DealDetailpage . unSaveDeal ( ) ; } CustomHooks . pressBack ( ) ; CustomHooks . pressBack ( ) ; LandingPage . clicktabTitleProducts ( ) ; ProductsPage . clickProductsPageLookbookCover ( ) ; LookbookPage . clickLookbookPageLookbookOfferSaveHeart ( ) ; CustomHooks . pressBack ( ) ; ProductsPage . clickProductsPageMySaves ( ) ; MySavesPage . clickMySavesANYOfferTile ( ) ; OfferPage . clickOfferPageOfferSaveButton ( ) ; CustomHooks . pressBack ( ) ; CustomHooks . pressBack ( ) ; CustomHooks . pressBack ( ) ; LandingPage . openLeftNavSignedIn ( ) ; driver . scrollTo ( "Settings" ) ; LeftNavBar . clickOnSettingsLeftNav ( ) ; LeftNavSettings . clicksettingsAccountSettings ( ) ; AccountSettings . clickAccountSettingsLogOut ( ) ; } @ Test public void EmailLoginTest ( ) { } public void teardown ( ) { } }

Fix:
DealsPage . clickOnSearchBar ( ) ;
Buggy code:
public class AtomData { private BoxParameter box ; private ArrayList < Atom > atoms = new ArrayList < Atom > ( ) ; private HashMap < Integer , Grain > grains = new HashMap < Integer , Grain > ( ) ; private int maxNumElements = 1 ; private String [ ] elementNames ; private List < DataColumnInfo > dataColumns = new ArrayList < DataColumnInfo > ( ) ; boolean rbvAvailable = false ; private boolean grainsImported = false ; private Map < String , Object > fileMetaData = null ; private String name ; private String fullPathAndFilename ; private ArrayList < DataContainer > additionalData = new ArrayList < DataContainer > ( ) ; private int [ ] atomsPerElement = new int [ 0 ] ; private int [ ] atomsPerType ; private AtomData next ; private AtomData previous ; private CrystalStructure defaultCrystalStructure ; private CrystalRotationTools crystalRotation ; public AtomData ( AtomData previous , MDFileLoader . ImportDataContainer idc ) { } public ArrayList < DataContainer > getAdditionalData ( ) { } private void addDataColumnInfo ( DataColumnInfo ... dci ) { } public void removeDataColumnInfo ( DataColumnInfo dci ) { } public void applyProcessingModule ( ProcessingModule pm ) throws Exception { } private void processInputData ( MDFileLoader . ImportDataContainer idc ) throws Exception { } public void countAtomTypes ( ) { } public StringBuilder plotNeighborsGraph ( Atom ... atomsToPlot ) { } public BoxParameter getBox ( ) { } public List < Atom > getAtoms ( ) { } public String getName ( ) { } public String getFullPathAndFilename ( ) { } public AtomData getNext ( ) { } public void setNext ( AtomData next ) { } public AtomData getPrevious ( ) { } public void setPrevious ( AtomData previous ) { } public CrystalStructure getCrystalStructure ( ) { } public CrystalRotationTools getCrystalRotation ( ) { } public int getIndexForCustomColumn ( DataColumnInfo dci ) { for ( int i = 0 ; i < ( dataColumns . size ( ) ) ; i ++ ) <START_BUG> if ( dci == ( dataColumns . get ( i ) ) ) <END_BUG> return i ; return - 1 ; } public List < DataColumnInfo > getDataColumnInfos ( ) { } public int getNumberOfAtomsWithType ( int i ) { } public int getNumberOfElements ( ) { } public int getNumberOfAtomsOfElement ( int i ) { } public String getNameOfElement ( int i ) { } public Collection < Grain > getGrains ( ) { } public void addGrain ( Grain g ) { } public Grain getGrains ( int grain ) { } public boolean isGrainsImported ( ) { } public boolean isPolyCrystalline ( ) { } public DataContainer getDataContainer ( Class < ? extends DataContainer > clazz ) { } public Object getFileMetaData ( String s ) { } public void clear ( ) { } public boolean isRbvAvailable ( ) { } private void addAdditionalData ( DataContainer dc ) { } public void printToFile ( File out , boolean binary , boolean compressed ) throws IOException { } public void printToFile ( File out , boolean binary , boolean compressed , Filter < Atom > filter ) throws IOException { } @ Override public String toString ( ) { } No newline ; at end ; of file ; }

Fix:
if ( dci . equals ( dataColumns . get ( i ) ) )
Buggy code:
interface SliderClientBundle extends ClientBundle { static final SliderClientBundle INSTANCE = GWT . create ( SliderClientBundle . class ) ; <START_BUG> @ Source ( "resource//js//bootstrap-slider-4.5.1-patch.min.cache.js" ) <END_BUG> TextResource slider ( ) ; }

Fix:
@ Source ( "resource//js//bootstrap-slider-4.5.4.min.cache.js" )
Buggy code:
class QueryNodeODataWriter implements QueryNodeVisitor < QueryNode > { private StringBuilder mBuilder ; QueryNodeODataWriter ( ) { } private static String process ( String s ) { } private static String process ( Date date ) { <START_BUG> return ( "datetime'" + ( DateSerializer . serialize ( date ) ) ) + "'" ; <END_BUG> } private static String sanitize ( String s ) { } static String percentEncode ( String s ) { } static String percentEncode ( String s , String reserved ) { } private static void appendHex ( StringBuilder builder , String s ) { } private static void appendHex ( StringBuilder sb , byte b ) { } StringBuilder getBuilder ( ) { } @ Override public QueryNode visit ( ConstantNode node ) { } @ Override public QueryNode visit ( FieldNode node ) { } @ Override public QueryNode visit ( UnaryOperatorNode node ) { } @ Override public QueryNode visit ( BinaryOperatorNode node ) { } @ Override public QueryNode visit ( FunctionCallNode node ) { } }

Fix:
return ( "datetimeoffset'" + ( DateSerializer . serialize ( date ) ) ) + "'" ;
Buggy code:
public class XQDTSourceParser extends AbstractSourceParser { private XQueryParser fParser ; protected XQDTCommonTreeVisitor getASTBuilderVisitor ( char [ ] content , IProblemReporter reporter ) { } public ModuleDeclaration parse ( char [ ] fileName , char [ ] source , IProblemReporter reporter ) { } protected XQueryParser prepareParser ( String fileName , char [ ] source , IProblemReporter reporter ) { if ( ( fParser ) != null ) { return fParser ; } ANTLRStringStream inputStream = new ANTLRStringStream ( source , source . length ) ; XQueryLexer lexer = new XQueryLexer ( inputStream ) ; NewLazyTokenStream tokenStream = new NewLazyTokenStream ( lexer ) ; tokenStream . jumpToFirstValidToken ( ) ; XQueryParser parser = new XQueryParser ( tokenStream ) ; parser . setCharSource ( inputStream ) ; parser . setTreeAdaptor ( new org . eclipse . wst . xquery . internal . core . parser . antlr . XQDTCommonTreeAdaptor ( reporter ) ) ; parser . setProblemReporter ( reporter ) ; parser . setFileName ( fileName ) ; IFile file = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . getFile ( new Path ( fileName ) ) ; <START_BUG> int language = LanguageUtil . getLanguageLevel ( file , source ) ; <END_BUG> if ( XQDTCorePlugin . DEBUG ) { System . out . println ( ( ( ( "prepareParser<seq2seq4repair_space>(" + language ) + "):" ) + ( new String ( fileName ) ) ) ) ; } parser . setLanguageLevel ( language ) ; return parser ; } private void reportProblem ( IProblemReporter reporter , String message ) { } private static String printTree ( CommonTree tree , int i ) { } private static String getIndent ( int count ) { } }

Fix:
int language = LanguageUtil . getLanguageLevel ( file . getProject ( ) ) ;
Buggy code:
public class ActionUserPasswordMail extends AbstractAction { public ActionUserPasswordMail ( Map < String , Action > actions ) { } @ Override public String getURI ( ) { } @ Override public void execute ( HttpServletRequest req , HttpServletResponse resp ) throws ImmopolyException { PersistenceManager pm = PMF . get ( ) . getPersistenceManager ( ) ; try { String username = req . getParameter ( USERNAME ) ; String email = req . getParameter ( EMAIL ) ; if ( ( null == username ) || ( ( username . length ( ) ) == 0 ) ) throw new ImmopolyException ( ImmopolyException . MISSING_PARAMETER_USERNAME , "missing<seq2seq4repair_space>username" ) ; if ( ( null == email ) || ( ( email . length ( ) ) == 0 ) ) throw new ImmopolyException ( ImmopolyException . MISSING_PARAMETER_EMAIL , "missing<seq2seq4repair_space>email" ) ; User user = DBManager . getUserByUsername ( pm , username ) ; if ( null == user ) { throw new ImmopolyException ( ImmopolyException . USERNAME_NOT_FOUND , ( "User<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>" + username ) ) ; } if ( ( ( user . getEmail ( ) ) == null ) || ( ( user . getEmail ( ) . length ( ) ) == 0 ) ) { throw new ImmopolyException ( ImmopolyException . USER_SEND_PASSWORDMAIL_NOEMAIL , ( ( "Email<seq2seq4repair_space>for<seq2seq4repair_space>username<seq2seq4repair_space>" + username ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>set!" ) ) ; } if ( ! ( email . equals ( user . getEmail ( ) ) ) ) { throw new ImmopolyException ( ImmopolyException . USER_SEND_PASSWORDMAIL_EMAIL_NOMATCH , ( ( "Email<seq2seq4repair_space>for<seq2seq4repair_space>username<seq2seq4repair_space>" + username ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match!" ) ) ; } sendMail ( user ) ; LOG . info ( ( "Send<seq2seq4repair_space>Token<seq2seq4repair_space>per<seq2seq4repair_space>mail<seq2seq4repair_space>" + ( user . getUserName ( ) ) ) ) ; <START_BUG> resp . getOutputStream ( ) . write ( "OK" . getBytes ( "UTF-8" ) ) ; <END_BUG> } catch ( ImmopolyException e ) { throw e ; } catch ( Exception e ) { throw new ImmopolyException ( ImmopolyException . USER_SEND_PASSWORDMAIL_FAILED , ( "could<seq2seq4repair_space>not<seq2seq4repair_space>send<seq2seq4repair_space>passwordmail" + ( e . getMessage ( ) ) ) , e ) ; } finally { pm . close ( ) ; } } private void sendMail ( User user ) throws Exception { } }

Fix:
resp . getOutputStream ( ) . write ( "{\"OK\":\"OK\"}" . getBytes ( "UTF-8" ) ) ;
Buggy code:
public class JoinPath extends AbstractDomainObject implements DomainObject { public JoinPath ( AbstractDomainObject parent , PathOperator join , String attr ) { } @ Override public String getAliasHint ( AliasContext ctx ) { } @ Override public String getLastSegment ( ) { } @ Override public AbstractDomainObject getParent ( ) { } @ Override public String asJoinable ( AliasContext ctx ) { <START_BUG> return new StringBuffer ( getOperator ( ) . toString ( ) ) . append ( getParent ( ) . asProjection ( ctx ) ) . append ( PathOperator . NAVIGATION ) . append ( getLastSegment ( ) ) . append ( "<seq2seq4repair_space>" ) . append ( ctx . getAlias ( this ) ) . toString ( ) ; <END_BUG> } @ Override public String asExpression ( AliasContext ctx ) { } @ Override public String asProjection ( AliasContext ctx ) { } public String toString ( ) { } }

Fix:
return new StringBuilder ( getOperator ( ) . toString ( ) ) . append ( getParent ( ) . asProjection ( ctx ) ) . append ( PathOperator . NAVIGATION ) . append ( getLastSegment ( ) ) . append ( "<seq2seq4repair_space>" ) . append ( ctx . getAlias ( this ) ) . toString ( ) ;
Buggy code:
public class ReferredOutAction extends BaseAction { private static ReferralResultDAO referralResultDAO = new ReferralResultDAOImpl ( ) ; private static DictionaryDAO dictionaryDAO = new DictionaryDAOImpl ( ) ; private List < ReferredOutAction . NonNumericTests > nonNumericTests ; @ Override protected String getPageSubtitleKey ( ) { } @ Override protected String getPageTitleKey ( ) { } @ Override protected ActionForward performAction ( ActionMapping mapping , ActionForm form , HttpServletRequest request , HttpServletResponse response ) throws Exception { } private void fillInDictionaryValuesForReferralItems ( List < ReferralItem > referralItems ) { } private List < ReferralItem > getReferralItems ( ) { } private static final class ReferralComparator implements Comparator < ReferralItem > { @ Override public int compare ( ReferralItem left , ReferralItem right ) { } } private ReferralItem getReferralItem ( Referral referral ) { } private String getSendDateOrDefault ( Referral referral ) { } private List < ReferredTest > getAdditionalReferralTests ( List < ReferralResult > referralResults ) { } private List < ReferralResult > setReferralItemForNextTest ( IReferralResultTest referralItem , List < ReferralResult > referralResults ) { } private List < IdValuePair > getDictionaryValuesForTest ( String testId ) { } private String getAppropriateResultValue ( List < Result > results ) { } private List < IdValuePair > getTestsForTypeOfSample ( TypeOfSample typeOfSample ) { <START_BUG> List < Test > testList = TypeOfSampleUtil . getTestListBySampleTypeId ( typeOfSample . getId ( ) , false ) ; <END_BUG> List < IdValuePair > valueList = new ArrayList < IdValuePair > ( ) ; for ( Test test : testList ) { if ( test . getOrderable ( ) ) { valueList . add ( new IdValuePair ( test . getId ( ) , TestService . getUserLocalizedTestName ( test ) ) ) ; } } return valueList ; } private List < ReferredOutAction . NonNumericTests > getNonNumericTests ( List < ReferralItem > referralItems ) { } public class NonNumericTests { public String testId ; public String testType ; public List < IdValuePair > dictionaryValues ; } }

Fix:
List < Test > testList = TypeOfSampleUtil . getActiveTestsBySampleTypeId ( typeOfSample . getId ( ) , false ) ;
Buggy code:
@ SuppressWarnings ( "ALL" ) public class EvdevWatcher { private static final String PATH = "//dev//input" ; private static final String REQUIRED_FILE_PREFIX = "event" ; private final HashMap < String , EvdevHandler > handlers = new HashMap < String , EvdevHandler > ( ) ; private boolean shutdown = false ; private boolean init = false ; private boolean ungrabbed = false ; private EvdevListener listener ; private Thread startThread ; private static boolean patchedSeLinuxPolicies = false ; private FileObserver observer = new FileObserver ( EvdevWatcher . PATH , ( ( FileObserver . CREATE ) | ( FileObserver . DELETE ) ) ) { @ Override public void onEvent ( int event , String fileName ) { } } ; public EvdevWatcher ( EvdevListener listener ) { } private File [ ] rundownWithPermissionsChange ( int newPermissions ) { } public void ungrabAll ( ) { } public void regrabAll ( ) { } public void start ( ) { startThread = new Thread ( ) { @ Override public void run ( ) { EvdevShell . getInstance ( ) . startShell ( ) ; if ( ! ( EvdevWatcher . patchedSeLinuxPolicies ) ) { EvdevReader . patchSeLinuxPolicies ( ) ; EvdevWatcher . patchedSeLinuxPolicies = true ; } File [ ] files = rundownWithPermissionsChange ( 438 ) ; init = true ; for ( File f : files ) { observer . onEvent ( CREATE , f . getName ( ) ) ; } init = false ; observer . startWatching ( ) ; synchronized ( startThread ) { try { startThread . wait ( ) ; } catch ( InterruptedException e ) { } } <START_BUG> rundownWithPermissionsChange ( 54 ) ; <END_BUG> try { EvdevShell . getInstance ( ) . stopShell ( ) ; } catch ( InterruptedException e ) { } } } ; startThread . start ( ) ; } public void shutdown ( ) { } }

Fix:
rundownWithPermissionsChange ( 432 ) ;
Buggy code:
final class WebMetaDataCreator { private static final String EJB_WEBSERVICE_REALM = "EJBWebServiceEndpointServlet<seq2seq4repair_space>Realm" ; private final SecurityMetaDataAccessorEJB ejb21SecurityAccessor = new SecurityMetaDataAccessorEJB21 ( ) ; private final SecurityMetaDataAccessorEJB ejb3SecurityAccessor = new SecurityMetaDataAccessorEJB3 ( ) ; private final Logger log = Logger . getLogger ( WebMetaDataCreator . class ) ; WebMetaDataCreator ( ) { } void create ( final Deployment dep ) { final DeploymentUnit unit = WSHelper . getRequiredAttachment ( dep , DeploymentUnit . class ) ; WarMetaData warMD = ASHelper . getOptionalAttachment ( unit , ATTACHMENT_KEY ) ; <START_BUG> JBossWebMetaData jbossWebMD = ( warMD != null ) ? warMD . getJbossWebMetaData ( ) : null ; <END_BUG> if ( warMD == null ) { warMD = new WarMetaData ( ) ; } if ( jbossWebMD == null ) { jbossWebMD = new JBossWebMetaData ( ) ; warMD . setMergedJBossWebMetaData ( jbossWebMD ) ; unit . putAttachment ( ATTACHMENT_KEY , warMD ) ; } createWebAppDescriptor ( dep , jbossWebMD ) ; createJBossWebAppDescriptor ( dep , jbossWebMD ) ; dep . addAttachment ( JBossWebMetaData . class , jbossWebMD ) ; } private void createWebAppDescriptor ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private void createJBossWebAppDescriptor ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private void createServlets ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private void createServletMappings ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private void createSecurityConstraints ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private void createLoginConfig ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private void createSecurityRoles ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private String getAuthMethod ( final Deployment dep ) { } private SecurityMetaDataAccessorEJB getEjbSecurityMetaDataAccessor ( final Deployment dep ) { } }

Fix:
JBossWebMetaData jbossWebMD = ( warMD != null ) ? warMD . getMergedJBossWebMetaData ( ) : null ;