nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SettingsFragment extends PreferenceFragment { private SharedPreferences mPref ; private Preference syncInterval ; private Toolbar mToolbar ; private LinearLayout root ; MainActivity getParentActivity ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( @ NonNull LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void setupAboutPref ( ) { Preference about = findPreference ( "about" ) ; about . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) { @ Override public boolean onPreferenceClick ( Preference preference ) { <START_BUG> new com . afollestad . materialdialogs . MaterialDialog . Builder ( getParentActivity ( ) ) . title ( ( ( getResources ( ) . getString ( application_name ) ) + "<seq2seq4repair_space>v0.5" ) ) . content ( Html . fromHtml ( ( "Designed<seq2seq4repair_space>and<seq2seq4repair_space>developed<seq2seq4repair_space>by<seq2seq4repair_space><b><seq2seq4repair_space>Tevin<seq2seq4repair_space>Jeffrey<//b><seq2seq4repair_space><br><seq2seq4repair_space>" + "<a<seq2seq4repair_space>href=\"http:////tevinjeffrey.com//\">Website<//a><seq2seq4repair_space>" ) ) ) . positiveText ( "Ok" ) . show ( ) ; <END_BUG> return true ; } } ) ; } private void setupIntervalPref ( ) { } private void setupLicensesPref ( ) { } private void setSummary ( Preference preference , String summary ) { } int getInterval ( ) { } void setInterval ( int intervalIndex ) { } @ Override public void onDestroyView ( ) { } }

Fix:
new com . afollestad . materialdialogs . MaterialDialog . Builder ( getParentActivity ( ) ) . title ( ( ( getResources ( ) . getString ( application_name ) ) + "<seq2seq4repair_space>v0.5.3" ) ) . content ( Html . fromHtml ( ( "Designed<seq2seq4repair_space>and<seq2seq4repair_space>developed<seq2seq4repair_space>by<seq2seq4repair_space><b><seq2seq4repair_space>Tevin<seq2seq4repair_space>Jeffrey<//b><seq2seq4repair_space><br><seq2seq4repair_space>" + "<a<seq2seq4repair_space>href=\"http:////tevinjeffrey.com//\">Website<//a><seq2seq4repair_space>" ) ) ) . positiveText ( "Ok" ) . show ( ) ;
Buggy code:
public class TypeValidatorTest extends WicketTestCase { public static class DateField extends TextField { private static final long serialVersionUID = 1L ; public DateField ( String id ) { } public String getInput ( ) { } } public static class Person { private Date birthdate = new Date ( ) ; public void setBirthdate ( Date date ) { } public Date getBirthdate ( ) { } } public TypeValidatorTest ( String name ) { } public void testDateField ( ) { <START_BUG> RequestCycle cycle = application . createRequestCycle ( ) ; <END_BUG> MockPage page = new MockPage ( ) ; Form form = new Form ( "form" , new CompoundPropertyModel ( new TypeValidatorTest . Person ( ) ) ) ; TypeValidatorTest . DateField dateField = new TypeValidatorTest . DateField ( "birthdate" ) ; form . add ( dateField ) ; page . add ( form ) ; form . onFormSubmitted ( ) ; } }

Fix:
RequestCycle cycle = tester . createRequestCycle ( ) ;
Buggy code:
public class EJBRemoteTransactionsRepository implements Service < EJBRemoteTransactionsRepository > { private static final Logger logger = Logger . getLogger ( EJBRemoteTransactionsRepository . class ) ; public static final ServiceName SERVICE_NAME = JBOSS . append ( "ejb" ) . append ( "remote-transactions-repository" ) ; private final InjectedValue < TransactionManager > transactionManagerInjectedValue = new InjectedValue < TransactionManager > ( ) ; private final InjectedValue < UserTransaction > userTransactionInjectedValue = new InjectedValue < UserTransaction > ( ) ; private final InjectedValue < RecoveryManagerService > recoveryManagerService = new InjectedValue ( ) ; private final Map < UserTransactionID , Uid > userTransactions = Collections . synchronizedMap ( new HashMap < UserTransactionID , Uid > ( ) ) ; @ Override public void start ( StartContext context ) throws StartException { recoveryManagerService . getValue ( ) . addSerializableXAResourceDeserializer ( INSTANCE ) ; <START_BUG> EJBRemoteTransactionsRepository . logger . debug ( ( "Registered<seq2seq4repair_space>EJB<seq2seq4repair_space>XA<seq2seq4repair_space>resource<seq2seq4repair_space>deserializer<seq2seq4repair_space>" + ( EJBXAResourceDeserializer . INSTANCE ) ) ) ; <END_BUG> } @ Override public void stop ( StopContext context ) { } @ Override public EJBRemoteTransactionsRepository getValue ( ) throws IllegalArgumentException , IllegalStateException { } public TransactionManager getTransactionManager ( ) { } public Transaction removeUserTransaction ( final UserTransactionID userTransactionID ) { } public Transaction getUserTransaction ( final UserTransactionID userTransactionID ) { } Transaction beginUserTransaction ( final UserTransactionID userTransactionID ) throws NotSupportedException , SystemException { } public SubordinateTransaction getImportedTransaction ( final XidTransactionID xidTransactionID ) throws XAException { } Transaction importTransaction ( final XidTransactionID xidTransactionID , final int txTimeout ) throws XAException { } public Xid [ ] getXidsToRecoverForParentNode ( final String parentNodeName , int recoveryFlags ) throws XAException { } public UserTransaction getUserTransaction ( ) { } public Injector < TransactionManager > getTransactionManagerInjector ( ) { } public Injector < UserTransaction > getUserTransactionInjector ( ) { } public Injector < RecoveryManagerService > getRecoveryManagerInjector ( ) { } }

Fix:
EJBRemoteTransactionsRepository . logger . debugf ( "Registered<seq2seq4repair_space>EJB<seq2seq4repair_space>XA<seq2seq4repair_space>resource<seq2seq4repair_space>deserializer<seq2seq4repair_space>%s" , INSTANCE ) ;
Buggy code:
public class SplashActivity extends Activity { public static final String TAG = "SplashActivity" ; private LinearLayout mContainer ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { super . onResume ( ) ; <START_BUG> if ( ( TwitterUser . getTwitterUser ( ) . getCredentialsVerified ( ) ) == ( CredentialsVerified . SUCCEEDED ) ) { <END_BUG> Intent intent = new Intent ( this , TweetListActivity . class ) ; startActivity ( intent ) ; finish ( ) ; } } @ Override protected void onStart ( ) { } }

