nus-yam/ex-repair huggingface dataset:
Buggy code:
public class MixedContentModel implements XMLContentModel { private int fCount ; private QName [ ] fChildren ; private int [ ] fChildrenType ; private SubstitutionGroupComparator comparator = null ; private boolean fOrdered ; private boolean fDTD ; public MixedContentModel ( QName [ ] childList , int [ ] childListType , int offset , int length ) throws CMException { } public MixedContentModel ( QName [ ] childList , int [ ] childListType , int offset , int length , boolean ordered ) throws CMException { } public MixedContentModel ( QName [ ] childList , int [ ] childListType , int offset , int length , boolean ordered , boolean dtd ) throws CMException { } public void checkUniqueParticleAttribution ( SchemaGrammar gram ) { } public int validateContent ( QName [ ] children , int offset , int length ) throws Exception { } public int validateContentSpecial ( QName [ ] children , int offset , int length ) throws Exception { } public void setSubstitutionGroupComparator ( SubstitutionGroupComparator comparator ) { } public int whatCanGoHere ( boolean fullyValid , InsertableElementsInfo info ) throws Exception { <START_BUG> for ( int index = info . insertAt ; index < ( info . childCount ) ; index ++ ) <END_BUG> info . curChildren [ index ] = info . curChildren [ ( index + 1 ) ] ; ( info . childCount ) -- ; final int failedIndex = validateContent ( info . curChildren , 0 , info . childCount ) ; if ( ( failedIndex != ( - 1 ) ) && ( failedIndex < ( info . insertAt ) ) ) return failedIndex ; info . canHoldPCData = true ; info . isValidEOC = true ; info . resultsCount = fCount ; if ( ( ( info . results ) == null ) || ( ( info . results . length ) < ( info . resultsCount ) ) ) info . results = new boolean [ info . resultsCount ] ; if ( ( ( info . possibleChildren ) == null ) || ( ( info . possibleChildren . length ) < ( info . resultsCount ) ) ) { info . possibleChildren = new QName [ info . resultsCount ] ; for ( int i = 0 ; i < ( info . possibleChildren . length ) ; i ++ ) { info . possibleChildren [ i ] = new QName ( ) ; } } boolean bStatus = true ; if ( fullyValid && ( failedIndex < ( info . childCount ) ) ) bStatus = false ; for ( int index = 0 ; index < ( fCount ) ; index ++ ) { info . possibleChildren [ index ] . setValues ( fChildren [ index ] ) ; info . results [ index ] = bStatus ; } return - 1 ; } public ContentLeafNameTypeVector getContentLeafNameTypeVector ( ) { } }

Fix:
for ( int index = info . insertAt ; index < ( ( info . childCount ) - 1 ) ; index ++ )
Buggy code:
@ RunWith ( GdxTestRunner . class ) public class GoalTest { Goal goal ; Train train ; WorldMap wm ; Station ss ; Station fs ; @ Before public void setUp ( ) throws Exception { } @ Test public void testGoal ( ) { } public boolean compareStations ( String Sname ) { } @ Test public void testAssignTrain ( ) { } @ Test public void testisSpecial ( ) { } public void testgetReward ( ) { } @ Test public void testgetStartDate ( ) { <START_BUG> assertTrue ( ( ( goal . getStartDate ( ) ) != null ) ) ; <END_BUG> } }

Fix:
assertTrue ( ( ( goal . getStartTurn ( ) ) > 0 ) ) ;
Buggy code:
public class ActionSaveGIF extends UMLAction { public static ActionSaveGIF SINGLETON = new ActionSaveGIF ( ) ; public static final String separator = "//" ; protected ActionSaveGIF ( ) { } public void actionPerformed ( ActionEvent ae ) { } public boolean trySave ( boolean overwrite ) { CmdSaveGIF cmd = new CmdSaveGIF ( ) ; <START_BUG> Object target = TheInstance . getTarget ( ) ; <END_BUG> if ( target instanceof Diagram ) { String defaultName = ( ( Diagram ) ( target ) ) . getName ( ) ; defaultName = Util . stripJunk ( defaultName ) ; ProjectBrowser pb = ProjectBrowser . TheInstance ; Project p = pb . getProject ( ) ; try { JFileChooser chooser = null ; try { if ( ( ( p != null ) && ( ( p . getURL ( ) ) != null ) ) && ( ( p . getURL ( ) . getFile ( ) . length ( ) ) > 0 ) ) { String filename = p . getURL ( ) . getFile ( ) ; if ( ! ( filename . startsWith ( "//FILE1//+//" ) ) ) chooser = new JFileChooser ( p . getURL ( ) . getFile ( ) ) ; } } catch ( Exception ex ) { System . out . println ( "exception<seq2seq4repair_space>in<seq2seq4repair_space>opening<seq2seq4repair_space>JFileChooser" ) ; ex . printStackTrace ( ) ; } if ( chooser == null ) chooser = new JFileChooser ( ) ; chooser . setDialogTitle ( ( "Save<seq2seq4repair_space>Diagram<seq2seq4repair_space>as<seq2seq4repair_space>GIF:<seq2seq4repair_space>" + defaultName ) ) ; FileFilter filter = FileFilters . GIFFilter ; chooser . addChoosableFileFilter ( filter ) ; chooser . setFileFilter ( filter ) ; File def = new File ( ( defaultName + ".gif" ) ) ; chooser . setSelectedFile ( def ) ; int retval = chooser . showSaveDialog ( pb ) ; if ( retval == 0 ) { File theFile = chooser . getSelectedFile ( ) ; if ( theFile != null ) { String path = theFile . getParent ( ) ; String name = theFile . getName ( ) ; if ( ! ( path . endsWith ( ActionSaveGIF . separator ) ) ) path += ActionSaveGIF . separator ; pb . showStatus ( ( ( ( "Writing<seq2seq4repair_space>" + path ) + name ) + "..." ) ) ; if ( ( theFile . exists ( ) ) && ( ! overwrite ) ) { System . out . println ( ( ( "Are<seq2seq4repair_space>you<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>overwrite<seq2seq4repair_space>" + name ) + "?" ) ) ; String t = ( "Overwrite<seq2seq4repair_space>" + path ) + name ; int response = JOptionPane . showConfirmDialog ( pb , t , t , JOptionPane . YES_NO_OPTION ) ; if ( response == ( JOptionPane . NO_OPTION ) ) return false ; } FileOutputStream fo = new FileOutputStream ( theFile ) ; cmd . setStream ( fo ) ; cmd . doIt ( ) ; fo . close ( ) ; pb . showStatus ( ( ( "Wrote<seq2seq4repair_space>" + path ) + name ) ) ; return true ; } } } catch ( FileNotFoundException ignore ) { System . out . println ( "got<seq2seq4repair_space>a<seq2seq4repair_space>FileNotFoundException" ) ; } catch ( IOException ignore ) { System . out . println ( "got<seq2seq4repair_space>an<seq2seq4repair_space>IOException" ) ; ignore . printStackTrace ( ) ; } } return false ; } }

