nus-yam/ex-repair huggingface dataset:
Buggy code:
public class WorkingSet extends AbstractWorkingSet { private String editPageId ; public WorkingSet ( String name , String uniqueId , IAdaptable [ ] elements ) { } WorkingSet ( String name , String label , IMemento memento ) { } public boolean equals ( Object object ) { if ( ( this ) == object ) { return true ; } if ( object instanceof WorkingSet ) { WorkingSet workingSet = ( ( WorkingSet ) ( object ) ) ; <START_BUG> return ( ( Util . equals ( workingSet . getLabel ( ) , getLabel ( ) ) ) && ( Util . equals ( workingSet . getElementsArray ( ) , getElementsArray ( ) ) ) ) && ( Util . equals ( workingSet . getId ( ) , getId ( ) ) ) ; <END_BUG> } return false ; } public boolean isEditable ( ) { } public String getId ( ) { } public ImageDescriptor getImage ( ) { } public int hashCode ( ) { } void restoreWorkingSet ( ) { } public void saveState ( IMemento memento ) { } public void setElements ( IAdaptable [ ] newElements ) { } public void setId ( String pageId ) { } public boolean isVisible ( ) { } public boolean isSelfUpdating ( ) { } public boolean isAggregateWorkingSet ( ) { } }

Fix:
return ( ( Util . equals ( workingSet . getName ( ) , getName ( ) ) ) && ( Util . equals ( workingSet . getElementsArray ( ) , getElementsArray ( ) ) ) ) && ( Util . equals ( workingSet . getId ( ) , getId ( ) ) ) ;
Buggy code:
public class ResponsiveUI { private static final int NTASKS = 10 ; public static void main ( String [ ] args ) throws InterruptedException { } public static void printFinishedTasks ( TaskReport taskReport ) { String finishedList = taskReport . toString ( ) ; <START_BUG> if ( finishedList != "" ) <END_BUG> System . out . println ( ( "Finished<seq2seq4repair_space>tasks:<seq2seq4repair_space>" + finishedList ) ) ; } }

Fix:
if ( ! ( finishedList . equals ( "" ) ) )
Buggy code:
@ SuppressWarnings ( "unchecked" ) public final class EntityResolutionScript extends AbstractDoubleSearchScript { private static final String FIELDS = "fields" ; private static final String COMPARATOR = "comparator" ; private static final String CLEANERS = "cleaners" ; private static final String PARAMS = "params" ; private static final String NAME = "name" ; private static final String HIGH = "high" ; private static final String LOW = "low" ; private static final double AVERAGE_SCORE = 0.5 ; private final Cache < String , HashMap < String , HashMap < String , Object > > > cache ; private final Client client ; private Record comparedRecord ; private Map < String , HashMap < String , Object > > entityParams ; private EntityResolutionScript ( final Map < String , Object > params , final Cache < String , HashMap < String , HashMap < String , Object > > > aCache , final Client aClient ) { } private static List < Cleaner > getCleaners ( final List < Map < String , String > > cleanersList ) { } private static void setParams ( Object anObject , Object params ) { } private static Comparator getComparator ( final Map < String , Object > value ) { } private static String getFieldValue ( final Object field ) { } private static double compare ( final Record r1 , final Record r2 , final Map < String , HashMap < String , Object > > params ) { } private static double computeProb ( Collection < String > vs1 , Collection < String > vs2 , Comparator comp , List < Cleaner > cleanersList , Double max , Double min ) { } private static double compare ( final String v1 , final String v2 , final double high , final double low , final Comparator comparator ) { if ( comparator == null ) { return EntityResolutionScript . AVERAGE_SCORE ; } double sim = comparator . compare ( v1 , v2 ) ; <START_BUG> if ( sim < ( EntityResolutionScript . AVERAGE_SCORE ) ) { <END_BUG> return low ; } else { return ( ( high - ( EntityResolutionScript . AVERAGE_SCORE ) ) * ( sim * sim ) ) + ( EntityResolutionScript . AVERAGE_SCORE ) ; } } @ Override public void setScorer ( Scorer scorer ) { } private Record configureWithFieldsAndConfiguration ( final Map < String , Object > configuration , final List < Map < String , Object > > fields ) { } private void readFields ( List < Map < String , Object > > fields , Map < String , Collection < String > > props ) { } private Record configureWithFieldsOnly ( final List < Map < String , Object > > fieldsParams ) { } @ Override public double runAsDouble ( ) { } public static class Factory extends AbstractComponent implements NativeScriptFactory { private final Node node ; private final Cache < String , HashMap < String , HashMap < String , Object > > > cache ; @ Inject public Factory ( final Node aNode , final Settings settings ) { } @ Override public final ExecutableScript newScript ( @ Nullable final Map < String , Object > params ) { } } }

