nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Lecture { private int number ; private String name ; private Lecturer lecturer ; private Group group ; private Room room ; private Date startTime ; private int duration ; private final ArrayList < Lecture > requiredLectures = new ArrayList < Lecture > ( ) ; @ Override public String toString ( ) { } public int getNumber ( ) { } public void setNumber ( int number ) { } public String getName ( ) { } public void setName ( String name ) { } public Lecturer getLecturer ( ) { } public void setLecturer ( Lecturer lecturer ) { } public Group getGroup ( ) { } public void setGroup ( Group group ) { } public Room getRoom ( ) { } public void setRoom ( Room room ) { } public Date getStartTime ( ) { <START_BUG> return startTime ; <END_BUG> } public void setStartTime ( Date start ) { } public int getDuration ( ) { } public void setDuration ( int duration ) { } public void addRequiredLecture ( Lecture lecture ) { } public Iterable < Lecture > getRequiredLectures ( ) { } }

Fix:
return this . startTime ;
Buggy code:
public class TimeDV extends AbstractDateTimeDV { public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { } protected DateTimeData parse ( String str ) throws SchemaDateTimeException { } protected String dateToString ( DateTimeData date ) { StringBuffer message = new StringBuffer ( 16 ) ; append ( message , date . hour , 2 ) ; message . append ( ':' ) ; <START_BUG> append ( message , date . month , 2 ) ; <END_BUG> message . append ( ':' ) ; append ( message , date . second ) ; append ( message , ( ( char ) ( date . utc ) ) , 0 ) ; return message . toString ( ) ; } }

Fix:
append ( message , date . minute , 2 ) ;
Buggy code:
public class Client { static final int PORTC = 1234 ; public static void MakeDir ( String name , Path path ) { } public static void main ( String [ ] args ) { User user ; Path path = new Path ( ) ; Menu menu = new Menu ( ) ; SecureLogin login = new SecureLogin ( ) ; String str = new String ( ) ; String [ ] cred = new String [ 2 ] ; int port ; int ch ; ClientThread ct ; ClientThread cc ; BufferedReader stdIn = new BufferedReader ( new InputStreamReader ( System . in ) ) ; try { port = Integer . parseInt ( args [ 0 ] ) ; while ( true ) { ch = menu . InitialMenu ( ) ; if ( ch == 0 ) { cred = menu . NewUserMenu ( ) ; <START_BUG> if ( ( cred [ 1 ] . length ( ) ) < 2 ) { <END_BUG> System . out . println ( "Warning:<seq2seq4repair_space>Password<seq2seq4repair_space>is<seq2seq4repair_space>too<seq2seq4repair_space>short." ) ; Thread . sleep ( 1000 ) ; continue ; } if ( ! ( login . newUser ( cred [ 0 ] , cred [ 1 ] , path ) ) ) { System . out . println ( "Warning:<seq2seq4repair_space>User<seq2seq4repair_space>name<seq2seq4repair_space>already<seq2seq4repair_space>in<seq2seq4repair_space>use." ) ; Thread . sleep ( 1000 ) ; continue ; } } if ( ch == 1 ) { cred = menu . RegisteredMenu ( ) ; if ( ! ( login . LoadUser ( cred [ 0 ] , cred [ 1 ] , path ) ) ) { System . out . println ( "Error:<seq2seq4repair_space>User<seq2seq4repair_space>or<seq2seq4repair_space>Password<seq2seq4repair_space>are<seq2seq4repair_space>invalid." ) ; Thread . sleep ( 1000 ) ; continue ; } break ; } } Client . MakeDir ( cred [ 0 ] , path ) ; user = new User ( port , Directory . LOCALHOST , login ) ; if ( ! ( user . isValid ( ) ) ) System . exit ( 0 ) ; if ( ! ( user . CreateRsa ( path . KEYDIRECTORY ) ) ) System . exit ( 0 ) ; menu . ChatBoard ( ( "Listening<seq2seq4repair_space>port:<seq2seq4repair_space>" + ( Integer . toString ( port ) ) ) ) ; ct = new ClientThread ( user , true , path ) ; ct . start ( ) ; while ( true ) { System . out . print ( "[CHAT]<seq2seq4repair_space>Select<seq2seq4repair_space>IP_Address:Port<seq2seq4repair_space>to<seq2seq4repair_space>connect<seq2seq4repair_space>:<seq2seq4repair_space>" ) ; str = stdIn . readLine ( ) ; if ( ( str . compareTo ( "y" ) ) == 0 ) { if ( ! ( ct . IsConnected ( ) ) ) continue ; ct . setAccepted ( true ) ; ct . signalConnected ( ) ; menu . ChatBoard ( "" ) ; break ; } if ( ( str . compareTo ( "n" ) ) == 0 ) { if ( ! ( ct . IsConnected ( ) ) ) continue ; ct . setAccepted ( false ) ; ct . signalConnected ( ) ; continue ; } port = Client . PORTC ; cred = str . split ( ":" ) ; try { port = Integer . parseInt ( cred [ 1 ] ) ; } catch ( Exception e ) { System . out . println ( "[Error]<seq2seq4repair_space>Unable<seq2seq4repair_space>to<seq2seq4repair_space>open<seq2seq4repair_space>the<seq2seq4repair_space>port<seq2seq4repair_space>given." ) ; continue ; } user . setClientPort ( port ) ; user . setClientIp ( cred [ 0 ] ) ; cc = new ClientThread ( user , false , path ) ; cc . start ( ) ; break ; } } catch ( Exception e ) { System . out . println ( "[CHAT]<seq2seq4repair_space>Unhandled<seq2seq4repair_space>error!" ) ; } } }

