nus-yam/ex-repair huggingface dataset:
Buggy code:
public class BigReal implements Serializable , Comparable < BigReal > , FieldElement < BigReal > { public static final BigReal ZERO = new BigReal ( BigDecimal . ZERO ) ; public static final BigReal ONE = new BigReal ( BigDecimal . ONE ) ; private static final long serialVersionUID = 4984534880991310382L ; private final BigDecimal d ; private RoundingMode roundingMode = RoundingMode . HALF_UP ; private int scale = 64 ; public BigReal ( BigDecimal val ) { } public BigReal ( BigInteger val ) { } public BigReal ( BigInteger unscaledVal , int scale ) { } public BigReal ( BigInteger unscaledVal , int scale , MathContext mc ) { } public BigReal ( BigInteger val , MathContext mc ) { } public BigReal ( char [ ] in ) { } public BigReal ( char [ ] in , int offset , int len ) { } public BigReal ( char [ ] in , int offset , int len , MathContext mc ) { } public BigReal ( char [ ] in , MathContext mc ) { } public BigReal ( double val ) { } public BigReal ( double val , MathContext mc ) { } public BigReal ( int val ) { } public BigReal ( int val , MathContext mc ) { } public BigReal ( long val ) { } public BigReal ( long val , MathContext mc ) { } public BigReal ( String val ) { } public BigReal ( String val , MathContext mc ) { } public RoundingMode getRoundingMode ( ) { } public void setRoundingMode ( RoundingMode roundingMode ) { } public int getScale ( ) { } public void setScale ( int scale ) { } public BigReal add ( BigReal a ) { } public BigReal subtract ( BigReal a ) { } public BigReal divide ( BigReal a ) throws ArithmeticException { <START_BUG> return new BigReal ( d . divide ( a . d ) ) ; <END_BUG> } public BigReal multiply ( BigReal a ) { } public int compareTo ( BigReal a ) { } public double doubleValue ( ) { } public BigDecimal bigDecimalValue ( ) { } @ Override public boolean equals ( Object other ) { } @ Override public int hashCode ( ) { } public Field < BigReal > getField ( ) { } }

Fix:
return new BigReal ( d . divide ( a . d , scale , roundingMode ) ) ;
Buggy code:
public class NestedApplication extends WicketExampleApplication { public NestedApplication ( ) { } protected void init ( ) { super . init ( ) ; <START_BUG> getAjaxSettings ( ) . setAjaxDebugModeEnabled ( false ) ; <END_BUG> } public Class getHomePage ( ) { } }

Fix:
getDebugSettings ( ) . setAjaxDebugModeEnabled ( false ) ;
Buggy code:
@ Service @ Transactional public class ParishServiceImpl implements ParishService { @ Autowired private ParishDao parishDao ; @ Override public boolean addParishSM ( Parish parish ) { } @ Override public List < Parish > getAllParish ( ) { } @ Override public Parish getParishForIDSM ( Long id ) { } @ Override public List < ParishDto > createParishDto ( List < Parish > parishList ) throws IllegalArgumentException { List < ParishDto > parishDtoList = new ArrayList < ParishDto > ( parishList . size ( ) ) ; if ( ! ( parishList . isEmpty ( ) ) ) { Integer uniqueId = 0 ; for ( Parish parish : parishList ) { ParishDto parishDto = new ParishDto ( uniqueId , parish . getId ( ) , parish . getName ( ) , parish . getRiteName ( ) , parish . getDioceseName ( ) , parish . getDioceseName ( ) , parish . getForaneName ( ) , parish . getFacebookPage ( ) , parish . getWebSite ( ) , parish . getCode ( ) , parish . getPlace ( ) , parish . getDrivingRoute ( ) , parish . getMap ( ) , parish . getRegisteredDate ( ) , parish . getMobileNo ( ) , parish . getEmail ( ) , parish . getLandLineNo ( ) , parish . getFaxNo ( ) ) ; <START_BUG> parishDto . setLocalAddress ( DisplayUtils . getEmbeddedObjectString ( parish . getLocalAddress ( ) , "addressLineOne" , "addressLineTwo" , "addressLineThree" ) ) ; <END_BUG> parishDtoList . add ( parishDto ) ; uniqueId += 1 ; } } else { throw new IllegalArgumentException ( "Parish<seq2seq4repair_space>List<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>an<seq2seq4repair_space>empty<seq2seq4repair_space>List!!!..." ) ; } return parishDtoList ; } @ Override public Long getParishCount ( ) { } @ Override public void updateParish ( Parish parish ) { } }

Fix:
parishDto . setLocalAddress ( DisplayUtils . getEmbeddedObjectString ( parish . getLocalAddress ( ) , "addressLineOne" , "addressLineTwo" , "addressLineThree" , "town" , "county" , "country" , "pin" ) ) ;
Buggy code:
public class CovReport extends Task { private File home = null ; private String format = null ; private File tofile = null ; private String type = null ; private Integer percent = null ; private String filters = null ; private File snapshot = null ; private Path sourcePath = null ; private boolean includeSource = true ; private Path coveragePath = null ; private CovReport . Reference reference = null ; public CovReport ( ) { } public void setFilters ( String values ) { } public void setFormat ( CovReport . ReportFormat value ) { } public void setHome ( File value ) { } public void setIncludesource ( boolean value ) { } public void setPercent ( Integer value ) { } public void setSnapshot ( File value ) { } public void setTofile ( File value ) { } public void setType ( CovReport . ReportType value ) { } public Path createCoveragepath ( ) { } public CovReport . Reference createReference ( ) { } public Path createSourcepath ( ) { } public void execute ( ) throws TaskException { } protected String [ ] getParameters ( ) throws TaskException { } protected void checkOptions ( ) throws TaskException { if ( ( tofile ) == null ) { throw new TaskException ( "'tofile'<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set." ) ; } if ( ( snapshot ) == null ) { throw new TaskException ( "'snapshot'<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set." ) ; } if ( ( home ) == null ) { throw new TaskException ( "'home'<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>JProbe<seq2seq4repair_space>home<seq2seq4repair_space>directory" ) ; } home = new File ( home , "coverage" ) ; File jar = new File ( home , "coverage.jar" ) ; if ( ! ( jar . exists ( ) ) ) { throw new TaskException ( ( "Cannot<seq2seq4repair_space>find<seq2seq4repair_space>Coverage<seq2seq4repair_space>directory:<seq2seq4repair_space>" + ( home ) ) ) ; } if ( ( ( reference ) != null ) && ( ! ( "xml" . equals ( format ) ) ) ) { <START_BUG> log ( "Ignored<seq2seq4repair_space>reference.<seq2seq4repair_space>It<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>used<seq2seq4repair_space>in<seq2seq4repair_space>non<seq2seq4repair_space>XML<seq2seq4repair_space>report." ) ; <END_BUG> reference = null ; } } public static class ReportFormat extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public static class ReportType extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public class Reference { protected Path classPath ; protected ReportFilters filters ; public Path createClasspath ( ) { } public ReportFilters createFilters ( ) { } protected void createEnhancedXMLReport ( ) throws TaskException { } } }

