nus-yam/ex-repair huggingface dataset:
Buggy code:
public class FixCRLF extends MatchingTask { private int addcr ; private int addtab ; private int ctrlz ; private int tablength = 8 ; private File srcDir ; private File destDir = null ; public FixCRLF ( ) { } public void setSrcdir ( File srcDir ) { } public void setDestdir ( File destDir ) { } public void setCr ( String option ) { } public void setTab ( String option ) { } public void setTablength ( int tlength ) throws BuildException { <START_BUG> if ( ( tlength < 2 ) || ( ( tlength % 2 ) != 0 ) ) { <END_BUG> throw new BuildException ( "tablength<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>positive<seq2seq4repair_space>power<seq2seq4repair_space>of<seq2seq4repair_space>2" , location ) ; } tablength = tlength ; } public void setEof ( String option ) { } public void execute ( ) throws BuildException { } }

Fix:
if ( ( tlength < 2 ) || ( ( tlength & ( tlength - 1 ) ) == 0 ) ) {
Buggy code:
public class ExternalTldParsingDeploymentProcessor implements DeploymentUnitProcessor { private static final String IMPLICIT_TLD = "implicit.tld" ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ! ( DeploymentTypeMarker . isType ( WAR , deploymentUnit ) ) ) { return ; } final WarMetaData warMetaData = deploymentUnit . getAttachment ( ATTACHMENT_KEY ) ; if ( ( warMetaData == null ) || ( ( warMetaData . getMergedJBossWebMetaData ( ) ) == null ) ) { return ; } TldsMetaData tldsMetaData = deploymentUnit . getAttachment ( TldsMetaData . ATTACHMENT_KEY ) ; Map < String , TldMetaData > tlds = tldsMetaData . getTlds ( ) ; Set < String > sharedTldUris = new HashSet < > ( ) ; for ( TldMetaData shared : tldsMetaData . getSharedTlds ( deploymentUnit ) ) { sharedTldUris . add ( shared . getUri ( ) ) ; } Module module = deploymentUnit . getAttachment ( MODULE ) ; try { <START_BUG> Iterator < Resource > resources = module . globResources ( "**.tld" ) ; <END_BUG> while ( resources . hasNext ( ) ) { final Resource resource = resources . next ( ) ; if ( resource . getURL ( ) . toString ( ) . contains ( "com//sun//jsf-impl//main" ) ) { continue ; } if ( resource . getName ( ) . startsWith ( "META-INF//" ) ) { if ( tlds . containsKey ( resource . getName ( ) ) ) { continue ; } final TldMetaData value = parseTLD ( resource ) ; if ( sharedTldUris . contains ( value . getUri ( ) ) ) { continue ; } String key = "//" + ( resource . getName ( ) ) ; if ( ! ( tlds . containsKey ( key ) ) ) { tlds . put ( key , value ) ; } if ( ! ( tlds . containsKey ( value . getUri ( ) ) ) ) { tlds . put ( value . getUri ( ) , value ) ; } if ( ( value . getListeners ( ) ) != null ) { for ( ListenerMetaData l : value . getListeners ( ) ) { warMetaData . getMergedJBossWebMetaData ( ) . getListeners ( ) . add ( l ) ; } } } } } catch ( ModuleLoadException e ) { throw new DeploymentUnitProcessingException ( e ) ; } } @ Override public void undeploy ( final DeploymentUnit context ) { } private TldMetaData parseTLD ( Resource tld ) throws DeploymentUnitProcessingException { } }

Fix:
Iterator < Resource > resources = module . globResources ( "META-INF//**.tld" ) ;
Buggy code:
public abstract class BuildFileTest extends TestCase { protected Project project ; private StringBuffer logBuffer ; private StringBuffer fullLogBuffer ; private StringBuffer outBuffer ; private StringBuffer errBuffer ; private BuildException buildException ; public BuildFileTest ( String name ) { } protected void expectBuildException ( String target , String cause ) { } protected void expectLog ( String target , String log ) { } protected void expectLogContaining ( String target , String log ) { } protected String getLog ( ) { } protected void expectDebuglog ( String target , String log ) { } protected String getFullLog ( ) { } protected void expectOutput ( String target , String output ) { executeTarget ( target ) ; String realOutput = getOutput ( ) ; <START_BUG> assertEquals ( output , realOutput ) ; <END_BUG> } protected void expectOutputAndError ( String target , String output , String error ) { } protected String getOutput ( ) { } protected String getError ( ) { } protected BuildException getBuildException ( ) { } private String cleanBuffer ( StringBuffer buffer ) { } protected void configureProject ( String filename ) throws BuildException { } protected void configureProject ( String filename , int logLevel ) throws BuildException { } protected void executeTarget ( String targetName ) { } protected Project getProject ( ) { } protected File getProjectDir ( ) { } protected void expectSpecificBuildException ( String target , String cause , String msg ) { } protected void expectBuildExceptionContaining ( String target , String cause , String contains ) { } protected void expectPropertySet ( String target , String property , String value ) { } protected void assertPropertyEquals ( String property , String value ) { } protected void assertPropertySet ( String property ) { } protected void assertPropertyUnset ( String property ) { } protected void expectPropertySet ( String target , String property ) { } protected void expectPropertyUnset ( String target , String property ) { } protected URL getResource ( String resource ) { } private static class AntOutputStream extends OutputStream { private StringBuffer buffer ; public AntOutputStream ( StringBuffer buffer ) { } public void write ( int b ) { } } private class AntTestListener implements BuildListener { private int logLevel ; public AntTestListener ( int logLevel ) { } public void buildStarted ( BuildEvent event ) { } public void buildFinished ( BuildEvent event ) { } public void targetStarted ( BuildEvent event ) { } public void targetFinished ( BuildEvent event ) { } public void taskStarted ( BuildEvent event ) { } public void taskFinished ( BuildEvent event ) { } public void messageLogged ( BuildEvent event ) { } } }

