nus-yam/ex-repair huggingface dataset:
Buggy code:
public final class ImplicitJPArgumentMatchingAtAspectJTests { @ Test public void testAspect ( ) { <START_BUG> new ClassPathXmlApplicationContext ( "implicit-jp-argument-matching-atAspectJ-tests.xml" , getClass ( ) ) ; <END_BUG> } @ Aspect static class CounterAtAspectJAspect { @ Around ( value = "execution(*<seq2seq4repair_space>org.springframework.beans.TestBean.*(..))<seq2seq4repair_space>and<seq2seq4repair_space>this(bean)<seq2seq4repair_space>and<seq2seq4repair_space>args(argument)" , argNames = "bean,argument" ) public void increment ( ProceedingJoinPoint pjp , TestBean bean , Object argument ) throws Throwable { } } }

Fix:
new ClassPathXmlApplicationContext ( ( ( getClass ( ) . getSimpleName ( ) ) + ".xml" ) , getClass ( ) ) ;
Buggy code:
public class FetchSubFolderListCommand extends FolderCommand { FolderTreeNode treeNode ; public FetchSubFolderListCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { log . debug ( ( "reference=" + ( getReferences ( UNDOABLE_OPERATION ) ) ) ) ; FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( getReferences ( FIRST_EXECUTION ) ) ) ; if ( r == null ) return ; treeNode = ( ( FolderTreeNode ) ( r [ 0 ] . getFolder ( ) ) ) ; if ( ( treeNode ) instanceof IMAPRootFolder ) <START_BUG> treeNode . createChildren ( ) ; <END_BUG> } public void undo ( Worker worker ) throws Exception { } public void redo ( Worker worker ) throws Exception { } }

Fix:
( ( IMAPRootFolder ) ( treeNode ) ) . syncSubscribedFolders ( ) ;
Buggy code:
public class ContentConflictsUnitTestCase extends AbstractTaskTestCase { @ Test public void testApply ( ) throws Exception { } @ Test public void testRollback ( ) throws Exception { } protected void assertConflicts ( CommandLineException e , String ... conflicts ) { final StringBuilder buf = new StringBuilder ( ) ; buf . append ( "Conflicts<seq2seq4repair_space>detected:<seq2seq4repair_space>" ) ; int i = 0 ; while ( i < ( conflicts . length ) ) { buf . append ( conflicts [ ( i ++ ) ] . replace ( '\\' , '//' ) ) ; if ( i < ( conflicts . length ) ) { buf . append ( ",<seq2seq4repair_space>" ) ; } } <START_BUG> assertEquals ( e . getMessage ( ) , buf . toString ( ) ) ; <END_BUG> } }

Fix:
assertEquals ( e . getMessage ( ) . split ( System . getProperty ( "line.separator" ) ) [ 0 ] , buf . toString ( ) ) ;
Buggy code:
public class CacheOperationEditor extends PropertyEditorSupport { @ Override public void setAsText ( String text ) throws IllegalArgumentException { if ( StringUtils . hasLength ( text ) ) { String [ ] tokens = StringUtils . commaDelimitedListToStringArray ( text ) ; if ( ( tokens . length ) < 2 ) { throw new IllegalArgumentException ( "too<seq2seq4repair_space>little<seq2seq4repair_space>arguments<seq2seq4repair_space>found,<seq2seq4repair_space>at<seq2seq4repair_space>least<seq2seq4repair_space>the<seq2seq4repair_space>cache<seq2seq4repair_space>action<seq2seq4repair_space>and<seq2seq4repair_space>cache<seq2seq4repair_space>name<seq2seq4repair_space>are<seq2seq4repair_space>required" ) ; } CacheOperation op ; if ( "cacheable" . contains ( tokens [ 0 ] ) ) { <START_BUG> op = new CacheUpdateOperation ( ) ; <END_BUG> } else if ( "evict" . contains ( tokens [ 0 ] ) ) { op = new CacheEvictOperation ( ) ; } else { throw new IllegalArgumentException ( ( "Invalid<seq2seq4repair_space>cache<seq2seq4repair_space>action<seq2seq4repair_space>specified<seq2seq4repair_space>" + ( tokens [ 0 ] ) ) ) ; } op . setCacheNames ( StringUtils . delimitedListToStringArray ( tokens [ 1 ] , ";" ) ) ; if ( ( tokens . length ) > 2 ) { op . setKey ( tokens [ 2 ] ) ; } if ( ( tokens . length ) > 3 ) { op . setCondition ( tokens [ 3 ] ) ; } setValue ( op ) ; } else { setValue ( null ) ; } } }

Fix:
op = new CacheableOperation ( ) ;
Buggy code:
public class circleMethods { public static void main ( String [ ] args ) { <START_BUG> final double PI = 3.14159 ; <END_BUG> double R = 15.0 ; double Circumference = ( PI * R ) * 2.0 ; JOptionPane . showMessageDialog ( null , ( ( "The<seq2seq4repair_space>circumference<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>circle<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>diameter<seq2seq4repair_space>of<seq2seq4repair_space>15<seq2seq4repair_space>is<seq2seq4repair_space>" + Circumference ) + "." ) ) ; } }