Fix:
if ( ! ( TwitterUser . getTwitterUser ( ) . isTemporal ( ) ) ) {
Buggy code:
@ RunWith ( RobolectricTestRunner . class ) public class BackgroundAttributeTest extends AbstractViewPropertyAttributeTest { @ Test public void givenResourceIdBoundAttribute_whenValueModelUpdated_ThenViewShouldReflectChanges ( ) { int resourceId = 1 ; <START_BUG> MockPresentationModelAdapterForProperty < Integer > mockPresentationModelAdapter = createBoundAttribute ( Integer . class ) ; <END_BUG> mockPresentationModelAdapter . updatePropertyValue ( resourceId ) ; Assert . assertEquals ( resourceId , shadowView . getBackgroundResourceId ( ) ) ; } @ Test public void givenDrawableBoundAttribute_whenValueModelUpdated_ThenViewShouldReflectChanges ( ) { } @ Test ( expected = RuntimeException . class ) public void whenBindToUnsupportedType_thenThrowException ( ) { } private < T > MockPresentationModelAdapterForProperty < T > createBoundAttribute ( Class < T > propertyType ) { } No newline ; at end ; of file ; }

Fix:
MockPresentationModelAdapterForProperty < Integer > mockPresentationModelAdapter = createBoundAttribute ( int . class ) ;
Buggy code:
public class ChameleonAction extends Action { public ActionForward execute ( ActionMapping mapping , ActionForm form , HttpServletRequest request , HttpServletResponse response ) throws Exception { HttpSession httpSession = request . getSession ( ) ; if ( ( ! ( Web . isLoggedIn ( httpSession ) ) ) || ( ( ! ( Web . isAdmin ( httpSession ) ) ) && ( ( ( httpSession . getAttribute ( "hdnAdminAlias" ) ) == null ) || ( ! ( httpSession . getAttribute ( "hdnAdminAlias" ) . toString ( ) . equals ( "1" ) ) ) ) ) ) { throw new Exception ( "Access<seq2seq4repair_space>Denied." ) ; } MessageResources rsc = getResources ( request ) ; User user = Web . getUser ( request . getSession ( ) ) ; ChameleonForm frm = ( ( ChameleonForm ) ( form ) ) ; <START_BUG> ActionMessages errors = null ; <END_BUG> String op = ( ( request . getParameter ( "op" ) ) == null ) ? ( ( frm . getOp ( ) ) == null ) || ( ( frm . getOp ( ) . length ( ) ) == 0 ) ? ( request . getAttribute ( "op" ) ) == null ? null : request . getAttribute ( "op" ) . toString ( ) : frm . getOp ( ) : request . getParameter ( "op" ) ; if ( ( op == null ) || ( ( op . trim ( ) . length ( ) ) == 0 ) ) op = rsc . getMessage ( "op.view" ) ; frm . setOp ( op ) ; if ( op . equals ( rsc . getMessage ( "op.view" ) ) ) { LookupTables . setupTimetableManagers ( request ) ; } if ( op . equals ( rsc . getMessage ( "button.changeUser" ) ) ) { try { doSwitch ( request , frm , user ) ; return mapping . findForward ( "reload" ) ; } catch ( Exception e ) { Debug . error ( e ) ; errors . add ( "exception" , new ActionMessage ( "errors.generic" , e . getMessage ( ) ) ) ; saveErrors ( request , errors ) ; LookupTables . setupTimetableManagers ( request ) ; return mapping . findForward ( "displayForm" ) ; } } return mapping . findForward ( "displayForm" ) ; } private void doSwitch ( HttpServletRequest request , ChameleonForm frm , User u ) throws Exception { } }

Fix:
ActionMessages errors = new ActionMessages ( ) ;
Buggy code:
public class JournalFolderAssetRenderer extends BaseAssetRenderer implements TrashRenderer { public static final String TYPE = "folder" ; public JournalFolderAssetRenderer ( JournalFolder folder ) { } @ Override public String getClassName ( ) { } @ Override public long getClassPK ( ) { } @ Override public Date getDisplayDate ( ) { } @ Override public long getGroupId ( ) { } @ Override public String getIconCssClass ( ) throws PortalException { if ( ( JournalFolderServiceUtil . getFoldersAndArticlesCount ( _folder . getGroupId ( ) , _folder . getFolderId ( ) ) ) > 0 ) { <START_BUG> return "icon-folder-close" ; <END_BUG> } return super . getIconCssClass ( ) ; } @ Override public String getIconPath ( ThemeDisplay themeDisplay ) { } @ Override public String getPortletId ( ) { } @ Override public String getSummary ( PortletRequest portletRequest , PortletResponse portletResponse ) { } @ Override public String getThumbnailPath ( PortletRequest portletRequest ) throws Exception { } @ Override public String getTitle ( Locale locale ) { } @ Override public String getType ( ) { } @ Override public PortletURL getURLEdit ( LiferayPortletRequest liferayPortletRequest , LiferayPortletResponse liferayPortletResponse ) throws Exception { } @ Override public PortletURL getURLView ( LiferayPortletResponse liferayPortletResponse , WindowState windowState ) throws Exception { } @ Override public String getURLViewInContext ( LiferayPortletRequest liferayPortletRequest , LiferayPortletResponse liferayPortletResponse , String noSuchEntryRedirect ) { } @ Override public long getUserId ( ) { } @ Override public String getUserName ( ) { } @ Override public String getUuid ( ) { } @ Override public boolean hasEditPermission ( PermissionChecker permissionChecker ) throws PortalException { } @ Override public boolean hasViewPermission ( PermissionChecker permissionChecker ) throws PortalException { } @ Override public String render ( RenderRequest renderRequest , RenderResponse renderResponse , String template ) throws Exception { } private final JournalFolder _folder ; No newline ; at end ; of file ; }

Fix:
return "icon-folder-open" ;
Buggy code:
public class Move extends Copy { public Move ( ) { } protected void doFileOperations ( ) { if ( ( fileCopyMap . size ( ) ) > 0 ) { log ( ( ( ( "Moving<seq2seq4repair_space>" + ( fileCopyMap . size ( ) ) ) + "<seq2seq4repair_space>files<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( destDir . getAbsolutePath ( ) ) ) ) ; Enumeration e = fileCopyMap . keys ( ) ; while ( e . hasMoreElements ( ) ) { String fromFile = ( ( String ) ( e . nextElement ( ) ) ) ; String toFile = ( ( String ) ( fileCopyMap . get ( fromFile ) ) ) ; try { log ( ( ( ( "Moving<seq2seq4repair_space>" + fromFile ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + toFile ) , verbosity ) ; FilterSet executionFilterSet = new FilterSet ( ) ; if ( filtering ) { executionFilterSet . addFilterSet ( project . getGlobalFilterSet ( ) ) ; } for ( Enumeration filterEnum = getFilterSets ( ) . elements ( ) ; filterEnum . hasMoreElements ( ) ; ) { executionFilterSet . addFilterSet ( ( ( FilterSet ) ( filterEnum . nextElement ( ) ) ) ) ; } <START_BUG> FileUtils . copyFile ( fromFile , toFile , executionFilterSet , forceOverwrite ) ; <END_BUG> File f = new File ( fromFile ) ; if ( ! ( f . delete ( ) ) ) { throw new BuildException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>delete<seq2seq4repair_space>file<seq2seq4repair_space>" + ( f . getAbsolutePath ( ) ) ) ) ; } } catch ( IOException ioe ) { String msg = ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>copy<seq2seq4repair_space>" + fromFile ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + toFile ) + "<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( ioe . getMessage ( ) ) ; throw new BuildException ( msg , ioe , location ) ; } } } if ( includeEmpty ) { Enumeration e = dirCopyMap . elements ( ) ; int count = 0 ; while ( e . hasMoreElements ( ) ) { File d = new File ( ( ( String ) ( e . nextElement ( ) ) ) ) ; if ( ! ( d . exists ( ) ) ) { if ( ! ( d . mkdirs ( ) ) ) { log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>directory<seq2seq4repair_space>" + ( d . getAbsolutePath ( ) ) ) , MSG_ERR ) ; } else { count ++ ; } } } if ( count > 0 ) { log ( ( ( ( "Moved<seq2seq4repair_space>" + count ) + "<seq2seq4repair_space>empty<seq2seq4repair_space>directories<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( destDir . getAbsolutePath ( ) ) ) ) ; } } if ( ( filesets . size ( ) ) > 0 ) { Enumeration e = filesets . elements ( ) ; while ( e . hasMoreElements ( ) ) { FileSet fs = ( ( FileSet ) ( e . nextElement ( ) ) ) ; File dir = fs . getDir ( project ) ; if ( okToDelete ( dir ) ) { deleteDir ( dir ) ; } } } } protected boolean okToDelete ( File d ) { } protected void deleteDir ( File d ) { } }