Fix:
assertEquals ( output , realOutput . trim ( ) ) ;
Buggy code:
public abstract class Piece implements ChessboardVisitee { private static final Logger LOG = Logger . getLogger ( Piece . class ) ; protected Chessboard chessboard ; protected Square square ; protected Player player ; protected String name ; protected String symbol ; protected short m_value ; protected Set < Behavior > behaviors = new HashSet < > ( ) ; public Piece ( Chessboard chessboard , Player player , short value ) { } public short getValue ( ) { } public void addBehavior ( Behavior behavior ) { } public Set < Behavior > getBehaviors ( ) { } void clean ( ) { } boolean canMove ( Square square , ArrayList allmoves ) { } public boolean canMove ( int newX , int newY ) { } public Set < Square > getAllMoves ( ) { } public Set < Square > getSquaresInRange ( ) { } public boolean isOut ( int x , int y ) { <START_BUG> if ( ( ( ( x < 0 ) || ( x > 7 ) ) || ( y < 0 ) ) || ( y > 7 ) ) { <END_BUG> return true ; } return false ; } public boolean checkPiece ( int x , int y ) { } public boolean otherOwner ( int x , int y ) { } public String getSymbol ( ) { } public Chessboard getChessboard ( ) { } public void setChessboard ( Chessboard chessboard ) { } public Square getSquare ( ) { } public void setSquare ( Square square ) { } public Player getPlayer ( ) { } public void setPlayer ( Player player ) { } public String getName ( ) { } public void setName ( String name ) { } @ Override public final void acceptChessboardVisitor ( ChessboardVisitor chessboardVisitor ) { } }