Fix:
if ( ( ( cred [ 1 ] . length ( ) ) < 2 ) || ( ( cred [ 0 ] . length ( ) ) < 2 ) ) {
Buggy code:
public class PlayScreen implements Screen { private static final int PANTY_AREA = 48 ; private SpriteBatch batch ; private OrthographicCamera camera ; private FitViewport viewport ; private Stage stage ; private Skin skin ; public int [ ] selections ; private int tapAttempts = 0 ; private Panty [ ] selectedPanties ; private Sound positive ; private Sound negative ; public PlayScreen ( SpriteBatch batch ) { } @ Override public void show ( ) { } public void changeSelection ( int i , Panty p ) { } @ Override public void render ( float delta ) { if ( ( tapAttempts ) == 2 ) { <START_BUG> if ( ( selectedPanties [ 0 ] . pantyNumber ) == ( selectedPanties [ 1 ] . pantyNumber ) ) { <END_BUG> positive . play ( ) ; } else { negative . play ( ) ; } tapAttempts = 0 ; } gl . glClearColor ( 0 , 0 , 0 , 1 ) ; gl . glClear ( GL_COLOR_BUFFER_BIT ) ; batch . setProjectionMatrix ( camera . combined ) ; batch . begin ( ) ; batch . end ( ) ; stage . act ( ) ; stage . draw ( ) ; } @ Override public void resize ( int width , int height ) { } @ Override public void pause ( ) { } @ Override public void resume ( ) { } @ Override public void hide ( ) { } @ Override public void dispose ( ) { } }

Fix:
if ( ( ( selectedPanties [ 0 ] . pantyNumber ) == ( selectedPanties [ 1 ] . pantyNumber ) ) && ( ( selectedPanties [ 0 ] ) != ( selectedPanties [ 1 ] ) ) ) {
Buggy code:
public final class SimpleLookupTable implements Cloneable { public Object [ ] keyTable ; public Object [ ] valueTable ; public int elementSize ; public int threshold ; public SimpleLookupTable ( ) { } public SimpleLookupTable ( int size ) { } public Object clone ( ) throws CloneNotSupportedException { } public boolean containsKey ( Object key ) { } public Object get ( Object key ) { } public Object put ( Object key , Object value ) { } public void removeKey ( Object key ) { } public void removeValue ( Object valueToRemove ) { } private void rehash ( ) { <START_BUG> SimpleLookupTable newLookupTable = new SimpleLookupTable ( elementSize ) ; <END_BUG> Object currentKey ; for ( int i = keyTable . length ; ( -- i ) >= 0 ; ) if ( ( currentKey = keyTable [ i ] ) != null ) newLookupTable . put ( currentKey , valueTable [ i ] ) ; this . keyTable = newLookupTable . keyTable ; this . valueTable = newLookupTable . valueTable ; this . elementSize = newLookupTable . elementSize ; this . threshold = newLookupTable . threshold ; } public String toString ( ) { } }

Fix:
SimpleLookupTable newLookupTable = new SimpleLookupTable ( ( ( elementSize ) * 2 ) ) ;
Buggy code:
@ Repository public class HolidayDAOImpl implements HolidayDAO { @ Resource SessionFactory sessionFactory ; @ Override @ Transactional public List < Holiday > getGeneralholidays ( ) { @ SuppressWarnings ( "unchecked" ) List < Holiday > holidays = sessionFactory . getCurrentSession ( ) . createQuery ( "FROM<seq2seq4repair_space>Holiday" ) . list ( ) ; for ( Holiday h : holidays ) { <START_BUG> if ( h . getTeams ( ) . isEmpty ( ) ) { <END_BUG> holidays . remove ( h ) ; } } return holidays ; } }

Fix:
if ( ! ( h . getTeams ( ) . isEmpty ( ) ) ) {
Buggy code:
public class TestRTGBase extends SolrTestCaseJ4 { public static String FROM_LEADER = FROMLEADER . toString ( ) ; @ Override public void clearIndex ( ) { } protected final ConcurrentHashMap < Integer , TestRTGBase . DocInfo > model = new ConcurrentHashMap < Integer , TestRTGBase . DocInfo > ( ) ; protected Map < Integer , TestRTGBase . DocInfo > committedModel = new HashMap < Integer , TestRTGBase . DocInfo > ( ) ; protected long snapshotCount ; protected long committedModelClock ; protected volatile int lastId ; protected final String field = "val_l" ; protected Object [ ] syncArr ; protected Object globalLock = this ; protected void initModel ( int ndocs ) { } protected static class DocInfo { long version ; long val ; public DocInfo ( long version , long val ) { } public String toString ( ) { } } protected long badVersion ( Random rand , long version ) { } protected List < Long > getLatestVersions ( ) { } protected int getFirstMatch ( IndexReader r , Term t ) throws IOException { Fields fields = MultiFields . getFields ( r ) ; if ( fields == null ) return - 1 ; Terms terms = fields . terms ( t . field ( ) ) ; if ( terms == null ) return - 1 ; BytesRef termBytes = t . bytes ( ) ; final TermsEnum termsEnum = terms . iterator ( null ) ; if ( ! ( termsEnum . seekExact ( termBytes , false ) ) ) { return - 1 ; } <START_BUG> DocsEnum docs = termsEnum . docs ( MultiFields . getLiveDocs ( r ) , null , 0 ) ; <END_BUG> int id = docs . nextDoc ( ) ; if ( id != ( DocIdSetIterator . NO_MORE_DOCS ) ) { int next = docs . nextDoc ( ) ; assertEquals ( NO_MORE_DOCS , next ) ; } return id == ( DocIdSetIterator . NO_MORE_DOCS ) ? - 1 : id ; } }

Fix:
DocsEnum docs = termsEnum . docs ( MultiFields . getLiveDocs ( r ) , null , false ) ;
Buggy code:
public class ExpressionOp extends Expression { ExpressionOp ( int type , Expression left , Expression right ) { } ExpressionOp ( Expression e , Type dataType ) { } ExpressionOp ( Expression e ) { } public String getSQL ( ) { } protected String describe ( Session session , int blanks ) { } public HsqlList resolveColumnReferences ( RangeVariable [ ] rangeVarArray , int rangeCount , HsqlList unresolvedSet , boolean acceptsSequences ) { } public void resolveTypes ( Session session , Expression parent ) { } void resolveTypesForCaseWhen ( Session session ) { } public Object getValue ( Session session ) { } String voltGetXML ( Session session , String indent ) throws HSQLParseException { String element = null ; switch ( opType ) { case OpTypes . LIMIT : element = "limit" ; break ; case OpTypes . ADD : element = "add" ; break ; case OpTypes . SUBTRACT : element = "subtract" ; break ; case OpTypes . MULTIPLY : element = "multiply" ; break ; case OpTypes . DIVIDE : element = "divide" ; break ; case OpTypes . EQUAL : element = "equal" ; break ; case OpTypes . NOT_EQUAL : element = "notequal" ; break ; case OpTypes . GREATER : element = "greaterthan" ; break ; case OpTypes . GREATER_EQUAL : element = "greaterthanorequalto" ; break ; case OpTypes . SMALLER : element = "lessthan" ; break ; case OpTypes . SMALLER_EQUAL : element = "lessthanorequalto" ; break ; case OpTypes . AND : element = "and" ; break ; case OpTypes . OR : element = "or" ; break ; case OpTypes . IN : element = "in" ; break ; case OpTypes . COUNT : element = "count" ; break ; case OpTypes . SUM : element = "sum" ; break ; case OpTypes . MIN : element = "min" ; break ; case OpTypes . MAX : element = "max" ; break ; case OpTypes . AVG : element = "avg" ; break ; case OpTypes . SQL_FUNCTION : element = "function" ; break ; case OpTypes . IS_NULL : element = "is_null" ; break ; case OpTypes . NOT : element = "not" ; break ; default : <START_BUG> throw new HSQLParseException ( ( "Unsupported<seq2seq4repair_space>Expresion<seq2seq4repair_space>Operation:<seq2seq4repair_space>" + ( String . valueOf ( opType ) ) ) ) ; <END_BUG> } StringBuffer sb = new StringBuffer ( ) ; sb . append ( indent ) . append ( "<operation<seq2seq4repair_space>id=\"" ) . append ( this . getUniqueId ( ) ) . append ( "\"" ) ; sb . append ( "<seq2seq4repair_space>type=\"" ) . append ( element ) . append ( "\"" ) ; if ( ( ( this . alias ) != null ) && ( ( getAlias ( ) . length ( ) ) > 0 ) ) { sb . append ( ( ( "<seq2seq4repair_space>alias='" + ( getAlias ( ) ) ) + "'" ) ) ; } sb . append ( ">\n" ) ; for ( Expression expr : nodes ) { sb . append ( expr . voltGetXML ( session , ( indent + ( HSQLInterface . XML_INDENT ) ) ) ) . append ( '\n' ) ; } sb . append ( indent ) . append ( "<//operation>" ) ; return sb . toString ( ) ; } }

Fix:
throw new HSQLParseException ( ( "Unsupported<seq2seq4repair_space>Expression<seq2seq4repair_space>Operation:<seq2seq4repair_space>" + ( String . valueOf ( opType ) ) ) ) ;
Buggy code:
public class ServerManager { private final ServerManagerEnvironment environment ; private final StandardElementReaderRegistrar extensionRegistrar ; private final File hostXML ; private final MessageHandler messageHandler ; private ProcessManagerSlave processManagerSlave ; private Host hostConfig ; private Domain domainConfig ; private final Map < String , Server > servers = new HashMap < String , Server > ( ) ; public ServerManager ( ServerManagerEnvironment environment ) { } public void start ( ) { } public void startServers ( ) { <START_BUG> ServerMaker serverMaker = new ServerMaker ( environment . getHomeDir ( ) . getAbsolutePath ( ) , processManagerSlave , messageHandler ) ; <END_BUG> for ( ServerElement serverEl : hostConfig . getServers ( ) ) { if ( serverEl . isStart ( ) ) { Standalone serverConf = new Standalone ( domainConfig , hostConfig , serverEl . getName ( ) ) ; try { Server server = serverMaker . makeServer ( serverConf ) ; servers . put ( serverConf . getServerName ( ) , server ) ; server . start ( serverConf ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } } } public void stop ( ) { } private void launchProcessManagerSlave ( ) { } private void registerWithDomainController ( ) { } private void initiateDomainController ( ) { } private Host parseHost ( ) { } private Domain parseDomain ( ) { } }

Fix:
ServerMaker serverMaker = new ServerMaker ( environment , processManagerSlave , messageHandler ) ;
Buggy code:
public class ActivityLogin extends CharsooActivity implements View . OnClickListener , IWebservice { EditTextFont editTextEmail ; EditTextFont editTextPassword ; MyApplication myApplication ; DialogMessage dialogMessage ; public static final int LOGIN_REQUST = 100 ; public static final int GET_VERSION_REQUEST = 200 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } private void doIfLogin ( ) { } @ Override public void onClick ( View view ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void getResult ( int reqCode , Object result ) { } @ Override public void getError ( int reqCode , Integer errorCode , String callerStringID ) { } private void showNonDefineErrorForGettingVersionCode ( ) { } private void showForceUpdateDialog ( ) { dialogMessage = new DialogMessage ( this , getString ( force_update_dlg_message ) ) ; dialogMessage . setAcceptText ( getString ( force_update_dlg_accept_btn_text ) ) ; dialogMessage . setOnAcceptButtonClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { <START_BUG> openHtmlLink ( "http:////www.asdf.asaf" ) ; <END_BUG> finish ( ) ; } } ) ; dialogMessage . setOnDismissListener ( new DialogInterface . OnDismissListener ( ) { @ Override public void onDismiss ( DialogInterface dialog ) { finish ( ) ; } } ) ; dialogMessage . show ( ) ; } boolean isContinuAfterUpdateDialog = true ; private void showNotifyUpdateDialog ( ) { } void continueAfterSuccessingVersionCode ( ) { } private void showTryAgainDialog ( int reqCode ) { } private void TryAgainGetVersionCode ( ) { } @ Override public void onBackPressed ( ) { } @ Override protected void onStart ( ) { } @ Override protected void onStop ( ) { } }

Fix:
openHtmlLink ( "http:////www.icharsoo.com" ) ;
Buggy code:
public class JGroupsSubsystemXMLWriter implements XMLElementWriter < SubsystemMarshallingContext > { @ Override public void writeContent ( XMLExtendedStreamWriter writer , SubsystemMarshallingContext context ) throws XMLStreamException { <START_BUG> context . startSubsystemElement ( CURRENT . getUri ( ) , false ) ; <END_BUG> ModelNode model = context . getModelNode ( ) ; if ( model . isDefined ( ) ) { DEFAULT_STACK . marshallAsAttribute ( model , writer ) ; if ( model . hasDefined ( WILDCARD_PATH . getKey ( ) ) ) { for ( Property property : model . get ( WILDCARD_PATH . getKey ( ) ) . asPropertyList ( ) ) { writer . writeStartElement ( STACK . getLocalName ( ) ) ; writer . writeAttribute ( NAME . getLocalName ( ) , property . getName ( ) ) ; ModelNode stack = property . getValue ( ) ; if ( stack . get ( PATH . getKeyValuePair ( ) ) . isDefined ( ) ) { ModelNode transport = stack . get ( PATH . getKeyValuePair ( ) ) ; writer . writeStartElement ( TRANSPORT . getLocalName ( ) ) ; TYPE . marshallAsAttribute ( transport , writer ) ; SOCKET_BINDING . marshallAsAttribute ( transport , writer ) ; SHARED . marshallAsAttribute ( transport , writer ) ; DIAGNOSTICS_SOCKET_BINDING . marshallAsAttribute ( transport , writer ) ; DEFAULT_EXECUTOR . marshallAsAttribute ( transport , writer ) ; OOB_EXECUTOR . marshallAsAttribute ( transport , writer ) ; TIMER_EXECUTOR . marshallAsAttribute ( transport , writer ) ; THREAD_FACTORY . marshallAsAttribute ( transport , writer ) ; MACHINE . marshallAsAttribute ( transport , writer ) ; RACK . marshallAsAttribute ( transport , writer ) ; SITE . marshallAsAttribute ( transport , writer ) ; JGroupsSubsystemXMLWriter . writeProtocolProperties ( writer , transport ) ; writer . writeEndElement ( ) ; } if ( stack . hasDefined ( ProtocolResourceDefinition . WILDCARD_PATH . getKey ( ) ) ) { for ( Property protocolProperty : StackAddHandler . getOrderedProtocolPropertyList ( stack ) ) { ModelNode protocol = protocolProperty . getValue ( ) ; writer . writeStartElement ( PROTOCOL . getLocalName ( ) ) ; ProtocolResourceDefinition . TYPE . marshallAsAttribute ( protocol , writer ) ; ProtocolResourceDefinition . SOCKET_BINDING . marshallAsAttribute ( protocol , writer ) ; JGroupsSubsystemXMLWriter . writeProtocolProperties ( writer , protocol ) ; writer . writeEndElement ( ) ; } } if ( stack . get ( RelayResourceDefinition . PATH . getKeyValuePair ( ) ) . isDefined ( ) ) { ModelNode relay = stack . get ( RelayResourceDefinition . PATH . getKeyValuePair ( ) ) ; JGroupsSubsystemXMLWriter . writeRelay ( writer , relay ) ; } writer . writeEndElement ( ) ; } } } writer . writeEndElement ( ) ; } private static void writeProtocolProperties ( XMLExtendedStreamWriter writer , ModelNode protocol ) throws XMLStreamException { } private static void writeRelay ( XMLExtendedStreamWriter writer , ModelNode relay ) throws XMLStreamException { } }

Fix:
context . startSubsystemElement ( CURRENT . getNamespaceUri ( ) , false ) ;
Buggy code:
public class Mapping { private ArrayList < Integer > alMapping ; private ArrayList < ArrayList < Integer > > alQueryHistory = new ArrayList < ArrayList < Integer > > ( ) ; private ArrayList < Integer > alGuess ; private int intScore ; public Mapping ( ArrayList < Integer > alMapping ) { } public ArrayList < Integer > query ( ArrayList < Integer > alQueryIndices ) { } public boolean guess ( ArrayList < Integer > alActionContent ) { this . alGuess = alActionContent ; if ( ( alActionContent . size ( ) ) != ( alMapping . size ( ) ) ) { System . out . println ( "Wrong<seq2seq4repair_space>guess<seq2seq4repair_space>size!" ) ; return false ; } for ( int i = 0 ; i < ( alActionContent . size ( ) ) ; i ++ ) { <START_BUG> if ( ( alActionContent . get ( i ) ) != ( alMapping . get ( i ) ) ) { <END_BUG> return false ; } } return true ; } public int getMappingLength ( ) { } public void setScore ( int intScore ) { } public int getScore ( ) { } public ArrayList < Integer > getMapping ( ) { } }

Fix:
if ( ! ( alActionContent . get ( i ) . equals ( alMapping . get ( i ) ) ) ) {
Buggy code:
public class ManageAccountFragment extends Fragment implements Constants { ViewGroup rootView ; @ Nullable @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void cancel ( ) { } private void logout ( ) { Bundle bundle = new Bundle ( ) ; bundle . putString ( "username" , UserCtrl . getInstance ( ) . currentUser . getUsername ( ) ) ; LoginFragment loginFragment = new LoginFragment ( ) ; loginFragment . setArguments ( bundle ) ; UserCtrl . getInstance ( ) . currentUser = UserCtrl . getInstance ( ) . createUser ( ( - 1 ) , null , null , null , null , false ) ; cancel ( ) ; <START_BUG> MainActivity . getActivity ( ) . getSupportFragmentManager ( ) . beginTransaction ( ) . replace ( main_container , new LoginFragment ( ) ) . commit ( ) ; <END_BUG> Toast . makeText ( MainActivity . getActivity ( ) , "You<seq2seq4repair_space>have<seq2seq4repair_space>logged<seq2seq4repair_space>out!" , LENGTH_LONG ) . show ( ) ; } private void saveChanges ( ) { } }

Fix:
MainActivity . getActivity ( ) . getSupportFragmentManager ( ) . beginTransaction ( ) . replace ( main_container , loginFragment ) . commit ( ) ;
Buggy code:
public class NodeIdentificationResponse extends ZigBeeRxBase { private int offset = 0 ; public NodeIdentificationResponse ( APIFrame frame ) { } @ Override public int GetReceivedDataLength ( ) { } @ Override public byte GetReceivedData ( int index ) { } @ Override public int GetReceivedDataOffset ( ) { } @ Override public byte [ ] GetReceivedData ( ) { } @ Override public ReceiveStatus GetReceiveStatus ( ) { } @ Override public Address GetRemoteDevice ( ) { byte [ ] data = new byte [ 10 ] ; System . arraycopy ( this . GetFrameData ( ) , 14 , data , 0 , 8 ) ; data [ 8 ] = this . GetFrameData ( ) [ 12 ] ; <START_BUG> data [ 8 ] = this . GetFrameData ( ) [ 13 ] ; <END_BUG> return new Address ( data ) ; } public Address GetSenderDevice ( ) { } public String GetNIString ( ) { } public int GetParentNetworkAddress ( ) { } public DeviceType GetDeviceType ( ) { } public SourceEvent GetSourceEvent ( ) { } public int GetDigiProfileID ( ) { } public int GetManufacturerID ( ) { } No newline ; at end ; of file ; }

Fix:
data [ 9 ] = this . GetFrameData ( ) [ 13 ] ;
Buggy code:
public class Initializer implements IInitializer { private static Log log = LogFactory . getLog ( Initializer . class ) ; public void init ( wicket . Application application ) { try { String name = application . getName ( ) ; MBeanServer mbs = ManagementFactory . getPlatformMBeanServer ( ) ; String domain = "wicket.app." + name ; ObjectName appBeanName = new ObjectName ( ( domain + ":type=Application" ) ) ; String tempDomain = domain ; int i = 0 ; while ( mbs . isRegistered ( appBeanName ) ) { tempDomain = ( name + "-" ) + ( i ++ ) ; appBeanName = new ObjectName ( ( tempDomain + ":type=Application" ) ) ; } <START_BUG> name = tempDomain ; <END_BUG> Application appBean = new Application ( application ) ; mbs . registerMBean ( appBean , appBeanName ) ; mbs . registerMBean ( new ApplicationSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=ApplicationSettings" ) ) ) ; mbs . registerMBean ( new DebugSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=DebugSettings" ) ) ) ; mbs . registerMBean ( new MarkupSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=MarkupSettings" ) ) ) ; mbs . registerMBean ( new ResourceSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=ResourceSettings" ) ) ) ; mbs . registerMBean ( new PageSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=PageSettings" ) ) ) ; mbs . registerMBean ( new RequestCycleSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=RequestCycleSettings" ) ) ) ; mbs . registerMBean ( new SecuritySettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=SecuritySettings" ) ) ) ; mbs . registerMBean ( new SessionSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=SessionSettings" ) ) ) ; mbs . registerMBean ( new CookieValuePersisterSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=CookieValuePersisterSettings" ) ) ) ; RequestLogger sessionsBean = new RequestLogger ( application ) ; ObjectName sessionsBeanName = new ObjectName ( ( domain + ":type=RequestLogger" ) ) ; mbs . registerMBean ( sessionsBean , sessionsBeanName ) ; } catch ( MalformedObjectNameException e ) { throw new WicketRuntimeException ( e ) ; } catch ( InstanceAlreadyExistsException e ) { throw new WicketRuntimeException ( e ) ; } catch ( MBeanRegistrationException e ) { throw new WicketRuntimeException ( e ) ; } catch ( NotCompliantMBeanException e ) { throw new WicketRuntimeException ( e ) ; } } }

Fix:
domain = tempDomain ;
Buggy code:
class APIClient extends BaseClient { private static APIClient singletonInstance = null ; long lastSuccessfulMatchesTimestamp = System . currentTimeMillis ( ) ; protected APIClient ( ) { } public static APIClient getInstance ( ) { } public void getPeople ( final Callback < Person [ ] > callback ) throws JSONException { } public void getMatches ( final Callback < Person [ ] > callback ) throws JSONException { } public void getHistory ( final Callback < Person [ ] > callback ) throws JSONException { } public void getNewMatches ( final Callback < Person [ ] > callback ) throws JSONException { } public void like ( Person person , boolean didLike ) throws JSONException { } public void updateProfile ( Person person ) throws JSONException { } private Person [ ] parseArray ( JSONArray matches ) { Person [ ] people = new Person [ matches . length ( ) ] ; try { for ( int i = 0 ; i < ( matches . length ( ) ) ; i ++ ) { JSONObject person = matches . getJSONObject ( i ) ; Person p = new Person ( ) ; p . setId ( person . getInt ( "id" ) ) ; p . setName ( person . getString ( "name" ) ) ; p . setCourse ( person . getString ( "course" ) ) ; p . setAge ( person . getInt ( "age" ) ) ; p . setStatus ( person . getString ( "status" ) ) ; p . setDescription ( person . getString ( "description" ) ) ; JSONArray jsonArray = person . getJSONArray ( "photo_urls" ) ; String [ ] photos = new String [ jsonArray . length ( ) ] ; for ( int j = 0 ; j < ( jsonArray . length ( ) ) ; j ++ ) { photos [ j ] = jsonArray . get ( j ) . toString ( ) ; } <START_BUG> p . setphotoURLs ( photos ) ; <END_BUG> people [ i ] = p ; } } catch ( JSONException e ) { e . printStackTrace ( ) ; } return people ; } }

Fix:
p . setPhotoURLs ( photos ) ;
Buggy code:
public class MainActivity extends ActionBarActivity implements LocationListener { private AlertDialog locationDisabledDialog ; private static final String CATEGORY_LISTENER = "Listener" ; private static final String ACTION_COMPASS = "Compass" ; private static final String LABEL_COMPASS_ON = "CompassOn" ; private static final String LABEL_COMPASS_ERROR = "CompassError" ; private AbstractFragment currentFragment ; private TextView lblGeolocating ; private LinearLayout lytGeolocatingContainer ; private Tracker analyticsTracker ; private Toolbar toolbar ; private boolean isGeolocationWorking = false ; private LocationManager locationManager ; private MuslimLocation currentLocation ; int locationProvidersStatus = 0 ; public Tracker getAnalyticsTracker ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onResume ( ) { } @ Override public void setTitle ( int titleResId ) { } @ Override public void onPause ( ) { } public MuslimLocation getCurrentLocation ( ) { } public void switchOnLocationListeners ( ) { } public void checkLocationProviders ( ) { } public void showLocationDisabledAlert ( ) { } public void switchOffLocationListeners ( ) { } private void redirectToFragment ( AbstractFragment fragment ) { currentFragment = fragment ; switch ( currentFragment . getGeolocationTypeNeeded ( ) ) { case NONE : manageNoGeolocationNeeded ( ) ; break ; case ONCE : manageOnceGeolocationNeeded ( ) ; break ; case CONTINUOUS : break ; } <START_BUG> getSupportFragmentManager ( ) . beginTransaction ( ) . replace ( lyt_fragment_container , currentFragment ) . commit ( ) ; <END_BUG> } public void manageNoGeolocationNeeded ( ) { } public void manageOnceGeolocationNeeded ( ) { } public MuslimLocation getLastValidMuslimLocation ( ) { } public void sendCompassOnEvent ( ) { } public void sendCompassErrorEvent ( ) { } private void sendAnalyticsEvent ( String category , String action , String label ) { } @ Override public void onLocationChanged ( Location location ) { } @ Override public void onStatusChanged ( String provider , int status , Bundle extras ) { } @ Override public void onProviderEnabled ( String provider ) { } @ Override public void onProviderDisabled ( String provider ) { } }

Fix:
getSupportFragmentManager ( ) . beginTransaction ( ) . replace ( lyt_fragment_container , currentFragment ) . commitAllowingStateLoss ( ) ;
Buggy code:
public class PostRequestUrlConnection implements UrlConnection { final Logger l = Logger . getLogger ( this . getClass ( ) . getName ( ) ) ; RequestHeadersManager requestHeadersManager ; public PostRequestUrlConnection ( RequestHeadersManager requestHeadersManager ) { } @ Override public ProxyConnection connect ( RequestedUrl url ) { ProxyConnection proxyConnection = null ; try { HttpServletRequest request = url . getRequest ( ) ; BufferedReader reader = request . getReader ( ) ; StringBuffer rawData = new StringBuffer ( ) ; char [ ] buff = new char [ 1024 ] ; int count ; while ( ( count = reader . read ( buff ) ) != ( - 1 ) ) { rawData . append ( buff , 0 , count ) ; } URL urlAddress = new URL ( url . getUrl ( ) ) ; HttpURLConnection conn = ( ( HttpURLConnection ) ( urlAddress . openConnection ( ) ) ) ; conn . setDoOutput ( true ) ; conn . setRequestMethod ( POST . getName ( ) ) ; conn . setRequestProperty ( "Content-Type" , "application//x-www-form-urlencoded" ) ; conn . setRequestProperty ( "Content-Length" , String . valueOf ( rawData . length ( ) ) ) ; <START_BUG> proxyConnection = new ProxyConnection ( conn , ( ( request . getParameter ( COOKIES_ON_PARAM ) ) != null ) ) ; <END_BUG> requestHeadersManager . sendHeaders ( request , proxyConnection ) ; OutputStream os = conn . getOutputStream ( ) ; if ( ( rawData . length ( ) ) > 0 ) { os . write ( rawData . toString ( ) . getBytes ( ) ) ; } } catch ( IOException e ) { l . log ( Level . WARNING , e . getMessage ( ) , e ) ; } return proxyConnection ; } }

Fix:
proxyConnection = new ProxyConnection ( conn , url . isCookiesOn ( ) ) ;
Buggy code:
public class InstantiatedTermEnum extends TermEnum { private final InstantiatedIndexReader reader ; public InstantiatedTermEnum ( InstantiatedIndexReader reader ) { } public InstantiatedTermEnum ( InstantiatedIndexReader reader , int startPosition ) { } private int nextTermIndex ; private InstantiatedTerm term ; public boolean next ( ) { } public Term term ( ) { <START_BUG> return term . getTerm ( ) ; <END_BUG> } public int docFreq ( ) { } public void close ( ) { } public boolean skipTo ( Term target ) throws IOException { } }

Fix:
return ( term ) == null ? null : term . getTerm ( ) ;
Buggy code:
public class ImportWizardLauncher { public ImportWizardLauncher ( ) { } public void launchWizard ( ) { final ImportPluginHandler pluginHandler ; try { pluginHandler = ( ( ImportPluginHandler ) ( pluginManager . getHandler ( "org.columba.mail.import" ) ) ) ; } catch ( PluginHandlerNotFoundException ex ) { NotifyDialog d = new NotifyDialog ( ) ; d . showDialog ( ex ) ; return ; } DataModel data = new DataModel ( ) ; data . registerDataLookup ( "Plugin.handler" , new DataLookup ( ) { public Object lookupData ( ) { return pluginHandler ; } } ) ; WizardModel model = new DefaultWizardModel ( new Step [ ] { new PluginStep ( data ) , new LocationStep ( data ) } ) ; model . addWizardModelListener ( new MailboxImporter ( data ) ) ; Wizard wizard = new Wizard ( model , MailResourceLoader . getString ( "dialog" , "mailboximport" , "title" ) , ImageLoader . getSmallImageIcon ( "stock_convert.png" ) ) ; CSH . setHelpIDString ( wizard , "organising_and_managing_your_email_1" ) ; JavaHelpSupport . enableHelp ( wizard , HelpManager . getHelpBroker ( ) ) ; <START_BUG> wizard . setSize ( 700 , 500 ) ; <END_BUG> wizard . setLocationRelativeTo ( null ) ; wizard . setVisible ( true ) ; } }

Fix:
wizard . pack ( ) ;
Buggy code:
public class TestMultiMMap extends LuceneTestCase { File workDir ; @ Override public void setUp ( ) throws Exception { } public void testRandomChunkSizes ( ) throws Exception { } private void assertChunking ( Random random , int chunkSize ) throws Exception { <START_BUG> File path = File . createTempFile ( ( "mmap" + chunkSize ) , "tmp" , workDir ) ; <END_BUG> path . delete ( ) ; path . mkdirs ( ) ; MMapDirectory dir = new MMapDirectory ( path ) ; dir . setMaxChunkSize ( chunkSize ) ; if ( MMapDirectory . UNMAP_SUPPORTED ) dir . setUseUnmap ( true ) ; RandomIndexWriter writer = new RandomIndexWriter ( random , dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new MockAnalyzer ( random ) ) . setMergePolicy ( newLogMergePolicy ( ) ) ) ; Document doc = new Document ( ) ; Field docid = newField ( "docid" , "0" , YES , NOT_ANALYZED ) ; Field junk = newField ( "junk" , "" , YES , NOT_ANALYZED ) ; doc . add ( docid ) ; doc . add ( junk ) ; int numDocs = 100 ; for ( int i = 0 ; i < numDocs ; i ++ ) { docid . setValue ( ( "" + i ) ) ; junk . setValue ( _TestUtil . randomUnicodeString ( random ) ) ; writer . addDocument ( doc ) ; } IndexReader reader = writer . getReader ( ) ; writer . close ( ) ; int numAsserts = 100 * ( RANDOM_MULTIPLIER ) ; for ( int i = 0 ; i < numAsserts ; i ++ ) { int docID = random . nextInt ( numDocs ) ; assertEquals ( ( "" + docID ) , reader . document ( docID ) . get ( "docid" ) ) ; } reader . close ( ) ; dir . close ( ) ; } }