Fix:
final double PI = Math . PI ;
Buggy code:
public class GeneralOptionsDialog extends JDialog implements ActionListener { JTabbedPane centerPane ; GeneralPanel generalPanel ; ComposerPanel composerPanel ; ThemePanel themePanel ; FontPanel fontPanel ; JButton okButton ; JButton cancelButton ; boolean result ; public GeneralOptionsDialog ( JFrame frame ) { } public void updateComponents ( boolean b ) { } protected void initComponents ( ) { JPanel contentPane = new JPanel ( ) ; contentPane . setLayout ( new BorderLayout ( 0 , 0 ) ) ; centerPane = new JTabbedPane ( ) ; generalPanel = new GeneralPanel ( ) ; centerPane . add ( generalPanel , "General" ) ; composerPanel = new ComposerPanel ( ) ; centerPane . add ( composerPanel , "Composer" ) ; themePanel = new ThemePanel ( ) ; centerPane . add ( themePanel , "Themes<seq2seq4repair_space>and<seq2seq4repair_space>Icons" ) ; fontPanel = new FontPanel ( ) ; centerPane . add ( fontPanel , "Fonts" ) ; contentPane . add ( centerPane , BorderLayout . CENTER ) ; JPanel bottomPanel = new JPanel ( new BorderLayout ( 0 , 0 ) ) ; bottomPanel . setBorder ( BorderFactory . createEmptyBorder ( 17 , 0 , 11 , 11 ) ) ; JPanel buttonPanel = new JPanel ( new GridLayout ( 1 , 2 , 5 , 0 ) ) ; okButton = new JButton ( MailResourceLoader . getString ( "global" , "ok" ) ) ; okButton . setActionCommand ( "OK" ) ; okButton . addActionListener ( this ) ; buttonPanel . add ( okButton ) ; <START_BUG> JButton cancelButton = new JButton ( MailResourceLoader . getString ( "global" , "ok" ) ) ; <END_BUG> cancelButton . setActionCommand ( "CANCEL" ) ; cancelButton . addActionListener ( this ) ; buttonPanel . add ( cancelButton ) ; bottomPanel . add ( buttonPanel , BorderLayout . EAST ) ; contentPane . add ( bottomPanel , BorderLayout . SOUTH ) ; setContentPane ( contentPane ) ; getRootPane ( ) . setDefaultButton ( okButton ) ; getRootPane ( ) . registerKeyboardAction ( this , "CANCEL" , KeyStroke . getKeyStroke ( KeyEvent . VK_ESCAPE , 0 ) , JComponent . WHEN_IN_FOCUSED_WINDOW ) ; } public void actionPerformed ( ActionEvent event ) { } public boolean getResult ( ) { } }

Fix:
JButton cancelButton = new JButton ( MailResourceLoader . getString ( "global" , "cancel" ) ) ;
Buggy code:
public abstract class UpdatePropertiesHandler { private ConsoleWrapper theConsole ; public UpdatePropertiesHandler ( ConsoleWrapper theConsole ) { } abstract void persist ( String [ ] entry , File file ) throws IOException { } abstract String consoleUserMessage ( String fileName ) { } abstract String consoleRolesMessage ( String fileName ) { } abstract String errorMessage ( String fileName , Throwable e ) { } State update ( StateValues stateValues ) { String [ ] entry = new String [ 2 ] ; try { String hash = new UsernamePasswordHashUtil ( ) . generateHashedHexURP ( stateValues . getUserName ( ) , stateValues . getRealm ( ) , stateValues . getPassword ( ) ) ; entry [ 0 ] = stateValues . getUserName ( ) ; entry [ 1 ] = hash ; } catch ( NoSuchAlgorithmException e ) { return new ErrorState ( theConsole , e . getMessage ( ) , null , stateValues ) ; } for ( File current : stateValues . getUserFiles ( ) ) { try { persist ( entry , current ) ; if ( ( stateValues . isSilent ( ) ) == false ) { theConsole . printf ( consoleUserMessage ( current . getCanonicalPath ( ) ) ) ; theConsole . printf ( AddUser . NEW_LINE ) ; } } catch ( Exception e ) { return new ErrorState ( theConsole , errorMessage ( current . getAbsolutePath ( ) , e ) , null , stateValues ) ; } } <START_BUG> if ( ( ! ( stateValues . isManagement ( ) ) ) && ( ( stateValues . getRoles ( ) ) != null ) ) { <END_BUG> for ( final File current : stateValues . getRoleFiles ( ) ) { String [ ] role = new String [ ] { stateValues . getUserName ( ) , stateValues . getRoles ( ) } ; try { persist ( role , current ) ; if ( ( stateValues . isSilent ( ) ) == false ) { theConsole . printf ( consoleRolesMessage ( current . getCanonicalPath ( ) ) ) ; theConsole . printf ( AddUser . NEW_LINE ) ; } } catch ( IOException e ) { return new ErrorState ( theConsole , errorMessage ( current . getAbsolutePath ( ) , e ) , null , stateValues ) ; } } } return null ; } }

