nus-yam/ex-repair huggingface dataset:
Buggy code:
@ SuppressWarnings ( "restriction" ) public class NodeServer { private int port ; public NodeServer ( int port ) { } public HttpServer createHttpServer ( Node n ) throws IOException { <START_BUG> ResourceConfig resourceConfig = new ResourceConfig ( NodeAPI . class ) ; <END_BUG> resourceConfig . register ( n ) ; return JdkHttpServerFactory . createHttpServer ( getURI ( ) , resourceConfig ) ; } private URI getURI ( ) { } }

Fix:
ResourceConfig resourceConfig = new ResourceConfig ( ) ;
Buggy code:
public class LightweightGraphPlugin extends GraphlikePlugin { protected Map < String , Map < String , TObjectDoubleMap < String > > > graph = new HashMap < String , Map < String , TObjectDoubleMap < String > > > ( ) ; protected Map < Goal , Double > fd = new HashMap < Goal , Double > ( ) ; protected String name ; public LightweightGraphPlugin ( APROptions apr , String name ) { } @ Override protected boolean indexContains ( String label ) { } @ Override protected TObjectDoubleMap < String > indexGet ( String label , String src ) { } @ Override protected Collection < String > indexGet ( String label ) { } @ Override protected void indexAdd ( String label , String src , String dst ) { } @ Override protected Map < Goal , Double > getFD ( ) { } public static GraphlikePlugin load ( APROptions apr , File f ) { GraphlikePlugin p = new LightweightGraphPlugin ( apr , f . getName ( ) ) ; ParsedFile parsed = new ParsedFile ( f ) ; for ( String line : parsed ) { String [ ] parts = line . split ( "\t" ) ; <START_BUG> if ( ( parts . length ) != 3 ) <END_BUG> parsed . parseError ( ( "expected<seq2seq4repair_space>3<seq2seq4repair_space>tab-delimited<seq2seq4repair_space>fields;<seq2seq4repair_space>got<seq2seq4repair_space>" + ( parts . length ) ) ) ; p . addEdge ( parts [ 0 ] . trim ( ) , parts [ 1 ] . trim ( ) , parts [ 2 ] . trim ( ) ) ; } return p ; } @ Override public String about ( ) { } }

Fix:
if ( ( parts . length ) < 3 )
Buggy code:
public class HttpTestSampleGui extends AbstractSamplerGui implements ItemListener { private static final long serialVersionUID = 240L ; private MultipartUrlConfigGui urlConfigGui ; private JCheckBox getImages ; private JCheckBox concurrentDwn ; private JTextField concurrentPool ; private JCheckBox isMon ; private JCheckBox useMD5 ; private JLabeledTextField embeddedRE ; private JLabeledTextField sourceIpAddr ; private final boolean isAJP ; public HttpTestSampleGui ( ) { } protected HttpTestSampleGui ( boolean ajp ) { } @ Override public void configure ( TestElement element ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement sampler ) { } public String getLabelResource ( ) { } private void init ( ) { } protected JPanel createOptionalTasksPanel ( ) { final JPanel optionalTasksPanel = new VerticalPanel ( ) ; optionalTasksPanel . setBorder ( BorderFactory . createTitledBorder ( BorderFactory . createEtchedBorder ( ) , JMeterUtils . getResString ( "optional_tasks" ) ) ) ; final JPanel checkBoxPanel = new HorizontalPanel ( ) ; getImages = new JCheckBox ( JMeterUtils . getResString ( "web_testing_retrieve_images" ) ) ; getImages . addItemListener ( new ItemListener ( ) { public void itemStateChanged ( final ItemEvent e ) { if ( ( e . getStateChange ( ) ) == ( ItemEvent . SELECTED ) ) { enableConcurrentDwn ( true ) ; } else { enableConcurrentDwn ( false ) ; } } } ) ; concurrentDwn = new JCheckBox ( JMeterUtils . getResString ( "web_testing_concurrent_download" ) ) ; concurrentDwn . addItemListener ( new ItemListener ( ) { public void itemStateChanged ( final ItemEvent e ) { <START_BUG> if ( ( e . getStateChange ( ) ) == ( ItemEvent . SELECTED ) ) { <END_BUG> concurrentPool . setEnabled ( true ) ; } else { concurrentPool . setEnabled ( false ) ; } } } ) ; concurrentPool = new JTextField ( 2 ) ; concurrentPool . setMaximumSize ( new Dimension ( 30 , 20 ) ) ; isMon = new JCheckBox ( JMeterUtils . getResString ( "monitor_is_title" ) ) ; useMD5 = new JCheckBox ( JMeterUtils . getResString ( "response_save_as_md5" ) ) ; checkBoxPanel . add ( getImages ) ; checkBoxPanel . add ( concurrentDwn ) ; checkBoxPanel . add ( concurrentPool ) ; checkBoxPanel . add ( isMon ) ; checkBoxPanel . add ( useMD5 ) ; optionalTasksPanel . add ( checkBoxPanel ) ; embeddedRE = new JLabeledTextField ( JMeterUtils . getResString ( "web_testing_embedded_url_pattern" ) , 30 ) ; optionalTasksPanel . add ( embeddedRE , BorderLayout . CENTER ) ; if ( ! ( isAJP ) ) { sourceIpAddr = new JLabeledTextField ( JMeterUtils . getResString ( "web_testing2_source_ip" ) ) ; optionalTasksPanel . add ( sourceIpAddr , BorderLayout . EAST ) ; } return optionalTasksPanel ; } @ Override public Dimension getPreferredSize ( ) { } @ Override public void clearGui ( ) { } private void enableConcurrentDwn ( boolean enable ) { } public void itemStateChanged ( ItemEvent event ) { } }