Fix:
File path = _TestUtil . createTempFile ( ( "mmap" + chunkSize ) , "tmp" , workDir ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { String fileName ; try { fileName = args [ 2 ] ; } catch ( ArrayIndexOutOfBoundsException e ) { <START_BUG> fileName = "track6.txt" ; <END_BUG> } try { int x = Integer . parseInt ( args [ 0 ] ) ; int y = Integer . parseInt ( args [ 1 ] ) ; Controller controller = new Controller ( new Dimension ( x , y ) , fileName ) ; } catch ( ArrayIndexOutOfBoundsException | NumberFormatException e ) { Controller controller = new Controller ( new Dimension ( 100 , 80 ) , fileName ) ; } } }

Fix:
fileName = "50x25_withWalls" ;
Buggy code:
public class PhotoGalleryFragment extends Fragment { private static final String LOGGERTAG = "PhotoGalleryFragment" ; GridView mGridView ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup parent , Bundle savedInstanceState ) { } private class FetchItemsTask extends AsyncTask < Void , Void , Void > { @ Override protected Void doInBackground ( Void ... params ) { try { <START_BUG> String result = new FlickerFetcher ( ) . getUrl ( "http:////www.flickr.com" ) ; <END_BUG> Log . i ( PhotoGalleryFragment . LOGGERTAG , ( "Fetched<seq2seq4repair_space>contents<seq2seq4repair_space>of<seq2seq4repair_space>URL:<seq2seq4repair_space>" + result ) ) ; } catch ( IOException ioe ) { Log . e ( PhotoGalleryFragment . LOGGERTAG , "Failed<seq2seq4repair_space>to<seq2seq4repair_space>fetch<seq2seq4repair_space>URL:<seq2seq4repair_space>" , ioe ) ; } return null ; } } }