Fix:
Object target = TheInstance . getActiveDiagram ( ) ;
Buggy code:
public class RSourceTestCase { static final Logger log = Logger . getLogger ( RScriptTestCase . class ) ; private int count ; private boolean eventArrived ; private static SiddhiConfiguration siddhiConfiguration ; private double value1 ; private double value2 ; @ Before public void init ( ) { } @ BeforeClass public static void setUp ( ) throws Exception { } @ Test public void testRScript1 ( ) throws InterruptedException { RSourceTestCase . log . info ( "R:runScript<seq2seq4repair_space>test1" ) ; SiddhiManager siddhiManager = new SiddhiManager ( RSourceTestCase . siddhiConfiguration ) ; siddhiManager . defineStream ( QueryFactory . createStreamDefinition ( ) . name ( "weather" ) . attribute ( "time" , LONG ) . attribute ( "temp" , DOUBLE ) ) ; Query query = QueryFactory . createQuery ( ) ; <START_BUG> query . from ( QueryFactory . inputStream ( "weather" ) . transform ( "R" , "runSource" , Expression . value ( "//home//sanka//workspace2//siddhi//siddhi-extensions//r//src//test//resources//sampleSource.R" ) , Expression . value ( "2" ) , Expression . value ( "m,c" ) ) ) ; <END_BUG> query . select ( QueryFactory . outputSelector ( ) . select ( "m" , Expression . variable ( "m" ) ) . select ( "c" , Expression . variable ( "c" ) ) ) ; query . insertInto ( "weatherOutput" , ALL_EVENTS ) ; String queryReference = siddhiManager . addQuery ( query ) ; siddhiManager . addCallback ( queryReference , new QueryCallback ( ) { @ Override public void receive ( long timeStamp , Event [ ] inEvents , Event [ ] removeEvents ) { EventPrinter . print ( timeStamp , inEvents , removeEvents ) ; if ( inEvents != null ) { for ( Event event : inEvents ) { value1 = ( ( Double ) ( event . getData1 ( ) ) ) ; value2 = ( ( Double ) ( event . getData0 ( ) ) ) ; } ( count ) ++ ; } } } ) ; InputHandler inputHandler = siddhiManager . getInputHandler ( "weather" ) ; inputHandler . send ( new Object [ ] { 10L , 55.6 } ) ; inputHandler . send ( new Object [ ] { 20L , 65.6 } ) ; inputHandler . send ( new Object [ ] { 30L , 75.6 } ) ; Thread . sleep ( 1000 ) ; Assert . assertEquals ( "Only<seq2seq4repair_space>one<seq2seq4repair_space>event<seq2seq4repair_space>must<seq2seq4repair_space>arrive" , 1 , count ) ; Assert . assertEquals ( "Value<seq2seq4repair_space>1<seq2seq4repair_space>returned" , ( ( 10 + 20 ) + 0.0 ) , value1 , 1.0E-4 ) ; Assert . assertEquals ( "Value<seq2seq4repair_space>2<seq2seq4repair_space>returned" , ( 55.6 + 65.6 ) , value2 , 1.0E-4 ) ; siddhiManager . shutdown ( ) ; } }

Fix:
query . from ( QueryFactory . inputStream ( "weather" ) . transform ( "R" , "runSource" , Expression . value ( "sample.R" ) , Expression . value ( "2" ) , Expression . value ( "m,c" ) ) ) ;
Buggy code:
public interface Response { public boolean containsHeader ( String name ) { } public void setHeader ( String name , String value ) { } public void addHeader ( String name , String value ) { } public void endHeaders ( ) throws IOException { } public boolean isStarted ( ) { } public boolean isUsingStream ( ) { } public void setUsingStream ( boolean stream ) { } public boolean isUsingWriter ( ) { } public void setUsingWriter ( boolean writer ) { } public void finish ( ) throws IOException { } public ServletOutputStream getOutputStream ( ) { } public PrintWriter getWriter ( ) throws IOException { } public boolean isIncluded ( ) { } public void setIncluded ( boolean b ) { } public int getBufferSize ( ) { } public void setBufferSize ( int size ) throws IllegalStateException { } public boolean isBufferCommitted ( ) { } public void reset ( ) throws IllegalStateException { } public void resetBuffer ( ) throws IllegalStateException { } public void flushBuffer ( ) throws IOException { } public void addCookie ( Cookie cookie ) { } public Enumeration getCookies ( ) { } public Locale getLocale ( ) { } public void setLocale ( Locale locale ) { } public String getCharacterEncoding ( ) { } public void setContentType ( String contentType ) { } public String getContentType ( ) { } public void setContentLength ( int contentLength ) { } public int getContentLength ( ) { } public void setStatus ( int status ) { } public int getStatus ( ) { } public void setSessionId ( String sId ) { } public String getSessionId ( ) { } <START_BUG> public HttpServletResponseFacade getFacade ( ) ; <END_BUG> public void setRequest ( Request request ) { } public Request getRequest ( ) { } public void recycle ( ) { } }