Fix:
getFileUtils ( ) . copyFile ( fromFile , toFile , executionFilterSet , forceOverwrite ) ;
Buggy code:
public class MainActivity extends AppCompatActivity { private static final int OPEN_FILE_REQUEST_CODE = 1 ; private static final int CHANGE_PROGRAM_REQUEST_CODE = 2 ; private MediaPlayer mediaPlayer = null ; private MidiFile midiFile = null ; private Handler handler ; private Runnable rUpdate ; private boolean playerIsPrepared = false ; private static final int REQUEST_EXTERNAL_STORAGE = 1 ; private static String [ ] PERMISSIONS_STORAGE = new String [ ] { permission . READ_EXTERNAL_STORAGE , permission . WRITE_EXTERNAL_STORAGE , permission . INTERNET } ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private void openMidiFileAsync ( final Uri uri ) { } private void changeProgram ( int program ) throws Exception { } private void changeProgramAsync ( final int program ) { } private void setUpButtonListeners ( ) { } private void setUpFileOpenListener ( ) { } private void setUpBackToStartListener ( ) { } private void setUpPlayListener ( ) { } private void setUpPauseListener ( ) { } private void setUpStopListener ( ) { } private void setUpForwardToEndListener ( ) { } private void setUpChangeProgramListener ( ) { } private void play ( ) throws Exception { } private void pause ( ) throws Exception { } private void stop ( ) throws Exception { } private void resetMediaPlayer ( ) { } private void prepareMediaPlayer ( ) throws Exception { } private void setUpHandler ( ) { } private String getFormattedPlayBackTime ( ) { if ( ! ( playerIsPrepared ) ) { return "0:00//0:00" ; } else { String duration = millisToString ( mediaPlayer . getDuration ( ) ) ; <START_BUG> String currentPosition = millisToString ( mediaPlayer . getCurrentPosition ( ) ) ; <END_BUG> return ( currentPosition + "//" ) + duration ; } } private String millisToString ( int millis ) { } private void verifyPermissions ( ) { } private boolean allPermissionsGranted ( ) { } private boolean permissionGranted ( String permission ) { } }