Fix:
String result = new FlickerFetcher ( ) . getUrl ( "http:////www.android.com//" ) ;
Buggy code:
public class P4Revert extends P4Base { private String revertChange = null ; private boolean onlyUnchanged = false ; public void setChange ( String revertChange ) throws BuildException { <START_BUG> if ( ( revertChange == null ) && ( ! ( revertChange . equals ( "" ) ) ) ) { <END_BUG> throw new BuildException ( "P4Revert:<seq2seq4repair_space>change<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null<seq2seq4repair_space>or<seq2seq4repair_space>empty" ) ; } this . revertChange = revertChange ; } public void setRevertOnlyUnchanged ( boolean onlyUnchanged ) { } public void execute ( ) throws BuildException { } }

Fix:
if ( ( revertChange == null ) || ( revertChange . equals ( "" ) ) ) {
Buggy code:
public class FQCNTest { public static void main ( String [ ] argv ) throws Exception { } static void usage ( String msg ) { } static void init ( String file ) throws Exception { Layout layout = new PatternLayout ( "%p<seq2seq4repair_space>%c<seq2seq4repair_space>(%C{2}#%M)<seq2seq4repair_space>-<seq2seq4repair_space>%m%n" ) ; FileAppender appender = new FileAppender ( layout , file , false ) ; appender . setLayout ( layout ) ; <START_BUG> Category root = Category . getRoot ( ) ; <END_BUG> root . addAppender ( appender ) ; } static void test ( ) { } }

Fix:
Logger root = Logger . getRootLogger ( ) ;
Buggy code:
public final class SimpleDistributionRequest implements DistributionRequest { private final DistributionRequestType requestType ; private final boolean deep ; private final String [ ] paths ; public SimpleDistributionRequest ( @ Nonnull DistributionRequestType requestType , boolean isDeep , @ Nonnull String ... paths ) { } public SimpleDistributionRequest ( @ Nonnull DistributionRequestType requestType , @ Nonnull String ... paths ) { } @ Nonnull public DistributionRequestType getRequestType ( ) { } public String [ ] getPaths ( ) { } public boolean isDeep ( @ Nonnull String path ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( ( ( ( "SimpleDistributionRequest{" + ",<seq2seq4repair_space>requestType=" ) + ( requestType ) ) + ",<seq2seq4repair_space>paths=" ) + ( Arrays . toString ( paths ) ) ) + ",<seq2seq4repair_space>deep=" ) + ( deep ) ) + '}' ; <END_BUG> } }