Fix:
if ( ( stateValues . rolePropertiesFound ( ) ) && ( ( stateValues . getRoles ( ) ) != null ) ) {
Buggy code:
<START_BUG> public class StaxUpdateRequestHandler extends RequestHandlerBase { <END_BUG> public static Logger log = Logger . getLogger ( StaxUpdateRequestHandler . class . getName ( ) ) ; public static final String UPDATE_PROCESSOR_CLASS = "update.processor.class" ; public static final String ADD = "add" ; public static final String DELETE = "delete" ; public static final String OPTIMIZE = "optimize" ; public static final String COMMIT = "commit" ; public static final String WAIT_SEARCHER = "waitSearcher" ; public static final String WAIT_FLUSH = "waitFlush" ; public static final String MODE = "mode" ; public static final String OVERWRITE = "overwrite" ; public static final String OVERWRITE_COMMITTED = "overwriteCommitted" ; public static final String OVERWRITE_PENDING = "overwritePending" ; public static final String ALLOW_DUPS = "allowDups" ; private XMLInputFactory inputFactory ; private Constructor < ? extends UpdateRequestProcessor > processorConstructor ; @ SuppressWarnings ( "unchecked" ) @ Override public void init ( NamedList args ) { super . init ( args ) ; inputFactory = BaseXMLInputFactory . newInstance ( ) ; Class < ? extends UpdateRequestProcessor > clazz = null ; String className = null ; try { if ( args != null ) { className = ( ( String ) ( args . get ( StaxUpdateRequestHandler . UPDATE_PROCESSOR_CLASS ) ) ) ; if ( className != null ) { clazz = Config . findClass ( className , new String [ ] { } ) ; } } if ( clazz == null ) { clazz = UpdateRequestProcessor . class ; } processorConstructor = clazz . getConstructor ( SolrQueryRequest . class ) ; } catch ( Exception e ) { throw new org . apache . solr . common . SolrException ( ErrorCode . SERVER_ERROR , ( "error<seq2seq4repair_space>initializing<seq2seq4repair_space>processor<seq2seq4repair_space>class:<seq2seq4repair_space>" + className ) , e ) ; } if ( ( processorConstructor ) == null ) { throw new org . apache . solr . common . SolrException ( ErrorCode . SERVER_ERROR , ( "invalid<seq2seq4repair_space>processor:<seq2seq4repair_space>" + clazz ) ) ; } } protected UpdateRequestProcessor getUpdateRequestProcessor ( SolrQueryRequest req ) { } @ Override public void handleRequestBody ( SolrQueryRequest req , SolrQueryResponse rsp ) throws Exception { } NamedList < Object > processUpdate ( SolrQueryRequest req , SolrCore core , XMLStreamReader parser ) throws IOException , IllegalAccessException , InstantiationException , FactoryConfigurationError , XMLStreamException , TransformerConfigurationException { } void processDelete ( UpdateRequestProcessor processor , XMLStreamReader parser ) throws IOException , XMLStreamException { } SolrInputDocument readDoc ( XMLStreamReader parser ) throws XMLStreamException { } public NamedList < Object > update ( SolrQueryRequest req , SolrCore core , Reader reader ) throws Exception { } @ Deprecated public void doLegacyUpdate ( Reader input , Writer output ) { } @ Override public String getDescription ( ) { } @ Override public String getVersion ( ) { } @ Override public String getSourceId ( ) { } @ Override public String getSource ( ) { } }

Fix:
public class StaxUpdateRequestHandler extends XmlUpdateRequestHandler {
Buggy code:
public final class LibrarySession extends WebSession { private User user ; protected LibrarySession ( final WebApplication application , Request request ) { } public final User authenticate ( final String username , final String password ) { if ( ( user ) == null ) { <START_BUG> if ( ( "org.apache.wicket" . equalsIgnoreCase ( username ) ) && ( "org.apache.wicket" . equalsIgnoreCase ( password ) ) ) { <END_BUG> final User user = new User ( ) ; user . setName ( username ) ; final List books = user . getBooks ( ) ; books . add ( new Book ( "Effective<seq2seq4repair_space>Java" , "Joshua<seq2seq4repair_space>Bloch" , Book . NON_FICTION ) ) ; books . add ( new Book ( "The<seq2seq4repair_space>Illiad" , "Homer<seq2seq4repair_space>Simpson" , Book . FICTION ) ) ; books . add ( new Book ( "Why<seq2seq4repair_space>Stock<seq2seq4repair_space>Markets<seq2seq4repair_space>Crash" , "Didier<seq2seq4repair_space>Sornette" , Book . NON_FICTION ) ) ; books . add ( new Book ( "The<seq2seq4repair_space>Netherlands" , "Mike<seq2seq4repair_space>Jones" , Book . NON_FICTION ) ) ; books . add ( new Book ( "Windows,<seq2seq4repair_space>Windows,<seq2seq4repair_space>Windows!" , "Steve<seq2seq4repair_space>Ballmer" , Book . FICTION ) ) ; books . add ( new Book ( "This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>test" , "Vincent<seq2seq4repair_space>Rumsfield" , Book . FICTION ) ) ; books . add ( new Book ( "Movies" , "Mark<seq2seq4repair_space>Marksfield" , Book . NON_FICTION ) ) ; books . add ( new Book ( "DOS<seq2seq4repair_space>Capitol" , "Billy<seq2seq4repair_space>G" , Book . FICTION ) ) ; books . add ( new Book ( "Whatever" , "Jonny<seq2seq4repair_space>Zoom" , Book . FICTION ) ) ; books . add ( new Book ( "Tooty<seq2seq4repair_space>Fruity" , "Rudy<seq2seq4repair_space>O" , Book . FICTION ) ) ; setUser ( user ) ; } } return user ; } public boolean isSignedIn ( ) { } public User getUser ( ) { } public void setUser ( final User user ) { } }

Fix:
if ( ( "wicket" . equalsIgnoreCase ( username ) ) && ( "wicket" . equalsIgnoreCase ( password ) ) ) {
Buggy code:
public class HandleFactory { private String lastPkgFragmentRootPath ; private IPackageFragmentRoot lastPkgFragmentRoot ; private Map packageHandles ; private IWorkspace workspace ; private JavaModel javaModel ; public HandleFactory ( IWorkspace workspace ) { } public Openable createOpenable ( String resourcePath ) { } private IPackageFragmentRoot getJarPkgFragmentRoot ( String jarPathString ) { IPath jarPath = new Path ( jarPathString ) ; IResource jarFile = this . workspace . getRoot ( ) . findMember ( jarPath ) ; if ( jarFile != null ) { return this . javaModel . getJavaProject ( jarFile ) . getPackageFragmentRoot ( jarFile ) ; } else { IProject [ ] projects = this . workspace . getRoot ( ) . getProjects ( ) ; for ( int i = 0 , projectCount = projects . length ; i < projectCount ; i ++ ) { try { IProject project = projects [ i ] ; if ( ( ! ( project . isAccessible ( ) ) ) || ( ! ( project . hasNature ( JavaCore . NATURE_ID ) ) ) ) continue ; IJavaProject javaProject = this . javaModel . getJavaProject ( project ) ; <START_BUG> IClasspathEntry [ ] classpathEntries = ( ( JavaProject ) ( javaProject ) ) . getExpandedClasspath ( true ) ; <END_BUG> for ( int j = 0 , entryCount = classpathEntries . length ; j < entryCount ; j ++ ) { if ( classpathEntries [ j ] . getPath ( ) . equals ( jarPath ) ) { return javaProject . getPackageFragmentRoot ( jarPathString ) ; } } } catch ( CoreException e ) { } } return null ; } } private IPackageFragmentRoot getPkgFragmentRoot ( String pathString ) { } }

Fix:
IClasspathEntry [ ] classpathEntries = ( ( JavaProject ) ( javaProject ) ) . getResolvedClasspath ( true ) ;
Buggy code:
public class KeyBindingMenu extends ContributionItem { private WorkbenchWindow workbenchWindow ; private Menu acceleratorsMenu ; private MenuItem cascade ; private Control focusControl ; private KeyBindingMenu . ResetModeListener resetModeListener = new KeyBindingMenu . ResetModeListener ( ) ; private static class ResetModeListener implements Listener { private AcceleratorScope scope ; private KeyBindingService service ; public void handleEvent ( Event event ) { if ( ( event . type ) == ( SWT . Verify ) ) event . doit = false ; <START_BUG> scope . resetMode ( service ) ; <END_BUG> } } public KeyBindingMenu ( WorkbenchWindow window ) { } public void fill ( final Menu parent , int index ) { } public void setAccelerators ( final int [ ] accs , final AcceleratorScope scope , final KeyBindingService activeService , boolean defaultMode ) { } private void updateCancelListener ( boolean defaultMode ) { } }

Fix:
AcceleratorScope . resetMode ( service ) ;
Buggy code:
public class Zipper { public void createOSZ ( String mp3Path , String difficultyPath , String outputPath , String fileName ) throws IOException { FileOutputStream fos = new FileOutputStream ( ( ( ( outputPath + "\\" ) + fileName ) + ".osz" ) ) ; ZipOutputStream zos = new ZipOutputStream ( fos ) ; addToZip ( mp3Path , "Audio.mp3" , zos ) ; <START_BUG> addToZip ( ( ( outputPath + "\\" ) + fileName ) , "Difficulty.osu" , zos ) ; <END_BUG> zos . close ( ) ; fos . close ( ) ; } private void addToZip ( String path , String name , ZipOutputStream zos ) throws IOException { } }

Fix:
addToZip ( ( ( ( outputPath + "\\" ) + fileName ) + ".osu" ) , "Difficulty.osu" , zos ) ;
Buggy code:
public class WebExternalResourceStream extends AbstractResourceStream { InputStream in ; private static final long serialVersionUID = 1L ; private static final Logger log = LoggerFactory . getLogger ( WebExternalResourceStream . class ) ; private final String url ; public WebExternalResourceStream ( String url ) { } public long length ( ) { } public void close ( ) throws IOException { } public Time lastModifiedTime ( ) { } public String getContentType ( ) { } public InputStream getInputStream ( ) throws ResourceStreamNotFoundException { final ServletContext context = ( ( org . apache . wicket . protocol . http . WebApplication ) ( org . apache . wicket . RequestCycle . get ( ) . getApplication ( ) ) ) . getServletContext ( ) ; in = context . getResourceAsStream ( url ) ; if ( ( in ) == null ) { <START_BUG> throw new WicketRuntimeException ( "the<seq2seq4repair_space>requested<seq2seq4repair_space>resource<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ; <END_BUG> } return in ; } }

Fix:
throw new WicketRuntimeException ( ( "The<seq2seq4repair_space>requested<seq2seq4repair_space>resource<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>found:<seq2seq4repair_space>" + ( url ) ) ) ;
Buggy code:
public class ClaimList implements Listenable { protected ArrayList < Claim > claimList ; protected transient ArrayList < Listener > listeners ; public ClaimList ( ) { } public void addClaim ( Claim claim1 ) throws IOException { } public Claim getClaim ( String name ) { } public void removeClaim ( Claim claim1 ) { } public int size ( ) { } public ArrayList < Claim > toArrayList ( ) { } <START_BUG> public ClaimList filterTag ( String tag1 ) { <END_BUG> return null ; } public void notifyListeners ( ) { } public void addListener ( Listener listener ) { } public void deleteListener ( Listener listener ) { } }

Fix:
public ClaimList filterTag ( Tag tag1 ) {
Buggy code:
public class TestItalianAnalyzer extends BaseTokenStreamTestCase { public void testResourcesAvailable ( ) { } public void testBasics ( ) throws IOException { } public void testExclude ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new ItalianAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } public void testContractions ( ) throws IOException { } public void testContractionsBackwards ( ) throws IOException { } }

Fix:
checkRandomData ( random ( ) , new ItalianAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class AssistAnnotation extends Annotation { private Map infoCache ; public AssistAnnotation ( JavaElement parent , String name , Map infoCache ) { } public Object getElementInfo ( IProgressMonitor monitor ) throws JavaModelException { <START_BUG> return infoCache . get ( this ) ; <END_BUG> } }

Fix:
return this . infoCache . get ( this ) ;
Buggy code:
public class ForceUpdatePolicy extends BaseLibraryPolicy { public static final String ERROR_FORCED_DOWNLOAD_FAILED = "Failed<seq2seq4repair_space>to<seq2seq4repair_space>download<seq2seq4repair_space>file:" ; public String getName ( ) { } public boolean beforeConnect ( Libraries owner , ListIterator libraries ) { owner . markAllLibrariesForFetch ( true ) ; <START_BUG> owner . _setUseTimestamp ( false ) ; <END_BUG> return true ; } public void afterFetched ( Libraries owner , ListIterator libraries ) { } }

Fix:
owner . setUseTimestamp ( false ) ;
Buggy code:
public class AlarmHome extends AppCompatActivity { private Timer mainTimer ; private AlarmHome . MainTimerTask mainTimerTask ; private TextView countText ; private Button timerButton ; private boolean isTimerProcessing = false ; private int minutes = 0 ; private int seconds = 0 ; private Handler mHandler = new Handler ( ) ; public static SoundPool mSoundPool ; public static int mSoundId ; private EditText timerSettingText ; private SurfaceView surface ; public static int alarmID ; private SharedPreferences dataStore ; private Editor dataEditor ; private boolean d_isAlarmSetting ; private int d_dekiAlarmHour ; private int d_dekiAlarmMinutes ; private int d_yabaAlarmHour ; private int d_yabaAlarmMinutes ; private int d_intentId ; private HashMap < String , Boolean > DOWMap ; private NotificationManager notificationManager ; private Button [ ] nidoneButtons ; private Button nidoneButtonHalf ; private Button nidoneButtonQuarter ; private Button nidoneButtonOneEighth ; private Button nidoneTimeResetButton ; Calendar dekiCalendarDate ; Calendar yabaCalendarDate ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void OnSetting ( View view ) { } public void OnPushAwakeButton ( View view ) { } public void StopAlarm ( ) { } public void StartTimer ( View v ) { } private void ResetTimer ( ) { } public class MainTimerTask extends TimerTask { @ Override public void run ( ) { } } private void SetAlarms ( ) { } private void SetAlarm ( int hour , int minute , boolean ytommorrow , String type ) { } private void SetAlarmByDate ( Calendar settingCal , String type ) { Calendar calendar = settingCal ; calendar . set ( Calendar . SECOND , 0 ) ; Intent intent = new Intent ( getApplicationContext ( ) , AlarmBroadcastReceiver . class ) ; intent . putExtra ( "intentId" , GetIntentId ( ) ) ; intent . putExtra ( "alarmType" , type ) ; <START_BUG> PendingIntent pending = PendingIntent . getBroadcast ( getApplicationContext ( ) , 0 , intent , 0 ) ; <END_BUG> AlarmManager am = ( ( AlarmManager ) ( getSystemService ( ALARM_SERVICE ) ) ) ; am . set ( RTC_WAKEUP , calendar . getTimeInMillis ( ) , pending ) ; LogUtil . LogString ( ( "set<seq2seq4repair_space>alarm" + ( CalendarUtil . GetCalendarInfo ( calendar ) ) ) ) ; Toast . makeText ( getApplicationContext ( ) , "SetAlarm" , LENGTH_LONG ) . show ( ) ; } private void OnTimerEnd ( ) { } private String GetDayOfWeekByTime ( boolean isTommorow ) { } private boolean GetTodayOrTommorowByTime ( int hour , int minutes ) { } private void ReadDataStore ( ) { } private int GetIntentId ( ) { } @ Override public boolean onTouchEvent ( MotionEvent event ) { } public void SetNidoneButtonsTime ( View v ) { } }

Fix:
PendingIntent pending = PendingIntent . getBroadcast ( getApplicationContext ( ) , GetIntentId ( ) , intent , 0 ) ;
Buggy code:
public class BatchImageBuilder extends AbstractImageBuilder { protected BatchImageBuilder ( JavaBuilder javaBuilder ) { } public void build ( ) { } protected void addAllSourceFiles ( final ArrayList locations , final ArrayList typeNames ) throws CoreException { } protected void scrubOutputFolder ( ) throws CoreException { } protected void copyExtraResourcesBack ( ) throws CoreException { } protected void updateProblemsFor ( CompilationResult result ) throws CoreException { IProblem [ ] problems = result . getProblems ( ) ; if ( ( problems == null ) || ( ( problems . length ) == 0 ) ) return ; <START_BUG> notifier . updateProblemCounts ( null , problems ) ; <END_BUG> IPath filePath = new Path ( new String ( result . getFileName ( ) ) ) ; IResource resource = workspaceRoot . getFileForLocation ( filePath ) ; storeProblemsFor ( resource , problems ) ; } public String toString ( ) { } }

Fix:
notifier . updateProblemCounts ( problems ) ;
Buggy code:
public abstract class AbstractRequestTargetUrlCodingStrategy implements IRequestTargetUrlCodingStrategy { private static Log log = LogFactory . getLog ( AbstractRequestTargetUrlCodingStrategy . class ) ; private final String mountPath ; public AbstractRequestTargetUrlCodingStrategy ( final String mountPath ) { } protected final String getMountPath ( ) { } protected ValueMap decodeParameters ( String urlFragment , Map urlParameters ) { } protected String urlDecode ( String value ) { } protected void appendParameters ( AppendingStringBuffer url , Map parameters ) { <START_BUG> if ( parameters != null ) { <END_BUG> Iterator entries = parameters . entrySet ( ) . iterator ( ) ; while ( entries . hasNext ( ) ) { Map . Entry entry = ( ( Map . Entry ) ( entries . next ( ) ) ) ; if ( ( entry . getValue ( ) ) != null ) { String escapedValue = urlEncode ( entry . getValue ( ) . toString ( ) ) ; if ( ! ( Strings . isEmpty ( escapedValue ) ) ) { url . append ( "//" ) . append ( entry . getKey ( ) ) . append ( "//" ) . append ( escapedValue ) ; } } } } } protected String urlEncode ( String string ) { } }

Fix:
if ( ( parameters != null ) && ( ( parameters . size ( ) ) > 0 ) ) {
Buggy code:
final class PreviewCallback implements Camera . PreviewCallback { private static final String TAG = PreviewCallback . class . getSimpleName ( ) ; private final CameraConfigurationManager configManager ; private final boolean useOneShotPreviewCallback ; private Handler previewHandler ; private int previewMessage ; PreviewCallback ( CameraConfigurationManager configManager , boolean useOneShotPreviewCallback ) { } void setHandler ( Handler previewHandler , int previewMessage ) { } public void onPreviewFrame ( byte [ ] data , Camera camera ) { Point cameraResolution = configManager . getCameraResolution ( ) ; if ( ! ( useOneShotPreviewCallback ) ) { camera . setPreviewCallback ( null ) ; } if ( ( previewHandler ) != null ) { Message message = previewHandler . obtainMessage ( previewMessage , cameraResolution . x , cameraResolution . y , data ) ; message . sendToTarget ( ) ; previewHandler = null ; } else { <START_BUG> Log . v ( PreviewCallback . TAG , "Got<seq2seq4repair_space>preview<seq2seq4repair_space>callback,<seq2seq4repair_space>but<seq2seq4repair_space>no<seq2seq4repair_space>handler<seq2seq4repair_space>for<seq2seq4repair_space>it" ) ; <END_BUG> } } }

Fix:
Log . d ( PreviewCallback . TAG , "Got<seq2seq4repair_space>preview<seq2seq4repair_space>callback,<seq2seq4repair_space>but<seq2seq4repair_space>no<seq2seq4repair_space>handler<seq2seq4repair_space>for<seq2seq4repair_space>it" ) ;
Buggy code:
public class CreateSavingsAccountControllerTest { private CreateSavingsAccountController controller ; private CreateSavingsAccountFormBean formBean ; private SavingsServiceFacade savingsServiceFacade ; private PrdOfferingDto offering ; private List < PrdOfferingDto > offerings ; private CustomerDto customer ; @ Before public void setUp ( ) { controller = new CreateSavingsAccountController ( ) ; QuestionnaireServiceFacade questionnaireServiceFacade = mock ( QuestionnaireServiceFacade . class ) ; controller . setQuestionnaireServiceFacade ( questionnaireServiceFacade ) ; savingsServiceFacade = mock ( SavingsServiceFacade . class ) ; controller . setSavingsServiceFacade ( savingsServiceFacade ) ; formBean = mock ( CreateSavingsAccountFormBean . class ) ; <START_BUG> offering = new PrdOfferingDto ( new Integer ( 1 ) . shortValue ( ) , "Offering<seq2seq4repair_space>1" , "10001" ) ; <END_BUG> offerings = new ArrayList < PrdOfferingDto > ( 1 ) ; offerings . add ( offering ) ; customer = new CustomerDto ( ) ; customer . setCustomerId ( 1 ) ; when ( formBean . getCustomer ( ) ) . thenReturn ( customer ) ; } @ Test public void testCustomerSelected ( ) { } @ SuppressWarnings ( "unchecked" ) @ Test public void testGetProductOfferings ( ) { } @ SuppressWarnings ( "unchecked" ) @ Test public void testLoadProduct ( ) { } @ SuppressWarnings ( "unchecked" ) @ Test public void testLoadQuestionGroupsFormBeanInvoked ( ) { } }

Fix:
offering = new PrdOfferingDto ( ( ( short ) ( 1 ) ) , "Offering<seq2seq4repair_space>1" , "10001" ) ;
Buggy code:
public final class PropertiesAttributeDefinition extends MapAttributeDefinition { @ Deprecated public PropertiesAttributeDefinition ( final String name , final String xmlName , boolean allowNull ) { } private PropertiesAttributeDefinition ( final String name , final String xmlName , final boolean allowNull , boolean allowExpression , final int minSize , final int maxSize , final ParameterCorrector corrector , final ParameterValidator elementValidator , final String [ ] alternatives , final String [ ] requires , final AttributeMarshaller attributeMarshaller , final boolean resourceOnly , final DeprecationData deprecated , final AttributeAccess ... flags ) { } @ Override protected void addValueTypeDescription ( ModelNode node , ResourceBundle bundle ) { } @ Override protected void addAttributeValueTypeDescription ( ModelNode node , ResourceDescriptionResolver resolver , Locale locale , ResourceBundle bundle ) { } @ Override protected void addOperationParameterValueTypeDescription ( ModelNode node , String operationName , ResourceDescriptionResolver resolver , Locale locale , ResourceBundle bundle ) { } void setValueType ( ModelNode node ) { } public Map < String , String > unwrap ( final OperationContext context , final ModelNode model ) throws OperationFailedException { if ( ! ( model . hasDefined ( getName ( ) ) ) ) { <START_BUG> return null ; <END_BUG> } ModelNode modelProps = model . get ( getName ( ) ) ; Map < String , String > props = new HashMap < String , String > ( ) ; for ( Property p : modelProps . asPropertyList ( ) ) { props . put ( p . getName ( ) , context . resolveExpressions ( p . getValue ( ) ) . asString ( ) ) ; } return props ; } private static class PropertiesAttributeMarshaller extends AttributeMarshaller { private final boolean wrapElement ; private final String wrapperElement ; protected PropertiesAttributeMarshaller ( final boolean wrapElement , String wrapperElement ) { } @ Override public boolean isMarshallable ( AttributeDefinition attribute , ModelNode resourceModel , boolean marshallDefault ) { } @ Override public void marshallAsElement ( AttributeDefinition attribute , ModelNode resourceModel , boolean marshallDefault , XMLStreamWriter writer ) throws XMLStreamException { } } public static class Builder extends AbstractAttributeDefinitionBuilder < PropertiesAttributeDefinition . Builder , PropertiesAttributeDefinition > { private boolean wrapXmlElement = true ; private String wrapperElement = null ; public Builder ( final String name , boolean allowNull ) { } public Builder ( final PropertiesAttributeDefinition basis ) { } public Builder ( final MapAttributeDefinition basis ) { } public PropertiesAttributeDefinition . Builder setWrapXmlElement ( boolean wrap ) { } public PropertiesAttributeDefinition . Builder setWrapperElement ( String name ) { } @ Override public PropertiesAttributeDefinition build ( ) { } } }

Fix:
return new HashMap < String , String > ( ) ;
Buggy code:
public class AndroidWidgetRepository implements WidgetRepository { private final Context context ; private final Storage appStorage ; public AndroidWidgetRepository ( Context context ) { } @ Override public Widget getWidget ( int id ) { } @ Override public List < Integer > getIds ( ) { } private void setIds ( List < Integer > ids ) { } private void addWidgetId ( int newId ) { } @ Override public Widget addWidget ( int id , int size ) { } @ Override public void delWidget ( int oldId ) { List < Integer > ids = this . getIds ( ) ; if ( ! ( ids . contains ( oldId ) ) ) { return ; } <START_BUG> ids . remove ( oldId ) ; <END_BUG> this . setIds ( ids ) ; } @ Override public boolean isEmpty ( ) { } @ Override public Set < String > getWidgetsStockSymbols ( ) { } }

Fix:
ids . remove ( ( ( Integer ) ( oldId ) ) ) ;
Buggy code:
public class Localizer { private static final Logger logger = LoggerFactory . getLogger ( Localizer . class ) ; private Map cache = new HashMap ( ) ; public Localizer ( ) { } public final void clearCache ( ) { } public String getString ( final String key , final Component component ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model ) throws MissingResourceException { } public String getString ( final String key , final Component component , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model , final Locale locale , final String style , final String defaultValue ) throws MissingResourceException { <START_BUG> return null ; <END_BUG> } public String getString ( final String key , final Component component , final IModel model , final String defaultValue ) throws MissingResourceException { } protected void putIntoCache ( final String cacheKey , final String string ) { } protected String getFromCache ( final String cacheKey ) { } protected String getCacheKey ( final String key , final Component component ) { } private String substitutePropertyExpressions ( final Component component , final String string , final IModel model ) { } }

Fix:
return getString ( key , component , model , defaultValue ) ;
Buggy code:
public class ExampleRunner { public static void main ( String [ ] args ) throws Exception { DeploymentUtils utils = null ; final ModelControllerClient client = Factory . create ( InetAddress . getByName ( "localhost" ) , 9999 ) ; try { utils = new DeploymentUtils ( ) ; <START_BUG> utils . addWarDeployment ( "war-example.war" , SimpleServlet . class . getPackage ( ) , true ) ; <END_BUG> utils . deploy ( ) ; ExampleRunner . createTestConnector ( client ) ; URLConnection conn = null ; InputStream in = null ; try { URL url = new URL ( "http:////localhost:8380//war-example//simple?input=Hello" ) ; System . out . println ( ( ( "Reading<seq2seq4repair_space>response<seq2seq4repair_space>from<seq2seq4repair_space>" + url ) + ":" ) ) ; conn = url . openConnection ( ) ; conn . setDoInput ( true ) ; in = new BufferedInputStream ( conn . getInputStream ( ) ) ; int i = in . read ( ) ; while ( i != ( - 1 ) ) { System . out . print ( ( ( char ) ( i ) ) ) ; i = in . read ( ) ; } System . out . println ( "" ) ; } finally { safeClose ( in ) ; } ExampleRunner . removeTestConnector ( client ) ; } finally { utils . undeploy ( ) ; safeClose ( utils ) ; safeClose ( client ) ; } } static void createTestConnector ( final ModelControllerClient client ) throws IOException , OperationFailedException { } static void removeTestConnector ( final ModelControllerClient client ) throws IOException , OperationFailedException { } static void applyUpdates ( final List < ModelNode > updates , final ModelControllerClient client ) throws IOException , OperationFailedException { } static void applyUpdate ( ModelNode update , final ModelControllerClient client ) throws IOException , OperationFailedException { } }

Fix:
utils . addWarDeployment ( "war-example.war" , true , SimpleServlet . class . getPackage ( ) ) ;
Buggy code:
public class DuckHunterFragment extends Fragment implements ActionBar . TabListener { DuckHunterFragment . TabsPagerAdapter TabsPagerAdapter ; ViewPager mViewPager ; static SharedPreferences sharedpreferences ; final CharSequence [ ] languages = new CharSequence [ ] { "American<seq2seq4repair_space>English" , "French" , "German" , "Spanish" , "Swedish" , "Italian" , "British<seq2seq4repair_space>English" , "Russian" , "Danish" , "Norwegian" , "Portugese" , "Belgian" } ; private static final String ARG_SECTION_NUMBER = "section_number" ; public DuckHunterFragment ( ) { } public static DuckHunterFragment newInstance ( int sectionNumber ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } public void onPrepareOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void start ( ) { } public void openLanguageDialog ( ) { } @ Override public void onTabUnselected ( ActionBar . Tab tab , FragmentTransaction fragmentTransaction ) { } @ Override public void onTabSelected ( ActionBar . Tab tab , FragmentTransaction fragmentTransaction ) { } @ Override public void onTabReselected ( ActionBar . Tab tab , FragmentTransaction fragmentTransaction ) { } public static class TabsPagerAdapter extends FragmentStatePagerAdapter { public TabsPagerAdapter ( FragmentManager fm ) { } @ Override public Fragment getItem ( int i ) { } @ Override public Parcelable saveState ( ) { } @ Override public int getCount ( ) { } @ Override public CharSequence getPageTitle ( int position ) { switch ( position ) { case 1 : <START_BUG> return "Execute" ; <END_BUG> case 2 : return "Reference" ; default : return "Convert" ; } } } public static class DuckHunterConvertFragment extends Fragment { private String configFilePath = "files//modules//duckconvert.txt" ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } } public static class DuckHunterExecuteFragment extends Fragment { private String configFilePath = "//data//local//kali-armhf//opt//duckout.sh" ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void onResume ( ) { } } public static class DuckHunterReferenceFragment extends Fragment { @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } } No newline ; at end ; of file ; }

Fix:
return "Preview" ;
Buggy code:
public class MessageBuilderTests { private MessageBuilder builder = new MessageBuilder ( ) ; @ Test public void buildMessage ( ) { <START_BUG> MessageResolver resolver = builder . severity ( ERROR ) . code ( "invalidFormat" ) . resolvableArg ( "label" , "mathForm.decimalField" ) . arg ( "format" , "#,###.##" ) . defaultText ( "Field<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>in<seq2seq4repair_space>format<seq2seq4repair_space>#,###.##" ) . build ( ) ; <END_BUG> MockMessageSource messageSource = new MockMessageSource ( ) ; messageSource . addMessage ( "invalidFormat" , Locale . US , "#{label}<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>in<seq2seq4repair_space>format<seq2seq4repair_space>#{format}" ) ; messageSource . addMessage ( "mathForm.decimalField" , Locale . US , "Decimal<seq2seq4repair_space>Field" ) ; Message message = resolver . resolveMessage ( messageSource , Locale . US ) ; assertEquals ( ERROR , message . getSeverity ( ) ) ; assertEquals ( "Decimal<seq2seq4repair_space>Field<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>in<seq2seq4repair_space>format<seq2seq4repair_space>#,###.##" , message . getText ( ) ) ; } }

Fix:
MessageResolver resolver = builder . severity ( ERROR ) . code ( "invalidFormat" ) . arg ( "label" , new ResolvableArgument ( "mathForm.decimalField" ) ) . arg ( "format" , "#,###.##" ) . defaultText ( "Field<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>in<seq2seq4repair_space>format<seq2seq4repair_space>#,###.##" ) . build ( ) ;
Buggy code:
public class TestXorErasureCodec extends TestErasureCodecBase { @ Test public void testCodec ( ) throws Exception { } @ Override protected String getCodecClass ( ) { <START_BUG> return "org.apache.hadoop.io.ec.codec.XorRSErasureCodec" ; <END_BUG> } protected void prepareSchema ( String codecName , String schemaName , int dataSize ) throws Exception { } }

Fix:
return "org.apache.hadoop.io.ec.codec.XorErasureCodec" ;
Buggy code:
@ Listener ( sync = false ) public class ServiceProviderRegistryService implements GroupMembershipListener , ServiceProviderRegistry , Service < ServiceProviderRegistry > { private static final short SCOPE_ID = 224 ; public static ServiceName getServiceName ( String name ) { } @ SuppressWarnings ( "rawtypes" ) private final InjectedValue < Cache > cacheRef = new InjectedValue < Cache > ( ) ; private final InjectedValue < GroupMembershipNotifier > notifierRef = new InjectedValue < GroupMembershipNotifier > ( ) ; private final Map < String , Listener > listeners = new ConcurrentHashMap < String , Listener > ( ) ; private volatile GroupMembershipNotifier notifier ; private volatile Cache < String , Map < ClusterNode , Void > > cache ; public ServiceBuilder < ServiceProviderRegistry > build ( ServiceTarget target , String container ) { } @ Override public void register ( final String service , Listener listener ) { } @ Override public void unregister ( final String service ) { } @ Override public Set < ClusterNode > getServiceProviders ( String service ) { } @ Override public ServiceProviderRegistry getValue ( ) throws IllegalArgumentException , IllegalStateException { } @ Override public void start ( StartContext context ) throws StartException { this . notifier = this . notifierRef . getValue ( ) ; this . notifier . registerGroupMembershipListener ( this ) ; @ SuppressWarnings ( "unchecked" ) Cache < String , Map < ClusterNode , Void > > cache = this . cacheRef . getValue ( ) ; <START_BUG> this . cache = new org . jboss . as . clustering . infinispan . atomic . AtomicMapCache < String , ClusterNode , Void > ( cache . getAdvancedCache ( ) . with ( this . getClass ( ) . getClassLoader ( ) ) ) ; <END_BUG> this . cache . addListener ( this ) ; } @ Override public void stop ( StopContext context ) { } @ Override public void membershipChanged ( List < ClusterNode > deadMembers , List < ClusterNode > newMembers , List < ClusterNode > allMembers ) { } @ Override public void membershipChangedDuringMerge ( List < ClusterNode > deadMembers , List < ClusterNode > newMembers , List < ClusterNode > allMembers , List < List < ClusterNode > > originatingGroups ) { } private void purgeDeadMembers ( final List < ClusterNode > deadNodes , final boolean merge ) { } @ CacheEntryModified public void modified ( CacheEntryModifiedEvent < String , Map < ClusterNode , Void > > event ) { } private < R > R invoke ( ServiceProviderRegistryService . Operation < R > operation ) { } abstract class Operation < R > implements CacheInvoker . Operation < String , Map < ClusterNode , Void > , R > { } }

Fix:
this . cache = new org . jboss . as . clustering . infinispan . atomic . AtomicMapCache < String , ClusterNode , Void > ( cache . getAdvancedCache ( ) ) ;
Buggy code:
public class HostContainerSelector extends AbstractHostContainerSelector implements IHostContainerSelector { private boolean autoCreateContainer = false ; public HostContainerSelector ( String [ ] defaultConfigTypes , boolean autoCreateContainer ) { } public IRemoteServiceContainer [ ] selectHostContainers ( ServiceReference serviceReference , String [ ] serviceExportedInterfaces , String [ ] serviceExportedConfigs , String [ ] serviceIntents ) { <START_BUG> Collection rsContainers = findExistingHostContainers ( serviceReference , serviceExportedInterfaces , serviceExportedConfigs , serviceIntents ) ; <END_BUG> if ( ( ( rsContainers . size ( ) ) == 0 ) && ( autoCreateContainer ) ) { rsContainers = createAndConfigureHostContainers ( serviceReference , serviceExportedInterfaces , serviceExportedConfigs , serviceIntents ) ; Object target = serviceReference . getProperty ( ENDPOINT_CONNECTTARGET_ID ) ; if ( target != null ) { for ( Iterator i = rsContainers . iterator ( ) ; i . hasNext ( ) ; ) { IContainer container = ( ( IRemoteServiceContainer ) ( i . next ( ) ) ) . getContainer ( ) ; try { connectHostContainer ( serviceReference , container , target ) ; } catch ( Exception e ) { logException ( ( ( ( "doConnectContainer<seq2seq4repair_space>failure<seq2seq4repair_space>containerID=" + ( container . getID ( ) ) ) + "<seq2seq4repair_space>target=" ) + target ) , e ) ; } } } } return ( ( IRemoteServiceContainer [ ] ) ( rsContainers . toArray ( new IRemoteServiceContainer [ ] { } ) ) ) ; } public void close ( ) { } }

Fix:
Collection rsContainers = selectExistingHostContainers ( serviceReference , serviceExportedInterfaces , serviceExportedConfigs , serviceIntents ) ;
Buggy code:
public class RatingContext extends Context implements Comparable < RatingContext > { private long timestamp ; private String location ; private int accompany ; private String mood ; public RatingContext ( int user , int item ) { } public RatingContext ( int user , int item , long timestamp ) { } public String getLocation ( ) { } public void setLocation ( String location ) { } public int getAccompany ( ) { } public void setAccompany ( int accompany ) { } public String getMood ( ) { } public void setMood ( String mood ) { } public long getTimestamp ( ) { } public void setTimestamp ( long timestamp ) { } @ Override public int compareTo ( RatingContext that ) { <START_BUG> double res = ( this . timestamp ) - ( this . timestamp ) ; <END_BUG> if ( res > 0 ) return 1 ; else if ( res < 0 ) return - 1 ; return 0 ; } }

Fix:
double res = ( this . timestamp ) - ( that . timestamp ) ;
Buggy code:
public class SpringApplicationController extends AbstractController { private static Log log = LogFactory . getLog ( SpringApplicationController . class ) ; private SpringApplication application ; public void setApplication ( final SpringApplication application ) { } protected ModelAndView handleRequestInternal ( HttpServletRequest servletRequest , HttpServletResponse servletResponse ) throws Exception { if ( ( application ) != null ) { <START_BUG> application . doService ( servletRequest , servletResponse ) ; <END_BUG> } else { SpringApplicationController . log . error ( "Wickets<seq2seq4repair_space>application<seq2seq4repair_space>object<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>available.<seq2seq4repair_space>Probably<seq2seq4repair_space>the<seq2seq4repair_space>bean<seq2seq4repair_space>named<seq2seq4repair_space>'wicketApplication'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>Spring's<seq2seq4repair_space>web<seq2seq4repair_space>application<seq2seq4repair_space>context:<seq2seq4repair_space><servlet-name>-servlet.xml" ) ; } return null ; } }

Fix:
application . getWicketServlet ( ) . doGet ( servletRequest , servletResponse ) ;
Buggy code:
public class dnsHeader { private int id ; private boolean [ ] flags ; byte rcode ; byte opcode ; private short [ ] counts ; public dnsHeader ( int _id ) { } public dnsHeader ( CountedDataInputStream in ) throws IOException { } public void toWire ( CountedDataOutputStream out ) throws IOException { } public byte [ ] toWire ( ) throws IOException { } public void setFlag ( int bit ) { } public void unsetFlag ( int bit ) { } public boolean getFlag ( int bit ) { } public int getID ( ) { <START_BUG> return id ; <END_BUG> } public void setID ( int _id ) { } static short randomID ( ) { } public void setRcode ( byte value ) { } public byte getRcode ( ) { } public void setOpcode ( byte value ) { } public byte getOpcode ( ) { } public void setCount ( int field , short value ) { } public void incCount ( int field ) { } public void decCount ( int field ) { } public short getCount ( int field ) { } private void writeFlags ( CountedDataOutputStream out ) throws IOException { } private void readFlags ( CountedDataInputStream in ) throws IOException { } public String printFlags ( ) { } public String toString ( ) { } }

Fix:
return ( id ) & 65535 ;