Fix:
getLogger ( ) . info ( "Ignored<seq2seq4repair_space>reference.<seq2seq4repair_space>It<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>used<seq2seq4repair_space>in<seq2seq4repair_space>non<seq2seq4repair_space>XML<seq2seq4repair_space>report." ) ;
Buggy code:
public class Recipe { public ArrayList < Ingredient > Ingredients ; public ArrayList < String > Steps ; public int ID ; public String Title ; public float Yield ; private int step ; public Recipe ( int id , String title , float yield ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( Title ) + "<seq2seq4repair_space>yields:<seq2seq4repair_space>" ) + ( Float . toString ( Yield ) ) ) + "<seq2seq4repair_space>serving(s)" ; <END_BUG> } public int getStep ( ) { } public void setStep ( int step ) { } public String currentStep ( ) { } }

Fix:
return Title ;
Buggy code:
public final class LoadFile extends Task { private File srcFile = null ; private boolean failOnError = true ; private String encoding = null ; private String property = null ; private final Vector filterChains = new Vector ( ) ; public final void setEncoding ( final String encoding ) { } public final void setProperty ( final String property ) { } public final void setSrcFile ( final File srcFile ) { } public final void setFailonerror ( final boolean fail ) { } public final void execute ( ) throws BuildException { if ( ( srcFile ) == null ) { throw new BuildException ( "source<seq2seq4repair_space>file<seq2seq4repair_space>not<seq2seq4repair_space>defined" ) ; } if ( ( property ) == null ) { throw new BuildException ( "output<seq2seq4repair_space>property<seq2seq4repair_space>not<seq2seq4repair_space>defined" ) ; } FileInputStream fis = null ; BufferedInputStream bis = null ; Reader instream = null ; log ( ( ( ( "loading<seq2seq4repair_space>" + ( srcFile ) ) + "<seq2seq4repair_space>into<seq2seq4repair_space>property<seq2seq4repair_space>" ) + ( property ) ) , MSG_VERBOSE ) ; try { final long len = srcFile . length ( ) ; log ( ( "file<seq2seq4repair_space>size<seq2seq4repair_space>=<seq2seq4repair_space>" + len ) , MSG_DEBUG ) ; final int size = ( ( int ) ( len ) ) ; fis = new FileInputStream ( srcFile ) ; bis = new BufferedInputStream ( fis ) ; if ( ( encoding ) == null ) { instream = new InputStreamReader ( bis ) ; } else { instream = new InputStreamReader ( bis , encoding ) ; } String text = "" ; if ( size != 0 ) { ChainReaderHelper crh = new ChainReaderHelper ( ) ; crh . setBufferSize ( size ) ; crh . setPrimaryReader ( instream ) ; crh . setFilterChains ( filterChains ) ; crh . setProject ( getProject ( ) ) ; instream = crh . getAssembledReader ( ) ; text = crh . readFully ( instream ) ; } if ( text != null ) { if ( ( text . length ( ) ) > 0 ) { getProject ( ) . setNewProperty ( property , text ) ; log ( ( ( "loaded<seq2seq4repair_space>" + ( text . length ( ) ) ) + "<seq2seq4repair_space>characters" ) , MSG_VERBOSE ) ; log ( ( ( ( property ) + "<seq2seq4repair_space>:=<seq2seq4repair_space>" ) + text ) , MSG_DEBUG ) ; } } } catch ( final IOException ioe ) { final String message = "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>file:<seq2seq4repair_space>" + ( ioe . toString ( ) ) ; if ( failOnError ) { <START_BUG> throw new BuildException ( message , ioe , location ) ; <END_BUG> } else { log ( message , MSG_ERR ) ; } } catch ( final BuildException be ) { if ( failOnError ) { throw be ; } else { log ( be . getMessage ( ) , MSG_ERR ) ; } } finally { try { if ( fis != null ) { fis . close ( ) ; } } catch ( IOException ioex ) { } } } public final void addFilterChain ( FilterChain filter ) { } }

Fix:
throw new BuildException ( message , ioe , getLocation ( ) ) ;
Buggy code:
public class ModClusterStopContext implements OperationStepHandler { static final ModClusterStopContext INSTANCE = new ModClusterStopContext ( ) ; static OperationDefinition getDefinition ( ResourceDescriptionResolver descriptionResolver ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( ( context . isNormalServer ( ) ) && ( ( context . getServiceRegistry ( false ) . getService ( SERVICE_NAME ) ) != null ) ) { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( SERVICE_NAME ) ; final ModClusterServiceMBean service = ( ( ModClusterServiceMBean ) ( controller . getValue ( ) ) ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "stop-context:<seq2seq4repair_space>%s" , operation ) ; final String webHost = ModClusterSubsystemResourceDefinition . VIRTUAL_HOST . resolveModelAttribute ( context , operation ) . asString ( ) ; final String webContext = ModClusterSubsystemResourceDefinition . CONTEXT . resolveModelAttribute ( context , operation ) . asString ( ) ; final int waitTime = ModClusterSubsystemResourceDefinition . WAIT_TIME . resolveModelAttribute ( context , operation ) . asInt ( ) ; try { service . stopContext ( webHost , webContext , waitTime , TimeUnit . SECONDS ) ; } catch ( IllegalArgumentException e ) { <START_BUG> throw new OperationFailedException ( new ModelNode ( ) . set ( ROOT_LOGGER . ContextOrHostNotFound ( webHost , webContext ) ) ) ; <END_BUG> } context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { service . enableContext ( webHost , webContext ) ; } } ) ; } } , RUNTIME ) ; } context . stepCompleted ( ) ; } }