Fix:
String currentPosition = millisToString ( Math . min ( mediaPlayer . getCurrentPosition ( ) , mediaPlayer . getDuration ( ) ) ) ;
Buggy code:
public class GridSubset { private final GridSet gridSet ; private final Map < Integer , GridCoverage > gridCoverageLevels ; private final boolean fullGridSetCoverage ; private final BoundingBox subSetExtent ; private final Integer minCachedZoom ; private final Integer maxCachedZoom ; protected GridSubset ( GridSet gridSet , Map < Integer , GridCoverage > coverages , BoundingBox originalExtent , boolean fullCoverage ) { } public GridSubset ( GridSet gridSet , Map < Integer , GridCoverage > coverages , BoundingBox originalExtent , boolean fullCoverage , Integer minCachedZoom , Integer maxCachedZoom ) { } public BoundingBox boundsFromIndex ( long [ ] tileIndex ) { } public BoundingBox boundsFromRectangle ( long [ ] rectangleExtent ) { } public long [ ] closestIndex ( BoundingBox tileBounds ) throws GridMismatchException { } public long [ ] closestRectangle ( BoundingBox rectangleBounds ) { } public boolean covers ( long [ ] index ) { } public void checkCoverage ( long [ ] index ) throws OutsideCoverageException { } public void checkTileDimensions ( int width , int height ) throws TileDimensionsMismatchException { } public long [ ] [ ] expandToMetaFactors ( final long [ ] [ ] coverages , final int [ ] metaFactors ) { } public long [ ] getCoverage ( int level ) { } public long [ ] [ ] getCoverages ( ) { } public double getDotsPerInch ( ) { } public BoundingBox getCoverageBounds ( int level ) { } public long [ ] getCoverageBestFit ( ) { } public BoundingBox getCoverageBestFitBounds ( ) { } public long [ ] getCoverageIntersection ( long [ ] reqRectangle ) { } public long [ ] [ ] getCoverageIntersections ( BoundingBox reqBounds ) { final int zoomStart = getZoomStart ( ) ; final int zoomStop = getZoomStop ( ) ; long [ ] [ ] ret = new long [ ( 1 + zoomStop ) - zoomStart ] [ 5 ] ; for ( int level = zoomStart ; level <= zoomStop ; level ++ ) { <START_BUG> ret [ level ] = getCoverageIntersection ( level , reqBounds ) ; <END_BUG> } return ret ; } public long [ ] getCoverageIntersection ( int level , BoundingBox reqBounds ) { } public long getGridIndex ( String gridId ) { } public String [ ] getGridNames ( ) { } public GridSet getGridSet ( ) { } public BoundingBox getGridSetBounds ( ) { } public long getNumTilesWide ( int zoomLevel ) { } public long getNumTilesHigh ( int zoomLevel ) { } public String getName ( ) { } public BoundingBox getOriginalExtent ( ) { } public double [ ] getResolutions ( ) { } public long [ ] [ ] getSubGrid ( long [ ] gridLoc ) throws GeoWebCacheException { } public boolean getScaleWarning ( ) { } public SRS getSRS ( ) { } public int getTileHeight ( ) { } public int getTileWidth ( ) { } public long [ ] [ ] getWMTSCoverages ( ) { } public int getZoomStart ( ) { } public int getZoomStop ( ) { } public Integer getMinCachedZoom ( ) { } public Integer getMaxCachedZoom ( ) { } public boolean fullGridSetCoverage ( ) { } public boolean shouldCacheAtZoom ( long zoom ) { } @ Override public String toString ( ) { } }

Fix:
ret [ ( level - zoomStart ) ] = getCoverageIntersection ( level , reqBounds ) ;
Buggy code:
public class NRTCachingDirectory extends Directory { private final RAMDirectory cache = new RAMDirectory ( ) ; private final Directory delegate ; private final long maxMergeSizeBytes ; private final long maxCachedBytes ; private static final boolean VERBOSE = false ; public NRTCachingDirectory ( Directory delegate , double maxMergeSizeMB , double maxCachedMB ) { } public Directory getDelegate ( ) { } @ Override public LockFactory getLockFactory ( ) { } @ Override public void setLockFactory ( LockFactory lf ) throws IOException { } @ Override public String getLockID ( ) { } @ Override public Lock makeLock ( String name ) { } @ Override public void clearLock ( String name ) throws IOException { } @ Override public String toString ( ) { } @ Override public synchronized String [ ] listAll ( ) throws IOException { } public long sizeInBytes ( ) { } @ Override public synchronized boolean fileExists ( String name ) throws IOException { } @ Override public synchronized void deleteFile ( String name ) throws IOException { } @ Override public synchronized long fileLength ( String name ) throws IOException { } public String [ ] listCachedFiles ( ) { } @ Override public IndexOutput createOutput ( String name , IOContext context ) throws IOException { } @ Override public void sync ( Collection < String > fileNames ) throws IOException { } @ Override public synchronized IndexInput openInput ( String name , IOContext context ) throws IOException { } public synchronized IndexInputSlicer createSlicer ( final String name , final IOContext context ) throws IOException { } @ Override public void close ( ) throws IOException { } protected boolean doCacheWrite ( String name , IOContext context ) { } private final Object uncacheLock = new Object ( ) ; private void unCache ( String fileName ) throws IOException { synchronized ( uncacheLock ) { if ( NRTCachingDirectory . VERBOSE ) { System . out . println ( ( "nrtdir.unCache<seq2seq4repair_space>name=" + fileName ) ) ; } if ( ! ( cache . fileExists ( fileName ) ) ) { return ; } if ( delegate . fileExists ( fileName ) ) { throw new IOException ( ( ( "cannot<seq2seq4repair_space>uncache<seq2seq4repair_space>file=\"" + fileName ) + "\":<seq2seq4repair_space>it<seq2seq4repair_space>was<seq2seq4repair_space>separately<seq2seq4repair_space>also<seq2seq4repair_space>created<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>delegate<seq2seq4repair_space>directory" ) ) ; } final IOContext context = IOContext . DEFAULT ; final IndexOutput out = delegate . createOutput ( fileName , context ) ; IndexInput in = null ; try { in = cache . openInput ( fileName , context ) ; <START_BUG> in . copyBytes ( out , in . length ( ) ) ; <END_BUG> } finally { IOUtils . close ( in , out ) ; } synchronized ( this ) { cache . deleteFile ( fileName ) ; } } } }

Fix:
out . copyBytes ( in , in . length ( ) ) ;
Buggy code:
public final class StringsTest extends TestCase { public void test ( ) { } public void testBeforeFirst ( ) { } public void testAfterFirst ( ) { } public void testAfterLast ( ) { } public void testBeforeLastPathComponent ( ) { } public void testCapitalize ( ) { } public void testEscapeMarkup ( ) { } public void testEscapeMarkupWhiteSpace ( ) { } public void testEscapeMarkupUnicode ( ) throws UnsupportedEncodingException { } public void testReplaceHtmlEscapeNumber ( ) throws UnsupportedEncodingException { } private String convertNonASCIIString ( String str ) throws UnsupportedEncodingException { } public void testFirstPathComponent ( ) { } public void testIsEmpty ( ) { } public void testIsTrue ( ) throws StringValueConversionException { } public void testReplaceAll ( ) { } public void testSplit ( ) { } public void testStripEnding ( ) { } public void testToBoolean ( ) throws StringValueConversionException { } public void testToChar ( ) throws StringValueConversionException { } public void testToMultilineMarkup ( ) { } public void testToString ( ) { } private void assertEquals ( String [ ] expected , String [ ] actual ) { } private String stringValue ( String [ ] arrayOfStrings ) { <START_BUG> StringBuffer sb = new StringBuffer ( "{" ) ; <END_BUG> String komma = "" ; for ( int i = 0 ; i < ( arrayOfStrings . length ) ; i ++ ) { sb . append ( komma ) ; sb . append ( arrayOfStrings [ i ] ) ; komma = "," ; } sb . append ( "}" ) ; return sb . toString ( ) ; } }