Fix:
public HttpServletResponse getFacade ( ) ;
Buggy code:
@ Action public class StationAction { private AirManager airManager ; @ Get @ Path ( "//searchStationNow" ) public Reply searchStationNow ( @ Param ( "lat" ) Double lat , @ Param ( "lng" ) Double lng ) { Station station = airManager . getStationByLatLng ( lat , lng ) ; <START_BUG> StationHour stationHour = airManager . getLastStationHourByStationId ( 4 ) ; <END_BUG> StationAction . StationReport report = new StationAction . StationReport ( ) ; report . setProvinceName ( station . getProvinceName ( ) ) ; report . setCityName ( station . getCityName ( ) ) ; report . setPointName ( station . getPointName ( ) ) ; report . setPm10 ( stationHour . getPm10 ( ) ) ; report . setSo2 ( stationHour . getSo2 ( ) ) ; report . setNo2 ( stationHour . getNo2 ( ) ) ; SimpleDateFormat format = new SimpleDateFormat ( "yyyy-MM-dd<seq2seq4repair_space>HH:mm:ss" ) ; Date reportTime = stationHour . getCollectTime ( ) ; if ( reportTime != null ) { report . setReportTime ( format . format ( reportTime ) ) ; } else { report . setReportTime ( "" ) ; } return Reply . asJson ( ) . with ( report ) ; } @ Inject public void setAirManager ( AirManager airManager ) { } public class StationReport { private String provinceName ; private String cityName ; private String pointName ; private Float pm10 ; private Float so2 ; private Float no2 ; private String reportTime ; public String getProvinceName ( ) { } public void setProvinceName ( String provinceName ) { } public String getCityName ( ) { } public void setCityName ( String cityName ) { } public String getPointName ( ) { } public void setPointName ( String pointName ) { } public Float getPm10 ( ) { } public void setPm10 ( Float pm10 ) { } public Float getSo2 ( ) { } public void setSo2 ( Float so2 ) { } public Float getNo2 ( ) { } public void setNo2 ( Float no2 ) { } public String getReportTime ( ) { } public void setReportTime ( String reportTime ) { } } }

Fix:
StationHour stationHour = airManager . getLastStationHourByStationId ( station . getId ( ) ) ;
Buggy code:
public class XmlEditor { Document xmlDoc ; String nodeName ; String name ; String function ; DocumentBuilderFactory dbFactory = DocumentBuilderFactory . newInstance ( ) ; void openFile ( File file ) { } void setFuction ( OnePageCV onePage ) { } String compareDataWithFilename ( File onePageXml ) throws IOException { } private String stripExtension ( String name ) { } public void injectPhoto ( OnePageCV onePage ) throws MalformedURLException , TransformerException , TransformerFactoryConfigurationError { NodeList techNode = xmlDoc . getElementsByTagName ( "Tech1" ) ; <START_BUG> techNode . item ( 0 ) . setTextContent ( onePage . getPhoto ( ) . getAbsolutePath ( ) ) ; <END_BUG> Transformer transformer = TransformerFactory . newInstance ( ) . newTransformer ( ) ; Source input = new DOMSource ( xmlDoc ) ; Result output = new StreamResult ( onePage . getXmlData ( ) . getAbsolutePath ( ) ) ; transformer . transform ( input , output ) ; } }

Fix:
techNode . item ( 0 ) . setTextContent ( onePage . getPhoto ( ) . toURI ( ) . toString ( ) ) ;
Buggy code:
public class MainActivity extends ActionBarActivity implements ActionBar . TabListener , DateFragment . OnFragmentInteractionListener { private static final String LOG_TAG = MainActivity . class . getSimpleName ( ) ; public static final String EXTRA_VIEWPAGER_POSITION = "extra_viewpager_pos" ; public static final int VIEWPAGER_POS_DATES = 0 ; public static final int VIEWPAGER_POS_HELP = 1 ; private static final long TICKET_FORM_ID = 62599L ; private static final long TICKET_FIELD_APP_VERSION = 24328555L ; private static final long TICKET_FIELD_OS_VERSION = 24273979L ; private static final long TICKET_FIELD_DEVICE_MODEL = 24273989L ; private static final long TICKET_FIELD_DEVICE_MEMORY = 24273999 ; private static final long TICKET_FIELD_DEVICE_FREE_SPACE = 24274009L ; private static final long TICKET_FIELD_DEVICE_BATTERY_LEVEL = 24274019L ; MainActivity . SectionsPagerAdapter mSectionsPagerAdapter ; ViewPager mViewPager ; private UserProfileStorage mStorage ; private PushNotificationStorage mPushStorage ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { } void initialiseSdk ( ) { } private List < CustomField > getCustomFields ( ) { } public float getBatteryLevel ( ) { } void initialisePush ( ) { } void enablePush ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onTabSelected ( ActionBar . Tab tab , FragmentTransaction fragmentTransaction ) { } @ Override public void onTabUnselected ( ActionBar . Tab tab , FragmentTransaction fragmentTransaction ) { } @ Override public void onTabReselected ( ActionBar . Tab tab , FragmentTransaction fragmentTransaction ) { } public class SectionsPagerAdapter extends FragmentPagerAdapter { public SectionsPagerAdapter ( FragmentManager fm ) { } @ Override public Fragment getItem ( int position ) { } @ Override public int getCount ( ) { } public Drawable getPageIcon ( int position ) { switch ( position ) { case 0 : <START_BUG> return getDrawable ( ic_home ) ; <END_BUG> case 1 : return null ; } return null ; } @ Override public CharSequence getPageTitle ( int position ) { } } @ Override public void onFragmentInteraction ( String id ) { } }

Fix:
return getResources ( ) . getDrawable ( ic_home ) ;
Buggy code:
public class JestResult { public static final String ES_METADATA_ID = "es_metadata_id" ; private static final Logger log = LoggerFactory . getLogger ( JestResult . class ) ; protected JsonObject jsonObject ; protected String jsonString ; protected String pathToResult ; protected int responseCode ; protected boolean isSucceeded ; protected String errorMessage ; protected Gson gson ; private JestResult ( ) { } public JestResult ( JestResult source ) { } public JestResult ( Gson gson ) { } public String getPathToResult ( ) { } public void setPathToResult ( String pathToResult ) { } public Object getValue ( String key ) { } public boolean isSucceeded ( ) { } public void setSucceeded ( boolean succeeded ) { } public String getJsonString ( ) { } public void setJsonString ( String jsonString ) { } public String getErrorMessage ( ) { } public int getResponseCode ( ) { } public void setResponseCode ( int responseCode ) { } public void setErrorMessage ( String errorMessage ) { } public JsonObject getJsonObject ( ) { } public void setJsonObject ( JsonObject jsonObject ) { this . jsonObject = jsonObject ; if ( ( jsonObject . get ( "error" ) ) != null ) { <START_BUG> errorMessage = jsonObject . get ( "error" ) . getAsString ( ) ; <END_BUG> } } @ Deprecated @ SuppressWarnings ( "rawtypes" ) public Map getJsonMap ( ) { } public void setJsonMap ( Map < String , Object > resultMap ) { } public < T > T getSourceAsObject ( Class < T > clazz ) { } public < T > List < T > getSourceAsObjectList ( Class < T > type ) { } protected List < JsonElement > extractSource ( ) { } protected < T > T createSourceObject ( JsonElement source , Class < T > type ) { } @ SuppressWarnings ( "unchecked" ) private < T > T getAs ( JsonElement id , Class < T > fieldType ) throws IllegalAccessException { } protected String [ ] getKeys ( ) { } }