Fix:
throw new OperationFailedException ( new ModelNode ( ) . set ( ROOT_LOGGER . contextOrHostNotFound ( webHost , webContext ) ) ) ;
Buggy code:
@ DefinitionPrefix ( "DO" ) public final class Domain implements Definition { private final String name ; private final DataType dataType ; private final DefinitionReference < FormatterDefinition > formatterDefinitionRef ; private final List < DefinitionReference < ConstraintDefinition > > constraintDefinitionRefs ; private final Properties properties ; private final String dtDefinitionName ; public Domain ( final String name , final DataType dataType ) { } public Domain ( final String name , final DataType dataType , final FormatterDefinition formatterDefinition , final List < ConstraintDefinition > constraintDefinitions , final Properties properties ) { } private static Properties buildProperties ( final List < ConstraintDefinition > constraintDefinitions , final Properties inputProperties ) { } public DataType getDataType ( ) { } <START_BUG> public Formatter getFormatter ( ) { <END_BUG> Assertion . checkNotNull ( formatterDefinitionRef , "no<seq2seq4repair_space>formatter<seq2seq4repair_space>defined<seq2seq4repair_space>on<seq2seq4repair_space>{0}" , this ) ; return formatterDefinitionRef . get ( ) ; } public Properties getProperties ( ) { } public void checkValue ( final Object value ) throws ConstraintException { } public boolean hasDtDefinition ( ) { } public DtDefinition getDtDefinition ( ) { } @ Override public String getName ( ) { } @ Override public String toString ( ) { } }