Fix:
if ( ( getImages . isSelected ( ) ) && ( ( e . getStateChange ( ) ) == ( ItemEvent . SELECTED ) ) ) {
Buggy code:
public class ZkCoordinator implements PartitionCoordinator { public static Logger LOG = Logger . getLogger ( ZkCoordinator . class ) ; SpoutConfig _config ; int _taskIndex ; int _totalTasks ; TransactionalState _state ; String _topologyInstanceId ; CuratorFramework _curator ; Map < GlobalPartitionId , PartitionManager > _managers = new HashMap ( ) ; List < PartitionManager > _cachedList ; Long _lastRefreshTime = null ; int _refreshFreqMs ; ZkHosts _brokerConf ; DynamicPartitionConnections _connections ; public ZkCoordinator ( DynamicPartitionConnections connections , Map conf , SpoutConfig config , int taskIndex , int totalTasks , TransactionalState state , String topologyInstanceId ) { } @ Override public List < PartitionManager > getMyManagedPartitions ( ) { } void refresh ( ) { } @ Override public PartitionManager getManager ( GlobalPartitionId id ) { } private boolean myOwnership ( GlobalPartitionId id ) { <START_BUG> int val = ( id . host . hashCode ( ) ) + ( 23 * ( id . partition ) ) ; <END_BUG> return ( val % ( _totalTasks ) ) == ( _taskIndex ) ; } private static HostPort getBrokerHost ( byte [ ] contents ) { } private static int getNumPartitions ( byte [ ] contents ) { } }

Fix:
int val = Math . abs ( ( ( id . host . hashCode ( ) ) + ( 23 * ( id . partition ) ) ) ) ;
Buggy code:
public class ServerRemoveHandler extends AbstractRemoveStepHandler { public static final String OPERATION_NAME = REMOVE ; public static final ServerRemoveHandler INSTANCE = new ServerRemoveHandler ( ) ; protected ServerRemoveHandler ( ) { } @ Override protected void performRemove ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { super . performRemove ( context , operation , model ) ; final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String serverName = address . getLastElement ( ) . getValue ( ) ; final PathAddress running = address . subAddress ( 0 , 1 ) . append ( PathElement . pathElement ( RUNNING_SERVER , serverName ) ) ; final ModelNode runningServerRemove = new ModelNode ( ) ; runningServerRemove . get ( OP ) . set ( REMOVE ) ; runningServerRemove . get ( OP_ADDR ) . set ( running . toModelNode ( ) ) ; <START_BUG> context . addStep ( operation , new OperationStepHandler ( ) { <END_BUG> @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { context . removeResource ( EMPTY_ADDRESS ) ; context . stepCompleted ( ) ; } } , IMMEDIATE ) ; final ModelNode verifyOp = new ModelNode ( ) ; verifyOp . get ( OP ) . set ( "verify-running-server" ) ; verifyOp . get ( OP_ADDR ) . add ( HOST , address . getElement ( 0 ) . getValue ( ) ) ; context . addStep ( verifyOp , new OperationStepHandler ( ) { @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final PathAddress serverAddress = EMPTY_ADDRESS . append ( PathElement . pathElement ( SERVER , serverName ) ) ; final ProxyController controller = context . getResourceRegistration ( ) . getProxyController ( serverAddress ) ; if ( controller != null ) { context . getFailureDescription ( ) . set ( HostControllerMessages . MESSAGES . serverStillRunning ( serverName ) ) ; } context . stepCompleted ( ) ; } } , RUNTIME ) ; } protected boolean requiresRuntime ( OperationContext context ) { } }