Fix:
return ( ( ( ( ( ( "SimpleDistributionRequest{" + "requestType=" ) + ( requestType ) ) + ",<seq2seq4repair_space>paths=" ) + ( Arrays . toString ( paths ) ) ) + ",<seq2seq4repair_space>deep=" ) + ( deep ) ) + '}' ;
Buggy code:
public class DeadlineTaskList { private final int TASKLIST_SIZE = 1000 ; private ArrayList < DeadlineTask > taskArray = new ArrayList < DeadlineTask > ( TASKLIST_SIZE ) ; private enum SORT_TYPE { NAME , DEADLINE , WORKLOAD , ID ; } private int numOfDisplayItems = 5 ; private ObservableList < DeadlineTask > observableDeadline = FXCollections . observableArrayList ( ) ; public DeadlineTaskList ( ) { } public DeadlineTask get ( int index ) { } public void add ( DeadlineTask task ) { } public void delete ( int index ) { } public void delete ( String name ) { } public int size ( ) { } public boolean isEmpty ( ) { } public DeadlineTaskList . SORT_TYPE getSortType ( String keyword ) { } public void sortBy ( DeadlineTaskList . SORT_TYPE type ) { } public ObservableList < DeadlineTask > getObservable ( ) { int maxNumTasksToAdd ; observableDeadline . removeAll ( observableDeadline ) ; <START_BUG> if ( isEmpty ( ) ) { <END_BUG> if ( ( taskArray . size ( ) ) > ( numOfDisplayItems ) ) { maxNumTasksToAdd = numOfDisplayItems ; } else { maxNumTasksToAdd = taskArray . size ( ) ; } for ( int i = 0 ; i < maxNumTasksToAdd ; i ++ ) { observableDeadline . add ( get ( i ) ) ; } } return observableDeadline ; } private Comparator < DeadlineTask > taskNameComparator = new Comparator < DeadlineTask > ( ) { public int compare ( DeadlineTask t1 , DeadlineTask t2 ) { } } ; private Comparator < DeadlineTask > taskDeadlineComparator = new Comparator < DeadlineTask > ( ) { public int compare ( DeadlineTask t1 , DeadlineTask t2 ) { } } ; private Comparator < DeadlineTask > taskWorkloadComparator = new Comparator < DeadlineTask > ( ) { public int compare ( DeadlineTask t1 , DeadlineTask t2 ) { } } ; private Comparator < DeadlineTask > taskIdComparator = new Comparator < DeadlineTask > ( ) { public int compare ( DeadlineTask t1 , DeadlineTask t2 ) { } } ; }