Fix:
public FormatterDefinition getFormatter ( ) {
Buggy code:
public class ExceptionMatcher { private Exception exception ; public ExceptionMatcher ( ExceptionMatcher . CodeBlock block ) { } public < T extends Exception > void toThrow ( Class < T > expectedExceptionClass ) { } public < T extends Exception > void toThrow ( Class < T > expectedExceptionClass , String expectedMessage ) { Arguments . ensureNotNull ( expectedMessage , "expectedMessage<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; this . toThrow ( expectedExceptionClass ) ; String exceptionMessage = this . exception . getMessage ( ) ; <START_BUG> Expectations . expectTrue ( expectedMessage . equals ( exceptionMessage ) , "Expected<seq2seq4repair_space>exception<seq2seq4repair_space>message<seq2seq4repair_space>'%s'<seq2seq4repair_space>but<seq2seq4repair_space>was<seq2seq4repair_space>'%s'" , exceptionMessage , exceptionMessage ) ; <END_BUG> } private void runCodeBlock ( ExceptionMatcher . CodeBlock block ) { } public static interface CodeBlock { public void run ( ) throws Exception { } } }

Fix:
Expectations . expectTrue ( expectedMessage . equals ( exceptionMessage ) , "Expected<seq2seq4repair_space>exception<seq2seq4repair_space>message<seq2seq4repair_space>'%s'<seq2seq4repair_space>but<seq2seq4repair_space>was<seq2seq4repair_space>'%s'" , expectedMessage , exceptionMessage ) ;
Buggy code:
public class CompilationMXBeanReadResourceHandler implements OperationStepHandler { public static final CompilationMXBeanReadResourceHandler INSTANCE = new CompilationMXBeanReadResourceHandler ( ) ; private CompilationMXBeanReadResourceHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode result = context . getResult ( ) ; for ( String attribute : PlatformMBeanConstants . COMPILATION_READ_ATTRIBUTES ) { final ModelNode store = result . get ( attribute ) ; try { CompilationMXBeanAttributeHandler . storeResult ( attribute , store ) ; } catch ( UnsupportedOperationException ignored ) { } } for ( String attribute : PlatformMBeanConstants . COMPILATION_METRICS ) { final ModelNode store = result . get ( attribute ) ; try { CompilationMXBeanAttributeHandler . storeResult ( attribute , store ) ; } catch ( UnsupportedOperationException ignored ) { } } if ( ( PlatformMBeanUtil . JVM_MAJOR_VERSION ) > 6 ) { final ModelNode store = result . get ( OBJECT_NAME ) ; CompilationMXBeanAttributeHandler . storeResult ( OBJECT_NAME , store ) ; } <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class MainActivity extends ActionBarActivity { private Button toMap ; private Button statsbtn ; private Button toRules ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; toMap = ( ( Button ) ( findViewById ( Start ) ) ) ; statsbtn = ( ( Button ) ( findViewById ( stats ) ) ) ; toRules = ( ( Button ) ( findViewById ( Rules ) ) ) ; toMap . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent launchMap = new Intent ( MainActivity . this , MapsActivity . class ) ; startActivity ( launchMap ) ; } } ) ; statsbtn . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent launchMap = new Intent ( MainActivity . this , ResultActivity . class ) ; startActivity ( launchMap ) ; } } ) ; toRules . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { <START_BUG> Intent RulesPage = new Intent ( MainActivity . this , ResultActivity . class ) ; <END_BUG> startActivity ( RulesPage ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
Intent RulesPage = new Intent ( MainActivity . this , RulesPage . class ) ;
Buggy code:
public class CharacterConverter extends AbstractConverter < Character > { private static final long serialVersionUID = 1L ; public static final IConverter < Character > INSTANCE = new CharacterConverter ( ) ; <START_BUG> public Character convertToObject ( final String value , Locale locale ) { <END_BUG> int length = value . length ( ) ; if ( length == 0 ) { return null ; } else if ( length == 1 ) { return value . charAt ( 0 ) ; } throw newConversionException ( ( ( "Cannot<seq2seq4repair_space>convert<seq2seq4repair_space>'" + value ) + "'<seq2seq4repair_space>to<seq2seq4repair_space>Character" ) , value , locale ) ; } @ Override protected Class < Character > getTargetType ( ) { } }

Fix:
public Character convertToObject ( final String value , final Locale locale ) {
Buggy code:
public final class ViewIntroAdapterPart extends ViewPart { private IIntroPart introPart ; private IIntroSite introSite ; private boolean handleZoomEvents = true ; private void addPaneListener ( ) { } public void setStandby ( final boolean standby ) { } public void setHandleZoomEvents ( boolean handle ) { } public void createPartControl ( Composite parent ) { } public void dispose ( ) { } public Object getAdapter ( Class adapter ) { } public Image getTitleImage ( ) { } public String getTitle ( ) { } public void init ( IViewSite site , IMemento memento ) throws PartInitException { } public void setFocus ( ) { } public void saveState ( IMemento memento ) { } private void setBarVisibility ( final boolean visible ) { WorkbenchWindow window = ( ( WorkbenchWindow ) ( getSite ( ) . getWorkbenchWindow ( ) ) ) ; boolean layout = false ; if ( visible ) { boolean coolbarVisible = PrefUtil . getInternalPreferenceStore ( ) . getBoolean ( COOLBAR_VISIBLE ) ; boolean persBarVisible = PrefUtil . getInternalPreferenceStore ( ) . getBoolean ( PERSPECTIVEBAR_VISIBLE ) ; layout = ( coolbarVisible != ( window . getCoolBarVisible ( ) ) ) || ( persBarVisible != ( window . getPerspectiveBarVisible ( ) ) ) ; window . setCoolBarVisible ( coolbarVisible ) ; window . setPerspectiveBarVisible ( persBarVisible ) ; } else { <START_BUG> layout = ( ! ( window . getCoolBarVisible ( ) ) ) || ( ! ( window . getPerspectiveBarVisible ( ) ) ) ; <END_BUG> window . setCoolBarVisible ( false ) ; window . setPerspectiveBarVisible ( false ) ; } if ( layout ) { window . getShell ( ) . layout ( ) ; } } }

Fix:
layout = ( window . getCoolBarVisible ( ) ) || ( window . getPerspectiveBarVisible ( ) ) ;
Buggy code:
public class Version { private Version ( ) { } public static String id ( ) { <START_BUG> return "56.2" ; <END_BUG> } public static void main ( String [ ] args ) { } }

Fix:
return "4.0" ;
Buggy code:
public class SariahGameView extends View { public SariahGameView ( ) { } @ Override public void doAction ( Object obj ) { } private void startBeginQuestionView ( ) { BeginQuestionView BeginQuestion = new BeginQuestionView ( ) ; <START_BUG> BeginQuestion . displayMenu ( ) ; <END_BUG> } private void RankReport ( ) { } private void startRankReportView ( ) { } }

Fix:
BeginQuestion . display ( ) ;
Buggy code:
public class ModClusterDisable implements OperationStepHandler , DescriptionProvider { static final ModClusterDisable INSTANCE = new ModClusterDisable ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( context . getProcessType ( ) . isServer ( ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; modcluster . disable ( ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . isNormalServer ( ) ) {
Buggy code:
public class PopupMenuExtender implements IRegistryChangeListener , IMenuListener { private static final int STATIC_ACTION_READ = 1 ; private static final int INCLUDE_EDITOR_INPUT = 1 << 1 ; private final Set menuIds = new HashSet ( ) ; private final MenuManager menu ; private SubMenuManager menuWrapper ; private final ISelectionProvider selProvider ; private final IWorkbenchPart part ; private ViewerActionBuilder staticActionBuilder ; private int bitSet = 0 ; public PopupMenuExtender ( String id , MenuManager menu , ISelectionProvider prov , IWorkbenchPart part ) { } public PopupMenuExtender ( final String id , final MenuManager menu , final ISelectionProvider prov , final IWorkbenchPart part , final boolean includeEditorInput ) { } public Set getMenuIds ( ) { } public final void addMenuId ( final String menuId ) { } public final boolean matches ( final MenuManager menuManager , final ISelectionProvider selectionProvider , final IWorkbenchPart part ) { } private void addEditorActions ( IMenuManager mgr ) { } private void addObjectActions ( IMenuManager mgr ) { } private void addStaticActions ( IMenuManager mgr ) { } public void menuAboutToShow ( IMenuManager mgr ) { } private void readStaticActions ( ) { } private void testForAdditions ( ) { } public void dispose ( ) { } public void registryChanged ( final IRegistryChangeEvent event ) { Display display = Display . getDefault ( ) ; if ( ( part ) != null ) { display = part . getSite ( ) . getPage ( ) . getWorkbenchWindow ( ) . getWorkbench ( ) . getDisplay ( ) ; } IExtensionDelta [ ] deltas = event . getExtensionDeltas ( ) ; for ( int i = 0 ; i < ( deltas . length ) ; i ++ ) { IExtensionDelta delta = deltas [ i ] ; IExtensionPoint extensionPoint = delta . getExtensionPoint ( ) ; if ( ( extensionPoint . getNamespace ( ) . equals ( PI_WORKBENCH ) ) && ( extensionPoint . getSimpleIdentifier ( ) . equals ( PL_POPUP_MENU ) ) ) { boolean clearPopups = false ; IConfigurationElement [ ] elements = delta . getExtension ( ) . getConfigurationElements ( ) ; for ( int j = 0 ; j < ( elements . length ) ; j ++ ) { IConfigurationElement element = elements [ j ] ; <START_BUG> if ( element . getName ( ) . equals ( TAG_CONTRIBUTION_TYPE ) ) { <END_BUG> clearPopups = true ; break ; } } if ( clearPopups ) { display . syncExec ( new Runnable ( ) { public void run ( ) { bitSet &= ~ ( PopupMenuExtender . STATIC_ACTION_READ ) ; if ( ( staticActionBuilder ) != null ) { staticActionBuilder . dispose ( ) ; staticActionBuilder = null ; } } } ) ; } } } } }

Fix:
if ( element . getName ( ) . equals ( TAG_VIEWER_CONTRIBUTION ) ) {
Buggy code:
public class BilTest extends WMSTestSupport { public static String WCS_PREFIX = "wcs" ; public static String WCS_URI = "http:////www.opengis.net//wcs//1.1.1" ; public static QName AUS_DEM = new QName ( BilTest . WCS_URI , "Ausdem" , BilTest . WCS_PREFIX ) ; private RenderedImageMapOutputFormat rasterMapProducer ; @ Override protected void onSetUp ( SystemTestData testData ) throws Exception { super . onSetUp ( testData ) ; testData . addStyle ( "raster" , "raster.sld" , BilTest . class , getCatalog ( ) ) ; <START_BUG> testData . addRasterLayer ( BilTest . AUS_DEM , "aus_dem.tif" , "tiff" , null , BilTest . class , getCatalog ( ) ) ; <END_BUG> WMSInfo wmsInfo = getGeoServer ( ) . getService ( WMSInfo . class ) ; wmsInfo . setMaxBuffer ( 50 ) ; getGeoServer ( ) . save ( wmsInfo ) ; } @ Test public void testStandardRequest ( ) throws Exception { } @ Test public void testLargeRequest ( ) throws Exception { } protected void copySchemaFile ( String file ) throws IOException { } }

Fix:
testData . addRasterLayer ( BilTest . AUS_DEM , "aus_dem.tiff" , "tiff" , null , BilTest . class , getCatalog ( ) ) ;
Buggy code:
public class TestMatchActivity extends ActionBarActivity implements SensorEventListener , View . OnClickListener { private Player player1 ; private CardDeck callableCardDeck ; private ArrayList < Card > stackedCards ; private Card playedCard ; private Card calledCard ; private Card flippedCard ; private boolean cardFlipped ; private View selectedPlayerCard ; private View selectedCallableCard ; private SensorManager senSensorManager ; private Sensor senAccelerometer ; private long lastUpdate = 0 ; private float last_x ; private float last_y ; private float last_z ; private static final int SHAKE_THRESHOLD = 1600 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void renderPlayerCards ( ) { } public void renderCallableCards ( ) { if ( ( this . calledCard ) != null ) { Card [ ] tempCardDeck = this . callableCardDeck . getCardDeck ( ) ; ArrayList < Card > storeCallableCards = new ArrayList < > ( 15 ) ; findViewById ( callableText ) . setVisibility ( VISIBLE ) ; <START_BUG> for ( int i = 0 ; i < ( ( tempCardDeck . length ) - 1 ) ; i ++ ) { <END_BUG> if ( ( ! ( tempCardDeck [ i ] . getTag ( ) . substring ( 1 ) . equals ( this . calledCard . getTag ( ) . substring ( 1 ) ) ) ) && ( ( tempCardDeck [ i ] . getValue ( ) . equals ( this . calledCard . getValue ( ) ) ) || ( tempCardDeck [ i ] . getType ( ) . equals ( this . calledCard . getType ( ) ) ) ) ) { tempCardDeck [ i ] . getImageView ( ) . setY ( 0 ) ; storeCallableCards . add ( tempCardDeck [ i ] ) ; } } ViewGroup callableCardContainer = ( ( ViewGroup ) ( findViewById ( callableCardContainer ) ) ) ; callableCardContainer . removeAllViews ( ) ; DisplayMetrics displayMetrics = getResources ( ) . getDisplayMetrics ( ) ; int maxHeight = displayMetrics . heightPixels ; int offsetY = 0 ; int moveY = ( maxHeight - 320 ) // ( storeCallableCards . size ( ) ) ; if ( moveY > 40 ) moveY = 40 ; Collections . sort ( storeCallableCards ) ; Iterator iterator = storeCallableCards . iterator ( ) ; while ( iterator . hasNext ( ) ) { ImageView crrntImgView = ( ( Card ) ( iterator . next ( ) ) ) . getImageView ( ) ; crrntImgView . setY ( ( ( crrntImgView . getY ( ) ) + offsetY ) ) ; offsetY = offsetY + moveY ; crrntImgView . setOnClickListener ( this ) ; crrntImgView . setClickable ( true ) ; callableCardContainer . addView ( crrntImgView ) ; } } } public void playCard ( View v ) { } public void pickUpCards ( View v ) { } public void flipCard ( View v ) { } public boolean validCard ( ) { } public void toggleSelectPlayerCard ( View v ) { } public void toggleSelectCallableCard ( View v ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onClick ( View v ) { } @ Override public void onSensorChanged ( SensorEvent sensorEvent ) { } @ Override public void onAccuracyChanged ( Sensor sensor , int accuracy ) { } protected void onPause ( ) { } protected void onResume ( ) { } No newline ; at end ; of file ; }

Fix:
for ( int i = 0 ; i < ( tempCardDeck . length ) ; i ++ ) {
Buggy code:
public class ChessBoard { private Player player1 ; private Player player2 ; ChessBoard ( ) { } public void updateLocation ( String whiteMove , String blackMove ) { player1 . nextMove ( whiteMove ) ; if ( whiteMove . contains ( "x" ) ) { player2 . setCapture ( whiteMove ) ; } player2 . nextMove ( blackMove ) ; if ( blackMove . contains ( "x" ) ) { <START_BUG> player2 . setCapture ( blackMove ) ; <END_BUG> } } public static void main ( String [ ] args ) { } }

Fix:
player1 . setCapture ( blackMove ) ;
Buggy code:
public class CollectionProperty extends MultiProperty { private static final long serialVersionUID = 221L ; private Collection < JMeterProperty > value ; private transient Collection < JMeterProperty > savedValue ; public CollectionProperty ( String name , Collection < ? > value ) { } public CollectionProperty ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } public void remove ( String prop ) { } public void set ( int index , String prop ) { } public void set ( int index , JMeterProperty prop ) { } public JMeterProperty get ( int row ) { } public void remove ( int index ) { } public void setObjectValue ( Object v ) { } @ Override public PropertyIterator iterator ( ) { } public String getStringValue ( ) { } public Object getObjectValue ( ) { } public int size ( ) { } @ Override public CollectionProperty clone ( ) { } private Collection < JMeterProperty > cloneCollection ( ) { } public void setCollection ( Collection < ? > coll ) { } @ Override public void clear ( ) { } @ Override public void addProperty ( JMeterProperty prop ) { } public void addItem ( Object item ) { } @ Override protected Class < ? extends JMeterProperty > getPropertyType ( ) { <START_BUG> if ( ( value . size ( ) ) > 0 ) { <END_BUG> return value . iterator ( ) . next ( ) . getClass ( ) ; } return NullProperty . class ; } public void recoverRunningVersion ( TestElement owner ) { } @ Override public void setRunningVersion ( boolean running ) { } }

Fix:
if ( ( ( value ) != null ) && ( ( value . size ( ) ) > 0 ) ) {
Buggy code:
<START_BUG> public class PageExpiredErrorPage extends WebPage < Object > { <END_BUG> private static final long serialVersionUID = 1L ; public PageExpiredErrorPage ( ) { } @ Override protected void configureResponse ( ) { super . configureResponse ( ) ; getWebRequestCycle ( ) . getWebResponse ( ) . getHttpServletResponse ( ) . setStatus ( SC_NOT_FOUND ) ; } @ Override public boolean isVersioned ( ) { } @ Override public boolean isErrorPage ( ) { } }

Fix:
public class PageExpiredErrorPage extends WebPage {
Buggy code:
public class StaticContentStep extends WizardStep < String > { private static final long serialVersionUID = 1L ; private final boolean allowHtml ; private IModel < String > content ; public StaticContentStep ( boolean allowHtml ) { } public StaticContentStep ( IModel < String > title , IModel < String > summary , IModel < String > content , boolean allowHtml ) { } public StaticContentStep ( IModel < String > title , IModel < String > summary , String content , boolean allowHtml ) { } public StaticContentStep ( String title , String summary , IModel < String > content , boolean allowHtml ) { } public StaticContentStep ( String title , String summary , String content , boolean allowHtml ) { } public final boolean getAllowHtml ( ) { } public final String getContent ( ) { <START_BUG> return ( content ) != null ? ( ( String ) ( content . getObject ( null ) ) ) : null ; <END_BUG> } public final IModel < String > getContentModel ( ) { } public final void setContentModel ( IModel < String > content ) { } @ Override protected void populate ( Panel contentPanel ) { } }

Fix:
return ( content ) != null ? ( ( String ) ( content . getObject ( ) ) ) : null ;
Buggy code:
@ Repository public class DomainSearchByNsIpStrategy extends AbstractDomainSearchStrategy { protected static final Logger LOGGER = LoggerFactory . getLogger ( DomainSearchByNsIpStrategy . class ) ; @ Override public boolean support ( QueryParam queryParam ) { } @ Override public Long searchCount ( QueryParam queryParam , JdbcTemplate jdbcTemplate ) { } @ Override public List < Domain > search ( QueryParam queryParam , JdbcTemplate jdbcTemplate ) { DomainSearchParam domainQueryParam = ( ( DomainSearchParam ) ( queryParam ) ) ; List < Domain > result = null ; final PageBean page = domainQueryParam . getPageBean ( ) ; int startPage = ( page . getCurrentPage ( ) ) - 1 ; startPage = ( startPage >= 0 ) ? startPage : 0 ; final long startRow = startPage * ( page . getMaxRecords ( ) ) ; String ipPrefix = domainQueryParam . getQ ( ) ; IpVersion ipVersion = IpUtil . getIpVersionOfIp ( ipPrefix ) ; final byte [ ] ipBytes = IpUtil . ipToByteArray ( ipPrefix , ipVersion ) ; DomainQueryDaoImpl domainDao = new DomainQueryDaoImpl ( ) ; final String sql = "SELECT<seq2seq4repair_space>distinct<seq2seq4repair_space>domain.*,status.*<seq2seq4repair_space>FROM<seq2seq4repair_space>RDAP_DOMAIN<seq2seq4repair_space>domain<seq2seq4repair_space>" + ( ( ( ( "<seq2seq4repair_space>INNER<seq2seq4repair_space>JOIN<seq2seq4repair_space>REL_DOMAIN_NAMESERVER<seq2seq4repair_space>rel<seq2seq4repair_space>" + "<seq2seq4repair_space>ON<seq2seq4repair_space>domain.DOMAIN_ID<seq2seq4repair_space>=<seq2seq4repair_space>rel.DOMAIN_ID<seq2seq4repair_space>" ) + "<seq2seq4repair_space>INNER<seq2seq4repair_space>JOIN<seq2seq4repair_space>RDAP_NAMESERVER_IP<seq2seq4repair_space>nsip<seq2seq4repair_space>" ) + "<seq2seq4repair_space>ON<seq2seq4repair_space>rel.NAMESERVER_ID<seq2seq4repair_space>=<seq2seq4repair_space>nsip.NAMESERVER_ID<seq2seq4repair_space>" ) + "<seq2seq4repair_space>where<seq2seq4repair_space>nsip.IP<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>domain.LDH_NAME<seq2seq4repair_space>limit<seq2seq4repair_space>?,?" ) ; result = jdbcTemplate . query ( new PreparedStatementCreator ( ) { public PreparedStatement createPreparedStatement ( Connection connection ) throws SQLException { PreparedStatement ps = connection . prepareStatement ( sql ) ; ps . setBytes ( 1 , ipBytes ) ; ps . setLong ( 2 , startRow ) ; ps . setLong ( 3 , page . getMaxRecords ( ) ) ; return ps ; } } , domainDao . new DomainWithStatusResultSetExtractor ( ) ) ; for ( Domain domain : result ) { <START_BUG> domainDao . queryDomainStatus ( domain ) ; <END_BUG> } return result ; } }

Fix:
domainDao . queryDomainStatus ( domain , jdbcTemplate ) ;
Buggy code:
public class Int2FloatOpenHash implements Externalizable { protected static final byte FREE = 0 ; protected static final byte FULL = 1 ; protected static final byte REMOVED = 2 ; private static final float DEFAULT_LOAD_FACTOR = 0.7F ; private static final float DEFAULT_GROW_FACTOR = 2.0F ; protected final transient float _loadFactor ; protected final transient float _growFactor ; protected int _used = 0 ; protected int _threshold ; protected float defaultReturnValue = - 1.0F ; protected int [ ] _keys ; protected float [ ] _values ; protected byte [ ] _states ; protected Int2FloatOpenHash ( int size , float loadFactor , float growFactor , boolean forcePrime ) { } public Int2FloatOpenHash ( int size , float loadFactor , float growFactor ) { } public Int2FloatOpenHash ( int size ) { } public Int2FloatOpenHash ( ) { } public void defaultReturnValue ( float v ) { } public boolean containsKey ( int key ) { } public float get ( int key ) { } public float put ( int key , float value ) { } protected boolean isFree ( int index , int key ) { } protected boolean preAddEntry ( int index ) { } protected int findKey ( int key ) { } public float remove ( int key ) { } public int size ( ) { } public void clear ( ) { } public Int2FloatOpenHash . IMapIterator entries ( ) { } @ Override public String toString ( ) { } protected void ensureCapacity ( int newCapacity ) { } private void rehash ( int newCapacity ) { } private static int keyHash ( int key ) { } public void writeExternal ( ObjectOutput out ) throws IOException { } public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { this . _threshold = in . readInt ( ) ; this . _used = in . readInt ( ) ; int keylen = in . readInt ( ) ; int [ ] keys = new int [ keylen ] ; float [ ] values = new float [ keylen ] ; byte [ ] states = new byte [ keylen ] ; for ( int i = 0 ; i < ( _used ) ; i ++ ) { int k = in . readInt ( ) ; float v = in . readFloat ( ) ; int hash = Int2FloatOpenHash . keyHash ( k ) ; int keyIdx = hash % keylen ; if ( ( states [ keyIdx ] ) != ( Int2FloatOpenHash . FREE ) ) { int decr = 1 + ( hash % ( keylen - 2 ) ) ; for ( ; ; ) { keyIdx -= decr ; <START_BUG> if ( i < 0 ) { <END_BUG> keyIdx += keylen ; } if ( ( states [ keyIdx ] ) == ( Int2FloatOpenHash . FREE ) ) { break ; } } } states [ keyIdx ] = Int2FloatOpenHash . FULL ; keys [ keyIdx ] = k ; values [ keyIdx ] = v ; } this . _keys = keys ; this . _values = values ; this . _states = states ; } public interface IMapIterator { public boolean hasNext ( ) { } public int next ( ) { } public int getKey ( ) { } public float getValue ( ) { } } private final class MapIterator implements Int2FloatOpenHash . IMapIterator { int nextEntry ; int lastEntry = - 1 ; MapIterator ( ) { } int nextEntry ( int index ) { } public boolean hasNext ( ) { } public int next ( ) { } public int getKey ( ) { } public float getValue ( ) { } } }

Fix:
if ( keyIdx < 0 ) {
Buggy code:
public class PrintMe { public static void main ( String [ ] args ) throws Exception { RuleStore ruleStore = new SimpleRuleStore ( ) ; ruleStore . addRule ( new Pattern ( "*//foo" ) , new NOPAction ( ) ) ; Interpreter ji = new Interpreter ( ruleStore ) ; <START_BUG> ji . addImplcitAction ( new PrintMeImplicitAction ( ) ) ; <END_BUG> SAXParserFactory spf = SAXParserFactory . newInstance ( ) ; SAXParser saxParser = spf . newSAXParser ( ) ; saxParser . parse ( args [ 0 ] , ji ) ; List errorList = ji . getExecutionContext ( ) . getErrorList ( ) ; if ( ( errorList . size ( ) ) > 0 ) { System . out . println ( "The<seq2seq4repair_space>following<seq2seq4repair_space>errors<seq2seq4repair_space>occured:" ) ; for ( int i = 0 ; i < ( errorList . size ( ) ) ; i ++ ) { System . out . println ( ( "\t" + ( errorList . get ( i ) ) ) ) ; } } } }

Fix:
ji . addImplicitAction ( new PrintMeImplicitAction ( ) ) ;
Buggy code:
public class Ilasm extends org . apache . tools . ant . taskdefs . MatchingTask { protected static final String exe_name = "ilasm" ; protected static final String file_ext = "il" ; protected static final String file_pattern = "**//*." + ( Ilasm . file_ext ) ; protected static final String exe_title = "ilasm" ; protected boolean _debug ; protected String _extraOptions ; protected boolean _failOnError ; protected boolean _listing ; protected File _outputFile ; protected File _resourceFile ; protected String _targetType ; protected boolean _verbose ; private File _keyfile ; private File _srcDir ; public Ilasm ( ) { } public void setDebug ( boolean f ) { } public void setExtraOptions ( String extraOptions ) { } public void setFailOnError ( boolean b ) { } public void setKeyfile ( File keyfile ) { } public void setListing ( boolean b ) { } public void setOutputFile ( File params ) { } public void setOwner ( String s ) { } public void setResourceFile ( File fileName ) { } public void setSrcDir ( File srcDirName ) { } public void setTargetType ( String targetType ) throws BuildException { } public void setVerbose ( boolean b ) { } public boolean getDebug ( ) { } public String getExtraOptions ( ) { } public boolean getFailFailOnError ( ) { } public String getTargetType ( ) { } public void Clear ( ) { } public void execute ( ) throws BuildException { if ( ( _srcDir ) == null ) <START_BUG> _srcDir = project . resolveFile ( "." ) ; <END_BUG> DirectoryScanner scanner = super . getDirectoryScanner ( _srcDir ) ; String [ ] dependencies = scanner . getIncludedFiles ( ) ; log ( ( ( ( "assembling<seq2seq4repair_space>" + ( dependencies . length ) ) + "<seq2seq4repair_space>file" ) + ( ( dependencies . length ) == 1 ? "" : "s" ) ) ) ; String baseDir = scanner . getBasedir ( ) . toString ( ) ; for ( int i = 0 ; i < ( dependencies . length ) ; i ++ ) { String targetFile = dependencies [ i ] ; targetFile = ( baseDir + ( File . separator ) ) + targetFile ; executeOneFile ( targetFile ) ; } } public void executeOneFile ( String targetFile ) throws BuildException { } protected String getDebugParameter ( ) { } protected String getExtraOptionsParameter ( ) { } protected String getKeyfileParameter ( ) { } protected String getListingParameter ( ) { } protected String getOutputFileParameter ( ) { } protected String getResourceFileParameter ( ) { } protected String getTargetTypeParameter ( ) { } protected String getVerboseParameter ( ) { } protected boolean notEmpty ( String s ) { } }

Fix:
_srcDir = resolveFile ( "." ) ;
Buggy code:
public class DumpArchiveInputStream extends ArchiveInputStream { private DumpArchiveSummary summary ; private DumpArchiveEntry active ; private boolean isClosed ; private boolean hasHitEOF ; private long entrySize ; private long entryOffset ; private int readIdx ; private byte [ ] readBuf = new byte [ DumpArchiveConstants . TP_SIZE ] ; private byte [ ] blockBuffer ; private int recordOffset ; private long filepos ; protected TapeInputStream raw ; private Map < Integer , Dirent > names = new HashMap < Integer , Dirent > ( ) ; private Map < Integer , DumpArchiveEntry > pending = new HashMap < Integer , DumpArchiveEntry > ( ) ; private Queue < DumpArchiveEntry > queue ; public DumpArchiveInputStream ( InputStream is ) throws ArchiveException { } public DumpArchiveSummary getSummary ( ) { } private void readCLRI ( ) throws IOException { } private void readBITS ( ) throws IOException { } public DumpArchiveEntry getNextDumpEntry ( ) throws IOException { } @ Override public DumpArchiveEntry getNextEntry ( ) throws IOException { } private void readDirectoryEntry ( DumpArchiveEntry entry ) throws IOException { } private String getPath ( DumpArchiveEntry entry ) { } @ Override public int read ( byte [ ] buf , int off , int len ) throws IOException { } @ Override public void close ( ) throws IOException { } public static boolean matches ( byte [ ] buffer , int length ) { if ( length < 32 ) { return false ; } if ( length >= ( DumpArchiveConstants . TP_SIZE ) ) { return DumpArchiveUtil . verify ( buffer ) ; } <START_BUG> return ( DumpArchiveConstants . NFS_MAGIC ) == ( DumpArchiveUtil . convert32 ( buffer , 7 ) ) ; <END_BUG> } private class CountingStream extends FilterInputStream { private CountingStream ( final InputStream in ) { } @ Override public int read ( ) throws IOException { } @ Override public int read ( byte [ ] b ) throws IOException { } @ Override public int read ( byte [ ] b , int off , int len ) throws IOException { } } }

Fix:
return ( DumpArchiveConstants . NFS_MAGIC ) == ( DumpArchiveUtil . convert32 ( buffer , 24 ) ) ;
Buggy code:
public class Color { float [ ] colors ; public Color ( ) { } public Color ( int red , int green , int blue , int alpha ) { } public Color ( int argb ) { } public Color ( float red , float green , float blue , float alpha ) { } public float getR ( ) { } public float getG ( ) { } public float getB ( ) { } public float getA ( ) { } public int getARGB ( ) { <START_BUG> return ( ( ( ( ( ( int ) ( ( colors [ 3 ] ) * 256 ) ) & 255 ) << 24 ) | ( ( ( ( int ) ( ( colors [ 0 ] ) * 256 ) ) & 255 ) << 16 ) ) | ( ( ( ( int ) ( ( colors [ 1 ] ) * 256 ) ) & 255 ) << 8 ) ) | ( ( ( int ) ( ( colors [ 2 ] ) * 256 ) ) & 255 ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return ( ( ( ( ( ( int ) ( ( colors [ 3 ] ) * 255 ) ) & 255 ) << 24 ) | ( ( ( ( int ) ( ( colors [ 0 ] ) * 255 ) ) & 255 ) << 16 ) ) | ( ( ( ( int ) ( ( colors [ 1 ] ) * 255 ) ) & 255 ) << 8 ) ) | ( ( ( int ) ( ( colors [ 2 ] ) * 255 ) ) & 255 ) ;
Buggy code:
public class XmlContentAssertionTests { private static final String PEOPLE_XML = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"<seq2seq4repair_space>standalone=\"yes\"?>" + ( ( ( ( ( "<people><composers>" + "<composer><name>Johann<seq2seq4repair_space>Sebastian<seq2seq4repair_space>Bach<//name><someBoolean>false<//someBoolean><someDouble>21.0<//someDouble><//composer>" ) + "<composer><name>Johannes<seq2seq4repair_space>Brahms<//name><someBoolean>false<//someBoolean><someDouble>0.0025<//someDouble><//composer>" ) + "<composer><name>Edvard<seq2seq4repair_space>Grieg<//name><someBoolean>false<//someBoolean><someDouble>1.6035<//someDouble><//composer>" ) + "<composer><name>Robert<seq2seq4repair_space>Schumann<//name><someBoolean>false<//someBoolean><someDouble>NaN<//someDouble><//composer>" ) + "<//composers><//people>" ) ; private MockMvc mockMvc ; @ Before public void setup ( ) { <START_BUG> this . mockMvc = standaloneSetup ( new XmlContentAssertionTests . MusicController ( ) ) . defaultRequest ( get ( "//" ) . accept ( APPLICATION_XML ) ) . alwaysExpect ( status ( ) . isOk ( ) ) . alwaysExpect ( content ( ) . mimeType ( APPLICATION_XML ) ) . build ( ) ; <END_BUG> } @ Test public void testXmlEqualTo ( ) throws Exception { } @ Test public void testNodeHamcrestMatcher ( ) throws Exception { } @ Controller private static class MusicController { @ RequestMapping ( "//music//people" ) @ ResponseBody public XmlContentAssertionTests . PeopleWrapper getPeople ( ) { } } @ SuppressWarnings ( "unused" ) @ XmlRootElement ( name = "people" ) @ XmlAccessorType ( XmlAccessType . FIELD ) private static class PeopleWrapper { @ XmlElementWrapper ( name = "composers" ) @ XmlElement ( name = "composer" ) private List < Person > composers ; public PeopleWrapper ( ) { } public PeopleWrapper ( List < Person > composers ) { } public List < Person > getComposers ( ) { } } }

Fix:
this . mockMvc = standaloneSetup ( new XmlContentAssertionTests . MusicController ( ) ) . defaultRequest ( get ( "//" ) . accept ( APPLICATION_XML ) ) . alwaysExpect ( status ( ) . isOk ( ) ) . alwaysExpect ( content ( ) . contentType ( APPLICATION_XML ) ) . build ( ) ;
Buggy code:
public class ConnectionFactoryAdd extends AbstractAddStepHandler { public static final ConnectionFactoryAdd INSTANCE = new ConnectionFactoryAdd ( ) ; protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { <START_BUG> AlternativeAttributeCheckHandler . checkAlternatives ( operation , CONNECTOR . getName ( ) , DISCOVERY_GROUP_NAME . getName ( ) ) ; <END_BUG> for ( final AttributeDefinition attribute : ConnectionFactoryDefinition . ATTRIBUTES ) { attribute . validateAndSet ( operation , model ) ; } } protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } static ConnectionFactoryConfiguration createConfiguration ( final OperationContext context , final String name , final ModelNode model ) throws OperationFailedException { } }

Fix:
AlternativeAttributeCheckHandler . checkAlternatives ( operation , CONNECTOR . getName ( ) , DISCOVERY_GROUP_NAME . getName ( ) , false ) ;