Fix:
if ( sim < low ) {
Buggy code:
public class DelayedStreamContainerFlowRegistry { static Logger2 log = Logger2 . getLogger ( Coordinator . class ) ; Coordinator coordinator ; public DelayedStreamContainerFlowRegistry ( Coordinator coordinator ) { } Map < String , DelayedStreamContainerFlowRegistry . ContainerFlag > containerFlagMap = new ConcurrentHashMap < String , DelayedStreamContainerFlowRegistry . ContainerFlag > ( ) ; Map < Long , DelayedStreamContainerFlowRegistry . ContainerFlowFlag > containerFlowFlagSet = new ConcurrentHashMap < Long , DelayedStreamContainerFlowRegistry . ContainerFlowFlag > ( ) ; public void delayNewStreamContainerFlow ( StreamContainerFlow scf ) { } public void checkContainerAppeared ( InstanceStat [ ] insStats ) { } public void registStreamContainerFlow ( DelayedStreamContainerFlowRegistry . ContainerFlowFlag cff ) { DelayedStreamContainerFlowRegistry . log . debug ( ( "regist<seq2seq4repair_space>StreamContainerFlow<seq2seq4repair_space>with<seq2seq4repair_space>eqlId=" + ( cff . eqlId ) ) ) ; streamContainersLock . writeLock ( ) . lock ( ) ; for ( DelayedStreamContainerFlowRegistry . ContainerFlag cf : cff . containerFlags ) { containerFlagMap . remove ( cf . getContainerName ( ) ) ; coordinator . addToExistedStreamContainer ( cf . container ) ; cf . containerFlowFlag = null ; } <START_BUG> streamContainersLock . writeLock ( ) . lock ( ) ; <END_BUG> containerFlowFlagSet . remove ( cff . eqlId ) ; cff . containerFlags = null ; } class ContainerFlowFlag { long eqlId ; DelayedStreamContainerFlowRegistry . ContainerFlag [ ] containerFlags ; AtomicInteger appearedCount = new AtomicInteger ( 0 ) ; public ContainerFlowFlag ( long eqlId , List < StreamContainer > containerList ) { } public boolean allAppeared ( ) { } public void incAppearedCount ( ) { } } class ContainerFlag { DelayedStreamContainerFlowRegistry . ContainerFlowFlag containerFlowFlag ; StreamContainer container ; AtomicBoolean appeared = new AtomicBoolean ( false ) ; public ContainerFlag ( StreamContainer container , DelayedStreamContainerFlowRegistry . ContainerFlowFlag cntFlowFlag ) { } public boolean markAppeared ( ) { } public String getContainerName ( ) { } } }

Fix:
streamContainersLock . writeLock ( ) . unlock ( ) ;
Buggy code:
public abstract class TypeReference extends Expression { public TypeBinding binding ; public TypeReference ( ) { } public void aboutToResolve ( Scope scope ) { } public static final TypeReference baseTypeReference ( int baseType , int dim ) { } public abstract TypeReference copyDims ( int dim ) { } public int dimensions ( ) { } public abstract TypeBinding getTypeBinding ( Scope scope ) { } public abstract char [ ] [ ] getTypeName ( ) { } public boolean isTypeReference ( ) { } public TypeBinding resolveType ( BlockScope scope ) { constant = NotAConstant ; if ( ( binding ) != null ) { if ( ! ( binding . isValidBinding ( ) ) ) return null ; } else { binding = getTypeBinding ( scope ) ; if ( ! ( binding . isValidBinding ( ) ) ) { scope . problemReporter ( ) . invalidType ( this , binding ) ; return null ; } if ( isTypeUseDeprecated ( binding , scope ) ) scope . problemReporter ( ) . deprecatedType ( binding , this ) ; } <START_BUG> return binding ; <END_BUG> } public abstract void traverse ( IAbstractSyntaxTreeVisitor visitor , ClassScope classScope ) { } }

Fix:
return this . expressionType = binding ;
Buggy code:
<START_BUG> public class HTTPAcceptorAdd extends HornetQReloadRequiredHandlers . AddStepHandler { <END_BUG> public static final HTTPAcceptorAdd INSTANCE = new HTTPAcceptorAdd ( ) ; private HTTPAcceptorAdd ( ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { super . performRuntime ( context , operation , model , verificationHandler , newControllers ) ; PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; String hornetqServerName = address . getElement ( ( ( address . size ( ) ) - 2 ) ) . getValue ( ) ; String acceptorName = address . getLastElement ( ) . getValue ( ) ; final ModelNode fullModel = Tools . readModel ( context . readResource ( EMPTY_ADDRESS ) ) ; launchServices ( context , hornetqServerName , acceptorName , fullModel , verificationHandler , newControllers ) ; } void launchServices ( OperationContext context , String hornetqServerName , String acceptorName , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } }

Fix:
public class HTTPAcceptorAdd extends TransportConfigOperationHandlers . BasicTransportConfigAdd {
Buggy code:
public class JAXRSubsystemParser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > { @ Override public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > operations ) throws XMLStreamException { } private void readElement1_0 ( XMLExtendedStreamReader reader , List < ModelNode > operations ) throws XMLStreamException { } private void readElement1_1 ( XMLExtendedStreamReader reader , List < ModelNode > operations ) throws XMLStreamException { } private void parseBinding1_0 ( XMLExtendedStreamReader reader , ModelNode addOp ) throws XMLStreamException { } private void parseBinding1_1 ( XMLExtendedStreamReader reader , ModelNode addOp ) throws XMLStreamException { String jndiName = null ; int count = reader . getAttributeCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { requireNoNamespaceAttribute ( reader , i ) ; final String attrValue = reader . getAttributeValue ( i ) ; final Attribute attribute = Attribute . forName ( reader . getAttributeLocalName ( i ) ) ; switch ( attribute ) { case JNDI_NAME : { jndiName = attrValue ; JAXRSubsystemRootResource . CONNECTION_FACTORY_ATTRIBUTE . parseAndSetParameter ( jndiName , addOp , reader ) ; break ; } case CLASS : { <START_BUG> JAXRSubsystemRootResource . CONNECTION_FACTORY_IMPL_ATTRIBUTE . parseAndSetParameter ( jndiName , addOp , reader ) ; <END_BUG> break ; } default : throw unexpectedAttribute ( reader , i ) ; } } if ( jndiName == null ) { throw missingRequired ( reader , Collections . singleton ( JNDI_NAME ) ) ; } requireNoContent ( reader ) ; } private List < ModelNode > parseProperties ( XMLExtendedStreamReader reader , PathAddress address ) throws XMLStreamException { } private ModelNode parseProperty ( XMLExtendedStreamReader reader , PathAddress parent ) throws XMLStreamException { } private List < ModelNode > parseJuddiServer ( XMLExtendedStreamReader reader , PathAddress parent ) throws XMLStreamException { } }

Fix:
JAXRSubsystemRootResource . CONNECTION_FACTORY_IMPL_ATTRIBUTE . parseAndSetParameter ( attrValue , addOp , reader ) ;
Buggy code:
public final class NonBlockingServer implements IServer { private static final Logger log = Logger . getLogger ( NonBlockingServer . class ) ; private boolean enableTcpNoDelay = false ; private ServerSocketChannel serverSocket ; SelectorManager selectorManager ; TrunkInvoker optimizedInvoker ; private WorkManager workManager ; public ServerSocket bind ( TrunkInvoker optimizedInvoker , InetAddress address , int port , int connectBackLog , boolean enableTcpNoDelay , WorkManager workManager ) throws IOException { } public void start ( ) throws IOException { } public void stop ( ) throws IOException { } class AcceptConnectionAction implements SelectionAction { public void service ( SelectionKey selection ) { if ( ! ( selection . isAcceptable ( ) ) ) return ; ServerSocketChannel server = ( ( ServerSocketChannel ) ( selection . channel ( ) ) ) ; try { if ( NonBlockingServer . log . isTraceEnabled ( ) ) NonBlockingServer . log . trace ( "Accepting<seq2seq4repair_space>client<seq2seq4repair_space>connection" ) ; SocketChannel client = server . accept ( ) ; NonBlockingSocketTrunk trunk = new NonBlockingSocketTrunk ( client , selectorManager . getSelector ( ) ) ; CommTrunkRamp trunkRamp = new CommTrunkRamp ( trunk , workManager ) ; trunk . setCommTrunkRamp ( trunkRamp ) ; <START_BUG> trunkRamp . setTrunkListner ( optimizedInvoker ) ; <END_BUG> trunk . start ( ) ; } catch ( IOException e ) { NonBlockingServer . log . debug ( "Error<seq2seq4repair_space>establishing<seq2seq4repair_space>connection<seq2seq4repair_space>with<seq2seq4repair_space>client:<seq2seq4repair_space>" , e ) ; } } } }

Fix:
trunkRamp . setTrunkListener ( optimizedInvoker ) ;
Buggy code:
public class SubjectDoAsHandler implements HttpHandler { private final HttpHandler wrapped ; public SubjectDoAsHandler ( final HttpHandler toWrap ) { } @ Override public void handleRequest ( final HttpServerExchange exchange ) throws Exception { <START_BUG> final SecurityContext securityContext = exchange . getAttachment ( ATTACHMENT_KEY ) ; <END_BUG> final Subject useSubject ; if ( securityContext != null ) { final Account account = securityContext . getAuthenticatedAccount ( ) ; if ( account instanceof SubjectAccount ) { useSubject = ( ( SubjectAccount ) ( account ) ) . getSubject ( ) ; } else { useSubject = new Subject ( ) ; } } else { useSubject = new Subject ( ) ; } handleRequest ( exchange , useSubject ) ; } void handleRequest ( final HttpServerExchange exchange , final Subject subject ) throws Exception { } }

Fix:
final SecurityContext securityContext = exchange . getSecurityContext ( ) ;
Buggy code:
public class TestWordDelimiterFilter extends BaseTokenStreamTestCase { @ Test public void testOffsets ( ) throws IOException { } @ Test public void testOffsetChange ( ) throws Exception { } @ Test public void testOffsetChange2 ( ) throws Exception { } @ Test public void testOffsetChange3 ( ) throws Exception { } @ Test public void testOffsetChange4 ( ) throws Exception { } public void doSplit ( final String input , String ... output ) throws Exception { } @ Test public void testSplits ( ) throws Exception { } public void doSplitPossessive ( int stemPossessive , final String input , final String ... output ) throws Exception { } @ Test public void testPossessives ( ) throws Exception { } private final class LargePosIncTokenFilter extends TokenFilter { private CharTermAttribute termAtt = addAttribute ( CharTermAttribute . class ) ; private PositionIncrementAttribute posIncAtt = addAttribute ( PositionIncrementAttribute . class ) ; protected LargePosIncTokenFilter ( TokenStream input ) { } @ Override public boolean incrementToken ( ) throws IOException { } } @ Test public void testPositionIncrements ( ) throws Exception { } public void testRandomStrings ( ) throws Exception { int numIterations = atLeast ( 5 ) ; for ( int i = 0 ; i < numIterations ; i ++ ) { final int flags = random ( ) . nextInt ( 512 ) ; final CharArraySet protectedWords ; if ( random ( ) . nextBoolean ( ) ) { protectedWords = new CharArraySet ( TEST_VERSION_CURRENT , new HashSet < String > ( Arrays . asList ( "a" , "b" , "cd" ) ) , false ) ; } else { protectedWords = null ; } Analyzer a = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { Tokenizer tokenizer = new MockTokenizer ( reader , MockTokenizer . WHITESPACE , false ) ; return new TokenStreamComponents ( tokenizer , new WordDelimiterFilter . WordDelimiterFilter ( tokenizer , flags , protectedWords ) ) ; } } ; <START_BUG> checkRandomData ( random ( ) , a , ( 10000 * ( RANDOM_MULTIPLIER ) ) , 20 , false , false ) ; <END_BUG> } } public void testEmptyTerm ( ) throws IOException { } }

Fix:
checkRandomData ( random ( ) , a , 200 , 20 , false , false ) ;
Buggy code:
public class BuildElementHandler extends ModelElementHandler { private BuildElement buildElement ; public BuildElement getBuildElement ( ) { } public void processElement ( String elementName ) { buildElement = new BuildElement ( getLocation ( ) , elementName ) ; setModelElement ( buildElement ) ; for ( Iterator i = getAttributes ( ) ; i . hasNext ( ) ; ) { String attributeName = ( ( String ) ( i . next ( ) ) ) ; buildElement . addAttribute ( attributeName , getAttribute ( attributeName ) ) ; } <START_BUG> buildElement . setAspects ( getAspects ( ) ) ; <END_BUG> } public void startElement ( String uri , String localName , String qualifiedName , Attributes attributes ) throws SAXParseException { } protected void finish ( ) { } protected void validateAttribute ( String attributeName , String attributeValue ) { } }

Fix:
buildElement . addAspectAttributes ( getAspectAttributes ( ) ) ;
Buggy code:
@ GET @ Path ( "//workspaces//{ID}" ) @ RESTPermitUnimplemented public Response getWorkspace ( @ PathParam ( "ID" ) Long workspaceEntityId ) { } @ GET @ Path ( "//workspaces//{ID}//details" ) @ RESTPermit ( handling = Handling . INLINE , requireLoggedIn = true ) public Response getWorkspaceExternalViewUrl ( @ PathParam ( "ID" ) Long workspaceEntityId ) { } @ PUT @ Path ( "//workspaces//{ID}//details" ) @ RESTPermit ( handling = Handling . INLINE , requireLoggedIn = true ) public Response getWorkspaceExternalViewUrl ( @ PathParam ( "ID" ) Long workspaceEntityId , WorkspaceDetails payload ) { WorkspaceEntity workspaceEntity = workspaceController . findWorkspaceEntityById ( workspaceEntityId ) ; if ( workspaceEntity == null ) { return Response . status ( NOT_FOUND ) . build ( ) ; } fi . muikku . schooldata . entity . Workspace workspace = workspaceController . findWorkspace ( workspaceEntity ) ; if ( workspace == null ) { return Response . status ( NOT_FOUND ) . build ( ) ; } if ( ! ( sessionController . hasCoursePermission ( MANAGE_WORKSPACE_DETAILS , workspaceEntity ) ) ) { return Response . status ( FORBIDDEN ) . build ( ) ; } if ( ( ( payload . getExternalViewUrl ( ) ) != null ) && ( ! ( StringUtils . equals ( workspace . getViewLink ( ) , payload . getExternalViewUrl ( ) ) ) ) ) { return Response . status ( BAD_REQUEST ) . entity ( "externalViewUrl<seq2seq4repair_space>is<seq2seq4repair_space>read-only<seq2seq4repair_space>property" ) . build ( ) ; } <START_BUG> if ( ( ! ( isEqualDateTime ( workspace . getBeginDate ( ) , payload . getBeginDate ( ) ) ) ) || ( ! ( isEqualDateTime ( workspace . getBeginDate ( ) , payload . getBeginDate ( ) ) ) ) ) { <END_BUG>

Fix:
if ( ( ! ( isEqualDateTime ( workspace . getBeginDate ( ) , payload . getBeginDate ( ) ) ) ) || ( ! ( isEqualDateTime ( workspace . getEndDate ( ) , payload . getEndDate ( ) ) ) ) ) {
Buggy code:
public class JournalService extends JournalRepository { private AccountConfigService accountConfigService ; public JournalService ( ) { } public Journal getJournal ( Invoice invoice ) throws AxelorException { Company company = invoice . getCompany ( ) ; if ( company != null ) { <START_BUG> AccountConfig accountConfig = company . getAccountConfig ( ) ; <END_BUG> switch ( invoice . getOperationTypeSelect ( ) ) { case 1 : if ( ( invoice . getInTaxTotal ( ) . compareTo ( BigDecimal . ZERO ) ) == ( - 1 ) ) { return accountConfigService . getSupplierCreditNoteJournal ( accountConfig ) ; } else { return accountConfigService . getSupplierPurchaseJournal ( accountConfig ) ; } case 2 : if ( ( invoice . getInTaxTotal ( ) . compareTo ( BigDecimal . ZERO ) ) == ( - 1 ) ) { return accountConfigService . getSupplierPurchaseJournal ( accountConfig ) ; } else { return accountConfigService . getSupplierCreditNoteJournal ( accountConfig ) ; } case 3 : if ( ( invoice . getInTaxTotal ( ) . compareTo ( BigDecimal . ZERO ) ) == ( - 1 ) ) { return accountConfigService . getCustomerCreditNoteJournal ( accountConfig ) ; } else { return accountConfigService . getCustomerSalesJournal ( accountConfig ) ; } case 4 : if ( ( invoice . getInTaxTotal ( ) . compareTo ( BigDecimal . ZERO ) ) == ( - 1 ) ) { return accountConfigService . getCustomerSalesJournal ( accountConfig ) ; } else { return accountConfigService . getCustomerCreditNoteJournal ( accountConfig ) ; } default : throw new AxelorException ( String . format ( I18n . get ( JOURNAL_1 ) , invoice . getInvoiceId ( ) ) , IException . MISSING_FIELD ) ; } } return null ; } }

Fix:
AccountConfig accountConfig = accountConfigService . getAccountConfig ( company ) ;
Buggy code:
public class AndroidDocConverter { private static HashMap < String , String > attrToMethodMap = new HashMap < String , String > ( ) ; private static Element systemStyles = null ; private static Element systemThemes = null ; public static void main ( String [ ] argv ) throws DocumentException { } private static void generateDat ( ) { } public static HashMap < String , String > getMap ( ) { } public static Element getSystemStyles ( ) { } public static Element getSystemThemes ( ) { if ( ( AndroidDocConverter . systemThemes ) == null ) { File dat = new File ( Config . DAT_PATH ) ; if ( ! ( dat . isFile ( ) ) ) { throw new AndroidDocException ( AndroidDocException . DAT_READ_ERROR ) ; } String content = AndroidDocConverter . readFile ( dat . getPath ( ) , THEME_BLOCK ) ; Document document ; try { document = DocumentHelper . parseText ( content ) ; } catch ( DocumentException e ) { e . printStackTrace ( ) ; throw new AndroidDocException ( AndroidDocException . DAT_READ_ERROR ) ; } <START_BUG> AndroidDocConverter . systemStyles = document . getRootElement ( ) ; <END_BUG> } return AndroidDocConverter . systemThemes ; } public static String [ ] listPage ( ) { } public static boolean writeFile ( String filePath , String content , boolean append ) { } public static String readFile ( String filePath , String block ) { } }

Fix:
AndroidDocConverter . systemThemes = document . getRootElement ( ) ;
Buggy code:
public class TestBufferedTokenStream extends BaseTokenTestCase { public static class AB_Q_Stream extends BufferedTokenStream { public AB_Q_Stream ( TokenStream input ) { } protected Token process ( Token t ) throws IOException { if ( "A" . equals ( new String ( t . termBuffer ( ) , 0 , t . termLength ( ) ) ) ) { Token t2 = read ( ) ; if ( ( t2 != null ) && ( "B" . equals ( new String ( t2 . termBuffer ( ) , 0 , t2 . termLength ( ) ) ) ) ) t . setTermText ( "Q" ) ; if ( t2 != null ) pushBack ( t2 ) ; } return t ; } } public static class AB_AAB_Stream extends BufferedTokenStream { public AB_AAB_Stream ( TokenStream input ) { } protected Token process ( Token t ) throws IOException { if ( ( "A" . equals ( new String ( t . termBuffer ( ) , 0 , t . termLength ( ) ) ) ) && ( "B" . equals ( new String ( peek ( 1 ) . termBuffer ( ) , 0 , peek ( 1 ) . termLength ( ) ) ) ) ) <START_BUG> write ( t ) ; <END_BUG> return t ; } } public void testABQ ( ) throws Exception { } public void testABAAB ( ) throws Exception { } public void testReset ( ) throws Exception { } }

Fix:
write ( ( ( Token ) ( t . clone ( ) ) ) ) ;
Buggy code:
public class ButtonTagTests extends AbstractFormTagTests { private ButtonTag tag ; @ Override protected void onSetUp ( ) { } public void testButtonTag ( ) throws Exception { } public void testDisabled ( ) throws Exception { <START_BUG> this . tag . setDisabled ( true ) ; <END_BUG> this . tag . doStartTag ( ) ; this . tag . doEndTag ( ) ; String output = getOutput ( ) ; assertTagOpened ( output ) ; assertTagClosed ( output ) ; assertContainsAttribute ( output , "disabled" , "disabled" ) ; } @ Override protected TestBean createTestBean ( ) { } protected final void assertTagClosed ( String output ) { } protected final void assertTagOpened ( String output ) { } @ SuppressWarnings ( "serial" ) protected ButtonTag createTag ( final Writer writer ) { } }

Fix:
this . tag . setDisabled ( "true" ) ;
Buggy code:
public class InfinispanSubsystemTestCase extends ClusteringSubsystemTest { public InfinispanSubsystemTestCase ( ) { } @ Override protected ValidationConfiguration getModelValidationConfiguration ( ) { } @ Test public void testParseSubsystem ( ) throws Exception { List < ModelNode > operations = super . parse ( getSubsystemXml ( ) ) ; <START_BUG> Assert . assertEquals ( 8 , operations . size ( ) ) ; <END_BUG> ModelNode addSubsystem = operations . get ( 0 ) ; Assert . assertEquals ( ADD , addSubsystem . get ( OP ) . asString ( ) ) ; PathAddress addr = PathAddress . pathAddress ( addSubsystem . get ( OP_ADDR ) ) ; Assert . assertEquals ( 1 , addr . size ( ) ) ; PathElement element = addr . getElement ( 0 ) ; Assert . assertEquals ( SUBSYSTEM , element . getKey ( ) ) ; Assert . assertEquals ( getMainSubsystemName ( ) , element . getValue ( ) ) ; } @ Test public void testInstallIntoController ( ) throws Exception { } @ Test public void testParseAndMarshalModel ( ) throws Exception { } @ Test public void testDescribeHandler ( ) throws Exception { } }

Fix:
Assert . assertEquals ( 9 , operations . size ( ) ) ;
Buggy code:
public class CreateCommand extends SubCommandAbst { private static final String COMMAND_NAME = "create" ; private static final String PERMISSION_NODE = "lunachat." + ( CreateCommand . COMMAND_NAME ) ; private static final String USAGE_KEY = "usageCreate" ; @ Override public String getCommandName ( ) { } @ Override public String getPermissionNode ( ) { } @ Override public CommandType getCommandType ( ) { } @ Override public void sendUsageMessage ( CommandSender sender , String label ) { } @ Override public boolean runCommand ( CommandSender sender , String label , String [ ] args ) { String name = "" ; String desc = "" ; if ( ( args . length ) >= 2 ) { name = args [ 1 ] ; if ( ( args . length ) >= 3 ) { desc = args [ 2 ] ; } } else { sendResourceMessage ( sender , PREERR , "errmsgCommand" ) ; return true ; } if ( api . isExistChannel ( name ) ) { sendResourceMessage ( sender , PREERR , "errmsgExist" ) ; return true ; } if ( ! ( LunaChat . checkForChannelName ( name ) ) ) { <START_BUG> sendResourceMessage ( sender , PREINFO , "errmsgCannotUseForChannel" , name ) ; <END_BUG> return true ; } Channel channel = api . createChannel ( name ) ; if ( channel != null ) { channel . setDescription ( desc ) ; channel . save ( ) ; sendResourceMessage ( sender , PREINFO , "cmdmsgCreate" , name ) ; } return true ; } }

Fix:
sendResourceMessage ( sender , PREERR , "errmsgCannotUseForChannel" , name ) ;
Buggy code:
public class AndroidFastRenderView extends SurfaceView implements Runnable { private AndroidGame game ; private Bitmap frameBuffer ; private Thread renderThread ; private SurfaceHolder holder ; private volatile boolean running ; public AndroidFastRenderView ( AndroidGame game , Bitmap frameBuffer ) { } public void resume ( ) { } public void run ( ) { Rect dstRect = new Rect ( ) ; long startTime = System . nanoTime ( ) ; while ( running ) { if ( ! ( holder . getSurface ( ) . isValid ( ) ) ) continue ; float deltaTime = ( ( System . nanoTime ( ) ) - startTime ) // 1.0E7F ; startTime = System . nanoTime ( ) ; if ( deltaTime > 3.15 ) deltaTime = ( ( float ) ( 3.15 ) ) ; game . getCurrentScreen ( ) . update ( deltaTime ) ; game . getCurrentScreen ( ) . paint ( deltaTime ) ; Canvas canvas = holder . lockCanvas ( ) ; <START_BUG> canvas . getClipBounds ( ) ; <END_BUG> canvas . drawBitmap ( frameBuffer , null , dstRect , null ) ; holder . unlockCanvasAndPost ( canvas ) ; } } public void pause ( ) { } }

Fix:
canvas . getClipBounds ( dstRect ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class Terrain extends JPanel implements ActionListener , KeyListener { private Tanks mainscreen ; private int [ ] [ ] Points ; protected static int [ ] yPoints ; Timer timer = new Timer ( ) ; Shell firedShell ; ArrayList < Tank > TankList ; private int AmountOfTanks ; private int CurrentTank = 0 ; private int ConfigureX = 10 ; private int SideEffect = 20 ; private Color terrainColor ; private Image TerrainBackground ; private boolean isStartupDrawComplete = false ; private ArrayList < JLabel > HPLabels = new ArrayList < JLabel > ( ) ; private ArrayList < JLabel > nameLabels = new ArrayList < JLabel > ( ) ; private double vx ; private double vy ; public Terrain ( Tanks mainscreen , Color terrainColor , String [ ] nameList , Color [ ] colorList , boolean [ ] computerControlledList , Image TerrainBackground ) { } public int getyPoints ( int xcoord ) { <START_BUG> if ( xcoord < 700 ) { <END_BUG> return Terrain . yPoints [ xcoord ] ; } else { return - 1 ; } } public int getAngleTerrain ( int beginPoint , int endPoint ) { } public void TankKilled ( Tank tank ) { } public int Tank_spawn ( int TANKID ) { } public void paintComponent ( Graphics g ) { } public void drawTerrain ( Graphics g ) { } public Tank getCurrentTank ( ) { } public void fireTank ( int speed , int Angle ) { } public void ShellFired ( int speed , int Angle , Tank tank ) { } public class MyTimerTask extends TimerTask { Shell shell ; Tank tank ; public MyTimerTask ( Shell shell , Tank tank ) { } private int time = 0 ; public void run ( ) { } } public void drawhit ( int posx , int hitRadius , Tank attacker ) { } private void checkNextTank ( ) { } private class TankTimerTask extends TimerTask { public TankTimerTask ( ) { } public void run ( ) { } } @ Override public void actionPerformed ( ActionEvent e ) { } @ Override public void keyPressed ( KeyEvent e ) { } @ Override public void keyReleased ( KeyEvent arg0 ) { } @ Override public void keyTyped ( KeyEvent arg0 ) { } }

Fix:
if ( ( xcoord < 700 ) && ( xcoord > 0 ) ) {
Buggy code:
public class WebExternalResourceRequestTarget implements IRequestTarget { private static final Log log = LogFactory . getLog ( WebExternalResourceRequestTarget . class ) ; private final String url ; public WebExternalResourceRequestTarget ( String url ) { } public void respond ( RequestCycle requestCycle ) { } public final String getUrl ( ) { } public void cleanUp ( RequestCycle requestCycle ) { } public Object getLock ( RequestCycle requestCycle ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } public String toString ( ) { <START_BUG> return ( ( ( "WebExternalResourceRequestTarget@" + ( hashCode ( ) ) ) + "{" ) + ( url ) ) + "}" ; <END_BUG> } }

Fix:
return ( ( ( "[WebExternalResourceRequestTarget@" + ( hashCode ( ) ) ) + "<seq2seq4repair_space>" ) + ( url ) ) + "]" ;
Buggy code:
public class SynchronizedBag < E > extends SynchronizedCollection < E > implements Bag < E > { private static final long serialVersionUID = 8084674570753837109L ; public static < E > SynchronizedBag < E > synchronizedBag ( final Bag < E > bag ) { } protected SynchronizedBag ( final Bag < E > bag ) { } protected SynchronizedBag ( final Bag < E > bag , final Object lock ) { } protected Bag < E > getBag ( ) { <START_BUG> return ( ( Bag < E > ) ( collection ) ) ; <END_BUG> } public boolean add ( final E object , final int count ) { } public boolean remove ( final Object object , final int count ) { } public Set < E > uniqueSet ( ) { } public int getCount ( final Object object ) { } class SynchronizedBagSet extends SynchronizedCollection < E > implements Set < E > { private static final long serialVersionUID = 2990565892366827855L ; SynchronizedBagSet ( final Set < E > set , final Object lock ) { } } }

Fix:
return ( ( Bag < E > ) ( SynchronizedBag . decorated ( ) ) ) ;
Buggy code:
public final class MathUtilsTest { @ Test public void testHash ( ) { } @ Test public void testArrayHash ( ) { } @ Test public void testPermutedArrayHash ( ) { } @ Test public void testIndicatorByte ( ) { } @ Test public void testIndicatorInt ( ) { } @ Test public void testIndicatorLong ( ) { } @ Test public void testIndicatorShort ( ) { } @ Test public void testNormalizeAngle ( ) { } @ Test public void testReduce ( ) { final double period = - 12.222 ; final double offset = 13 ; final double delta = 1.5 ; double orig = ( offset + ( 122456789 * period ) ) + delta ; double expected = delta ; Assert . assertEquals ( expected , MathUtils . reduce ( orig , period , offset ) , 1.0E-7 ) ; Assert . assertEquals ( expected , MathUtils . reduce ( orig , ( - period ) , offset ) , 1.0E-7 ) ; orig = ( offset - ( 123356789 * period ) ) - delta ; <START_BUG> expected = ( Math . abs ( period ) ) - delta ; <END_BUG> Assert . assertEquals ( expected , MathUtils . reduce ( orig , period , offset ) , 1.0E-6 ) ; Assert . assertEquals ( expected , MathUtils . reduce ( orig , ( - period ) , offset ) , 1.0E-6 ) ; orig = ( offset - ( 123446789 * period ) ) + delta ; expected = delta ; Assert . assertEquals ( expected , MathUtils . reduce ( orig , period , offset ) , 1.0E-6 ) ; Assert . assertEquals ( expected , MathUtils . reduce ( orig , ( - period ) , offset ) , 1.0E-6 ) ; Assert . assertTrue ( Double . isNaN ( MathUtils . reduce ( orig , Double . NaN , offset ) ) ) ; Assert . assertTrue ( Double . isNaN ( MathUtils . reduce ( Double . NaN , period , offset ) ) ) ; Assert . assertTrue ( Double . isNaN ( MathUtils . reduce ( orig , period , Double . NaN ) ) ) ; Assert . assertTrue ( Double . isNaN ( MathUtils . reduce ( orig , period , Double . POSITIVE_INFINITY ) ) ) ; Assert . assertTrue ( Double . isNaN ( MathUtils . reduce ( Double . POSITIVE_INFINITY , period , offset ) ) ) ; Assert . assertTrue ( Double . isNaN ( MathUtils . reduce ( orig , Double . POSITIVE_INFINITY , offset ) ) ) ; Assert . assertTrue ( Double . isNaN ( MathUtils . reduce ( orig , Double . POSITIVE_INFINITY , Double . POSITIVE_INFINITY ) ) ) ; Assert . assertTrue ( Double . isNaN ( MathUtils . reduce ( Double . POSITIVE_INFINITY , period , Double . POSITIVE_INFINITY ) ) ) ; Assert . assertTrue ( Double . isNaN ( MathUtils . reduce ( Double . POSITIVE_INFINITY , Double . POSITIVE_INFINITY , offset ) ) ) ; Assert . assertTrue ( Double . isNaN ( MathUtils . reduce ( Double . POSITIVE_INFINITY , Double . POSITIVE_INFINITY , Double . POSITIVE_INFINITY ) ) ) ; } @ Test public void testReduceComparedWithNormalizeAngle ( ) { } @ Test public void testSignByte ( ) { } @ Test public void testSignInt ( ) { } @ Test public void testSignLong ( ) { } @ Test public void testSignShort ( ) { } @ Test public void testCheckFinite ( ) { } @ Test public void testCheckNotNull1 ( ) { } @ Test public void testCheckNotNull2 ( ) { } @ Test public void testCopySignByte ( ) { } @ Test ( expected = MathArithmeticException . class ) public void testCopySignByte2 ( ) { } }

Fix:
expected = ( FastMath . abs ( period ) ) - delta ;
Buggy code:
public class SpaTesterApplicationContext extends Application { private static int indentationLevel = 0 ; private DatabaseHelper dbHelper ; @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) @ Override public void onCreate ( ) { super . onCreate ( ) ; <START_BUG> String [ ] classNames = new String [ ] { "de.codecentric.spa.tester.entity.State" , "de.codecentric.spa.tester.entity.City" , "de.codecentric.spa.tester.entity.Government" } ; <END_BUG> PersistenceContext persistenceContext = PersistenceContext . init ( getApplicationContext ( ) , classNames ) ; dbHelper = new SpaTesterDatabaseHelper ( getApplicationContext ( ) , "VOICE_NOTES_DB" , 1 ) ; dbHelper . retrieveSqlStatements ( persistenceContext ) ; persistenceContext . setDatabaseHelper ( dbHelper ) ; } public static void resetIndentationLevel ( ) { } public static String increaseIndentationLevel ( ) { } public static String decreaseIndentationLevel ( ) { } public static String getIndentationPrefix ( ) { } }

Fix:
String [ ] classNames = new String [ ] { "de.codecentric.spa.tester.entity.TypeCheckBean" , "de.codecentric.spa.tester.entity.State" , "de.codecentric.spa.tester.entity.City" , "de.codecentric.spa.tester.entity.Government" } ;
Buggy code:
public class KafkaEventProducer extends ProducerBase { private String brokerList ; private String topic ; private String acks ; private Producer < String , String > producer ; @ Override public synchronized void init ( Config config ) throws TestException { super . init ( config ) ; try { brokerList = config . getPropertyValue ( "brokerList" , "localhost:9092" ) ; topic = config . getPropertyValue ( "topic" , "default-topic" ) ; acks = config . getPropertyValue ( "requiredAcks" , "1" ) ; Properties kprops = new Properties ( ) ; kprops . put ( "metadata.broker.list" , brokerList ) ; kprops . put ( "serializer.class" , "kafka.serializer.StringEncoder" ) ; kprops . put ( "request.required.acks" , acks ) ; <START_BUG> kprops . put ( "partitioner.class" , "com.esri.ges.test.performance.kafka.SimplePartitioner" ) ; <END_BUG> kprops . put ( "producer.type" , "async" ) ; kprops . put ( "queue.buffering.max.ms" , "1000" ) ; kprops . put ( "batch.num.messages" , "2000" ) ; ProducerConfig producerConfig = new ProducerConfig ( kprops ) ; producer = new Producer < String , String > ( producerConfig ) ; } catch ( Throwable error ) { throw new TestException ( ImplMessages . getMessage ( "INIT_FAILURE" , getClass ( ) . getName ( ) , error . getMessage ( ) ) , error ) ; } } @ Override public void validate ( ) throws TestException { } public int sendEvents ( int index , int numEventsToSend ) { } @ Override public void destroy ( ) { } }

Fix:
kprops . put ( "partitioner.class" , "com.esri.geoevent.test.performance.kafka.SimplePartitioner" ) ;
Buggy code:
public class AggregationGroupSizeRule implements IValidatorRule < CubeDesc > { @ Override public void validate ( CubeDesc cube , ValidateContext context ) { } private void innerValidateMaxSize ( CubeDesc cube , ValidateContext context ) { } protected int getMaxAgrGroupSize ( ) { <START_BUG> String size = KylinConfig . getInstanceFromEnv ( ) . getProperty ( KEY_MAX_AGR_GROUP_SIZE , String . valueOf ( DEFAULT_MAX_AGR_GROUP_SIZE ) ) ; <END_BUG> return Integer . parseInt ( size ) ; } }

Fix:
String size = KylinConfig . getInstanceFromEnv ( ) . getOptional ( KEY_MAX_AGR_GROUP_SIZE , String . valueOf ( DEFAULT_MAX_AGR_GROUP_SIZE ) ) ;
Buggy code:
public class Module { private final Document document ; private final File pomFile ; private final Element root ; private final Namespace nameSpace ; private final String moduleName ; private final VersionControl versionControl ; private final String originalVersion ; private String label ; private String commitMessage ; private boolean labelOnlyPomXml = false ; public Module ( String baseDirName , String moduleName , VersionControl versionControl ) throws IOException , JDOMException { } private File openDir ( File base , String name ) { } public String gav ( ) { } public String groupId ( ) { } public void groupId ( String groupId ) { } public String artifactId ( ) { } public void artifactId ( String artifactId ) { } public String version ( ) { } public void version ( String version ) { } public String parentVersion ( ) { } public void parentVersion ( String parentVersion ) { } public void parentVersion ( Module parent ) { } private String myOrParent ( String itemName ) { } public void updateDependency ( Module moduleToUpdate ) { } public void updatePluginDependency ( Module pluginToUpdate ) { } public void updateProperty ( String propertyName , String value ) { Element properties = root . getChild ( "properties" , nameSpace ) ; if ( properties == null ) { throw new IllegalArgumentException ( ( "No<seq2seq4repair_space>properties<seq2seq4repair_space>defined<seq2seq4repair_space>in<seq2seq4repair_space>module<seq2seq4repair_space>" + ( gav ( ) ) ) ) ; } Element property = properties . getChild ( propertyName , nameSpace ) ; if ( property == null ) { <START_BUG> throw new IllegalArgumentException ( ( ( ( "No<seq2seq4repair_space>property<seq2seq4repair_space>" + property ) + "<seq2seq4repair_space>defined<seq2seq4repair_space>in<seq2seq4repair_space>module<seq2seq4repair_space>" ) + ( gav ( ) ) ) ) ; <END_BUG> } property . setText ( value ) ; } public void save ( ) throws IOException { } public void label ( String label ) throws IOException { } public void commitMessage ( String commitMessage ) throws IOException { } private Element findDependencyElement ( Module moduleToFind , String ... path ) { } @ Override public String toString ( ) { } public boolean labelOnlyPomXml ( ) { } public void labelOnlyPomXml ( boolean labelOnlyPomXml ) { } }

Fix:
throw new IllegalArgumentException ( ( ( ( "No<seq2seq4repair_space>property<seq2seq4repair_space>" + propertyName ) + "<seq2seq4repair_space>defined<seq2seq4repair_space>in<seq2seq4repair_space>module<seq2seq4repair_space>" ) + ( gav ( ) ) ) ) ;
Buggy code:
@ Component public class MgmtVmCfgCommands implements CommandMarker { @ Autowired private MgmtVMCfgClient mgmtCfgOnMgmtVMClient ; @ CliAvailabilityIndicator ( { "mgmtvmcfg<seq2seq4repair_space>help" } ) public boolean isCommandAvailable ( ) { } @ CliCommand ( value = "mgmtvmcfg<seq2seq4repair_space>modify" , help = "configure<seq2seq4repair_space>management<seq2seq4repair_space>VM." ) public void modifyMgmtVMCfg ( @ CliOption ( key = { "usermgmtmode" } , mandatory = true , help = "User<seq2seq4repair_space>management<seq2seq4repair_space>mode<seq2seq4repair_space>{MIXED,<seq2seq4repair_space>LDAP}." ) final String mode ) { } <START_BUG> @ CliCommand ( value = "mgmtvmcfg<seq2seq4repair_space>get" , help = "get<seq2seq4repair_space>management<seq2seq4repair_space>VM's<seq2seq4repair_space>user<seq2seq4repair_space>management<seq2seq4repair_space>Configuration." ) <END_BUG> public void getMgmtVMCfg ( ) { try { Map < String , String > mgmtVMcfg = mgmtCfgOnMgmtVMClient . get ( ) ; StringBuilder cfgStrBuilder = new StringBuilder ( "Management<seq2seq4repair_space>VM's<seq2seq4repair_space>configuration:<seq2seq4repair_space>" ) . append ( '\n' ) ; cfgStrBuilder . append ( "User<seq2seq4repair_space>management<seq2seq4repair_space>mode:<seq2seq4repair_space>" ) . append ( mgmtVMcfg . get ( VMCONFIG_MGMTVM_CUM_MODE ) ) ; System . out . println ( cfgStrBuilder . toString ( ) ) ; GET_MGMTVMCFG_OUTPUT . printSuccess ( ) ; } catch ( CliRestException e ) { GET_MGMTVMCFG_OUTPUT . printFailure ( "" , e ) ; } } }

Fix:
@ CliCommand ( value = "mgmtvmcfg<seq2seq4repair_space>get" , help = "get<seq2seq4repair_space>management<seq2seq4repair_space>VM's<seq2seq4repair_space>Configuration." )
Buggy code:
public class RecipeDaoImpl extends AbstractDaoImpl < Recipe > implements RecipeDao { @ Override public List < Recipe > searchByKeyword ( final String keyword ) { final Session session = this . getSessionFactory ( ) . getCurrentSession ( ) ; final String search = ( "%" + ( keyword . toLowerCase ( ) . trim ( ) ) ) + "%" ; <START_BUG> return session . createQuery ( "FROM<seq2seq4repair_space>recipe<seq2seq4repair_space>WHERE<seq2seq4repair_space>name<seq2seq4repair_space>LIKE<seq2seq4repair_space>:name<seq2seq4repair_space>OR<seq2seq4repair_space>description<seq2seq4repair_space>LIKE<seq2seq4repair_space>:desc<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>name" ) . setParameter ( "name" , search ) . setParameter ( "desc" , search ) . list ( ) ; <END_BUG> } }

Fix:
return session . createQuery ( "FROM<seq2seq4repair_space>recipe<seq2seq4repair_space>WHERE<seq2seq4repair_space>lower(name)<seq2seq4repair_space>LIKE<seq2seq4repair_space>:name<seq2seq4repair_space>OR<seq2seq4repair_space>lower(description)<seq2seq4repair_space>LIKE<seq2seq4repair_space>:desc<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>name" ) . setParameter ( "name" , search ) . setParameter ( "desc" , search ) . list ( ) ;
Buggy code:
public class System { private static LocationService service ; private static String TAG = "Location<seq2seq4repair_space>Service<seq2seq4repair_space>System<seq2seq4repair_space>module" ; private static Location currentlyActiveLocation ; public static void reactToLocationChange ( android . location . Location location , Context context , LocationService service ) { } private static void updatePhoneStatusForFoundLocation ( Location nearestLocation ) { } private static Location findBestSuitedLocation ( android . location . Location location , Context context ) { } private static boolean isLocationValidToApplySettings ( Location nearestLocation , android . location . Location location ) { <START_BUG> return ( nearestLocation != null ) && ( ( nearestLocation . getLocation ( ) . distanceTo ( location ) ) <= ( nearestLocation . getRadius ( ) ) ) ; <END_BUG> } private static void setWifi ( boolean isEnabled ) { } private static void setBluetooth ( boolean isEnabled ) { } @ SuppressWarnings ( "deprecation" ) private static void setSound ( boolean isSoundEnabled , boolean isVibrationEnabled ) { } private static void setMobileData ( boolean isEnabled ) { } private static void sendSMS ( ) { } private static boolean findBinary ( String binaryName ) { } }

Fix:
return ( ( nearestLocation != null ) && ( location != null ) ) && ( ( nearestLocation . getLocation ( ) . distanceTo ( location ) ) <= ( nearestLocation . getRadius ( ) ) ) ;
Buggy code:
public class JMSTopicAdd extends AbstractAddStepHandler implements DescriptionProvider { public static final String OPERATION_NAME = ADD ; public static ModelNode getOperation ( ModelNode address , ModelNode existing ) { } public static final JMSTopicAdd INSTANCE = new JMSTopicAdd ( ) ; protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; final ServiceName hqServiceName = MessagingServices . getHornetQServiceName ( PathAddress . pathAddress ( operation . get ( ModelDescriptionConstants . OP_ADDR ) ) ) ; <START_BUG> CommonAttributes . ENTRIES . validateResolvedOperation ( model ) ; <END_BUG> final JMSTopicService service = new JMSTopicService ( name , JndiEntriesAttribute . getJndiBindings ( operation ) ) ; final ServiceName serviceName = JMSServices . getJmsTopicBaseServiceName ( hqServiceName ) . append ( name ) ; newControllers . add ( context . getServiceTarget ( ) . addService ( serviceName , service ) . addDependency ( JMSServices . getJmsManagerBaseServiceName ( hqServiceName ) , JMSServerManager . class , service . getJmsServer ( ) ) . addListener ( verificationHandler ) . setInitialMode ( ACTIVE ) . install ( ) ) ; } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
CommonAttributes . ENTRIES . resolveModelAttribute ( context , model ) ;
Buggy code:
public abstract class Scrollable extends Control { int scrolledHandle ; ScrollBar horizontalBar ; ScrollBar verticalBar ; Scrollable ( ) { } public Scrollable ( Composite parent , int style ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } ScrollBar createScrollBar ( int style ) { } ScrollBar createStandardBar ( int style ) { } void createWidget ( ) { } void deregister ( ) { } public Rectangle getClientArea ( ) { } public ScrollBar getHorizontalBar ( ) { } public ScrollBar getVerticalBar ( ) { } boolean hasBorder ( ) { } void hookEvents ( ) { } boolean hooksKeys ( ) { } Rect inset ( ) { } boolean isTrimHandle ( int trimHandle ) { } int kEventMouseWheelMoved ( int nextHandler , int theEvent , int userData ) { } void redrawBackgroundImage ( ) { } void register ( ) { } void releaseHandle ( ) { } void releaseChildren ( boolean destroy ) { } void resetVisibleRegion ( int control ) { } void resizeClientArea ( ) { } boolean sendMouseWheel ( short wheelAxis , int wheelDelta ) { if ( ( ( state ) & ( CANVAS ) ) != 0 ) { ScrollBar bar = ( wheelAxis == ( OS . kEventMouseWheelAxisX ) ) ? horizontalBar : verticalBar ; <START_BUG> if ( ( bar != null ) && ( bar . getVisible ( ) ) ) { <END_BUG> bar . setSelection ( Math . max ( 0 , ( ( bar . getSelection ( ) ) - ( ( bar . getIncrement ( ) ) * wheelDelta ) ) ) ) ; Event event = new Event ( ) ; event . detail = ( wheelDelta > 0 ) ? SWT . PAGE_UP : SWT . PAGE_DOWN ; bar . sendEvent ( Selection , event ) ; if ( ! ( OS . HIVIEW ) ) { update ( ) ; } return true ; } } return false ; } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } boolean setScrollBarVisible ( ScrollBar bar , boolean visible ) { } void setZOrder ( ) { } int topHandle ( ) { } }

Fix:
if ( ( bar != null ) && ( bar . getEnabled ( ) ) ) {