Fix:
if ( ! ( isEmpty ( ) ) ) {
Buggy code:
public class Switch extends Instruction { IMap caseLabels ; String caseDefault ; boolean useConcreteFingerprint ; public Switch ( CodeBlock ins , IMap caseLabels , String caseDefault , boolean useConcreteFingerprint ) { } public String toString ( ) { } public void generate ( BytecodeGenerator codeEmittor , boolean dcode ) { if ( ! dcode ) codeEmittor . emitDebugCall ( opcode . name ( ) ) ; IMapWriter w = vf . mapWriter ( ) ; for ( IValue key : caseLabels ) { String label = ( ( org . eclipse . imp . pdb . facts . IString ) ( caseLabels . get ( key ) ) ) . getValue ( ) ; w . put ( key , vf . integer ( codeblock . getLabelPC ( label ) ) ) ; } <START_BUG> codeEmittor . emitInlineSwitch ( caseLabels , caseDefault , dcode ) ; <END_BUG> codeblock . addCode2 ( opcode . getOpcode ( ) , codeblock . getConstantIndex ( w . done ( ) ) , codeblock . getLabelPC ( caseDefault ) ) ; codeblock . addCode ( ( useConcreteFingerprint ? 1 : 0 ) ) ; } }

Fix:
codeEmittor . emitInlineSwitch ( caseLabels , caseDefault , useConcreteFingerprint , dcode ) ;
Buggy code:
public class ManagePanel extends JPanel { public ManagePanel ( PluginManager window ) { } public void update ( ) { } private JTable table ; private ManagePanel . PluginTableModel pluginModel ; private JButton remove ; private JButton help ; private PluginManager window ; class ActionHandler implements ActionListener { public void actionPerformed ( ActionEvent evt ) { } } class Entry { static final String ERROR = "error" ; static final String LOADED = "loaded" ; String clazz ; String name ; String version ; String author ; String status ; String docs ; Vector jars ; boolean broken ; Entry ( String path , String clazz , boolean broken ) { } public String toString ( ) { } } class PluginTableModel extends AbstractTableModel { private ArrayList entries ; private int sortType = ManagePanel . EntryCompare . STATUS ; public PluginTableModel ( ) { } public int getColumnCount ( ) { } public String getColumnName ( int column ) { } public ManagePanel . Entry getEntry ( int rowIndex ) { } public int getRowCount ( ) { } public Object getValueAt ( int rowIndex , int columnIndex ) { } public void setSortType ( int type ) { } public void sort ( int type ) { } public void update ( ) { } } class TextRenderer extends DefaultTableCellRenderer { private DefaultTableCellRenderer tcr ; public TextRenderer ( DefaultTableCellRenderer tcr ) { } public Component getTableCellRendererComponent ( JTable table , Object value , boolean isSelected , boolean hasFocus , int row , int column ) { } } class RemoveButton extends JButton implements ActionListener , ListSelectionListener { public RemoveButton ( ) { } public void actionPerformed ( ActionEvent evt ) { } public void valueChanged ( ListSelectionEvent e ) { if ( ( table . getSelectedRowCount ( ) ) == 0 ) setEnabled ( false ) ; else setEnabled ( true ) ; } } class HelpButton extends JButton implements ActionListener , ListSelectionListener { private URL docURL ; public HelpButton ( ) { } public void actionPerformed ( ActionEvent evt ) { } public void valueChanged ( ListSelectionEvent e ) { if ( ( table . getSelectedRowCount ( ) ) == 1 ) { try { ManagePanel . Entry entry = pluginModel . getEntry ( table . getSelectedRow ( ) ) ; String label = entry . clazz ; String docs = entry . docs ; <START_BUG> EditPlugin . JAR jar = jEdit . getPlugin ( label ) . getJAR ( ) ; <END_BUG> if ( ( ( jar != null ) && ( label != null ) ) && ( docs != null ) ) { URL url = jar . getClassLoader ( ) . getResource ( docs ) ; if ( url != null ) { docURL = url ; setEnabled ( true ) ; return ; } } } catch ( Exception ex ) { } } setEnabled ( false ) ; } } static class EntryCompare implements Comparator { public static final int NAME = 0 ; public static final int STATUS = 1 ; private int type ; public EntryCompare ( int type ) { } public int compare ( Object o1 , Object o2 ) { } } class HeaderMouseHandler extends MouseAdapter { public void mouseClicked ( MouseEvent evt ) { } } }

Fix:
PluginJAR jar = jEdit . getPlugin ( label ) . getJAR ( ) ;
Buggy code:
public class JavadocParser extends AbstractCommentParser { public Javadoc docComment ; public boolean checkDocComment = false ; JavadocParser ( Parser sourceParser ) { } public boolean checkDeprecation ( int javadocStart , int javadocEnd ) { } public String toString ( ) { } protected Object createArgumentReference ( char [ ] name , int dim , Object typeRef , long dimPos , long argNamePos ) throws InvalidInputException { try { TypeReference argTypeRef = ( ( TypeReference ) ( typeRef ) ) ; if ( dim > 0 ) { <START_BUG> long pos = ( ( long ) ( argTypeRef . sourceStart ) ) << ( 32 + ( argTypeRef . sourceEnd ) ) ; <END_BUG> if ( typeRef instanceof JavadocSingleTypeReference ) { JavadocSingleTypeReference singleRef = ( ( JavadocSingleTypeReference ) ( typeRef ) ) ; argTypeRef = new JavadocArraySingleTypeReference ( singleRef . token , dim , pos ) ; } else { JavadocQualifiedTypeReference qualifRef = ( ( JavadocQualifiedTypeReference ) ( typeRef ) ) ; argTypeRef = new JavadocArrayQualifiedTypeReference ( qualifRef , dim ) ; } } int argEnd = argTypeRef . sourceEnd ; if ( dimPos >= 0 ) argEnd = ( ( int ) ( dimPos ) ) ; if ( argNamePos >= 0 ) argEnd = ( ( int ) ( argNamePos ) ) ; return new JavadocArgumentExpression ( name , argTypeRef . sourceStart , argEnd , argTypeRef ) ; } catch ( ClassCastException ex ) { throw new InvalidInputException ( ) ; } } protected Object createFieldReference ( Object receiver ) throws InvalidInputException { } protected Object createMethodReference ( Object receiver , List arguments ) throws InvalidInputException { } protected Object createReturnStatement ( ) { } protected Object createTypeReference ( int primitiveToken ) { } protected boolean parseReturn ( ) { } protected boolean parseTag ( ) { } protected boolean pushParamName ( ) { } protected boolean pushSeeRef ( Object statement , boolean plain ) { } protected void pushText ( int start , int end ) { } protected boolean pushThrowName ( Object typeRef , boolean real ) { } protected void updateDocComment ( ) { } }

Fix:
long pos = ( ( ( long ) ( argTypeRef . sourceStart ) ) << 32 ) + ( argTypeRef . sourceEnd ) ;
Buggy code:
@ JavaScriptResource ( "//org//apidesign//html//leaflet//api//leaflet-src.js" ) public final class LatLng { private final Object jsObj ; Object getJSObj ( ) { } public LatLng ( double latitude , double longitude ) { } LatLng ( Object jsObj ) { } public double getLatitude ( ) { } public void setLatitude ( double latitude ) { } public double getLongitude ( ) { } public void setLongitude ( double longitude ) { } public double distanceTo ( LatLng other ) { } @ Override public boolean equals ( Object other ) { if ( ! ( other instanceof LatLng ) ) { return false ; } LatLng otherLatLng = ( ( LatLng ) ( other ) ) ; <START_BUG> return LatLng . equals ( jsObj , otherLatLng ) ; <END_BUG> } @ Override public String toString ( ) { } public LatLng wrap ( double left , double right ) { } @ JavaScriptBody ( args = { "latitude" , "longitude" } , body = "return<seq2seq4repair_space>L.latLng(latitude,<seq2seq4repair_space>longitude);" ) private static native Object create ( double latitude , double longitude ) { } @ JavaScriptBody ( args = { "jsObj" } , body = "return<seq2seq4repair_space>jsObj.lat;" ) private static native double getLat ( Object jsObj ) { } @ JavaScriptBody ( args = { "jsObj" , "latitudeVal" } , body = "jsObj.lat<seq2seq4repair_space>=<seq2seq4repair_space>latitudeVal;" ) private static native void setLat ( Object jsObj , double latitudeVal ) { } @ JavaScriptBody ( args = { "jsObj" } , body = "return<seq2seq4repair_space>jsObj.lng;" ) private static native double getLng ( Object jsObj ) { } @ JavaScriptBody ( args = { "jsObj" , "longitudeVal" } , body = "jsObj.lng<seq2seq4repair_space>=<seq2seq4repair_space>longitudeVal;" ) private static native void setLng ( Object jsObj , double longitudeVal ) { } @ JavaScriptBody ( args = { "jsObj" , "other" } , body = "return<seq2seq4repair_space>jsObj.distanceTo(other);" ) private static native double distanceTo ( Object jsObj , Object other ) { } @ JavaScriptBody ( args = { "jsObj" , "other" } , body = "return<seq2seq4repair_space>jsObj.equals(other);" ) private static native boolean equals ( Object jsObj , Object other ) { } @ JavaScriptBody ( args = { "jsObj" } , body = "return<seq2seq4repair_space>jsObj.toString();" ) private static native String toString ( Object jsObj ) { } @ JavaScriptBody ( args = { "jsObj" , "left" , "right" } , body = "return<seq2seq4repair_space>jsObj.wrap(left,<seq2seq4repair_space>right);" ) private static native Object wrap ( Object jsObj , double left , double right ) { } }

Fix:
return LatLng . equals ( jsObj , otherLatLng . getJSObj ( ) ) ;