Fix:
AppendingStringBuffer sb = new AppendingStringBuffer ( "{" ) ;
Buggy code:
public class Block extends Statement { public static final ChildListPropertyDescriptor STATEMENTS_PROPERTY = new ChildListPropertyDescriptor ( Block . class , "statements" , Statement . class , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private ASTNode . NodeList statements = new ASTNode . NodeList ( Block . STATEMENTS_PROPERTY ) ; Block ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { Block result = new Block ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . copyLeadingComment ( this ) ; result . statements ( ) . addAll ( ASTNode . copySubtrees ( target , statements ( ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public List statements ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class DefaultResolutionCollisionHandler implements CollisionHandler { @ Override public void handleCollision ( GameObject ourObject , GameObject otherObject , Rectangle ourBoundingBox , Rectangle otherBoundingBox , boolean [ ] directions ) { Position position = ourObject . getComponent ( Position . class ) ; Movement movement = ourObject . getComponent ( Movement . class ) ; if ( directions [ CollisionHandler . DIRECTION_LEFT ] ) { position . setX ( ( ( otherBoundingBox . getRight ( ) ) + 1 ) ) ; if ( ( movement . getVelocityX ( ) ) < 0 ) { movement . setVelocityX ( 0 ) ; } } else if ( directions [ CollisionHandler . DIRECTION_TOP ] ) { position . setY ( ( ( otherBoundingBox . getBottom ( ) ) + 1 ) ) ; if ( ( movement . getVelocityY ( ) ) < 0 ) { movement . setVelocityY ( 0 ) ; } } else if ( directions [ CollisionHandler . DIRECTION_RIGHT ] ) { position . setX ( ( ( ( otherBoundingBox . getLeft ( ) ) - ( ourBoundingBox . getWidth ( ) ) ) - 1 ) ) ; if ( ( movement . getVelocityX ( ) ) > 0 ) { movement . setVelocityX ( 0 ) ; } } else if ( directions [ CollisionHandler . DIRECTION_BOTTOM ] ) { <START_BUG> position . setY ( ( ( ( otherBoundingBox . getY ( ) ) - ( ourBoundingBox . getHeight ( ) ) ) - 1 ) ) ; <END_BUG> if ( ( movement . getVelocityY ( ) ) > 0 ) { movement . setVelocityY ( 0 ) ; } } } }

Fix:
position . setY ( ( ( ( otherBoundingBox . getY ( ) ) - ( ourBoundingBox . getHeight ( ) ) ) + 1 ) ) ;
Buggy code:
public final class FaceTrackerActivity extends AppCompatActivity { private CameraSource mCameraSource = null ; private CameraSourcePreview mPreview ; private GraphicOverlay mGraphicOverlay ; private Button smileButton ; private Button addMinFace ; private Button subMinFace ; public FaceDetector blinkDetector ; private ImageView thumbnail ; private Button flipButton ; private static final int RC_HANDLE_GMS = 9001 ; private static final int RC_HANDLE_CAMERA_PERM = 2 ; private static int numPics = 1 ; private static float eyeProb = ( ( float ) ( 0.5 ) ) ; private volatile int smilers = 0 ; private boolean captureSmilers = false ; private boolean blinkProof = true ; private boolean retake = false ; private volatile int faces = 0 ; private static int minSmiles = 1 ; private volatile int count = 0 ; private SharedPreferences sharedPrefs ; private Editor mEditor ; private long global_time = System . currentTimeMillis ( ) ; private long TIME_BETWEEN_THRESHOLD = 2000 ; private int CAMERA_FACING_BACK = CameraSource . CAMERA_FACING_BACK ; private int CAMERA_FACING_FRONT = CameraSource . CAMERA_FACING_FRONT ; private String TAG = "CalHacks" ; @ Override public void onCreate ( Bundle icicle ) { } public void initializeDrawables ( String lastImagePath ) { } public void flipCamera ( ) { } public void resetVars ( ) { FaceTrackerActivity . numPics = 1 ; smilers = 0 ; captureSmilers = false ; blinkProof = true ; retake = false ; faces = 0 ; <START_BUG> minFaces = 1 ; <END_BUG> count = 0 ; } public void takePicture ( ) { } private void requestCameraPermission ( ) { } private void createCameraSource ( int facing ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onDestroy ( ) { } @ Override public void onRequestPermissionsResult ( int requestCode , String [ ] permissions , int [ ] grantResults ) { } private void startCameraSource ( ) { } private class GraphicFaceTrackerFactory implements MultiProcessor . Factory < Face > { @ Override public Tracker < Face > create ( Face face ) { } } private class GraphicFaceTracker extends Tracker < Face > { private GraphicOverlay mOverlay ; private FaceGraphic mFaceGraphic ; private boolean smiling = false ; GraphicFaceTracker ( GraphicOverlay overlay ) { } @ Override public void onNewItem ( int faceId , Face item ) { } @ Override public void onUpdate ( FaceDetector . Detections < Face > detectionResults , Face face ) { } public boolean checkConditions ( ) { } @ Override public void onMissing ( FaceDetector . Detections < Face > detectionResults ) { } @ Override public void onDone ( ) { } } }

Fix:
FaceTrackerActivity . minSmiles = 1 ;
Buggy code:
public class MessageDrivenBeanXmlDescriptorProcessor extends AbstractEjbXmlDescriptorProcessor < MessageDrivenBeanMetaData > { @ Override protected Class < MessageDrivenBeanMetaData > getMetaDataType ( ) { } @ Override protected void processBeanMetaData ( MessageDrivenBeanMetaData mdb , DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final EjbJarDescription ejbModuleDescription = deploymentUnit . getAttachment ( EJB_JAR_DESCRIPTION ) ; final EEModuleDescription moduleDescription = deploymentUnit . getAttachment ( EE_MODULE_DESCRIPTION ) ; final String applicationName = moduleDescription . getApplicationName ( ) ; String ejbName = mdb . getEjbName ( ) ; String ejbClassName = mdb . getEjbClass ( ) ; <START_BUG> MessageDrivenComponentDescription mdbDescription = new MessageDrivenComponentDescription ( ejbName , ejbClassName , ejbModuleDescription ) ; <END_BUG> mdbDescription . setMessageListenerInterfaceName ( mdb . getMessagingType ( ) ) ; ejbModuleDescription . getEEModuleDescription ( ) . addComponent ( mdbDescription ) ; } }

Fix:
MessageDrivenComponentDescription mdbDescription = new MessageDrivenComponentDescription ( ejbName , ejbClassName , ejbModuleDescription , deploymentUnit . getServiceName ( ) ) ;
Buggy code:
public class MapJobExplorerFactoryBean extends AbstractJobExplorerFactoryBean implements InitializingBean { private MapJobRepositoryFactoryBean repositoryFactory ; public MapJobExplorerFactoryBean ( MapJobRepositoryFactoryBean repositoryFactory ) { } public MapJobExplorerFactoryBean ( ) { } public void setRepositoryFactory ( MapJobRepositoryFactoryBean repositoryFactory ) { } public void afterPropertiesSet ( ) throws Exception { <START_BUG> Assert . state ( ( ( repositoryFactory ) != null ) , "A<seq2seq4repair_space>MapJobExplorerFactoryBean<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>provided" ) ; <END_BUG> repositoryFactory . afterPropertiesSet ( ) ; } @ Override protected JobExecutionDao createJobExecutionDao ( ) throws Exception { } @ Override protected JobInstanceDao createJobInstanceDao ( ) throws Exception { } @ Override protected StepExecutionDao createStepExecutionDao ( ) throws Exception { } @ Override protected ExecutionContextDao createExecutionContextDao ( ) throws Exception { } public Object getObject ( ) throws Exception { } }

Fix:
Assert . state ( ( ( repositoryFactory ) != null ) , "A<seq2seq4repair_space>MapJobRepositoryFactoryBean<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>provided" ) ;
Buggy code:
class GenericTypeAwarePropertyDescriptor extends PropertyDescriptor { private final Class beanClass ; private final Method readMethod ; private final Method writeMethod ; private final Class propertyEditorClass ; private volatile Set < Method > ambiguousWriteMethods ; private Class propertyType ; private MethodParameter writeMethodParameter ; public GenericTypeAwarePropertyDescriptor ( Class beanClass , String propertyName , Method readMethod , Method writeMethod , Class propertyEditorClass ) throws IntrospectionException { } public Class < ? > getBeanClass ( ) { <START_BUG> return beanClass ; <END_BUG> } @ Override public Method getReadMethod ( ) { } @ Override public Method getWriteMethod ( ) { } public Method getWriteMethodForActualAccess ( ) { } @ Override public Class getPropertyEditorClass ( ) { } @ Override public synchronized Class getPropertyType ( ) { } public synchronized MethodParameter getWriteMethodParameter ( ) { } }

Fix:
return this . beanClass ;
Buggy code:
public class WhenClause { private final Object when ; private Object then ; WhenClause ( Object op ) { } Object getThen ( ) { } void setThen ( Object then ) { } boolean hasThen ( ) { } public String toJPQL ( AliasContext ctx ) { <START_BUG> StringBuffer tmp = new StringBuffer ( ) ; <END_BUG> tmp . append ( "<seq2seq4repair_space>WHEN<seq2seq4repair_space>" ) . append ( JPQLHelper . toJPQL ( ctx , when ) ) . append ( "<seq2seq4repair_space>THEN<seq2seq4repair_space>" ) . append ( JPQLHelper . toJPQL ( ctx , then ) ) ; return tmp . toString ( ) ; } }

Fix:
StringBuilder tmp = new StringBuilder ( ) ;
Buggy code:
public class MyEllipse extends MyShape { public MyEllipse ( ) { } public MyEllipse ( int x1 , int y1 , int x2 , int y2 ) { } public MyEllipse ( int x1 , int y1 , int x2 , int y2 , int width , int heigth , int startx , int starty ) { } public MyEllipse ( int x , int y ) { } @ Override public void draw ( Graphics2D g ) { } @ Override public boolean contains ( int x , int y ) { Ellipse2D . Double ellip = new Ellipse2D . Double ( startx , starty , width , height ) ; <START_BUG> return ellip . intersects ( ( x - 1 ) , ( y - 1 ) , 1 , 1 ) ; <END_BUG> } }

Fix:
return ellip . intersects ( x , y , 1 , 1 ) ;
Buggy code:
public class CloudSolrServer extends SolrServer { private volatile ZkStateReader zkStateReader ; private String zkHost ; private int zkConnectTimeout = 10000 ; private int zkClientTimeout = 10000 ; private String defaultCollection ; private LBHttpSolrServer lbServer ; Random rand = new Random ( ) ; private MultiThreadedHttpConnectionManager connManager ; public CloudSolrServer ( String zkHost ) throws MalformedURLException { } public CloudSolrServer ( String zkHost , LBHttpSolrServer lbServer ) { } public void setDefaultCollection ( String collection ) { } public void setZkConnectTimeout ( int zkConnectTimeout ) { } public void setZkClientTimeout ( int zkClientTimeout ) { } public void connect ( ) { } @ Override public NamedList < Object > request ( SolrRequest request ) throws IOException , SolrServerException { connect ( ) ; CloudState cloudState = zkStateReader . getCloudState ( ) ; SolrParams reqParams = request . getParams ( ) ; if ( reqParams == null ) { reqParams = new ModifiableSolrParams ( ) ; } String collection = reqParams . get ( "collection" , defaultCollection ) ; List < String > collectionList = StrUtils . splitSmart ( collection , "," , true ) ; Map < String , Slice > slices = new HashMap < String , Slice > ( ) ; for ( int i = 0 ; i < ( collectionList . size ( ) ) ; i ++ ) { String coll = collectionList . get ( i ) ; ClientUtils . appendMap ( coll , slices , cloudState . getSlices ( coll ) ) ; } Set < String > liveNodes = cloudState . getLiveNodes ( ) ; Map < String , ZkNodeProps > nodes = new HashMap < String , ZkNodeProps > ( ) ; List < String > urlList = new ArrayList < String > ( ) ; for ( Slice slice : slices . values ( ) ) { for ( ZkNodeProps nodeProps : slice . getShards ( ) . values ( ) ) { ZkCoreNodeProps coreNodeProps = new ZkCoreNodeProps ( nodeProps ) ; String node = coreNodeProps . getNodeName ( ) ; <START_BUG> if ( ( ! ( liveNodes . contains ( coreNodeProps . getNodeName ( ) ) ) ) && ( coreNodeProps . getState ( ) . equals ( ACTIVE ) ) ) <END_BUG> continue ; if ( ( nodes . put ( node , nodeProps ) ) == null ) { String url = coreNodeProps . getCoreUrl ( ) ; urlList . add ( url ) ; } } } Collections . shuffle ( urlList , rand ) ; LBHttpSolrServer . Req req = new LBHttpSolrServer . Req ( request , urlList ) ; LBHttpSolrServer . Rsp rsp = lbServer . request ( req ) ; return rsp . getResponse ( ) ; } public void close ( ) { } public LBHttpSolrServer getLbServer ( ) { } }

Fix:
if ( ( ! ( liveNodes . contains ( coreNodeProps . getNodeName ( ) ) ) ) || ( ! ( coreNodeProps . getState ( ) . equals ( ACTIVE ) ) ) )
Buggy code:
public class Director { private ECS ecs ; private Skin skin ; private int size ; private int level ; public Director ( ECS ecs ) { } public Entity start ( ) { <START_BUG> return ecs . createEntity ( new ca . jestdotty . ecs . component . Body ( skin . getRegion ( "dot" ) , new Color ( 0.9F , 0.9F , 0.9F , 0.5F ) , 0 , 0 , size ) , new Velocity ( 0 , 0 ) , new Acceleration ( 40 ) ) ; <END_BUG> } public void dispose ( ) { } No newline ; at end ; of file ; }

Fix:
return ecs . createEntity ( new ca . jestdotty . ecs . component . Body ( skin . getRegion ( "dot" ) , new Color ( 0.9F , 0.9F , 0.9F , 0.5F ) , 0 , 0 , size ) , new Velocity ( 0 , 0 ) , new Acceleration ( 2 ) ) ;
Buggy code:
public class Jaxb2MarshallerTests extends AbstractMarshallerTests { private static final String CONTEXT_PATH = "org.springframework.oxm.jaxb.test" ; private Jaxb2Marshaller marshaller ; private Flights flights ; @ Override public Marshaller createMarshaller ( ) throws Exception { } @ Override protected Object createFlights ( ) { FlightType flight = new FlightType ( ) ; flight . setNumber ( 42L ) ; flights = new Flights ( ) ; <START_BUG> flights . getFlight ( ) . add ( flight ) ; <END_BUG> return flights ; } @ Test public void marshalSAXResult ( ) throws Exception { } @ Test public void laxyInit ( ) throws Exception { } @ Test public void properties ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void noContextPathOrClassesToBeBound ( ) throws Exception { } @ Test ( expected = UncategorizedMappingException . class ) public void testInvalidContextPath ( ) throws Exception { } @ Test ( expected = XmlMappingException . class ) public void marshalInvalidClass ( ) throws Exception { } @ Test public void supportsContextPath ( ) throws Exception { } @ Test public void supportsClassesToBeBound ( ) throws Exception { } @ Test public void marshalAttachments ( ) throws Exception { } }

Fix:
flights . getFlight ( ) . configureBinding ( flight ) ;
Buggy code:
public class Quest5 implements YesNoQuestion { private static final String _id = "Quest5" ; private ConfigFile _conf ; private static final UserCommunicator _uc = UserCommunicator . getDefault ( ) ; private Quest5a _q5a ; private Quest5b _q5b ; private ResourceBundle _labels ; public Quest5 ( ConfigFile conf ) { } @ Override public boolean answer ( ) { Quest5 . _uc . printHeading3 ( Quest5 . _id ) ; Quest5 . _uc . printHidingParagraph ( _labels . getString ( "S0" ) , _labels . getString ( "P0" ) ) ; <START_BUG> Quest5 . _uc . printParagraph ( _labels . getString ( "Q0" ) ) ; <END_BUG> Quest5 . _uc . println ( _labels . getString ( "L1" ) ) ; Quest5 . _uc . beginIndent ( ) ; boolean answer5a = _q5a . answer ( ) ; boolean answer5b = _q5b . answer ( ) ; boolean ret = answer5a && answer5b ; Quest5 . _uc . endIndent ( ) ; Quest5 . _uc . println ( MessageFormat . format ( _labels . getString ( "L2" ) , Quest5 . _id ) ) ; Quest5 . _uc . printAnswer ( ret , ( ret ? _labels . getString ( "S1_good" ) : _labels . getString ( "S1_bad" ) ) ) ; return ret ; } @ Override public boolean isCritical ( ) { } @ Override public String getID ( ) { } @ Override public int getBlockNumber ( ) { } @ Override public int getNumber ( ) { } @ Override public String [ ] getRequirements ( ) { } @ Override public void initialize ( ) throws Exception { } }

Fix:
Quest5 . _uc . printParagraph ( MessageFormat . format ( _labels . getString ( "Q0" ) , _conf . getFileName ( ) ) ) ;
Buggy code:
public class EnemyNibbler extends SimpleEnemy { public static final int WAVE_SIZE = 45 ; public static final double BASE_KILL_REWARD = 2 ; public static final double PRIORITY = 0 ; public static final double MAX_HEALTH = 60 ; public static final double HEALTH_REGEN = 0 ; public static final double ATTACK_DAMAGE = 8 ; public static final double ATTACK_DELAY = 40 ; public static final double ATTACK_RANGE = 0.1 ; public static final double MOVE_SPEED = 0.07 ; public static final double TOWER_AFFINITY = 0 ; public static final boolean FIRE_ON_THE_MOVE = false ; public static final double [ ] [ ] MOVE_PRIORITIES = new double [ ] [ ] { new double [ ] { 2.5 , 3 , 2.5 } , new double [ ] { 1 , 0 , 1 } , new double [ ] { 0 , 0 , 0 } } ; public static final boolean USES_PROJECTILE = false ; public static final double PROJECTILE_SPEED = 0 ; public static final double SHOT_ORIGIN_DISTANCE = 0 ; public static final boolean APPLIES_DEBUFF = false ; public EnemyNibbler ( GameState gameState , Point2d loc , double tier , Node currNode , int spawnFrame ) { } public EnemyNibbler ( double tier ) { } @ Override public Enemy generateCopy ( double tier ) { <START_BUG> return new EnemyNibbler ( null , null , tier , null , 0 ) ; <END_BUG> } public static PaintableShapes generateShapes ( Point2d loc ) { } @ Override protected Animation generateInstantAttackAnimation ( GameState gameState ) { } }

Fix:
return new EnemyNibbler ( tier ) ;
Buggy code:
public class SubsystemDescriptionDump implements OperationStepHandler { private final ExtensionRegistry extensionRegistry ; protected static final SimpleAttributeDefinition PATH = new SimpleAttributeDefinition ( "path" , ModelType . STRING , false ) ; public static final String OPERATION_NAME = "subsystem-description-dump" ; public static final OperationDefinition DEFINITION = new org . jboss . as . controller . SimpleOperationDefinition ( SubsystemDescriptionDump . OPERATION_NAME , new NonResolvingResourceDescriptionResolver ( ) , EntryType . PRIVATE , EnumSet . of ( READ_ONLY ) , SubsystemDescriptionDump . PATH ) ; public SubsystemDescriptionDump ( final ExtensionRegistry extensionRegistry ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { String path = SubsystemDescriptionDump . PATH . resolveModelAttribute ( context , operation ) . asString ( ) ; SubsystemDescriptionDump . dumpManagementResourceRegistration ( extensionRegistry , path ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } public static void dumpManagementResourceRegistration ( final ExtensionRegistry registry , final String path ) throws OperationFailedException { } public static ModelNode readFullModelDescription ( PathAddress address , ImmutableManagementResourceRegistration reg ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
class SchemaCommandBuilderImpl extends InvocationCallbackBase < List < Schema > > implements SchemaCommandBuilder { private final QdsClient client ; private String filter ; private boolean describe ; private String schemaName = "default" ; @ Override public SchemaCommandBuilder filter ( String filter ) { } @ Override public SchemaCommandBuilder described ( ) { } @ Override public SchemaCommandBuilder schemaName ( String schemaName ) { } @ Override protected InvokeArguments < List < Schema > > getInvokeArguments ( ) { Map < String , String > params = Maps . newHashMap ( ) ; if ( ( filter ) != null ) { params . put ( "filter" , filter ) ; } if ( describe ) { params . put ( "describe" , "true" ) ; } GenericType < List < Schema > > responseType = new GenericType < List < Schema > > ( ) { } ; <START_BUG> return new InvokeArguments < List < Schema > > ( client , null , new RequestDetails ( null , Method . GET , params ) , responseType , "hive" , "default" ) ; <END_BUG> } SchemaCommandBuilderImpl ( QdsClient client ) { } }

Fix:
return new InvokeArguments < List < Schema > > ( client , null , new RequestDetails ( null , Method . GET , params ) , responseType , "hive" , schemaName ) ;
Buggy code:
@ RunWith ( Parameterized . class ) public class SimpAnnotationMethodIntegrationTests extends AbstractWebSocketIntegrationTests { @ Parameters public static Iterable < Object [ ] > arguments ( ) { } @ Override protected Class < ? > [ ] getAnnotatedConfigClasses ( ) { } @ Test public void sendMessageToController ( ) throws Exception { } @ Test public void sendMessageToControllerAndReceiveReplyViaTopic ( ) throws Exception { } @ Test public void sendMessageToBrokerAndReceiveReplyViaTopic ( ) throws Exception { } @ SimpAnnotationMethodIntegrationTests . IntegrationTestController static class SimpleController { private CountDownLatch latch = new CountDownLatch ( 1 ) ; @ MessageMapping ( "//simple" ) public void handle ( ) { } @ MessageMapping ( "//exception" ) public void handleWithError ( ) { } @ MessageExceptionHandler public void handleException ( IllegalArgumentException ex ) { } } @ SimpAnnotationMethodIntegrationTests . IntegrationTestController static class IncrementController { @ MessageMapping ( "//topic//increment" ) public int handle ( int i ) { } } private static class TestClientWebSocketHandler extends TextWebSocketHandlerAdapter { private final TextMessage [ ] messagesToSend ; private final int expected ; private final List < TextMessage > actual = new CopyOnWriteArrayList < > ( ) ; private final CountDownLatch latch ; public TestClientWebSocketHandler ( int expectedNumberOfMessages , TextMessage ... messagesToSend ) { } @ Override public void afterConnectionEstablished ( WebSocketSession session ) throws Exception { } @ Override protected void handleTextMessage ( WebSocketSession session , TextMessage message ) throws Exception { } } @ Configuration @ ComponentScan ( basePackageClasses = SimpAnnotationMethodIntegrationTests . class , useDefaultFilters = false , includeFilters = @ ComponentScan . Filter ( SimpAnnotationMethodIntegrationTests . IntegrationTestController . class ) ) static class TestMessageBrokerConfigurer implements WebSocketMessageBrokerConfigurer { @ Autowired private HandshakeHandler handshakeHandler ; @ Override public void registerStompEndpoints ( StompEndpointRegistry registry ) { } @ Override public void configureMessageBroker ( MessageBrokerConfigurer configurer ) { <START_BUG> configurer . setAnnotationMethodDestinationPrefixes ( "//app" ) ; <END_BUG> configurer . enableSimpleBroker ( "//topic" , "//queue" ) ; } } @ Configuration static class TestMessageBrokerConfiguration extends DelegatingWebSocketMessageBrokerConfiguration { @ Override @ Bean public AbstractSubscribableChannel webSocketRequestChannel ( ) { } @ Override @ Bean public AbstractSubscribableChannel webSocketResponseChannel ( ) { } } @ Target ( { ElementType . TYPE } ) @ Retention ( RetentionPolicy . RUNTIME ) @ Controller private @ interface IntegrationTestController { } }

Fix:
configurer . setApplicationDestinationPrefixes ( "//app" ) ;
Buggy code:
public class SettingsTabFonts extends SettingsTabHelper implements SettingsTabPanel { ButtonGroup _bg = null ; JRadioButton _normal = null ; JRadioButton _big = null ; JRadioButton _huge = null ; public SettingsTabFonts ( ) { } public void handleSettingsTabRefresh ( ) { } public void handleSettingsTabSave ( ) { } public void handleSettingsTabCancel ( ) { } public String getModuleName ( ) { } public String getModuleDescription ( ) { } public String getModuleAuthor ( ) { } public String getModuleVersion ( ) { <START_BUG> return ArgoVersion . VERSION ; <END_BUG> } public String getModuleKey ( ) { } public String getTabKey ( ) { } }

Fix:
return ArgoVersion . getVersion ( ) ;