Fix:
errorMessage = jsonObject . get ( "error" ) . toString ( ) ;
Buggy code:
public class PerspectiveBarManager extends ToolBarManager { public static final String SMALL_FONT = "org.eclipse.ui.smallFont" ; public PerspectiveBarManager ( int style ) { } public ToolBar createControl ( Composite parent ) { } public PerspectiveBarManager ( ToolBar toolbar ) { } public void add ( IContributionItem item ) { } private CoolBar coolBar ; private Menu popup ; public void handleChevron ( SelectionEvent event ) { if ( ( popup ) != null ) { popup . dispose ( ) ; popup = null ; return ; } CoolItem item = ( ( CoolItem ) ( event . widget ) ) ; Control control = getControl ( ) ; if ( ! ( control instanceof ToolBar ) ) return ; Rectangle itemBounds = item . getBounds ( ) ; Point pt = coolBar . toDisplay ( new Point ( itemBounds . x , itemBounds . y ) ) ; itemBounds . x = pt . x ; itemBounds . y = pt . y ; ToolBar toolBar = ( ( ToolBar ) ( control ) ) ; ToolItem [ ] tools = toolBar . getItems ( ) ; int toolCount = tools . length ; int i = 0 ; while ( i < toolCount ) { Rectangle toolBounds = tools [ i ] . getBounds ( ) ; pt = toolBar . toDisplay ( new Point ( toolBounds . x , toolBounds . y ) ) ; toolBounds . x = pt . x ; toolBounds . y = pt . y ; Rectangle intersection = itemBounds . intersection ( toolBounds ) ; if ( ! ( intersection . equals ( toolBounds ) ) ) break ; i ++ ; } popup = new Menu ( coolBar ) ; for ( int j = i ; j < toolCount ; j ++ ) { ToolItem tool = tools [ j ] ; MenuItem menuItem = new MenuItem ( popup , SWT . NONE ) ; menuItem . setText ( tool . getText ( ) ) ; menuItem . setImage ( tool . getImage ( ) ) ; menuItem . setData ( "IContributionItem" , tool . getData ( ) ) ; menuItem . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { MenuItem menuItem = ( ( MenuItem ) ( e . widget ) ) ; PerspectiveBarContributionItem contribItem = ( ( PerspectiveBarContributionItem ) ( menuItem . getData ( "IContributionItem" ) ) ) ; PerspectiveBarContributionItem newItem = new PerspectiveBarContributionItem ( contribItem . getPerspective ( ) , contribItem . getPage ( ) ) ; remove ( contribItem ) ; contribItem . dispose ( ) ; insert ( 1 , newItem ) ; update ( false ) ; newItem . select ( ) ; } } ) ; } pt = coolBar . toDisplay ( new Point ( event . x , event . y ) ) ; popup . setLocation ( pt . x , pt . y ) ; popup . setVisible ( true ) ; Display display = coolBar . getDisplay ( ) ; <START_BUG> while ( popup . isVisible ( ) ) { <END_BUG> if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } if ( ( popup ) != null ) { popup . dispose ( ) ; popup = null ; } } public void update ( boolean force ) { } protected void relayout ( ToolBar toolBar , int oldCount , int newCount ) { } private void updateCoolBar ( ) { } void setParent ( CoolBar cool ) { } private Font getFont ( ) { } }