Fix:
if ( ( ( ( x < 0 ) || ( x >= ( chessboard . getCols ( ) ) ) ) || ( y < 0 ) ) || ( y >= ( chessboard . getRows ( ) ) ) ) {
Buggy code:
public class ArrayReference extends Reference { public Expression receiver ; public Expression position ; public ArrayReference ( Expression rec , Expression pos ) { } public FlowInfo analyseAssignment ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , Assignment assignment , boolean compoundAssignment ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { <START_BUG> receiver . checkNPE ( currentScope , flowContext , flowInfo , true ) ; <END_BUG> flowInfo = receiver . analyseCode ( currentScope , flowContext , flowInfo ) ; return position . analyseCode ( currentScope , flowContext , flowInfo ) ; } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public int nullStatus ( FlowInfo flowInfo ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
receiver . checkNPE ( currentScope , flowContext , flowInfo ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) class DistributedStoreQuery extends JDBCStoreQuery { private List < StoreQuery > _queries = new ArrayList < StoreQuery > ( ) ; private ExpressionParser _parser ; public DistributedStoreQuery ( JDBCStore store , ExpressionParser parser ) { } void add ( StoreQuery q ) { } public DistributedStoreManager getDistributedStore ( ) { } public Executor newDataStoreExecutor ( ClassMetaData meta , boolean subs ) { } public void setContext ( QueryContext ctx ) { } public ExecutorService getExecutorServiceInstance ( ) { } public static class ParallelExecutor extends ExpressionStoreQuery . DataStoreExecutor { private List < Executor > executors = new ArrayList < Executor > ( ) ; private DistributedStoreQuery owner = null ; private ExecutorService threadPool = null ; public void addExecutor ( Executor ex ) { } public ParallelExecutor ( DistributedStoreQuery dsq , ClassMetaData meta , boolean subclasses , ExpressionParser parser , Object parsed ) { } public ResultObjectProvider executeQuery ( StoreQuery q , final Object [ ] params , final Range range ) { } boolean containsReplicated ( QueryContext query ) { } public Number executeDelete ( StoreQuery q , Object [ ] params ) { } public Number executeUpdate ( StoreQuery q , Object [ ] params ) { } List < SliceStoreManager > findTargets ( ) { } } static class QueryExecutor implements Callable < ResultObjectProvider > { StoreQuery query ; Executor executor ; Object [ ] params ; Range range ; public ResultObjectProvider call ( ) throws Exception { return executor . executeQuery ( query , params , range ) ; } } static class DeleteExecutor implements Callable < Number > { StoreQuery query ; Executor executor ; Object [ ] params ; public Number call ( ) throws Exception { return executor . executeDelete ( query , params ) ; } } static class UpdateExecutor implements Callable < Number > { StoreQuery query ; Executor executor ; Object [ ] params ; public Number call ( ) throws Exception { <START_BUG> return executor . executeDelete ( query , params ) ; <END_BUG> } } }

Fix:
return executor . executeUpdate ( query , params ) ;
Buggy code:
public class TasmaGUI extends JFrame implements TasmaUserInterface { private static final String SHOW_HINT_CONFIG_KEY = "showhint" ; private static final String SHOW_HINT_CONFIG_YES_VALUE = "yes" ; private static final long serialVersionUID = 7369112773183099080L ; private static final int WINDOW_DEFAULT_WIDTH = 640 ; private static final int WINDOW_DEFAULT_HEIGHT = 200 ; private static final int MAX_TASK_DISPLAY_COUNT = 6 ; private Controller controller ; private JPanel contentPane ; private PlaceholderTextField textCommand ; private JTextArea textMessage = new JTextArea ( ) ; private CommandHintFrame commandHintFrame = new CommandHintFrame ( ) ; private ZebraJList listTasks = new ZebraJList ( ) ; private JScrollPane listTasksScrollPane = new JScrollPane ( ) ; public TasmaGUI ( ) { } private void decorateFrame ( ) { TasmaGUI . setUIFont ( new FontUIResource ( Palette . UI_FONT_DEFAULT ) ) ; setTitle ( "TASMA" ) ; <START_BUG> setIconImage ( TasmaGUI . createImage ( "res//logo.png" , "icon" ) ) ; <END_BUG> setAlwaysOnTop ( true ) ; setDefaultCloseOperation ( JFrame . HIDE_ON_CLOSE ) ; updateWindowHeight ( ) ; setLocationRelativeTo ( null ) ; this . setLocation ( this . getLocation ( ) . x , ( ( int ) ( 0.5 * ( this . getLocation ( ) . y ) ) ) ) ; } private static void setUIFont ( FontUIResource f ) { } private void addWindowEvents ( ) { } private void initTxtCmd ( ) { } private void initTxtMsg ( ) { } @ SuppressWarnings ( "unchecked" ) private void initTaskLists ( ) { } private void initScrollPane ( ) { } @ Override public void initialize ( Controller controller ) throws Exception { } private class DisabledItemSelectionModel extends DefaultListSelectionModel { private static final long serialVersionUID = 1L ; @ Override public void setSelectionInterval ( int index0 , int index1 ) { } } @ SuppressWarnings ( "unchecked" ) @ Override public void displayTasks ( List < Task > tasks ) { } @ Override public void displayMessage ( String message ) { } @ Override public void displayMessage ( String message , Color color ) { } public void editCmdDisplay ( String task ) { } protected void updateWindowHeight ( ) { } protected static Image createImage ( String path , String description ) { } @ SuppressWarnings ( "deprecation" ) @ Override public void show ( ) { } public class CustomListRenderer implements ListCellRenderer < Object > { @ Override public Component getListCellRendererComponent ( JList < ? > list , Object value , int index , boolean isSelected , boolean cellHasFocus ) { } } }

Fix:
setIconImage ( TasmaGUI . createImage ( "..//res//logo.png" , "icon" ) ) ;
Buggy code:
public class SourceIndexerRequestor implements ISourceElementRequestor , IIndexConstants { SourceIndexer indexer ; IDocument document ; char [ ] packageName ; char [ ] [ ] enclosingTypeNames = new char [ 5 ] [ ] ; int depth = 0 ; int methodDepth = 0 ; public SourceIndexerRequestor ( SourceIndexer indexer , IDocument document ) { } public void acceptConstructorReference ( char [ ] typeName , int argCount , int sourcePosition ) { } public void acceptFieldReference ( char [ ] fieldName , int sourcePosition ) { } public void acceptImport ( int declarationStart , int declarationEnd , char [ ] name , boolean onDemand ) { } public void acceptLineSeparatorPositions ( int [ ] positions ) { } public void acceptMethodReference ( char [ ] methodName , int argCount , int sourcePosition ) { } public void acceptPackage ( int declarationStart , int declarationEnd , char [ ] name ) { } public void acceptProblem ( IProblem problem ) { } public void acceptTypeReference ( char [ ] [ ] typeName , int sourceStart , int sourceEnd ) { } public void acceptTypeReference ( char [ ] simpleTypeName , int sourcePosition ) { } public void acceptUnknownReference ( char [ ] [ ] name , int sourceStart , int sourceEnd ) { } public void acceptUnknownReference ( char [ ] name , int sourcePosition ) { } public char [ ] [ ] enclosingTypeNames ( ) { } public void enterClass ( int declarationStart , int modifiers , char [ ] name , int nameSourceStart , int nameSourceEnd , char [ ] superclass , char [ ] [ ] superinterfaces ) { } public void enterCompilationUnit ( ) { } public void enterConstructor ( int declarationStart , int modifiers , char [ ] name , int nameSourceStart , int nameSourceEnd , char [ ] [ ] parameterTypes , char [ ] [ ] parameterNames , char [ ] [ ] exceptionTypes ) { } public void enterField ( int declarationStart , int modifiers , char [ ] type , char [ ] name , int nameSourceStart , int nameSourceEnd ) { } public void enterInitializer ( int declarationSourceStart , int modifiers ) { } public void enterInterface ( int declarationStart , int modifiers , char [ ] name , int nameSourceStart , int nameSourceEnd , char [ ] [ ] superinterfaces ) { } public void enterMethod ( int declarationStart , int modifiers , char [ ] returnType , char [ ] name , int nameSourceStart , int nameSourceEnd , char [ ] [ ] parameterTypes , char [ ] [ ] parameterNames , char [ ] [ ] exceptionTypes ) { } public void exitClass ( int declarationEnd ) { } public void exitCompilationUnit ( int declarationEnd ) { } public void exitConstructor ( int declarationEnd ) { } public void exitField ( int declarationEnd ) { } public void exitInitializer ( int declarationEnd ) { } public void exitInterface ( int declarationEnd ) { } public void exitMethod ( int declarationEnd ) { } public void popTypeName ( ) { try { <START_BUG> enclosingTypeNames [ ( ( depth ) -- ) ] = null ; <END_BUG> } catch ( ArrayIndexOutOfBoundsException e ) { e . printStackTrace ( ) ; } } public void pushTypeName ( char [ ] typeName ) { } }

Fix:
enclosingTypeNames [ ( -- ( depth ) ) ] = null ;
Buggy code:
public class MenuItem extends Item { Menu parent ; Menu menu ; int id ; int accelerator ; static final int MARGIN_WIDTH = ( OS . IsWin95 ) ? 2 : 1 ; static final int MARGIN_HEIGHT = ( OS . IsWin95 ) ? 2 : 1 ; public MenuItem ( Menu parent , int style ) { } public MenuItem ( Menu parent , int style , int index ) { } MenuItem ( Menu parent , Menu menu , int style , int index ) { } public void addArmListener ( ArmListener listener ) { } public void addHelpListener ( HelpListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } protected void checkSubclass ( ) { } static int checkStyle ( int style ) { } void destroyWidget ( ) { } void fillAccel ( ACCEL accel ) { } void fixMenus ( Decorations newParent ) { } public int getAccelerator ( ) { } Rectangle getBounds ( ) { } public boolean getEnabled ( ) { } public Menu getMenu ( ) { } String getNameText ( ) { } public Menu getParent ( ) { } public boolean getSelection ( ) { } public boolean isEnabled ( ) { } void releaseChildren ( boolean destroy ) { if ( ( menu ) != null ) { <START_BUG> menu . releaseChildren ( false ) ; <END_BUG> menu = null ; } super . releaseChildren ( destroy ) ; } void releaseHandle ( ) { } void releaseMenu ( ) { } void releaseParent ( ) { } void releaseWidget ( ) { } public void removeArmListener ( ArmListener listener ) { } public void removeHelpListener ( HelpListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } public void setAccelerator ( int accelerator ) { } public void setEnabled ( boolean enabled ) { } public void setImage ( Image image ) { } public void setMenu ( Menu menu ) { } boolean setRadioSelection ( boolean value ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } int widgetStyle ( ) { } LRESULT wmCommandChild ( int wParam , int lParam ) { } LRESULT wmDrawChild ( int wParam , int lParam ) { } LRESULT wmMeasureChild ( int wParam , int lParam ) { } }

Fix:
menu . release ( false ) ;
Buggy code:
public class RandomLineChart2DExample extends ChartExample { public static final RandomLineChart2DExample INSTANCE = new RandomLineChart2DExample ( ) ; private static final double MAX_VAL = 0.1 * ( Double . MAX_VALUE ) ; private static final double MIN_VAL = - ( RandomLineChart2DExample . MAX_VAL ) ; private RandomLineChart2DExample ( ) { } public static final void main ( final String [ ] args ) throws IOException { } @ Override public void perform ( final IChartSelector selector , final StyleSet styles , final Random random ) { final int minX ; final int maxX ; final int minY ; final int maxY ; try ( final ILineChart2D chart = selector . lineChart2D ( ) ) { ChartExample . setTitle ( chart , null , random , styles ) ; chart . setLegendMode ( ChartExample . randomLegendMode ( random ) ) ; minX = ( random . nextInt ( 50 ) ) - 25 ; maxX = ( minX + 1 ) + ( random . nextInt ( 100 ) ) ; minY = ( random . nextInt ( 50 ) ) - 25 ; <START_BUG> maxY = ( minX + 1 ) + ( random . nextInt ( 100 ) ) ; <END_BUG> try ( final IAxis axis = chart . xAxis ( ) ) { RandomLineChart2DExample . __axis ( axis , random , styles , minX , maxX ) ; } try ( final IAxis axis = chart . yAxis ( ) ) { RandomLineChart2DExample . __axis ( axis , random , styles , minY , maxY ) ; } do { try ( final ILine2D line = chart . line ( ) ) { RandomLineChart2DExample . __line ( line , random , styles , minX , maxX , minY , maxY ) ; } } while ( ( random . nextInt ( 4 ) ) > 0 ) ; } } private static final void __axis ( final IAxis axis , final Random rand , final StyleSet styles , final double min , final double max ) { } private static final void __line ( final ILine2D line , final Random rand , final StyleSet styles , final double minX , final double maxX , final double minY , final double maxY ) { } private static final void __fill ( final double [ ] data , final double min , final double max , final Random rand , final boolean canReverse ) { } private static final void __revert ( final double [ ] data , final int i , final int j ) { } }

Fix:
maxY = ( minY + 1 ) + ( random . nextInt ( 100 ) ) ;
Buggy code:
public class UnconditionalFlowInfo extends FlowInfo { public long definiteInits ; long potentialInits ; public long [ ] extraDefiniteInits ; long [ ] extraPotentialInits ; public boolean isFakeReachable ; public int maxFieldCount ; public static final int BitCacheSize = 64 ; UnconditionalFlowInfo ( ) { } public UnconditionalFlowInfo addInitializationsFrom ( UnconditionalFlowInfo otherInits ) { } public UnconditionalFlowInfo addPotentialInitializationsFrom ( UnconditionalFlowInfo otherInits ) { } public boolean complainIfUnreachable ( Statement statement , BlockScope scope ) { } public FlowInfo copy ( ) { } public FlowInfo initsWhenFalse ( ) { } public FlowInfo initsWhenTrue ( ) { } private final boolean isDefinitelyAssigned ( int position ) { } public final boolean isDefinitelyAssigned ( FieldBinding field ) { } public final boolean isDefinitelyAssigned ( LocalVariableBinding local ) { } public boolean isFakeReachable ( ) { } private final boolean isPotentiallyAssigned ( int position ) { } public final boolean isPotentiallyAssigned ( FieldBinding field ) { <START_BUG> if ( ( this ) == ( DeadEnd ) ) <END_BUG> return false ; return isPotentiallyAssigned ( field . id ) ; } public final boolean isPotentiallyAssigned ( LocalVariableBinding local ) { } private final void markAsDefinitelyAssigned ( int position ) { } public void markAsDefinitelyAssigned ( FieldBinding field ) { } public void markAsDefinitelyAssigned ( LocalVariableBinding local ) { } private final void markAsDefinitelyNotAssigned ( int position ) { } public void markAsDefinitelyNotAssigned ( FieldBinding field ) { } public void markAsDefinitelyNotAssigned ( LocalVariableBinding local ) { } public FlowInfo markAsFakeReachable ( boolean isFakeReachable ) { } public UnconditionalFlowInfo mergedWith ( UnconditionalFlowInfo otherInits ) { } static int numberOfEnclosingFields ( ReferenceBinding type ) { } public String toString ( ) { } public UnconditionalFlowInfo unconditionalInits ( ) { } }

Fix:
if ( ( ( this ) == ( DeadEnd ) ) || ( this . isFakeReachable ) )
Buggy code:
public class JLabeledTextArea extends JPanel implements FocusListener , JLabeledField { private JLabel mLabel ; private JTextArea mTextArea ; private ArrayList mChangeListeners = new ArrayList ( 3 ) ; private String oldValue = "" ; public JLabeledTextArea ( ) { } public JLabeledTextArea ( String pLabel , Document docModel ) { } public List getComponentList ( ) { } public void setDocumentModel ( Document docModel ) { } private void init ( ) { } public void focusLost ( FocusEvent pFocusEvent ) { <START_BUG> if ( ( oldValue . equals ( mTextArea . getText ( ) ) ) == false ) { <END_BUG> notifyChangeListeners ( ) ; } } public void focusGained ( FocusEvent pFocusEvent ) { } public void setLabel ( String pLabel ) { } public void setText ( String pText ) { } public String getText ( ) { } public String getLabel ( ) { } public void addChangeListener ( ChangeListener pChangeListener ) { } public void removeChangeListener ( ChangeListener pChangeListener ) { } private void notifyChangeListeners ( ) { } }

Fix:
if ( ! ( oldValue . equals ( mTextArea . getText ( ) ) ) ) {
Buggy code:
public class DraggableImage extends Image implements IHeaderContributor { private final String id ; public DraggableImage ( String wicketId , String id , String img ) { } protected void onRender ( MarkupStream markupStream ) { } protected void onComponentTag ( ComponentTag tag ) { } public void renderHead ( HtmlHeaderContainer container ) { } private void addCssReference ( final HtmlHeaderContainer container , final Class clazz , final String name ) { PackageResourceReference ref = new PackageResourceReference ( Application . get ( ) , clazz , name ) ; <START_BUG> write ( container , ( ( "\t<link<seq2seq4repair_space>rel=\'stylesheet\'<seq2seq4repair_space>type=\'text//css\'<seq2seq4repair_space>href=\'" + ( getPage ( ) . urlFor ( ref . getPath ( ) ) ) ) + "\'//>\n" ) ) ; <END_BUG> } protected void write ( MarkupContainer container , String s ) { } public String getBodyOnLoad ( ) { } }

Fix:
write ( container , ( ( "\t<link<seq2seq4repair_space>rel=\'stylesheet\'<seq2seq4repair_space>type=\'text//css\'<seq2seq4repair_space>href=\'" + ( urlFor ( ref . getPath ( ) ) ) ) + "\'//>\n" ) ) ;
Buggy code:
public class ContextPathGenerator extends AbstractBehavior { private static final long serialVersionUID = 1L ; private final IModel < String > contextRelativePath ; public ContextPathGenerator ( IModel < String > contextRelativePath ) { } public ContextPathGenerator ( String contextRelativePath ) { } @ Override public void onComponentTag ( Component component , ComponentTag tag ) { final String path = contextRelativePath . getObject ( ) ; final String prefix = component . getRequest ( ) . getRelativePathPrefixToContextRoot ( ) ; <START_BUG> final String contextRelativePath = Strings . join ( "//" , path , prefix ) ; <END_BUG> tag . put ( "src" , contextRelativePath ) ; } @ Override public void detach ( Component component ) { } }

Fix:
final String contextRelativePath = Strings . join ( "//" , prefix , path ) ;
Buggy code:
public class AudioPlayerActivity extends AppCompatActivity implements View . OnClickListener { private static final String TAG = AudioPlayerActivity . class . getSimpleName ( ) ; private void showLog ( String msg ) { } private void showToast ( String toast_msg ) { } private static final String HOME = "com.suwonsmartapp.hello.showme." ; private static final int MSG_GET_MP = 1 ; private static final int MSG_NEXT_MP = 2 ; private TextView mTvAudioPlayerTitle ; private ImageView mIvAudioPlayerPicture ; private SeekBar mSbAudioPlayerSeekbar ; private TextView mTvAudioPlayerTimeRight ; private TextView mTvAudioPlayerTimeLeft ; private ImageButton mIbAudioPlayerPlay ; private ImageButton mIbAudioPlayerForward ; private ImageButton mIbAudioPlayerBackward ; private ImageButton mIbAudioPlayerRevert ; private static MediaPlayer mMediaPlayer ; private double TimeLeft = 0 ; private double TimeRight = 0 ; private int mCurrentPosition = 0 ; private ArrayList < AudioFileInfo > mAudioFileInfoList ; private AudioFileInfo mPlayAudioFileInfo ; private boolean mIsReceiverRegistered ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void setupViews ( ) { } @ Override protected void onStart ( ) { } @ Override protected void onResume ( ) { } @ Override protected void onDestroy ( ) { } private static Messenger mServiceMessenger ; private boolean mBoundMessenger ; private ServiceConnection mConnectionMessenger = new ServiceConnection ( ) { @ Override public void onServiceConnected ( ComponentName name , IBinder service ) { } @ Override public void onServiceDisconnected ( ComponentName name ) { } } ; private void setMusicUI ( ) { mTvAudioPlayerTitle . setText ( ( ( ( mPlayAudioFileInfo . getTitle ( ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( mPlayAudioFileInfo . getArtist ( ) ) ) ) ; mPlayAudioFileInfo . setAlbumArt ( getAlbumArt ( mPlayAudioFileInfo . getAlbumId ( ) ) ) ; if ( ( mPlayAudioFileInfo . getAlbumArt ( ) ) != null ) { mIvAudioPlayerPicture . setImageBitmap ( mPlayAudioFileInfo . getAlbumArt ( ) ) ; } else { <START_BUG> mIvAudioPlayerPicture . setImageResource ( audio_headphone_large ) ; <END_BUG> } if ( ( AudioPlayerActivity . mMediaPlayer ) != null ) { mMusicThread = getmMusicThread ( ) ; mMusicHandler . postDelayed ( mMusicThread , 100 ) ; } } private Bitmap getAlbumArt ( int albumId ) { } private final AudioPlayerActivity . MusicHandler mMusicHandler = new AudioPlayerActivity . MusicHandler ( ) ; public static class MusicHandler extends Handler { public MusicHandler ( ) { } @ Override public void handleMessage ( Message msg ) { } } private Thread mMusicThread ; private Thread getmMusicThread ( ) { } @ Override public void onClick ( View v ) { } private void restartOrpause ( ) { } private void previous ( ) { } private void next ( ) { } private void backToList ( ) { } private BroadcastReceiver mBRPlayer = new BroadcastReceiver ( ) { @ Override public void onReceive ( Context context , Intent intent ) { } } ; private void registerCallReceiver ( ) { } private void unregisterCallReceiver ( ) { } }

Fix:
mIvAudioPlayerPicture . setImageResource ( audio_music_large ) ;
Buggy code:
public class RaOperationUtil { public static ModifiableResourceAdapter buildResourceAdaptersObject ( final OperationContext context , ModelNode operation ) throws OperationFailedException { } public static ModifiableConnDef buildConnectionDefinitionObject ( final OperationContext context , final ModelNode operation , final String poolName , final boolean isXa ) throws OperationFailedException , ValidateException { } public static ModifiableAdminObject buildAdminObjects ( final OperationContext context , ModelNode operation , final String poolName ) throws OperationFailedException , ValidateException { } private static Extension extractExtension ( final OperationContext operationContext , final ModelNode node , final SimpleAttributeDefinition className , final SimpleMapAttributeDefinition propertyName ) throws OperationFailedException , ValidateException { } public static boolean deactivateIfActive ( OperationContext context , String raName ) throws OperationFailedException { } public static void activate ( OperationContext context , String raName , String rarName ) throws OperationFailedException { ServiceRegistry registry = context . getServiceRegistry ( true ) ; if ( rarName . contains ( RA_SERVICE_NAME_SEPARATOR ) ) { rarName = rarName . substring ( 0 , rarName . indexOf ( RA_SERVICE_NAME_SEPARATOR ) ) ; } final ServiceController < ? > inactiveRaController = registry . getService ( INACTIVE_RESOURCE_ADAPTER_SERVICE . append ( rarName ) ) ; if ( inactiveRaController == null ) { throw new OperationFailedException ( "rar<seq2seq4repair_space>not<seq2seq4repair_space>yet<seq2seq4repair_space>deployed" ) ; } InactiveResourceAdapterDeploymentService . InactiveResourceAdapterDeployment inactive = ( ( InactiveResourceAdapterDeploymentService . InactiveResourceAdapterDeployment ) ( inactiveRaController . getValue ( ) ) ) ; final ServiceController < ? > RaxmlController = registry . getService ( ServiceName . of ( RA_SERVICE , raName ) ) ; ResourceAdapter raxml = ( ( ResourceAdapter ) ( RaxmlController . getValue ( ) ) ) ; <START_BUG> RaServicesFactory . createDeploymentService ( inactive . getRegistration ( ) , inactive . getConnectorXmlDescriptor ( ) , inactive . getModule ( ) , inactive . getServiceTarget ( ) , raName , inactive . getDeployment ( ) , raxml , inactive . getResource ( ) ) ; <END_BUG> } public static void installRaServices ( OperationContext context , ServiceVerificationHandler verificationHandler , String name , ModifiableResourceAdapter resourceAdapter ) { } }

Fix:
RaServicesFactory . createDeploymentService ( inactive . getRegistration ( ) , inactive . getConnectorXmlDescriptor ( ) , inactive . getModule ( ) , inactive . getServiceTarget ( ) , raName , inactive . getDeploymentUnitServiceName ( ) , inactive . getDeployment ( ) , raxml , inactive . getResource ( ) ) ;
Buggy code:
public class DebugInput extends InputAdapter { private AbstractScreen screen ; private Stage stage ; private Rectangle rectangle ; public DebugInput ( AbstractScreen screen , Stage stage ) { } private boolean leftPlayer = true ; @ Override public boolean touchDown ( int screenX , int screenY , int pointer , int button ) { } @ Override public boolean keyDown ( int keycode ) { } private static TextItem debugTextItem ; private static Timeline debugTextSequence ; private void createDebugMessage ( CharSequence string ) { } private static TextItem fpsCounterTextItem ; private void showFPSCounter ( ) { if ( ( DebugInput . fpsCounterTextItem ) == null ) { DebugInput . fpsCounterTextItem = new TextItem ( Integer . toString ( graphics . getFramesPerSecond ( ) ) ) ; DebugInput . fpsCounterTextItem . setColor ( 1.0F , 1.0F , 1.0F , 0.75F ) ; DebugInput . fpsCounterTextItem . setX ( ( 4 * ( Settings . GAME_SCALE ) ) ) ; DebugInput . fpsCounterTextItem . setY ( ( ( graphics . getHeight ( ) ) - ( 2 * ( Settings . GAME_SCALE ) ) ) ) ; DebugInput . fpsCounterTextItem . setActCallback ( new ItemCallback ( ) { @ Override public void execute ( Item data ) { <START_BUG> DebugInput . fpsCounterTextItem . setString ( Integer . toString ( graphics . getFramesPerSecond ( ) ) ) ; <END_BUG> } } ) ; } if ( ! ( stage . getActors ( ) . contains ( DebugInput . fpsCounterTextItem , true ) ) ) { stage . addActor ( DebugInput . fpsCounterTextItem ) ; } } private void hideFPSCounter ( ) { } }

Fix:
DebugInput . fpsCounterTextItem . setText ( Integer . toString ( graphics . getFramesPerSecond ( ) ) ) ;
Buggy code:
public class AjaxTimerBehaviorTest extends WicketTestCase { private static final Logger log = LoggerFactory . getLogger ( AjaxTimerBehaviorTest . class ) ; public void testAddToAjaxUpdate ( ) { Duration dur = Duration . seconds ( 20 ) ; final AjaxTimerBehaviorTest . MyAjaxSelfUpdatingTimerBehavior timer = new AjaxTimerBehaviorTest . MyAjaxSelfUpdatingTimerBehavior ( dur ) ; final MockPageWithLinkAndComponent page = new MockPageWithLinkAndComponent ( ) ; page . add ( new org . apache . wicket . markup . html . WebComponent ( MockPageWithLinkAndComponent . COMPONENT_ID ) . setOutputMarkupId ( true ) ) ; page . add ( new org . apache . wicket . ajax . markup . html . AjaxLink < Void > ( MockPageWithLinkAndComponent . LINK_ID ) { private static final long serialVersionUID = 1L ; @ Override public void onClick ( AjaxRequestTarget target ) { WebMarkupContainer wmc = new WebMarkupContainer ( MockPageWithLinkAndComponent . COMPONENT_ID ) ; wmc . setOutputMarkupId ( true ) ; wmc . add ( timer ) ; page . replace ( wmc ) ; <START_BUG> target . addComponent ( wmc ) ; <END_BUG> } } ) ; tester . startPage ( new ITestPageSource ( ) { private static final long serialVersionUID = 1L ; public Page getTestPage ( ) { return page ; } } ) ; tester . clickLink ( LINK_ID ) ; validate ( timer , false ) ; } public void testAddToWebPage ( ) { } private void validate ( AjaxTimerBehaviorTest . MyAjaxSelfUpdatingTimerBehavior timer , boolean inBodyOnLoad ) { } private void validateTimerScript ( String document , String updateScript ) { } private static final String quote ( String s ) { } static class MyAjaxSelfUpdatingTimerBehavior extends AjaxSelfUpdatingTimerBehavior { private static final long serialVersionUID = 1L ; private final Duration duration ; String updateScript ; public MyAjaxSelfUpdatingTimerBehavior ( Duration updateInterval ) { } @ Override protected void onComponentRendered ( ) { } public String getUpdateScript ( ) { } } }

Fix:
target . add ( wmc ) ;
Buggy code:
public class SequenceStackNode extends AbstractExpandableStackNode { private final String nodeName ; private final AbstractStackNode [ ] children ; public SequenceStackNode ( int id , int containerIndex , boolean isEndNode , AbstractStackNode [ ] nodes , String nodeName , IBeforeFilter [ ] beforeFilters , IAfterFilter [ ] afterFilters ) { } private SequenceStackNode ( SequenceStackNode original , int startLocation ) { } private static AbstractStackNode [ ] generateChildren ( AbstractStackNode [ ] nodes ) { AbstractStackNode [ ] children = new AbstractStackNode [ nodes . length ] ; children [ 0 ] = nodes [ 0 ] ; for ( int i = 1 ; i < ( children . length ) ; ++ i ) { children [ i ] = nodes [ i ] ; children [ ( i - 1 ) ] . addNext ( children [ i ] ) ; } <START_BUG> return children ; <END_BUG> } public String getName ( ) { } public AbstractStackNode getCleanCopy ( int startLocation ) { } public AbstractStackNode [ ] getChildren ( ) { } public boolean canBeEmpty ( ) { } public AbstractStackNode getEmptyChild ( ) { } public String toString ( ) { } }

Fix:
return new AbstractStackNode [ ] { children [ 0 ] } ;
Buggy code:
public class ForStatement extends Statement { public static final ChildListPropertyDescriptor INITIALIZERS_PROPERTY = new ChildListPropertyDescriptor ( ForStatement . class , "initializers" , Expression . class , ASTNode . CYCLE_RISK ) ; public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( ForStatement . class , "expression" , Expression . class , ASTNode . OPTIONAL , ASTNode . CYCLE_RISK ) ; public static final ChildListPropertyDescriptor UPDATERS_PROPERTY = new ChildListPropertyDescriptor ( ForStatement . class , "updaters" , Expression . class , ASTNode . CYCLE_RISK ) ; public static final ChildPropertyDescriptor BODY_PROPERTY = new ChildPropertyDescriptor ( ForStatement . class , "body" , Statement . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private ASTNode . NodeList initializers = new ASTNode . NodeList ( ForStatement . INITIALIZERS_PROPERTY ) ; private Expression optionalConditionExpression = null ; private ASTNode . NodeList updaters = new ASTNode . NodeList ( ForStatement . UPDATERS_PROPERTY ) ; private Statement body = null ; ForStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { ForStatement result = new ForStatement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . copyLeadingComment ( this ) ; result . initializers ( ) . addAll ( ASTNode . copySubtrees ( target , initializers ( ) ) ) ; result . setExpression ( ( ( Expression ) ( ASTNode . copySubtree ( target , getExpression ( ) ) ) ) ) ; result . updaters ( ) . addAll ( ASTNode . copySubtrees ( target , updaters ( ) ) ) ; result . setBody ( ( ( Statement ) ( ASTNode . copySubtree ( target , getBody ( ) ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public List initializers ( ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } public List updaters ( ) { } public Statement getBody ( ) { } public void setBody ( Statement statement ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class CSVParser implements Iterable < CSVRecord > { private final Lexer lexer ; private final Map < String , Integer > headerMap ; private long recordNumber ; private final List < String > record = new ArrayList < String > ( ) ; private final Token reusableToken = new Token ( ) ; public CSVParser ( final Reader input ) throws IOException { } public CSVParser ( final Reader input , final CSVFormat format ) throws IOException { } public CSVParser ( final String input , final CSVFormat format ) throws IOException { } public Map < String , Integer > getHeaderMap ( ) { } public long getLineNumber ( ) { } public long getRecordNumber ( ) { } CSVRecord nextRecord ( ) throws IOException { <START_BUG> CSVRecord result = new CSVRecord ( null , headerMap , null , ( ( recordNumber ) + 1 ) ) ; <END_BUG> record . clear ( ) ; StringBuilder sb = null ; do { reusableToken . reset ( ) ; lexer . nextToken ( reusableToken ) ; switch ( reusableToken . type ) { case Type . TOKEN : record . add ( reusableToken . content . toString ( ) ) ; break ; case EORECORD : record . add ( reusableToken . content . toString ( ) ) ; break ; case EOF : if ( reusableToken . isReady ) { record . add ( reusableToken . content . toString ( ) ) ; } else { result = null ; } break ; case INVALID : throw new IOException ( ( ( "(line<seq2seq4repair_space>" + ( getLineNumber ( ) ) ) + ")<seq2seq4repair_space>invalid<seq2seq4repair_space>parse<seq2seq4repair_space>sequence" ) ) ; case COMMENT : if ( sb == null ) { sb = new StringBuilder ( ) ; } else { sb . append ( "\n" ) ; } sb . append ( reusableToken . content ) ; reusableToken . type = Type . TOKEN ; break ; } } while ( ( reusableToken . type ) == ( Type . TOKEN ) ) ; if ( ! ( record . isEmpty ( ) ) ) { ( recordNumber ) ++ ; final String comment = ( sb == null ) ? null : sb . toString ( ) ; result = new CSVRecord ( record . toArray ( new String [ record . size ( ) ] ) , headerMap , comment , this . recordNumber ) ; } return result ; } public List < CSVRecord > getRecords ( ) throws IOException { } private Map < String , Integer > initializeHeader ( final CSVFormat format ) throws IOException { } public Iterator < CSVRecord > iterator ( ) { } }

Fix:
CSVRecord result = null ;
Buggy code:
@ SuppressWarnings ( "rawtypes" ) public class BBCodeCreator { private static Map < String , String > bbMapPlugins = new HashMap < String , String > ( ) ; private static String previewJspUrl = "//burrito//bbCodePreview.jsp" ; public static String generateHTML ( String bbcode ) { String html = StringUtils . escapeHtml ( bbcode ) ; Map < String , String > bbMap = new HashMap < String , String > ( ) ; bbMap . put ( "(\r\n|\r|\n|\n\r)" , "<br//>" ) ; bbMap . put ( "\\[b\\](.+?)\\[//b\\]" , "<span<seq2seq4repair_space>style=\"font-weight:bold;\">$1<//span>" ) ; <START_BUG> bbMap . put ( "\\[i\\](.+?)\\[//i\\]" , "<span<seq2seq4repair_space>style=\"font-weight:italic;\">$1<//span>" ) ; <END_BUG> bbMap . put ( "\\[url\\](.+?)\\[//url\\]" , "<a<seq2seq4repair_space>href=\"$1\">$1<//a>" ) ; bbMap . put ( "\\[img\\](.+?)\\[//img\\]" , "<img<seq2seq4repair_space>src=\"//blobstore//image?key=$1\"<seq2seq4repair_space>//>" ) ; bbMap . put ( "\\[url=(.+?)\\](.+?)\\[//url\\]" , "<a<seq2seq4repair_space>href=\"$1\">$2<//a>" ) ; for ( Map . Entry entry : bbMap . entrySet ( ) ) { html = html . replaceAll ( entry . getKey ( ) . toString ( ) , entry . getValue ( ) . toString ( ) ) ; } for ( Map . Entry entry : BBCodeCreator . bbMapPlugins . entrySet ( ) ) { html = html . replaceAll ( entry . getKey ( ) . toString ( ) , entry . getValue ( ) . toString ( ) ) ; } html = BBCodeCreator . generateYouTube ( html ) ; return html ; } private static String generateYouTube ( String bbcode ) { } private static String youtubeEmbed ( ) { } public static void addPlugin ( String key , String value ) { } public static String getPreviewJspUrl ( ) { } public static void setPreviewJspUrl ( String jspUrl ) { } }

Fix:
bbMap . put ( "\\[i\\](.+?)\\[//i\\]" , "<span<seq2seq4repair_space>style=\"font-style:italic;\">$1<//span>" ) ;
Buggy code:
public class SynchronizedStatement extends Statement { private Expression expression = null ; private Block body = null ; SynchronizedStatement ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { SynchronizedStatement result = new SynchronizedStatement ( target ) ; result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <START_BUG> result . setLeadingComment ( getLeadingComment ( ) ) ; <END_BUG> result . setExpression ( ( ( Expression ) ( getExpression ( ) . clone ( target ) ) ) ) ; result . setBody ( ( ( Block ) ( getBody ( ) . clone ( target ) ) ) ) ; return result ; } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } public Block getBody ( ) { } public void setBody ( Block block ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . copyLeadingComment ( this ) ;
Buggy code:
public class ClassicPropertyResolverTestCase extends AbstractPropertyResolverTestCase { public ClassicPropertyResolverTestCase ( String name ) { } protected PropertyResolver createResolver ( ) { } public void testUndefinedProp ( ) throws Exception { final String undefinedProp = "undefinedProperty" ; final String propRef = ( "${" + undefinedProp ) + "}" ; <START_BUG> doTestResolution ( propRef , propRef , m_context ) ; <END_BUG> } }

Fix:
doTestResolution ( propRef , propRef , m_store ) ;
Buggy code:
@ OnApplicationStart public class Bootstrap extends Job { public void doJob ( ) { } private void createAaronCalendars ( UserManager um , final CalendarManager cm ) { } private void createJudithCalendars ( UserManager um , final CalendarManager cm ) { User judith = um . createUser ( "judith" , "ese" ) ; EseCalendar judithcal ; try { judithcal = cm . createCalendar ( judith , "Judiths<seq2seq4repair_space>Kalender" ) ; } catch ( CalendarAlreadyExistsException e ) { judithcal = cm . getCalendar ( "Judiths<seq2seq4repair_space>Kalender" ) ; } Calendar juc = Calendar . getInstance ( ) ; juc . set ( 2011 , 11 , 23 , 22 , 15 ) ; Date start = juc . getTime ( ) ; juc . set ( 2011 , 11 , 23 , 23 , 0 ) ; Date end = juc . getTime ( ) ; <START_BUG> judithcal . addEvent ( ADMIN , new CalendarEvent ( start , end , "Tolle<seq2seq4repair_space>party" , true ) ) ; <END_BUG> } private void createErwannCalendars ( UserManager um , final CalendarManager cm ) { } No newline ; at end ; of file ; }

Fix:
judithcal . addEvent ( ADMIN , new CalendarEvent ( start , end , "Super<seq2seq4repair_space>Tolle<seq2seq4repair_space>Party" , true ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class ConnectionFactoryManagementTestCase extends ContainerResourceMgmtTestBase { private static final String CF_NAME = UUID . randomUUID ( ) . toString ( ) ; private static final ModelNode address = new ModelNode ( ) ; @ Test public void testWriteDiscoveryGroupAttributeWhenConnectorIsAlreadyDefined ( ) throws Exception { final ModelNode add = new ModelNode ( ) ; add . get ( OP ) . set ( ADD ) ; add . get ( OP_ADDR ) . set ( ConnectionFactoryManagementTestCase . address ) ; ModelNode connector = new ModelNode ( ) ; connector . get ( "in-vm" ) . set ( new ModelNode ( ) ) ; add . get ( CONNECTOR ) . set ( connector ) ; ModelNode entries = new ModelNode ( ) ; entries . add ( ( "java://jms//" + ( ConnectionFactoryManagementTestCase . CF_NAME ) ) ) ; add . get ( ENTRIES ) . set ( entries ) ; executeOperation ( add ) ; final ModelNode writeAttribute = new ModelNode ( ) ; writeAttribute . get ( OP ) . set ( WRITE_ATTRIBUTE_OPERATION ) ; writeAttribute . get ( OP_ADDR ) . set ( ConnectionFactoryManagementTestCase . address ) ; writeAttribute . get ( NAME ) . set ( DISCOVERY_GROUP_NAME ) ; writeAttribute . get ( VALUE ) . set ( UUID . randomUUID ( ) . toString ( ) ) ; try { executeOperation ( writeAttribute ) ; fail ( "it<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>possible<seq2seq4repair_space>to<seq2seq4repair_space>define<seq2seq4repair_space>a<seq2seq4repair_space>discovery<seq2seq4repair_space>group<seq2seq4repair_space>when<seq2seq4repair_space>the<seq2seq4repair_space>connector<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>defined" ) ; } catch ( MgmtOperationException e ) { assertEquals ( FAILED , e . getResult ( ) . get ( OUTCOME ) . asString ( ) ) ; assertEquals ( true , e . getResult ( ) . get ( ROLLED_BACK ) . asBoolean ( ) ) ; <START_BUG> assertTrue ( e . getResult ( ) . get ( FAILURE_DESCRIPTION ) . asString ( ) . contains ( "JBAS011630" ) ) ; <END_BUG> } final ModelNode remove = new ModelNode ( ) ; remove . get ( OP ) . set ( REMOVE ) ; remove . get ( OP_ADDR ) . set ( ConnectionFactoryManagementTestCase . address ) ; executeOperation ( remove ) ; } }

Fix:
assertTrue ( e . getResult ( ) . get ( FAILURE_DESCRIPTION ) . asString ( ) . contains ( "WFLYMSG0019" ) ) ;