Fix:
context . addStep ( runningServerRemove , new OperationStepHandler ( ) {
Buggy code:
public class TestWildcard extends LuceneTestCase { public void testEquals ( ) { } public void testTermWithoutWildcard ( ) throws IOException { } public void testEmptyTerm ( ) throws IOException { RAMDirectory indexStore = getIndexStore ( "field" , new String [ ] { "nowildcard" , "nowildcardx" } ) ; IndexSearcher searcher = new IndexSearcher ( indexStore , true ) ; MultiTermQuery wq = new WildcardQuery ( new Term ( "field" , "" ) ) ; wq . setRewriteMethod ( SCORING_BOOLEAN_QUERY_REWRITE ) ; assertMatches ( searcher , wq , 0 ) ; <START_BUG> BooleanQuery expected = new BooleanQuery ( ) ; <END_BUG> assertEquals ( searcher . rewrite ( expected ) , searcher . rewrite ( wq ) ) ; } public void testPrefixTerm ( ) throws IOException { } public void testAsterisk ( ) throws IOException { } public void testQuestionmark ( ) throws IOException { } private RAMDirectory getIndexStore ( String field , String [ ] contents ) throws IOException { } private void assertMatches ( IndexSearcher searcher , Query q , int expectedMatches ) throws IOException { } public void testParsingAndSearching ( ) throws Exception { } }

Fix:
BooleanQuery expected = new BooleanQuery ( true ) ;
Buggy code:
@ ContextConfiguration ( classes = IntegrationTestConfiguration . class ) public class StackCreationTest extends AbstractCloudbreakIntegrationTest { @ Autowired private Template stackCreationTemplate ; @ BeforeMethod public void setContextParams ( ) { } @ Test @ Parameters ( { "stackName" , "region" , "ambariUser" , "ambariPassword" , "onFailureAction" , "threshold" , "adjustmentType" } ) public void testStackCreation ( @ Optional ( "testing1" ) String stackName , @ Optional ( "EUROPE_WEST1_B" ) String region , @ Optional ( "admin" ) String ambariUser , @ Optional ( "admin" ) String ambariPassword , @ Optional ( "DO_NOTHING" ) String onFailureAction , @ Optional ( "1" ) Long threshold , @ Optional ( "EXACT" ) String adjustmentType ) { IntegrationTestContext itContext = getItContext ( ) ; Map < String , Object > templateModel = new HashMap < > ( ) ; templateModel . put ( "stackName" , stackName ) ; templateModel . put ( "region" , region ) ; templateModel . put ( "ambariUser" , ambariUser ) ; templateModel . put ( "ambariPassword" , ambariPassword ) ; <START_BUG> templateModel . put ( "onFailureAction" , onFailure ) ; <END_BUG> templateModel . put ( "threshold" , threshold ) ; templateModel . put ( "adjustmentType" , adjustmentType ) ; templateModel . put ( "instanceGroups" , itContext . getContextParam ( TEMPLATE_ID , List . class ) ) ; templateModel . put ( "credentialId" , itContext . getContextParam ( CREDENTIAL_ID ) ) ; Response resourceCreationResponse = RestUtil . createEntityRequest ( itContext . getContextParam ( CLOUDBREAK_SERVER ) , itContext . getContextParam ( AUTH_TOKEN ) , FreeMarkerUtil . renderTemplate ( stackCreationTemplate , templateModel ) ) . log ( ) . all ( ) . post ( "//user//stacks" ) ; checkResponse ( resourceCreationResponse , CREATED , JSON ) ; String stackId = resourceCreationResponse . jsonPath ( ) . getString ( "id" ) ; itContext . putCleanUpParam ( STACK_ID , stackId ) ; CloudbreakUtil . waitForStackStatus ( itContext , stackId , "AVAILABLE" ) ; itContext . putContextParam ( STACK_ID , stackId ) ; } }

Fix:
templateModel . put ( "onFailureAction" , onFailureAction ) ;
Buggy code:
public class AngularCookieLocaleResolver extends CookieLocaleResolver { @ Override public Locale resolveLocale ( HttpServletRequest request ) { } @ Override <START_BUG> public LocaleContext resolveLocaleContext ( HttpServletRequest request ) { <END_BUG> parseLocaleCookieIfNecessary ( request ) ; return new TimeZoneAwareLocaleContext ( ) { @ Override public Locale getLocale ( ) { return ( ( Locale ) ( request . getAttribute ( LOCALE_REQUEST_ATTRIBUTE_NAME ) ) ) ; } @ Override public TimeZone getTimeZone ( ) { return ( ( TimeZone ) ( request . getAttribute ( TIME_ZONE_REQUEST_ATTRIBUTE_NAME ) ) ) ; } } ; } @ Override public void addCookie ( HttpServletResponse response , String cookieValue ) { } private void parseLocaleCookieIfNecessary ( HttpServletRequest request ) { } }

Fix:
public LocaleContext resolveLocaleContext ( final HttpServletRequest request ) {
Buggy code:
public class EditProjectDialog extends DialogFragment implements View . OnClickListener , View . OnFocusChangeListener { long projRecId = 0 ; Uri uri ; Uri baseUri = Uri . withAppendedPath ( CONTENT_URI , "projects" ) ; ContentValues values = new ContentValues ( ) ; private EditText mProjCode ; private EditText mDescription ; private EditText mContext ; private EditText mCaveats ; private EditText mContactPerson ; private EditText mStartDate ; private EditText mEndDate ; private EditText mActiveDateView ; SimpleDateFormat dateFormat = new SimpleDateFormat ( "yyyy-MM-dd" , Locale . US ) ; private Calendar myCalendar = Calendar . getInstance ( ) ; private OnDateSetListener myDateListener = new DatePickerDialog . OnDateSetListener ( ) { @ Override public void onDateSet ( DatePicker view , int year , int monthOfYear , int dayOfMonth ) { } } ; static EditProjectDialog newInstance ( long projRecId ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup root , Bundle savedInstanceState ) { } @ Override public void onClick ( View v ) { } private void fireOffDatePicker ( ) { } @ Override public void onStart ( ) { } @ Override public void onFocusChange ( View v , boolean hasFocus ) { } @ Override public void onCancel ( DialogInterface dialog ) { } private int saveProjRecord ( ) { if ( ( "" + ( mProjCode . getText ( ) . toString ( ) . trim ( ) ) ) == "" ) { Toast . makeText ( this . getActivity ( ) , "Need<seq2seq4repair_space>Project<seq2seq4repair_space>Code" , LENGTH_LONG ) . show ( ) ; return 0 ; } ContentResolver rs = getActivity ( ) . getContentResolver ( ) ; if ( ( projRecId ) == 0 ) { uri = rs . insert ( baseUri , values ) ; Log . v ( "EditProj" , ( "new<seq2seq4repair_space>record<seq2seq4repair_space>in<seq2seq4repair_space>saveProjRecord;<seq2seq4repair_space>returned<seq2seq4repair_space>URI:<seq2seq4repair_space>" + ( uri . toString ( ) ) ) ) ; projRecId = Long . parseLong ( uri . getLastPathSegment ( ) ) ; uri = ContentUris . withAppendedId ( baseUri , projRecId ) ; Log . v ( "EditProj" , ( "new<seq2seq4repair_space>record<seq2seq4repair_space>in<seq2seq4repair_space>saveProjRecord;<seq2seq4repair_space>URI<seq2seq4repair_space>re-parsed:<seq2seq4repair_space>" + ( uri . toString ( ) ) ) ) ; SharedPreferences sharedPref = getActivity ( ) . getPreferences ( MODE_PRIVATE ) ; SharedPreferences . Editor prefEditor = sharedPref . edit ( ) ; <START_BUG> prefEditor . putLong ( DEFAULT_PLOTTYPE_ID , projRecId ) ; <END_BUG> prefEditor . commit ( ) ; return 1 ; } else { int numUpdated = rs . update ( uri , values , null , null ) ; Log . v ( "EditProj" , ( "Saved<seq2seq4repair_space>record<seq2seq4repair_space>in<seq2seq4repair_space>saveProjRecord;<seq2seq4repair_space>numUpdated:<seq2seq4repair_space>" + numUpdated ) ) ; return numUpdated ; } } }

Fix:
prefEditor . putLong ( DEFAULT_PROJECT_ID , projRecId ) ;
Buggy code:
public class CsvEntityTest { @ Test public void csv_entriesAreEscaped ( ) { CsvEntity csvEntity = new CsvEntity ( ) ; Map jsonMap = ImmutableMap . of ( "hash" , "hash1" , "entry" , ImmutableMap . of ( "key1" , "valu\te1" , "key2" , "val,ue2" , "key3" , "val\"ue3" , "key4" , "val\nue4" ) ) ; JsonNode node = JsonObjectMapper . convert ( jsonMap , JsonNode . class ) ; AbstractView view = new SingleResultView ( "foo" , node ) ; Object result = csvEntity . convert ( view ) ; <START_BUG> assertThat ( result . toString ( ) , equalTo ( "hash,key1,key2,key3,key4\nhash1,valu\te1,\"val,ue2\",\"val\"\"ue3\",\"val\nue4\"" ) ) ; <END_BUG> } }

Fix:
assertThat ( result . toString ( ) , equalTo ( "hash,key1,key2,key3,key4\r\nhash1,valu\te1,\"val,ue2\",\"val\"\"ue3\",\"val\nue4\"" ) ) ;
Buggy code:
public class NumberFormatTransformer extends Transformer { private static final Pattern localeRegex = Pattern . compile ( "^([a-z]{2})-([A-Z]{2})$" ) ; @ Override @ SuppressWarnings ( "unchecked" ) public Object transformRow ( Map < String , Object > row , Context context ) { for ( Map < String , String > fld : context . getAllEntityFields ( ) ) { String style = context . replaceTokens ( fld . get ( NumberFormatTransformer . FORMAT_STYLE ) ) ; if ( style != null ) { String column = fld . get ( COLUMN ) ; String srcCol = fld . get ( SRC_COL_NAME ) ; Locale locale = null ; String localeStr = context . replaceTokens ( fld . get ( NumberFormatTransformer . LOCALE ) ) ; if ( srcCol == null ) srcCol = column ; if ( localeStr != null ) { Matcher matcher = NumberFormatTransformer . localeRegex . matcher ( localeStr ) ; if ( ( matcher . find ( ) ) && ( ( matcher . groupCount ( ) ) == 2 ) ) { locale = new Locale ( matcher . group ( 1 ) , matcher . group ( 2 ) ) ; } else { throw new DataImportHandlerException ( DataImportHandlerException . SEVERE , ( "Invalid<seq2seq4repair_space>Locale<seq2seq4repair_space>specified<seq2seq4repair_space>for<seq2seq4repair_space>field:<seq2seq4repair_space>" + fld ) ) ; } } else { <START_BUG> locale = Locale . getDefault ( ) ; <END_BUG> } Object val = row . get ( srcCol ) ; String styleSmall = style . toLowerCase ( Locale . ROOT ) ; if ( val instanceof List ) { List < String > inputs = ( ( List ) ( val ) ) ; List results = new ArrayList ( ) ; for ( String input : inputs ) { try { results . add ( process ( input , styleSmall , locale ) ) ; } catch ( ParseException e ) { throw new DataImportHandlerException ( DataImportHandlerException . SEVERE , ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>apply<seq2seq4repair_space>NumberFormat<seq2seq4repair_space>on<seq2seq4repair_space>column:<seq2seq4repair_space>" + column ) , e ) ; } } row . put ( column , results ) ; } else { if ( ( val == null ) || ( val . toString ( ) . trim ( ) . equals ( "" ) ) ) continue ; try { row . put ( column , process ( val . toString ( ) , styleSmall , locale ) ) ; } catch ( ParseException e ) { throw new DataImportHandlerException ( DataImportHandlerException . SEVERE , ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>apply<seq2seq4repair_space>NumberFormat<seq2seq4repair_space>on<seq2seq4repair_space>column:<seq2seq4repair_space>" + column ) , e ) ; } } } } return row ; } private Number process ( String val , String style , Locale locale ) throws ParseException { } private Number parseNumber ( String val , NumberFormat numFormat ) throws ParseException { } public static final String FORMAT_STYLE = "formatStyle" ; public static final String LOCALE = "locale" ; public static final String NUMBER = "number" ; public static final String PERCENT = "percent" ; public static final String INTEGER = "integer" ; public static final String CURRENCY = "currency" ; }

Fix:
locale = Locale . ROOT ;
Buggy code:
public class MainActivity extends ActionBarActivity { public static final String TYPE = "type" ; public static final String LOGIN = "Log<seq2seq4repair_space>In" ; public static final String SIGNUP = "Sign<seq2seq4repair_space>Up" ; protected Button mLoginButton ; protected Button mSignupButton ; private Button storyShowcaseButton ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void startStory ( ) { } public void startShowcase ( ) { <START_BUG> Intent intent = new Intent ( this , StoryShowcase . class ) ; <END_BUG> startActivity ( intent ) ; } No newline ; at end ; of file ; }

Fix:
Intent intent = new Intent ( this , storyShowcase . class ) ;
Buggy code:
public class Renderer { private static OrthographicCamera camera ; private static SpriteBatch worldbatch ; private static SpriteBatch hudbatch ; private static ShapeRenderer shapeRenderer ; private static Font font ; private static Map < String , Tileset > tilesets ; public static int cameraWidth = 1280 ; public static int cameraHeight = 720 ; public static void Initialize ( ) { } public static void Shutdown ( ) { } public static void StartWorldBatch ( ) { } public static void EndWorldBatch ( ) { } public static void StartScreenBatch ( ) { } public static void EndScreenBatch ( ) { } public static void ClearScreen ( ) { } public static void DrawText ( String text , Vector2f position , Color color , float scale ) { } public static void DrawTexture ( Texture sprite , Vector2f position ) { } public static void DrawSpriteScreen ( Sprite sprite , Vector2f position ) { <START_BUG> Renderer . hudbatch . draw ( sprite , position . x , position . y ) ; <END_BUG> } public static void DrawSpriteWorld ( Sprite sprite , Vector2f position ) { } public static void DrawSpriteWorld ( Sprite sprite , Vector2f position , Rectangle urmum ) { } public static void DrawTile ( Vector2f position , String strtileset , int index ) { } public static OrthographicCamera GetCamera ( ) { } public static ShapeRenderer GetShapeRenderer ( ) { } }

Fix:
Renderer . hudbatch . draw ( sprite , position . x , position . y , ( ( sprite . getWidth ( ) ) * ( sprite . getScaleX ( ) ) ) , ( ( sprite . getHeight ( ) ) * ( sprite . getScaleY ( ) ) ) ) ;
Buggy code:
public class PanelTest extends WicketTestCase { public PanelTest ( String name ) { } public void testRenderHomePage_1 ( ) throws Exception { boolean hit = false ; try { executeTest ( PanelPage_1 . class , "Dummy.html" ) ; } catch ( MarkupException mex ) { hit = true ; assertNotNull ( mex . getMarkupStream ( ) ) ; assertTrue ( mex . getMessage ( ) . contains ( "Tag<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>a<seq2seq4repair_space>close<seq2seq4repair_space>tag" ) ) ; <START_BUG> assertTrue ( mex . getMessage ( ) . contains ( "SimplePanel_1.html" ) ) ; <END_BUG> } assertTrue ( "Did<seq2seq4repair_space>expect<seq2seq4repair_space>a<seq2seq4repair_space>MarkupException" , hit ) ; } public void testRenderHomePage_2 ( ) throws Exception { } public void testPanel3 ( ) throws Exception { } public void testPanel4 ( ) throws Exception { } public void testInlinePanel ( ) throws Exception { } public void testInlinePanel_2 ( ) throws Exception { } public void testInlinePanel_3 ( ) throws Exception { } public void testInlinePanel_4 ( ) throws Exception { } public void testInlinePanel_5 ( ) throws Exception { } public void testInlinePanel_6 ( ) throws Exception { } public void testPanelWithAttributeModifier ( ) throws Exception { } public void testInlinePanel_7 ( ) throws Exception { } public void testInlinePanel_8 ( ) throws Exception { } public void testStartPanel ( ) { } }

Fix:
assertTrue ( mex . toString ( ) . contains ( "SimplePanel_1.html" ) ) ;
Buggy code:
public class LocalizedFormatsTest { @ Test public void testMessageNumber ( ) { <START_BUG> Assert . assertEquals ( 311 , LocalizedFormats . values ( ) . length ) ; <END_BUG> } @ Test public void testAllKeysPresentInPropertiesFiles ( ) { } @ Test public void testAllPropertiesCorrespondToKeys ( ) { } @ Test public void testNoMissingFrenchTranslation ( ) { } @ Test public void testNoOpEnglishTranslation ( ) { } @ Test public void testVariablePartsConsistency ( ) { } }

Fix:
Assert . assertEquals ( 310 , LocalizedFormats . values ( ) . length ) ;
Buggy code:
public class HasVariantValueNodeVisitor implements Visitor { private boolean hasVariant ; private int variantType ; private boolean ignoreParameters ; public HasVariantValueNodeVisitor ( ) { } public HasVariantValueNodeVisitor ( int variantType , boolean ignoreParameters ) { } public Visitable visit ( Visitable node ) throws StandardException { if ( node instanceof ValueNode ) { <START_BUG> if ( ( ignoreParameters ) && ( ( ( ValueNode ) ( node ) ) . isParameterNode ( ) ) ) <END_BUG> return node ; if ( ( ( ( ValueNode ) ( node ) ) . getOrderableVariantType ( ) ) <= ( variantType ) ) { hasVariant = true ; } } return node ; } public boolean skipChildren ( Visitable node ) { } public boolean stopTraversal ( ) { } public boolean hasVariant ( ) { } }

Fix:
if ( ( ignoreParameters ) && ( ( ( ValueNode ) ( node ) ) . requiresTypeFromContext ( ) ) )
Buggy code:
public class SQLExec extends Task { private int goodSql = 0 ; private int totalSql = 0 ; private ArrayList filesets = new ArrayList ( ) ; private Connection conn = null ; private boolean autocommit = false ; private Statement statement = null ; private String driver = null ; private String url = null ; private String userId = null ; private String password = null ; private File srcFile = null ; private String sqlCommand = "" ; private ArrayList transactions = new ArrayList ( ) ; private String delimiter = ";" ; private String delimiterType = SQLExec . DelimiterType . NORMAL ; private boolean print = false ; private boolean showheaders = true ; private File output = null ; private String rdbms = null ; private String version = null ; private String onError = "abort" ; private String encoding = null ; private Path classpath ; private AntClassLoader loader ; public void setAutocommit ( boolean autocommit ) { } public void setClasspath ( Path classpath ) throws TaskException { } public void setClasspathRef ( Reference r ) throws TaskException { } public void setDelimiter ( String delimiter ) { } public void setDelimiterType ( SQLExec . DelimiterType delimiterType ) { } public void setDriver ( String driver ) { } public void setEncoding ( String encoding ) { } public void setOnerror ( SQLExec . OnError action ) { } public void setOutput ( File output ) { } public void setPassword ( String password ) { } public void setPrint ( boolean print ) { } public void setRdbms ( String vendor ) { } public void setShowheaders ( boolean showheaders ) { } public void setSrc ( File srcFile ) { } public void setUrl ( String url ) { } public void setUserid ( String userId ) { } public void setVersion ( String version ) { } public void addFileset ( FileSet set ) { } public void addText ( String sql ) { } public Path createClasspath ( ) throws TaskException { if ( ( this . classpath ) == null ) { <START_BUG> this . classpath = new Path ( getProject ( ) ) ; <END_BUG> } return this . classpath . createPath ( ) ; } public SQLExec . Transaction createTransaction ( ) { } public void execute ( ) throws TaskException { } protected boolean isValidRdbms ( Connection conn ) { } protected void execSQL ( String sql , PrintStream out ) throws SQLException { } protected void printResults ( PrintStream out ) throws SQLException { } protected void runStatements ( Reader reader , PrintStream out ) throws IOException , SQLException , TaskException { } public static class DelimiterType extends EnumeratedAttribute { public static final String NORMAL = "normal" ; public static final String ROW = "row" ; public String [ ] getValues ( ) { } } public static class OnError extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public class Transaction { private File tSrcFile = null ; private String tSqlCommand = "" ; public void setSrc ( File src ) { } public void addText ( String sql ) { } private void runTransaction ( PrintStream out ) throws IOException , SQLException , TaskException { } } }

Fix:
this . classpath = new Path ( ) ;
Buggy code:
public class SingleSignOnManagerService implements Service < SingleSignOnManager > { public static ServiceBuilder < SingleSignOnManager > build ( ServiceTarget target , ServiceName name , ServiceName hostName ) { ServiceName factoryName = name . append ( "factory" ) ; DistributableSingleSignOnManagerFactoryBuilder builder = new DistributableSingleSignOnManagerFactoryBuilderValue ( ) . getValue ( ) ; if ( builder != null ) { builder . build ( target , factoryName , hostName ) . setInitialMode ( ON_DEMAND ) . install ( ) ; } else { SingleSignOnManagerFactory factory = new InMemorySingleSignOnManagerFactory ( ) ; <START_BUG> target . addService ( factoryName , new org . jboss . msc . service . ValueService ( new org . jboss . msc . value . ImmediateValue ( factory ) ) ) . install ( ) ; <END_BUG> } SingleSignOnManagerService service = new SingleSignOnManagerService ( ) ; return target . addService ( name , service ) . addDependency ( factoryName , SingleSignOnManagerFactory . class , service . factory ) . addDependency ( hostName , Host . class , service . host ) ; } private final InjectedValue < SingleSignOnManagerFactory > factory = new InjectedValue ( ) ; private final InjectedValue < Host > host = new InjectedValue ( ) ; private volatile SingleSignOnManager manager ; private SingleSignOnManagerService ( ) { } @ Override public SingleSignOnManager getValue ( ) { } @ Override public void start ( StartContext context ) { } @ Override public void stop ( StopContext context ) { } }

Fix:
target . addService ( factoryName , new org . jboss . msc . service . ValueService ( new org . jboss . msc . value . ImmediateValue ( factory ) ) ) ;
Buggy code:
public class TypeVariableBinding extends ReferenceBinding { public Binding declaringElement ; public int rank ; public ReferenceBinding firstBound ; public ReferenceBinding superclass ; public ReferenceBinding [ ] superInterfaces ; public char [ ] genericTypeSignature ; public TypeVariableBinding ( char [ ] sourceName , Binding declaringElement , int rank ) { } public int kind ( ) { } public boolean boundCheck ( Substitution substitution , TypeBinding argumentType ) { } public boolean canBeInstantiated ( ) { } public void collectSubstitutes ( Scope scope , TypeBinding otherType , Map substitutes , int constraint ) { } public char [ ] constantPoolName ( ) { } public char [ ] computeUniqueKey ( ) { } public String debugName ( ) { } public TypeBinding erasure ( ) { } public ReferenceBinding findSuperTypeErasingTo ( int erasureId , boolean erasureIsClass ) { } public ReferenceBinding findSuperTypeErasingTo ( ReferenceBinding erasure ) { if ( ( this ) == erasure ) return this ; ReferenceBinding currentType = this ; <START_BUG> if ( erasure . isClass ( ) ) { <END_BUG> while ( ( currentType = currentType . superclass ( ) ) != null ) { if ( ( currentType == erasure ) || ( ( currentType . erasure ( ) ) == erasure ) ) return currentType ; } return null ; } ReferenceBinding [ ] [ ] interfacesToVisit = new ReferenceBinding [ 5 ] [ ] ; int lastPosition = - 1 ; do { ReferenceBinding [ ] itsInterfaces = currentType . superInterfaces ( ) ; if ( itsInterfaces != ( NoSuperInterfaces ) ) { if ( ( ++ lastPosition ) == ( interfacesToVisit . length ) ) System . arraycopy ( interfacesToVisit , 0 , ( interfacesToVisit = new ReferenceBinding [ lastPosition * 2 ] [ ] ) , 0 , lastPosition ) ; interfacesToVisit [ lastPosition ] = itsInterfaces ; } } while ( ( currentType = currentType . superclass ( ) ) != null ) ; for ( int i = 0 ; i <= lastPosition ; i ++ ) { ReferenceBinding [ ] interfaces = interfacesToVisit [ i ] ; for ( int j = 0 , length = interfaces . length ; j < length ; j ++ ) { if ( ( ( currentType = interfaces [ j ] ) == erasure ) || ( ( currentType . erasure ( ) ) == erasure ) ) return currentType ; ReferenceBinding [ ] itsInterfaces = currentType . superInterfaces ( ) ; if ( itsInterfaces != ( NoSuperInterfaces ) ) { if ( ( ++ lastPosition ) == ( interfacesToVisit . length ) ) System . arraycopy ( interfacesToVisit , 0 , ( interfacesToVisit = new ReferenceBinding [ lastPosition * 2 ] [ ] ) , 0 , lastPosition ) ; interfacesToVisit [ lastPosition ] = itsInterfaces ; } } } return null ; } public char [ ] genericSignature ( ) { } public char [ ] genericTypeSignature ( ) { } public boolean isErasureBoundTo ( TypeBinding type ) { } public boolean isTypeVariable ( ) { } public TypeVariableBinding original ( ) { } public char [ ] readableName ( ) { } ReferenceBinding resolve ( LookupEnvironment environment ) { } public char [ ] shortReadableName ( ) { } public ReferenceBinding superclass ( ) { } public ReferenceBinding [ ] superInterfaces ( ) { } public String toString ( ) { } }

Fix:
if ( ( ( erasure . modifiers ) & ( AccInterface ) ) == 0 ) {
Buggy code:
public class HighamHall54StepInterpolatorTest { @ Test public void derivativesConsistency ( ) throws DerivativeException , IntegratorException { TestProblem3 pb = new TestProblem3 ( 0.1 ) ; double minStep = 0 ; double maxStep = ( pb . getFinalTime ( ) ) - ( pb . getInitialTime ( ) ) ; double scalAbsoluteTolerance = 1.0E-8 ; double scalRelativeTolerance = scalAbsoluteTolerance ; HighamHall54Integrator integ = new HighamHall54Integrator ( minStep , maxStep , scalAbsoluteTolerance , scalRelativeTolerance ) ; <START_BUG> StepInterpolatorTestUtils . checkDerivativesConsistency ( integ , pb , 1.0E-10 ) ; <END_BUG> } @ Test public void serialization ( ) throws IOException , ClassNotFoundException , DerivativeException , IntegratorException { } @ Test public void checkClone ( ) throws DerivativeException , IntegratorException { } }

Fix:
StepInterpolatorTestUtils . checkDerivativesConsistency ( integ , pb , 1.1E-10 ) ;
Buggy code:
public class ForStatement extends Statement { public Statement [ ] initializations ; public Expression condition ; public Statement [ ] increments ; public Statement action ; public boolean neededScope ; public BlockScope scope ; private Label breakLabel ; private Label continueLabel ; int preCondInitStateIndex = - 1 ; int condIfTrueInitStateIndex = - 1 ; int mergedInitStateIndex = - 1 ; public ForStatement ( Statement [ ] initializations , Expression condition , Statement [ ] increments , Statement action , boolean neededScope , int s , int e ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public StringBuffer printStatement ( int tab , StringBuffer output ) { } public void resolve ( BlockScope upperScope ) { scope = ( neededScope ) ? new BlockScope ( upperScope ) : upperScope ; if ( ( initializations ) != null ) for ( int i = 0 , length = initializations . length ; i < length ; i ++ ) initializations [ i ] . resolve ( scope ) ; if ( ( condition ) != null ) { <START_BUG> TypeBinding type = condition . resolveTypeExpecting ( scope , BooleanBinding ) ; <END_BUG> condition . computeConversion ( scope , type , type ) ; } if ( ( increments ) != null ) for ( int i = 0 , length = increments . length ; i < length ; i ++ ) increments [ i ] . resolve ( scope ) ; if ( ( action ) != null ) action . resolve ( scope ) ; } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } }

Fix:
TypeBinding type = condition . resolveTypeExpecting ( scope , TypeBinding . BOOLEAN ) ;
Buggy code:
public class CommandLineArgumentUsageImpl extends CommandLineArgumentUsage { public static void init ( ) { } public static void printUsage ( final PrintStream out ) { CommandLineArgumentUsageImpl . init ( ) ; <START_BUG> out . print ( usage ( ) ) ; <END_BUG> } }

Fix:
out . print ( usage ( "standalone" ) ) ;
Buggy code:
public class ScrollBar { private ScrollPane parent ; private int display ; private int x ; private int y ; private int startY = - 1 ; private int startX = - 1 ; private int startDragX = - 1 ; private int startDragY = - 1 ; private int width ; private int maxWidth ; private int height ; private int maxHeight ; private boolean barHover = false ; private boolean topHover = false ; private boolean bottomHover = false ; private boolean leftHover = false ; private boolean rightHover = false ; public static final int VERTICAL = 1 ; public static final int HORIZONTAL = 2 ; public ScrollBar ( int display , ScrollPane parent ) { } private int getParentHeight ( ) { } private int getParentWidth ( ) { } public boolean hoveringOverBar ( ) { } public boolean isHeld ( ) { } public void update ( ) { } public void cursorMove ( CursorMoveEvent event ) { if ( ( display ) == ( ScrollBar . VERTICAL ) ) { if ( ( startDragY ) != ( - 1 ) ) { barHover = getBar ( ) . contains ( event . getX ( ) , event . getY ( ) ) ; y = ( ( startY ) + ( event . getY ( ) ) ) - ( startDragY ) ; } topHover = new Rectangle ( ( ( ( int ) ( ( parent . getDisplayLocation ( ) . getX ( ) ) + ( getParentWidth ( ) ) ) ) - 13 ) , ( ( ( int ) ( parent . getDisplayLocation ( ) . getY ( ) ) ) + 2 ) , 11 , 11 ) . contains ( event . getX ( ) , event . getY ( ) ) ; bottomHover = new Rectangle ( ( ( ( int ) ( ( parent . getDisplayLocation ( ) . getX ( ) ) + ( getParentWidth ( ) ) ) ) - 13 ) , ( ( ( ( int ) ( parent . getDisplayLocation ( ) . getY ( ) ) ) + ( maxHeight ) ) + 17 ) , 11 , 11 ) . contains ( event . getX ( ) , event . getY ( ) ) ; } if ( ( display ) == ( ScrollBar . HORIZONTAL ) ) { if ( ( startDragX ) != ( - 1 ) ) { barHover = getBar ( ) . contains ( event . getX ( ) , event . getY ( ) ) ; x = ( ( startX ) + ( event . getX ( ) ) ) - ( startDragX ) ; } leftHover = new Rectangle ( ( ( ( int ) ( parent . getDisplayLocation ( ) . getX ( ) ) ) + 2 ) , ( ( ( int ) ( ( parent . getDisplayLocation ( ) . getY ( ) ) + ( getParentHeight ( ) ) ) ) - 13 ) , 11 , 11 ) . contains ( event . getX ( ) , event . getY ( ) ) ; <START_BUG> rightHover = new Rectangle ( ( ( ( ( int ) ( parent . getDisplayLocation ( ) . getX ( ) ) ) + ( getParentWidth ( ) ) ) - 13 ) , ( ( ( int ) ( ( parent . getDisplayLocation ( ) . getY ( ) ) + ( getParentHeight ( ) ) ) ) - 13 ) , 11 , 11 ) . contains ( event . getY ( ) , event . getY ( ) ) ; <END_BUG> } } public void cursorClick ( CursorClickEvent event ) { } public Rectangle getBar ( ) { } public float calculateYOffset ( ) { } public float calculateXOffset ( ) { } public void render ( ) { } No newline ; at end ; of file ; }

Fix:
rightHover = new Rectangle ( ( ( ( ( int ) ( parent . getDisplayLocation ( ) . getX ( ) ) ) + ( getParentWidth ( ) ) ) - 13 ) , ( ( ( int ) ( ( parent . getDisplayLocation ( ) . getY ( ) ) + ( getParentHeight ( ) ) ) ) - 13 ) , 11 , 11 ) . contains ( event . getX ( ) , event . getY ( ) ) ;
Buggy code:
public class DocumentFrequency { private List < String > documents ; private Map < String , Integer > wordFrequency ; private int documentCount = 0 ; public DocumentFrequency ( String path ) throws IOException { } public Map < String , Integer > getWordFrequency ( ) { } public void setWordFrequency ( Map < String , Integer > wordFrequency ) { } public int getDocumentCount ( ) { } public void setDocumentCount ( int documentCount ) { } public int getWordFrequency ( String word ) { <START_BUG> return wordFrequency . get ( word ) ; <END_BUG> } public List < String > getListOfWords ( ) { } public void readCorpus ( String path ) throws IOException { } private void countWordsFrequency ( ) { } }

Fix:
return wordFrequency . getOrDefault ( word , 1 ) ;
Buggy code:
public class DoorLocation extends BaseLocation { @ Data @ AllArgsConstructor public class Key implements Item { protected String name ; } @ Getter protected boolean open ; protected DoorLocation . Key key ; public DoorLocation . Key generateKey ( boolean force ) { } public boolean lock ( ) { <START_BUG> if ( isOpen ( ) ) { <END_BUG> return false ; } this . open = false ; return true ; } public void forceOpen ( ) { } public boolean openWith ( DoorLocation . Key key ) { } @ Override public DoorLocation useDefaultRoutine ( ) { } @ Override public boolean isWalkable ( ) { } @ Override public String toString ( ) { } @ AllArgsConstructor public static class DefaultRoutine extends InteractionRoutine { @ Getter @ Setter protected DoorLocation door ; @ Override public boolean handle ( Player player , Command cmd , Adapter adapter ) throws IOException { } protected void openDoorRoutine ( Player player , Adapter adapter ) throws IOException { } protected void lockedDoorRoutine ( Player player , Adapter adapter ) throws IOException { } protected DoorLocation . Key chooseKey ( Player player , Adapter adapter ) throws IOException { } } }

Fix:
if ( ! ( isOpen ( ) ) ) {
Buggy code:
public class Conversions { public static void main ( String [ ] args0 ) { } private static String Verbose ( String word ) { } private static void NotVerbose ( String word ) { } private static void BinaryToDecimal ( String bin ) { System . out . println ( "\nConverted<seq2seq4repair_space>back<seq2seq4repair_space>to<seq2seq4repair_space>ASCII:\n" ) ; int binlen = bin . length ( ) ; boolean isSameNum = true ; String workShown = "" ; int sum = 0 ; String binaryString = "" ; int power = 0 ; for ( int i = binlen - 2 ; i >= ( - 1 ) ; i -- ) { if ( ( i < 0 ) || ( ( bin . charAt ( i ) ) == '<seq2seq4repair_space>' ) ) { isSameNum = false ; } if ( ! isSameNum ) { binaryString = new StringBuilder ( binaryString ) . reverse ( ) . toString ( ) ; <START_BUG> System . out . println ( ( ( ( ( ( ( binaryString + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + workShown ) + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + sum ) + "\nTherfore<seq2seq4repair_space>based<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>ASCII<seq2seq4repair_space>tables<seq2seq4repair_space>this<seq2seq4repair_space>number<seq2seq4repair_space>represents:<seq2seq4repair_space>" ) + ( ( char ) ( sum ) ) ) ) ; <END_BUG> isSameNum = true ; binaryString = "" ; workShown = "" ; power = 0 ; sum = 0 ; } else { binaryString += bin . charAt ( i ) ; if ( ( bin . charAt ( i ) ) == '1' ) { sum += Math . pow ( 2 , ( ( double ) ( power ) ) ) ; workShown += ( ( int ) ( Math . pow ( 2 , ( ( double ) ( power ) ) ) ) ) ; if ( ( i != 0 ) && ( ( bin . charAt ( ( i - 1 ) ) ) != '<seq2seq4repair_space>' ) ) { workShown += "+" ; } } power += 1 ; } } } }

Fix:
System . out . println ( ( ( ( ( ( ( binaryString + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + workShown ) + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + sum ) + "\nTherefore<seq2seq4repair_space>based<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>ASCII<seq2seq4repair_space>tables<seq2seq4repair_space>this<seq2seq4repair_space>number<seq2seq4repair_space>represents:<seq2seq4repair_space>" ) + ( ( char ) ( sum ) ) ) ) ;
Buggy code:
public interface ModelFixer { ModelNode fixModel ( ModelNode modelNode ) ; public static class CumulativeModelFixer implements ModelFixer { ModelFixer [ ] fixers ; public CumulativeModelFixer ( ModelFixer ... fixers ) { } @ Override public ModelNode fixModel ( ModelNode modelNode ) { for ( ModelFixer fixer : fixers ) { if ( fixer != null ) { <START_BUG> fixer . fixModel ( modelNode ) ; <END_BUG> } } return modelNode ; } } }

Fix:
modelNode = fixer . fixModel ( modelNode ) ;
Buggy code:
public class TestPredicatedSortedMap < K , V > extends AbstractTestSortedMap < K , V > { protected static final Predicate < Object > truePredicate = org . apache . commons . collections . functors . TruePredicate . truePredicate ( ) ; protected static final Predicate < Object > testPredicate = new Predicate < Object > ( ) { public boolean evaluate ( Object o ) { } } ; public TestPredicatedSortedMap ( String testName ) { } protected SortedMap < K , V > decorateMap ( SortedMap < K , V > map , Predicate < ? super K > keyPredicate , Predicate < ? super V > valuePredicate ) { <START_BUG> return PredicatedSortedMap . decorate ( map , keyPredicate , valuePredicate ) ; <END_BUG> } @ Override public SortedMap < K , V > makeObject ( ) { } public SortedMap < K , V > makeTestMap ( ) { } @ Override public boolean isSubMapViewsSerializable ( ) { } @ Override public boolean isAllowNullKey ( ) { } @ SuppressWarnings ( "unchecked" ) public void testEntrySet ( ) { } @ SuppressWarnings ( "unchecked" ) public void testPut ( ) { } @ SuppressWarnings ( "unchecked" ) public void testSortOrder ( ) { } @ Override public String getCompatibilityVersion ( ) { } }

Fix:
return PredicatedSortedMap . predicatedSortedMap ( map , keyPredicate , valuePredicate ) ;
Buggy code:
public class ReplicationFinishedVerbHandler implements IVerbHandler { private static Logger logger = LoggerFactory . getLogger ( ReplicationFinishedVerbHandler . class ) ; public void doVerb ( Message msg ) { instance . confirmReplication ( msg . getFrom ( ) ) ; <START_BUG> Message response = msg . getInternalReply ( EMPTY_BYTE_ARRAY ) ; <END_BUG> if ( ReplicationFinishedVerbHandler . logger . isDebugEnabled ( ) ) ReplicationFinishedVerbHandler . logger . debug ( ( ( ( "Replying<seq2seq4repair_space>to<seq2seq4repair_space>" + ( msg . getMessageId ( ) ) ) + "@" ) + ( msg . getFrom ( ) ) ) ) ; MessagingService . instance ( ) . sendOneWay ( response , msg . getFrom ( ) ) ; } }

Fix:
Message response = msg . getInternalReply ( EMPTY_BYTE_ARRAY , msg . getVersion ( ) ) ;
Buggy code:
public class ThemHandler { public static final ThemHandler INSTANCE = new ThemHandler ( ) ; @ SideOnly ( Side . CLIENT ) @ SubscribeEvent public void onTick ( PlayerTickEvent event ) { <START_BUG> if ( ( ( event . side ) == ( Side . SERVER ) ) || ( ( event . player . dimension ) != ( ConfigHandler . DIMENSION_ID ) ) ) <END_BUG> return ; proxy . spawnThem ( ) ; } No newline ; at end ; of file ; }

Fix:
if ( ( ( ( event . side ) == ( Side . SERVER ) ) || ( ( event . player . dimension ) != ( ConfigHandler . DIMENSION_ID ) ) ) || ( ( event . player ) != ( proxy . getClientPlayer ( ) ) ) )
Buggy code:
public class ByteArrayInputStream extends InputStream { private InputStream inputStream ; private Integer peek ; private int blockLength = - 1 ; public ByteArrayInputStream ( InputStream inputStream ) { } public ByteArrayInputStream ( byte [ ] bytes ) { } public int readInteger ( int length ) throws IOException { } public long readLong ( int length ) throws IOException { } public String readString ( int length ) throws IOException { } public String readLengthEncodedString ( ) throws IOException { } public String readZeroTerminatedString ( ) throws IOException { } public byte [ ] read ( int length ) throws IOException { } public BitSet readBitSet ( int length , boolean bigEndian ) throws IOException { } private byte [ ] reverse ( byte [ ] bytes ) { <START_BUG> for ( int i = 0 , length = ( bytes . length ) > > 2 ; i <= length ; i ++ ) { <END_BUG> int j = ( ( bytes . length ) - 1 ) - i ; byte t = bytes [ i ] ; bytes [ i ] = bytes [ j ] ; bytes [ j ] = t ; } return bytes ; } public int readPackedInteger ( ) throws IOException { } public Number readPackedNumber ( ) throws IOException { } @ Override public int available ( ) throws IOException { } public int peek ( ) throws IOException { } @ Override public int read ( ) throws IOException { } private int readWithinBlockBoundaries ( ) throws IOException { } @ Override public void close ( ) throws IOException { } public void enterBlock ( int length ) { } public void skipToTheEndOfTheBlock ( ) throws IOException { } }

Fix:
for ( int i = 0 , length = ( bytes . length ) > > 1 ; i < length ; i ++ ) {