Fix:
while ( ( ( popup ) != null ) && ( popup . isVisible ( ) ) ) {
Buggy code:
public class NativeManagementServices { private static final int heartbeatInterval = 15000 ; private static final int WINDOW_SIZE = Configuration . WINDOW_SIZE ; private static final OptionMap SERVICE_OPTIONS = OptionMap . create ( TRANSMIT_WINDOW_SIZE , NativeManagementServices . WINDOW_SIZE , RECEIVE_WINDOW_SIZE , NativeManagementServices . WINDOW_SIZE ) ; public static final OptionMap CONNECTION_OPTIONS = OptionMap . create ( HEARTBEAT_INTERVAL , NativeManagementServices . heartbeatInterval , READ_TIMEOUT , 45000 ) ; static synchronized void installRemotingServicesIfNotInstalled ( final ServiceTarget serviceTarget , final String hostName , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers , final ServiceRegistry serviceContainer , boolean onDemand ) { if ( ( serviceContainer . getService ( MANAGEMENT_ENDPOINT ) ) == null ) { ManagementChannelRegistryService . addService ( serviceTarget , MANAGEMENT_ENDPOINT ) ; <START_BUG> ManagementRemotingServices . installRemotingManagementEndpoint ( serviceTarget , MANAGEMENT_ENDPOINT , hostName , MANAGEMENT , NativeManagementServices . CONNECTION_OPTIONS , verificationHandler , newControllers ) ; <END_BUG> ManagementRemotingServices . installManagementChannelOpenListenerService ( serviceTarget , MANAGEMENT_ENDPOINT , SERVER_CHANNEL , SERVICE_NAME , NativeManagementServices . SERVICE_OPTIONS , verificationHandler , newControllers , onDemand ) ; ManagementRemotingServices . installManagementChannelServices ( serviceTarget , MANAGEMENT_ENDPOINT , new ModelControllerClientOperationHandlerFactoryService ( ) , DomainModelControllerService . SERVICE_NAME , MANAGEMENT_CHANNEL , verificationHandler , newControllers ) ; RemotingConnectorService . addService ( serviceTarget , verificationHandler ) ; } } }

Fix:
ManagementRemotingServices . installRemotingEndpoint ( serviceTarget , MANAGEMENT_ENDPOINT , hostName , MANAGEMENT , NativeManagementServices . CONNECTION_OPTIONS , verificationHandler , newControllers ) ;
Buggy code:
public class TimeMachineQuestionCreator extends QuestionCreator { private int startingYear ; private int modifier ; private String passenger ; private String timeMachineName ; public TimeMachineQuestionCreator ( ) { } @ Override protected void randomizeParameters ( ) { } @ Override protected HashMap < String , Object > setUpScope ( ) { } @ Override protected Question setUpQuestionAndAnswers ( ) { } @ Override protected String determineRightAnswer ( ) { <START_BUG> return ( "" + ( startingYear ) ) + ( modifier ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return "" + ( ( startingYear ) + ( modifier ) ) ;
Buggy code:
public class Selection extends SpelNode { public static final int ALL = 0 ; public static final int FIRST = 1 ; public static final int LAST = 2 ; private final int variant ; public Selection ( Token payload , int variant ) { } @ Override public Object getValue ( ExpressionState state ) throws EvaluationException { } @ Override public String toStringAST ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( ) ; <END_BUG> switch ( variant ) { case Selection . ALL : sb . append ( "?{" ) ; break ; case Selection . FIRST : sb . append ( "^{" ) ; break ; case Selection . LAST : sb . append ( "${" ) ; break ; } return sb . append ( getChild ( 0 ) . toStringAST ( ) ) . append ( "}" ) . toString ( ) ; } @ Override public boolean isWritable ( ExpressionState expressionState ) throws SpelException { } }

Fix:
StringBuilder sb = new StringBuilder ( ) ;
Buggy code:
public class DefaultLogger implements BuildLogger { private static String lSep = System . getProperty ( "line.separator" ) ; private static final int LEFT_COLUMN_SIZE = 12 ; private PrintStream out ; private PrintStream err ; private int messageOutputLevel = MessageLevel . MSG_ERR ; private boolean emacsMode = false ; private long startTime = System . currentTimeMillis ( ) ; protected static String formatTime ( long millis ) { } public void setMessageOutputLevel ( int level ) { } public void setOutputPrintStream ( PrintStream output ) { } public void setErrorPrintStream ( PrintStream err ) { } public void setEmacsMode ( boolean emacsMode ) { } public void reportException ( Throwable t ) { if ( t instanceof AntException ) { AntException e = ( ( AntException ) ( t ) ) ; Location location = e . getLocation ( ) ; Throwable cause = e . getCause ( ) ; if ( ( location != null ) && ( location != ( Location . UNKNOWN_LOCATION ) ) ) { out . print ( location ) ; } out . println ( e . getMessage ( ) ) ; if ( ( messageOutputLevel ) >= ( MessageLevel . MSG_VERBOSE ) ) { t . printStackTrace ( out ) ; } <START_BUG> if ( cause != null ) { <END_BUG> out . println ( ( "Root<seq2seq4repair_space>cause:<seq2seq4repair_space>" + ( cause . toString ( ) ) ) ) ; } } else { t . printStackTrace ( err ) ; } } public void buildStarted ( BuildEvent event ) { } public void buildFinished ( BuildEvent event ) { } public void targetStarted ( BuildEvent event ) { } public void targetFinished ( BuildEvent event ) { } public void taskStarted ( BuildEvent event ) { } public void taskFinished ( BuildEvent event ) { } public void messageLogged ( BuildEvent event ) { } }

Fix:
if ( ! ( cause . getMessage ( ) . equals ( t . getMessage ( ) ) ) ) {
Buggy code:
public class SmsRecieved extends BroadcastReceiver { public static final String LOG_TAG = MainActivity . class . getName ( ) ; public Context c ; private JSONArray m_jArry ; @ Override public void onReceive ( Context c , Intent intent ) { } public synchronized SmsMessage [ ] getMessages ( Intent intent ) { } public Boolean checkStorage ( ) { } private String loadJSONFromInternal ( ) throws JSONException { } public String loadJSONFromAsset ( ) { String json = null ; try { <START_BUG> InputStream is = c . getAssets ( ) . open ( "SMSJson.json" ) ; <END_BUG> int size = is . available ( ) ; byte [ ] buffer = new byte [ size ] ; is . read ( buffer ) ; is . close ( ) ; json = new String ( buffer , "UTF-8" ) ; } catch ( IOException ex ) { ex . printStackTrace ( ) ; return null ; } return json ; } public Boolean containUnique ( String msg_content , String [ ] results ) { } public long removePreCode ( String msg_sender_number ) { } public Boolean numberOrName ( String msg_sender_number ) { } public String [ ] recognizeSms ( String msg_sender_number , String msg_content ) throws JSONException { } No newline ; at end ; of file ; }

Fix:
InputStream is = c . getAssets ( ) . open ( "sms.json" ) ;
Buggy code:
public class DelayedServiceNotifierTest { private Map < Class , List < OSGIServiceLifecycleListener > > instanceListeners ; private ScheduledExecutorService scheduler ; private OSGIPluginTracker osgiPluginTracker ; private Object serviceObject ; private Class < ? > clazz ; @ Before public void setup ( ) { } @ Test public void testFactoryEqualNotNullStarting ( ) { } @ Test public void testFactoryEqualNotNullStopping ( ) { } @ Test public void testFactoryEqualNotNullModified ( ) { } @ Test public void testAllEventTypesLegal ( ) { } @ Test public void testFactoryEqualNull ( ) { DelayedServiceNotifier delayedServiceNotifier = new DelayedServiceNotifier ( osgiPluginTracker , clazz , LifecycleEvent . START , serviceObject , instanceListeners , scheduler ) ; when ( osgiPluginTracker . findOrCreateBeanFactoryFor ( serviceObject ) ) . thenReturn ( null ) ; delayedServiceNotifier . run ( ) ; <START_BUG> verify ( scheduler ) . schedule ( delayedServiceNotifier , 2 , TimeUnit . SECONDS ) ; <END_BUG> } }

Fix:
verify ( scheduler ) . schedule ( delayedServiceNotifier , 100 , TimeUnit . MILLISECONDS ) ;
Buggy code:
public class PlayerSaveHandler implements PacketHandler { public void handlePacket ( Packet p , IoSession session ) throws Exception { World world = ( ( World ) ( session . getAttachment ( ) ) ) ; long usernameHash = p . readLong ( ) ; int owner = p . readInt ( ) ; PlayerSave save = Server . getServer ( ) . findSave ( usernameHash , world ) ; if ( save == null ) { System . out . println ( ( "Error<seq2seq4repair_space>loading<seq2seq4repair_space>data<seq2seq4repair_space>for:<seq2seq4repair_space>" + ( DataConversions . hashToUsername ( usernameHash ) ) ) ) ; return ; } System . out . println ( ( "Adding<seq2seq4repair_space>save<seq2seq4repair_space>data<seq2seq4repair_space>for:<seq2seq4repair_space>" + ( save . getUsername ( ) ) ) ) ; if ( owner != ( save . getOwner ( ) ) ) { System . out . println ( "WARNING<seq2seq4repair_space>ATTEMPTED<seq2seq4repair_space>DUPE" ) ; } save . setOwner ( owner ) ; save . setLogin ( p . readLong ( ) , p . readLong ( ) ) ; save . setTotals ( p . readShort ( ) , p . readShort ( ) ) ; save . setLocation ( p . readShort ( ) , p . readShort ( ) ) ; save . setFatigue ( p . readShort ( ) ) ; save . setAppearance ( p . readByte ( ) , p . readByte ( ) , p . readByte ( ) , p . readByte ( ) , p . readByte ( ) , p . readByte ( ) , ( ( p . readByte ( ) ) == 1 ) , p . readLong ( ) ) ; save . setCombatStyle ( p . readByte ( ) ) ; for ( int i = 0 ; i < 18 ; i ++ ) { <START_BUG> save . setStat ( i , p . readInt ( ) , p . readShort ( ) ) ; <END_BUG> } int invCount = p . readShort ( ) ; save . clearInvItems ( ) ; for ( int i = 0 ; i < invCount ; i ++ ) { save . addInvItem ( p . readShort ( ) , p . readInt ( ) , ( ( p . readByte ( ) ) == 1 ) ) ; } int bnkCount = p . readShort ( ) ; save . clearBankItems ( ) ; for ( int i = 0 ; i < bnkCount ; i ++ ) { save . addBankItem ( p . readShort ( ) , p . readInt ( ) ) ; } save . setQuestPoints ( p . readShort ( ) ) ; int qstCount = p . readShort ( ) ; for ( int i = 0 ; i < qstCount ; i ++ ) save . setQuestStage ( p . readShort ( ) , p . readShort ( ) ) ; save . setEventCD ( p . readLong ( ) ) ; save . setLastUpdate ( System . currentTimeMillis ( ) ) ; if ( ! ( save . save ( ) ) ) { System . out . println ( ( "Error<seq2seq4repair_space>saving:<seq2seq4repair_space>" + ( save . getUsername ( ) ) ) ) ; } } }

Fix:
save . setStat ( i , ( ( int ) ( p . readLong ( ) ) ) , p . readShort ( ) ) ;
Buggy code:
@ Controller public class CartController { @ Autowired CartDAO cartDao ; @ Autowired UserDAO userDao ; @ ResponseBody @ RequestMapping ( path = "cart//{id}" , method = RequestMethod . GET ) public Cart getUserCart ( @ PathVariable ( "id" ) int id ) { } @ ResponseBody @ RequestMapping ( path = "addCart//{itemid}//{userid}" , method = RequestMethod . GET ) public String addCartItem ( @ PathVariable ( "itemid" ) int itemId , @ PathVariable ( "userid" ) int userId ) { } @ ResponseBody <START_BUG> @ RequestMapping ( path = "cartItems//{id)" ) <END_BUG> public int getCartItems ( @ PathVariable ( "id" ) int id ) { Cart cart = cartDao . getCartByUserId ( id ) ; List < CartItem > listOfItems = cart . getItems ( ) ; return listOfItems . size ( ) ; } }

Fix:
@ RequestMapping ( path = "cartItems//{id}" )
Buggy code:
public class RecyclerViewSimpleActivity extends AppCompatActivity { public static void openActivity ( Activity activity ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } private List < String > createItemList ( ) { } public class RecyclerAdapter extends RecyclerWithHeaderAdapter { private List < String > mItemList ; public RecyclerAdapter ( ) { } public void addItems ( List < String > list ) { } @ Override public ViewHolder oncreateViewHolder ( ViewGroup viewGroup , int viewType ) { } @ Override public void onbindViewHolder ( RecyclerView . ViewHolder holder , int position ) { RecyclerViewSimpleActivity . RecyclerAdapter . RecyclerItemViewHolder viewHolder = ( ( RecyclerViewSimpleActivity . RecyclerAdapter . RecyclerItemViewHolder ) ( holder ) ) ; <START_BUG> viewHolder . tvTitle . setText ( mItemList . get ( ( position - 1 ) ) ) ; <END_BUG> } @ Override public int getitemCount ( ) { } private class RecyclerItemViewHolder extends RecyclerView . ViewHolder { private final TextView tvTitle ; private final ImageView ivIcon ; public RecyclerItemViewHolder ( View itemView ) { } } } }

Fix:
viewHolder . tvTitle . setText ( mItemList . get ( position ) ) ;
Buggy code:
public class ResolveExpressionHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "resolve-expression" ; public static final ResolveExpressionHandler INSTANCE = new ResolveExpressionHandler ( ) ; public static final SimpleAttributeDefinition EXPRESSION = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( "expression" , ModelType . STRING , true ) . setAllowExpression ( true ) . build ( ) ; private ResolveExpressionHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ModelNode toResolve = ResolveExpressionHandler . EXPRESSION . validateOperation ( operation ) ; if ( ( toResolve . getType ( ) ) == ( ModelType . STRING ) ) { toResolve = ParseUtils . parsePossibleExpression ( toResolve . asString ( ) ) ; } try { ModelNode resolved = toResolve . resolve ( ) ; ModelNode result = context . getResult ( ) ; if ( resolved . isDefined ( ) ) { result . set ( resolved . asString ( ) ) ; } context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; } catch ( SecurityException e ) { throw new OperationFailedException ( new ModelNode ( ) . set ( MESSAGES . noPermissionToResolveExpression ( toResolve , e ) ) ) ; } catch ( IllegalStateException e ) { throw new OperationFailedException ( new ModelNode ( ) . set ( MESSAGES . cannotResolveExpression ( toResolve , e ) ) ) ; } } } , RUNTIME ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class IfStatement extends Statement { public Expression condition ; public Statement thenStatement ; public Statement elseStatement ; boolean thenExit ; int thenInitStateIndex = - 1 ; int elseInitStateIndex = - 1 ; int mergedInitStateIndex = - 1 ; public IfStatement ( Expression condition , Statement thenStatement , int sourceStart , int sourceEnd ) { } public IfStatement ( Expression condition , Statement thenStatement , Statement elseStatement , int sourceStart , int sourceEnd ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resolve ( BlockScope scope ) { <START_BUG> TypeBinding type = condition . resolveTypeExpecting ( scope , BooleanBinding ) ; <END_BUG> condition . computeConversion ( scope , type , type ) ; if ( ( thenStatement ) != null ) thenStatement . resolve ( scope ) ; if ( ( elseStatement ) != null ) elseStatement . resolve ( scope ) ; } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } }

Fix:
TypeBinding type = condition . resolveTypeExpecting ( scope , TypeBinding . BOOLEAN ) ;
Buggy code:
public class RemoveContact extends HttpServlet { private static final long serialVersionUID = 1L ; public RemoveContact ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { System . out . println ( "SContact::doPost<seq2seq4repair_space>1" ) ; Integer id = Integer . parseInt ( request . getParameter ( "contactID" ) ) ; ApplicationContext ac = WebApplicationContextUtils . getWebApplicationContext ( getServletContext ( ) ) ; <START_BUG> IDAOContact daoContact = ( ( IDAOContact ) ( ac . getBean ( "daocontact" ) ) ) ; <END_BUG> String dbOutput = daoContact . deleteContact ( id ) ; String responseUrl = "//removeContact.jsp" + ( ServerUtils . getNewParameter ( "dbOutput" , dbOutput ) ) ; System . out . println ( ( "::doPost<seq2seq4repair_space>responseUrl=" + responseUrl ) ) ; RequestDispatcher rd = getServletContext ( ) . getRequestDispatcher ( responseUrl ) ; rd . forward ( request , response ) ; } }

Fix:
IDAOContact daoContact = ( ( IDAOContact ) ( ac . getBean ( "daoContactProperty" ) ) ) ;
Buggy code:
public class PointManager { protected final String TAG = getClass ( ) . getSimpleName ( ) ; protected Vector < PointOfInterest > m_pointsOfInterest = new Vector < > ( ) ; public void setPrefs ( SharedPreferences prefs ) { } public SharedPreferences getPrefs ( ) { } SharedPreferences m_prefs ; Context m_Context ; public PointManager ( Context c ) { } protected Location createLocation ( double latitude , double longitude , double altitude ) { } public Vector < GUIPointOfInterest > GetPointsForLocation ( Location location , boolean showCompass ) { Vector < GUIPointOfInterest > data = new Vector < > ( ) ; if ( location != null ) { for ( PointOfInterest p : m_pointsOfInterest ) { <START_BUG> if ( ( p . computeDistanceFrom ( location ) ) < ( m_prefs . getInt ( "distance" , Integer . MAX_VALUE ) ) ) { <END_BUG> data . add ( new GUIPointOfInterest ( p . getLabel ( ) , p . getType ( ) , p . computeDistanceFrom ( location ) , p . computeAngleFrom ( location ) ) ) ; } } } if ( showCompass ) { data . add ( new GUIPointOfInterest ( "North" , PointType . NONE , 1000 , Angle . A_ZERO ) ) ; data . add ( new GUIPointOfInterest ( "South" , PointType . NONE , 1000 , Angle . A_PI ) ) ; data . add ( new GUIPointOfInterest ( "West" , PointType . NONE , 1000 , Angle . A_THREE_HALF_PI ) ) ; data . add ( new GUIPointOfInterest ( "East" , PointType . NONE , 1000 , Angle . A_HALF_PI ) ) ; } return data ; } public void loadFromJson ( InputStreamReader rd ) throws IOException , JSONException { } public void loadFromJson ( String data ) throws JSONException { } public Vector < PointOfInterest > getPointList ( ) { } public void loadDefaultData ( ) { } public void reset ( ) { } }

Fix:
if ( ( p . computeDistanceFrom ( location ) ) < ( Integer . parseInt ( m_prefs . getString ( "distance" , "0" ) ) ) ) {
Buggy code:
@ Controller @ RequestMapping ( "//pecas" ) public class EstoqueController { @ Autowired private IEstoqueRepository repository ; public EstoqueController ( ) { } @ RequestMapping public ModelAndView index ( HttpServletResponse response ) { } @ RequestMapping ( "//cadastro" ) public ModelAndView cadastro ( ) { } @ Transactional @ RequestMapping ( value = "//criar" , method = RequestMethod . POST , consumes = MediaType . APPLICATION_JSON_VALUE ) @ ResponseStatus ( HttpStatus . CREATED ) @ ResponseBody public String criar ( @ RequestBody Peca peca ) { } @ Transactional @ RequestMapping ( value = "//excluir" , method = RequestMethod . POST , consumes = MediaType . TEXT_PLAIN_VALUE ) @ ResponseStatus ( HttpStatus . OK ) public void excluir ( @ RequestBody String id , HttpServletResponse response ) { Peca p = repository . getEntityManager ( ) . find ( Peca . class , Integer . parseInt ( id ) ) ; if ( p == null ) { response . setStatus ( NO_CONTENT . value ( ) ) ; return ; } <START_BUG> p . setDataExclusao ( GregorianCalendar . getInstance ( ) ) ; <END_BUG> } @ Transactional @ RequestMapping ( value = "//validarCodigo" , method = RequestMethod . POST , consumes = MediaType . TEXT_PLAIN_VALUE ) public void validarCodigo ( @ RequestBody String codigo , HttpServletResponse response ) { } @ Transactional @ RequestMapping ( value = "//listar" , method = RequestMethod . POST , produces = MediaType . APPLICATION_JSON_VALUE , consumes = MediaType . APPLICATION_JSON_VALUE ) @ ResponseBody public ConsultaPecas listar ( @ RequestBody FiltroPecas filtro ) { } No newline ; at end ; of file ; }

Fix:
p . excluir ( ) ;
Buggy code:
public class StageMenu extends Stage { @ Override public void choiceDone ( String a ) { } @ Override public void init ( ) { setDialog ( new Dialog ( "Maximized" ) ) ; setSprites ( new Sprite ( "troi" ) ) ; <START_BUG> setInputs ( new Input ( 5 ) , new Input ( 10 ) ) ; <END_BUG> setChoices ( new Choice ( "Click<seq2seq4repair_space>To<seq2seq4repair_space>Expand" ) , new Choice ( "Disable<seq2seq4repair_space>Me" ) ) ; } }

Fix:
setInputs ( new Input ( "Name" , 5 ) , new Input ( "Troi" , 10 ) ) ;
Buggy code:
public class CollabStart implements IECFStart { Discovery discovery = null ; public IStatus startup ( IProgressMonitor monitor ) { } private void startConnection ( ConnectionDetails details ) throws Exception { CollabClient client = new CollabClient ( ) ; <START_BUG> System . out . println ( ( ( ( ( ( ( ( "Autostarting<seq2seq4repair_space>ECF<seq2seq4repair_space>containerType=" + ( details . getContainerType ( ) ) ) + ",uri=" ) + ( details . getTargetURI ( ) ) ) + ",nickname=" ) + ( details . getNickname ( ) ) ) + ",password=" ) + ( details . getPassword ( ) ) ) ) ; <END_BUG> client . createAndConnectClient ( details . getContainerType ( ) , details . getTargetURI ( ) , details . getNickname ( ) , details . getPassword ( ) , ResourcesPlugin . getWorkspace ( ) . getRoot ( ) ) ; } }

Fix:
ClientPlugin . log ( ( ( ( ( ( "ECF:<seq2seq4repair_space>Autostarting<seq2seq4repair_space>containerType=" + ( details . getContainerType ( ) ) ) + ",uri=" ) + ( details . getTargetURI ( ) ) ) + ",nickname=" ) + ( details . getNickname ( ) ) ) ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) @ Widgetset ( "edu.uwm.gwt.ClinicalTrialsWidgetSet" ) @ Theme ( "touchkit" ) @ CacheManifestEnabled @ OfflineModeEnabled @ PreserveOnRefresh public class ClinicalTrialsTouchKitUI extends UI { private TabBarView tabBarView = null ; private MapView mapview = null ; private MongodbData md = null ; private MenuView menuview = null ; private final ClinicalTrialsPersistToServerRpc serverRpc = new ClinicalTrialsPersistToServerRpc ( ) { @ Override public void persistToServer ( ) { } } ; @ Override protected void init ( VaadinRequest request ) { buildView ( ) ; OfflineMode offlineMode = new OfflineMode ( ) ; offlineMode . extend ( this ) ; offlineMode . setPersistentSessionCookie ( true ) ; <START_BUG> offlineMode . setOfflineModeTimeout ( 15 ) ; <END_BUG> } private void buildView ( ) { } public static ClinicalTrialsTouchKitUI getApp ( ) { } public void showDataSet ( String data_set ) { } public void showOriginalDataSet ( String data_set ) { } public void queryData ( HashMap < String , HashMap < String , String > > des , HashMap < String , ArrayList < ArrayList < String > > > dataset ) { } }

Fix:
offlineMode . setOfflineModeTimeout ( 60 ) ;
Buggy code:
@ RunWith ( OrderedRunner . class ) public class TestResourceLocator { @ Test @ TestOrder ( 1 ) public void testLocateResourceInClassPath ( ) { } @ Test @ TestOrder ( 2 ) public void testCache ( ) { } @ Test @ TestOrder ( 3 ) public void testLocateResourceInSourceCode ( ) { Resource r = ResourceLocator . locateResource ( "Config//logging.properties" ) ; <START_BUG> Resource r2 = ResourceLocator . locateSourceCodeResource ( r ) ; <END_BUG> Resource r3 = ResourceLocator . locateSourceCodeResource ( "Config//logging.properties" ) ; assertTrue ( ( r instanceof FileResourceImpl ) ) ; assertTrue ( ( r2 instanceof FileResourceImpl ) ) ; assertTrue ( ( r3 instanceof FileResourceImpl ) ) ; assertTrue ( ( ( FileResourceImpl ) ( r ) ) . getFile ( ) . getAbsolutePath ( ) . contains ( "target" ) ) ; assertTrue ( ( ( FileResourceImpl ) ( r2 ) ) . getFile ( ) . getAbsolutePath ( ) . contains ( "src//main//resources" ) ) ; assertSame ( r2 , r3 ) ; } }

Fix:
Resource r2 = ResourceLocator . locateSourceCodeResource ( r , ".*connie.*" ) ;
Buggy code:
public class ModClusterGetProxyInfo implements OperationStepHandler , DescriptionProvider { static final ModClusterGetProxyInfo INSTANCE = new ModClusterGetProxyInfo ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( context . isNormalServer ( ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; Map < InetSocketAddress , String > map = modcluster . getProxyInfo ( ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "Mod_cluster<seq2seq4repair_space>ProxyInfo<seq2seq4repair_space>%s" , map ) ; if ( ! ( map . isEmpty ( ) ) ) { final ModelNode result = new ModelNode ( ) ; Object [ ] addr = map . keySet ( ) . toArray ( ) ; for ( int i = 0 ; i < ( addr . length ) ; i ++ ) { InetSocketAddress address = ( ( InetSocketAddress ) ( addr [ i ] ) ) ; result . add ( ( ( ( address . getHostName ( ) ) + ":" ) + ( address . getPort ( ) ) ) ) ; result . add ( map . get ( addr [ i ] ) ) ; } context . getResult ( ) . set ( result ) ; } context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( ( context . isNormalServer ( ) ) && ( ( context . getServiceRegistry ( false ) . getService ( NAME ) ) != null ) ) {
Buggy code:
public class ArrayAllocationExpression extends Expression { public TypeReference type ; public Expression [ ] dimensions ; public ArrayInitializer initializer ; public ArrayBinding arrayTb ; public ArrayAllocationExpression ( ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { int pc = codeStream . position ; ArrayBinding arrayBinding ; if ( ( initializer ) != null ) { initializer . generateCode ( currentScope , codeStream , valueRequired ) ; return ; } int nonNullDimensionsLength = 0 ; for ( int i = 0 , max = dimensions . length ; i < max ; i ++ ) if ( ( dimensions [ i ] ) != null ) { dimensions [ i ] . generateCode ( currentScope , codeStream , true ) ; nonNullDimensionsLength ++ ; } if ( ( arrayTb . isArrayType ( ) ) && ( ( ( arrayBinding = ( ( ArrayBinding ) ( arrayTb ) ) ) . dimensions ) == 1 ) ) { codeStream . newArray ( currentScope , arrayBinding ) ; } else { codeStream . multianewarray ( arrayTb , nonNullDimensionsLength ) ; } if ( valueRequired ) { codeStream . generateImplicitConversion ( implicitConversion ) ; } else { codeStream . pop ( ) ; } <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public TypeBinding resolveType ( BlockScope scope ) { } public String toStringExpression ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
public class TestNorwegianAnalyzer 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 NorwegianAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new NorwegianAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;