nus-yam/ex-repair huggingface dataset:
Buggy code:
@ WebServlet ( name = "ControllerServlet" , urlPatterns = { "//controller" } ) public class ControllerServlet extends HttpServlet { private static final Logger log = Logger . getLogger ( ControllerServlet . class ) ; public void init ( ServletConfig config ) throws ServletException { try { final KeyStore keyStore = KeyStore . getInstance ( KeyStore . getDefaultType ( ) ) ; final InputStream in = new BufferedInputStream ( new FileInputStream ( "..//jcetest.keystore" ) ) ; try { keyStore . load ( in , null ) ; } finally { in . close ( ) ; } final X509Certificate testCertificate = ( ( X509Certificate ) ( keyStore . getCertificate ( "test" ) ) ) ; final Object validator = ControllerServlet . get ( "javax.crypto.JarVerifier" , "providerValidator" , Object . class ) ; ControllerServlet . get ( validator , "trustedX500Principals" , Map . class ) . put ( testCertificate . getIssuerX500Principal ( ) , Arrays . asList ( testCertificate ) ) ; } catch ( ClassNotFoundException e ) { throw new ServletException ( "This<seq2seq4repair_space>requires<seq2seq4repair_space>being<seq2seq4repair_space>run<seq2seq4repair_space>on<seq2seq4repair_space>Oracle<seq2seq4repair_space>JDK<seq2seq4repair_space>7." , e ) ; } catch ( Exception e ) { <START_BUG> throw new ServletException ( "Cannot<seq2seq4repair_space>install<seq2seq4repair_space>the<seq2seq4repair_space>certificate<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>validator." , e ) ; <END_BUG> } Security . addProvider ( new DummyProvider ( ) ) ; } private static < T > T get ( final Object obj , final String fieldName , Class < T > type ) throws IllegalAccessException , NoSuchFieldException { } private static < T > T get ( final String className , final String fieldName , Class < T > type ) throws ClassNotFoundException , IllegalAccessException , NoSuchFieldException { } private static void set ( final Object obj , final String fieldName , final Object value ) throws IllegalAccessException , NoSuchFieldException { } protected void service ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } }

Fix:
throw new ServletException ( "Cannot<seq2seq4repair_space>install<seq2seq4repair_space>the<seq2seq4repair_space>a<seq2seq4repair_space>certificate<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>validator." , e ) ;
Buggy code:
public final class ServerMaker { private final ProcessManagerSlave processManagerSlave ; private final MessageHandler messageHandler ; private final ServerManagerEnvironment environment ; public ServerMaker ( ServerManagerEnvironment environment , ProcessManagerSlave processManagerSlave , MessageHandler messageHandler ) { } public Server makeServer ( Standalone serverConfig ) throws IOException { } private List < String > getServerLaunchCommand ( Standalone serverConfig ) { JvmElement jvm = serverConfig . getJvm ( ) ; List < String > command = new ArrayList < String > ( ) ; command . add ( getJavaCommand ( jvm ) ) ; Map < String , String > sysProps = appendJavaOptions ( jvm , command ) ; command . add ( "-Djava.util.logging.manager=org.jboss.logmanager.LogManager" ) ; command . add ( "-jar" ) ; command . add ( "jboss-modules.jar" ) ; command . add ( "-mp" ) ; command . add ( "modules" ) ; command . add ( "-logmodule" ) ; command . add ( "org.jboss.logmanager:jboss-logmanager" ) ; <START_BUG> command . add ( "org.jboss.as:server" ) ; <END_BUG> appendArgsToMain ( serverConfig , sysProps , command ) ; return command ; } private String getJavaCommand ( JvmElement jvm ) { } private Map < String , String > appendJavaOptions ( JvmElement jvm , List < String > command ) { } private void appendArgsToMain ( Standalone serverConfig , Map < String , String > jvmProps , List < String > command ) { } private static String getPropertyValue ( String property , Map < String , String > jvmProps , Map < String , String > sysProps , String defaultVal ) { } private void addStandardProperties ( Map < String , String > sysProps ) { } private Map < String , String > getServerLaunchEnvironment ( JvmElement jvm ) { } }

Fix:
command . add ( "org.jboss.as:jboss-as-server" ) ;
Buggy code:
class LocalOutboundConnectionAdd extends AbstractOutboundConnectionAddHandler { static final LocalOutboundConnectionAdd INSTANCE = new LocalOutboundConnectionAdd ( ) ; private LocalOutboundConnectionAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } ServiceController installRuntimeService ( final OperationContext context , final ModelNode operation , final ModelNode fullModel , final ServiceVerificationHandler verificationHandler ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String connectionName = address . getLastElement ( ) . getValue ( ) ; final String outboundSocketBindingRef = OUTBOUND_SOCKET_BINDING_REF . resolveModelAttribute ( context , operation ) . asString ( ) ; final ServiceName outboundSocketBindingDependency = OUTBOUND_SOCKET_BINDING_BASE_SERVICE_NAME . append ( outboundSocketBindingRef ) ; <START_BUG> final OptionMap connectionCreationOptions = ConnectorUtils . getOptions ( context , fullModel . get ( PROPERTY ) ) ; <END_BUG> final LocalOutboundConnectionService outboundConnectionService = new LocalOutboundConnectionService ( connectionName , connectionCreationOptions ) ; final ServiceName serviceName = OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionName ) ; final ServiceName aliasServiceName = LOCAL_OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionName ) ; final ServiceBuilder < LocalOutboundConnectionService > svcBuilder = context . getServiceTarget ( ) . addService ( serviceName , outboundConnectionService ) . addAliases ( aliasServiceName ) . addDependency ( SUBSYSTEM_ENDPOINT , Endpoint . class , outboundConnectionService . getEndpointInjector ( ) ) . addDependency ( outboundSocketBindingDependency , OutboundSocketBinding . class , outboundConnectionService . getDestinationOutboundSocketBindingInjector ( ) ) ; if ( verificationHandler != null ) { svcBuilder . addListener ( verificationHandler ) ; } return svcBuilder . install ( ) ; } }

Fix:
final OptionMap connectionCreationOptions = ConnectorResource . getOptions ( context , fullModel . get ( PROPERTY ) ) ;
Buggy code:
public class ConfirmPinCodeActivity extends AppCompatActivity implements View . OnClickListener { private EditText et_pincode ; private Button btn_confirm_code ; private String phoneNumber ; private int code = 0 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void generate ( ) { } private void inflateView ( ) { } public void onClick ( View view ) { } public void showNotification ( ) { String ns = Context . NOTIFICATION_SERVICE ; NotificationManager notificationManager = ( ( NotificationManager ) ( getSystemService ( ns ) ) ) ; <START_BUG> int icon = drawable . ic_lock_white_24dp ; <END_BUG> long when = System . currentTimeMillis ( ) ; Context context = getApplicationContext ( ) ; Intent notificationIntent = new Intent ( this , ConfirmPinCodeActivity . class ) ; PendingIntent contentIntent = PendingIntent . getActivity ( this , 0 , notificationIntent , 0 ) ; Notification notification ; notification = new Notification . Builder ( context ) . setContentTitle ( "Mã<seq2seq4repair_space>xác<seq2seq4repair_space>nhận" ) . setContentText ( ( ( code ) + "<seq2seq4repair_space>Bạn<seq2seq4repair_space>đã<seq2seq4repair_space>đăng<seq2seq4repair_space>ký<seq2seq4repair_space>thành<seq2seq4repair_space>công!<seq2seq4repair_space>" ) ) . setSmallIcon ( icon ) . setContentIntent ( contentIntent ) . setWhen ( when ) . setAutoCancel ( true ) . build ( ) ; notification . flags |= Notification . FLAG_AUTO_CANCEL ; notification . defaults |= Notification . DEFAULT_SOUND ; notificationManager . notify ( 5 , notification ) ; } }

Fix:
int icon = drawable . splash ;
Buggy code:
public abstract class P4Base extends org . apache . tools . ant . Task { protected Perl5Util util = null ; protected String shell ; protected String P4Port = "" ; protected String P4Client = "" ; protected String P4User = "" ; protected String P4View = "" ; protected boolean failOnError = true ; protected String P4Opts = "" ; protected String P4CmdOpts = "" ; public void setPort ( String P4Port ) { } public void setClient ( String P4Client ) { } public void setUser ( String P4User ) { } public void setView ( String P4View ) { } public void setCmdopts ( String P4CmdOpts ) { } public void setFailonerror ( boolean fail ) { } public void init ( ) { } protected void execP4Command ( String command ) throws BuildException { } protected void execP4Command ( String command , P4Handler handler ) throws BuildException { try { Commandline commandline = new Commandline ( ) ; commandline . setExecutable ( "p4" ) ; if ( ( ( P4Port ) != null ) && ( ( P4Port . length ( ) ) != 0 ) ) { commandline . createArgument ( ) . setValue ( P4Port ) ; } if ( ( ( P4User ) != null ) && ( ( P4User . length ( ) ) != 0 ) ) { commandline . createArgument ( ) . setValue ( P4User ) ; } if ( ( ( P4Client ) != null ) && ( ( P4Client . length ( ) ) != 0 ) ) { commandline . createArgument ( ) . setValue ( P4Client ) ; } commandline . createArgument ( ) . setLine ( command ) ; String [ ] cmdline = commandline . getCommandline ( ) ; String cmdl = "" ; for ( int i = 0 ; i < ( cmdline . length ) ; i ++ ) { cmdl += ( cmdline [ i ] ) + "<seq2seq4repair_space>" ; } <START_BUG> log ( ( "Execing<seq2seq4repair_space>" + cmdl ) , MSG_VERBOSE ) ; <END_BUG> if ( handler == null ) { handler = new SimpleP4OutputHandler ( this ) ; } Execute exe = new Execute ( handler , null ) ; exe . setAntRun ( project ) ; exe . setCommandline ( commandline . getCommandline ( ) ) ; try { exe . execute ( ) ; } catch ( IOException e ) { throw new BuildException ( e ) ; } finally { try { handler . stop ( ) ; } catch ( Exception e ) { } } } catch ( Exception e ) { String failMsg = "Problem<seq2seq4repair_space>exec'ing<seq2seq4repair_space>P4<seq2seq4repair_space>command:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ; if ( failOnError ) { throw new BuildException ( failMsg ) ; } else { log ( failMsg , MSG_ERR ) ; } } } }

Fix:
log ( cmdl . describeCommand ( ) , MSG_VERBOSE ) ;
Buggy code:
@ ServerEndpoint ( value = "//bubble" , decoders = { MessageDecoder . class } , encoders = { MessageEncoder . class } ) public class BubblesServer { public static final int PLAYER_LIMIT = 6 ; private static Set < Game > pendingGames = new HashSet < > ( ) ; private static Set < Game > activeGames = new HashSet < > ( ) ; private static Set < Game > endedGames = new HashSet < > ( ) ; private Session session ; private Game game ; private BubblePlayer player ; @ OnOpen public void onOpen ( Session session ) throws Exception { } @ OnMessage public void onMessage ( long bubbleId ) throws Exception { } @ OnError public void onError ( Throwable throwable ) { } @ OnClose public void onClose ( ) throws IOException , EncodeException { game . removePlayer ( this . player ) ; game . removeSession ( this . session ) ; broadcastPlayerLeft ( this . player . name ) ; if ( ( game . getPlayersSessions ( ) . size ( ) ) == 1 ) { broadcastGameOverMessage ( this . player ) ; BubblesServer . endedGames . add ( game ) ; BubblesServer . activeGames . remove ( game ) ; } else <START_BUG> if ( ( game . getPlayersSessions ) == 0 ) { <END_BUG> BubblesServer . endedGames . remove ( game ) ; } } private boolean isThereActiveAnGameWithRoom ( ) { } private Game getActiveGameThatHasRoom ( ) throws Exception { } private Game getAPendingGame ( ) throws Exception { } private void startNewGame ( Bubble [ ] bubbles , BubblePlayer [ ] players ) throws IOException , EncodeException { } private void broadcastMessage ( Message m , boolean includeMe ) throws IOException , EncodeException { } private void broadcastPlayerJoinedMessage ( ) throws IOException , EncodeException { } private void broadcastBubblePoppedMessage ( long id ) throws IOException , EncodeException { } public void broadcastPlayerLeft ( String playerName ) throws IOException , EncodeException { } public void broadcastGameOverMessage ( BubblePlayer winner ) throws IOException , EncodeException { } private String extractQueryParam ( String key ) { } private String extractPlayerName ( ) { } private long extractGameIdOfSession ( ) { } }

Fix:
if ( ( game . getPlayersSessions ( ) . size ( ) ) == 0 ) {
Buggy code:
public class CompletionOnFieldType extends FieldDeclaration { public boolean isLocalVariable ; public CompletionOnFieldType ( TypeReference type , boolean isLocalVariable ) { } public StringBuffer printStatement ( int tab , StringBuffer output ) { <START_BUG> return type . print ( tab , output ) . append ( ';' ) ; <END_BUG> } }

Fix:
return this . type . print ( tab , output ) . append ( ';' ) ;
Buggy code:
public class ResearchSupportTextInterface { int action = 0 ; Paper paper = null ; String refTitle = null ; String paperTitle = null ; int rating = 0 ; int levels = 0 ; public ResearchSupportTextInterface ( ) { } public void start ( ) throws IOException { } private int menu ( ) { int choice = - 1 ; Scanner scan = new Scanner ( System . in ) ; <START_BUG> System . out . println ( "\nPaper<seq2seq4repair_space>REPOSITORY<seq2seq4repair_space>MENU\n" ) ; <END_BUG> System . out . println ( "1\tAdd<seq2seq4repair_space>a<seq2seq4repair_space>paper<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>repository" ) ; System . out . println ( "2\tMake<seq2seq4repair_space>a<seq2seq4repair_space>paper<seq2seq4repair_space>a<seq2seq4repair_space>reference" ) ; System . out . println ( "3\tList<seq2seq4repair_space>paper<seq2seq4repair_space>details" ) ; System . out . println ( "4\tList<seq2seq4repair_space>direct<seq2seq4repair_space>citations" ) ; System . out . println ( "5\tList<seq2seq4repair_space>direct<seq2seq4repair_space>references" ) ; System . out . println ( "6\tList<seq2seq4repair_space>all<seq2seq4repair_space>citation<seq2seq4repair_space>chains<seq2seq4repair_space>up<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>root" ) ; System . out . println ( "7\tList<seq2seq4repair_space>all<seq2seq4repair_space>reference<seq2seq4repair_space>chains<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>lowest<seq2seq4repair_space>level" ) ; System . out . println ( "8\tList<seq2seq4repair_space>n-levels<seq2seq4repair_space>of<seq2seq4repair_space>citation" ) ; System . out . println ( "9\tList<seq2seq4repair_space>n-levels<seq2seq4repair_space>of<seq2seq4repair_space>references\n" ) ; System . out . println ( "10\tLoad<seq2seq4repair_space>Data" ) ; System . out . println ( "0\tEXIT\n" ) ; System . out . println ( "Enter<seq2seq4repair_space>menu<seq2seq4repair_space>choice,<seq2seq4repair_space>0<seq2seq4repair_space>to<seq2seq4repair_space>exit:<seq2seq4repair_space>" ) ; String selection = scan . nextLine ( ) ; try { choice = Integer . parseInt ( selection ) ; } catch ( NumberFormatException e ) { System . out . println ( "Please<seq2seq4repair_space>enter<seq2seq4repair_space>an<seq2seq4repair_space>integer<seq2seq4repair_space>" ) ; choice = - 1 ; } return choice ; } private String inputPaperTitle ( ) throws IOException { } private int inputLevelCountOrRating ( String prompt ) { } public int getAction ( ) { } public Paper getPaper ( ) { } public int getLevels ( ) { } public String getRefTitle ( ) { } public String getPaperTitle ( ) { } public void print ( String s ) { } public void print ( Set < Paper > references ) { } public void print ( HashSet < Stack < Paper > > chains ) { } }

Fix:
System . out . println ( "\nPaper<seq2seq4repair_space>Repository<seq2seq4repair_space>Menu\n" ) ;
Buggy code:
public class Master extends AbstractMaster { private static Logger _log = Logger . getLogger ( Master . class ) ; private NetworkHandler handler ; private HashSet < WorkerRepr > workers = new HashSet < WorkerRepr > ( ) ; private Date mapsLastModifiedDate ; private File pendingBattlecodeServerFile ; private File pendingAllowedPackagesFile ; private File pendingDisallowedClassesFile ; private File pendingMethodCostsFile ; private boolean initialized ; public static Master createMaster ( int dataPort ) throws Exception { } private Master ( int dataPort ) throws Exception { } public synchronized void start ( ) throws IOException , NoSuchAlgorithmException { new Thread ( handler ) . start ( ) ; startRun ( ) ; new Thread ( new Runnable ( ) { @ Override public void run ( ) { while ( true ) { kickoffUpdateMaps ( ) ; try { Thread . sleep ( 10000 ) ; } catch ( InterruptedException e ) { } } } } ) . start ( ) ; <START_BUG> WebSocketChannelManager . startHeartbeatManager ( ) ; <END_BUG> initialized = true ; } public synchronized boolean isInitialized ( ) { } @ Override public synchronized void queueRun ( Long teamAId , Long teamBId , List < Long > seeds , List < Long > mapIds ) { } @ Override public synchronized void analyzeScrimmageMatch ( BSScrimmageSet scrim ) { } @ Override public synchronized void updateBattlecodeFiles ( File battlecode_server , File allowedPackages , File disallowedClasses , File methodCosts ) { } private void writeBattlecodeFiles ( ) { } @ Override protected synchronized void deleteRun ( Long runId ) { } @ Override public synchronized void deleteScrimmage ( Long scrimId ) { } @ Override synchronized void workerConnect ( WorkerRepr worker ) { } @ Override synchronized void workerDisconnect ( WorkerRepr worker ) { } @ Override public synchronized void matchAnalyzed ( WorkerRepr worker , Packet p ) { } @ Override public synchronized void matchFinished ( WorkerRepr worker , Packet p ) { } @ Override protected synchronized void sendWorkerMatches ( WorkerRepr worker ) { } @ Override public synchronized void sendWorkerDependencies ( WorkerRepr worker , NetworkMatch match , boolean needUpdate , boolean needMap , boolean needTeamA , boolean needTeamB ) { } private void startRun ( ) { } private BSRun getCurrentRun ( ) { } private void stopCurrentRun ( STATUS status ) { } @ Override public synchronized void updateMaps ( ) { } @ Override protected Set < WorkerRepr > getConnections ( ) { } No newline ; at end ; of file ; }

Fix:
WebSocketChannelManager . start ( ) ;
Buggy code:
public interface MethodExecutor { <START_BUG> Object execute ( EvaluationContext context , Object target , Object ... arguments ) throws AccessException ; <END_BUG> }

Fix:
TypedValue execute ( EvaluationContext context , Object target , Object ... arguments ) throws AccessException ;
Buggy code:
public class Server implements Serializable { private static final long serialVersionUID = 1356474862304251338L ; private static final Integer DEFAULT_MAX_LEVEL = 2 ; private static final Integer MAX_LEVEL = 100 ; private Long key ; private String uid ; private String name ; private String adminEmail ; private Date created ; private Date updated ; private int onlinePlayers ; private String address ; private String displayAddress ; private String pluginVersion ; private Integer maxLevel ; private Boolean dirty ; private Integer permission ; private Boolean disabled ; private Map < Long , Integer > permissions ; private Long maxBanDuration ; private Integer totalPlayers ; public Integer getTotalPlayers ( ) { } public void setTotalPlayers ( Integer totalPlayers ) { } public Integer getPermission ( Integer func ) { <START_BUG> Integer n = this . permissions . get ( func ) ; <END_BUG> if ( n == null ) return Server . MAX_LEVEL ; return n ; } public Map < Long , Integer > getPermissions ( ) { } public void setPermissions ( Map < Long , Integer > permissions ) { } public Boolean getDisabled ( ) { } public void setDisabled ( Boolean disabled ) { } public Server ( ) { } public Long getKey ( ) { } public void setKey ( Long key ) { } public String getUid ( ) { } public void setUid ( String uid ) { } public String getName ( ) { } public void setName ( String name ) { } public String getAdminEmail ( ) { } public void setAdminEmail ( String admin ) { } public Date getCreated ( ) { } public void setCreated ( Date created ) { } public Date getUpdated ( ) { } public void setUpdated ( Date updated ) { } public int getOnlinePlayers ( ) { } public void setOnlinePlayers ( int onlinePlayers ) { } public String getAddress ( ) { } public void setAddress ( String address ) { } @ Override public String toString ( ) { } public String getPluginVersion ( ) { } public void setPluginVersion ( String pluginVersion ) { } public Integer getMaxLevel ( ) { } public void setMaxLevel ( Integer maxLevel ) { } public Boolean getDirty ( ) { } public void setDirty ( Boolean dirty ) { } public Boolean getOffline ( ) { } public Integer getRemotePermission ( ) { } public void setRemotePermission ( Integer permission ) { } public Integer getAdminLevel ( ) { } public Long getMaxBanDuration ( ) { } public void setMaxBanDuration ( Long maxBanDuration ) { } public String getDisplayAddress ( ) { } public void setDisplayAddress ( String displayAddress ) { } }

Fix:
Integer n = this . permissions . get ( new Long ( func ) ) ;
Buggy code:
public class MainActivity extends ActionBarActivity implements OnTouchListener , ViewPresenterInterFace { private final int REQ_CODE_SPEECH_INPUT = 100 ; private Presenter presenter ; private EditText selectedView ; private InputMethodManager inputMethodManager ; private int keyboardState = 0 ; private boolean continuousDictation = true ; private boolean agree = false ; private WebView htmlViewer ; private PopupWindow popUpPreview ; private View popUpPreviewLayout ; private long actionDownTime = - 1 ; private long actionUpTime = - 1 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } public boolean onOptionsItemSelected ( MenuItem item ) { } private void createPopUpPreview ( ) { } private void popUpPreview ( ) { } public void send ( View v ) { } public void close ( View v ) { } public void dictates ( View view ) { } public void submits ( View view ) { } public void up ( View view ) { } public void down ( View view ) { } public void showKeyboard ( View v ) { } private void popUpHIPPA ( ) { } private void initialDictation ( ) { } private void setListeners ( ) { } @ Override public boolean onTouch ( View v , MotionEvent event ) { if ( ( event . getAction ( ) ) == ( MotionEvent . ACTION_UP ) ) { actionUpTime = ( event . getEventTime ( ) ) - ( actionDownTime ) ; if ( ( ( actionUpTime ) > 0 ) && ( ( v . getId ( ) ) != ( id . code_status_spinner ) ) ) { v . requestFocus ( ) ; selectedView = ( ( EditText ) ( v ) ) ; if ( ( actionUpTime ) < 600 ) { inputMethodManager . hideSoftInputFromWindow ( selectedView . getWindowToken ( ) , HIDE_NOT_ALWAYS ) ; keyboardState = InputMethodManager . RESULT_HIDDEN ; } else { inputMethodManager . showSoftInput ( selectedView , SHOW_IMPLICIT ) ; keyboardState = InputMethodManager . RESULT_SHOWN ; } } return true ; } <START_BUG> actionDownTime = event . getEventTime ( ) ; <END_BUG> return false ; } @ Override public void fillBox ( int boxNum , String transcribedText ) { } @ Override protected void onDestroy ( ) { } public void onBackPressed ( ) { } public void setAgreement ( boolean a ) { } public boolean getAgreement ( ) { } public void setContinuousDictation ( boolean cd ) { } public boolean getContinuousDictation ( ) { } }

Fix:
actionDownTime = event . getDownTime ( ) ;
Buggy code:
public class MutableDouble { private double value ; public MutableDouble ( ) { } public MutableDouble ( float value ) { } public double get ( ) { } public void set ( double value ) { } public void setIfMax ( double value ) { } public void setIfMin ( double value ) { <START_BUG> if ( ( this . value ) < value ) { <END_BUG> this . value = value ; } } }

Fix:
if ( ( this . value ) > value ) {
Buggy code:
public class dataManager { static friendTeamDataManager allFriend = null ; public dataManager ( ) { } public static void init ( Context context ) { } public static friendTeamDataManager getFrilendList ( ) { } public static void updateFriendListFromServer ( int update_type , JSONArray jason_friendList , Context context ) { if ( jason_friendList == null ) return ; if ( ( 1 == update_type ) || ( ( dataManager . allFriend ) == null ) ) { dataManager . allFriend = new friendTeamDataManager ( ) ; } for ( int i = 0 ; i < ( jason_friendList . length ( ) ) ; i ++ ) { JSONObject obj ; try { obj = ( ( JSONObject ) ( jason_friendList . get ( i ) ) ) ; <START_BUG> String teamName = obj . getString ( "team" ) ; <END_BUG> String memberName = obj . getString ( "nickname" ) ; String phoneNumber = obj . getString ( "mobile" ) ; String pictureAddress = obj . getString ( "avatar_url" ) ; dataManager . allFriend . addA_FriendMemberData ( teamName , memberName , phoneNumber , pictureAddress ) ; } catch ( JSONException e ) { e . printStackTrace ( ) ; } } dataManager . allFriend . updateDataToDb ( context ) ; } }

Fix:
String teamName = obj . getString ( "group" ) ;
Buggy code:
public class Action { private String mId ; private String mBoardId ; private String mType ; private String mData ; private long mFrom ; private long mDuration ; private String mSender ; private static final String TABLE = "action" ; private static final String COL_ID = "id" ; private static final String COL_BOARD_ID = "board_id" ; private static final String COL_TYPE = "type" ; private static final String COL_DATA = "data" ; private static final String COL_FROM = "_from" ; private static final String COL_DURATION = "duration" ; private static final String COL_SENDER = "sender" ; static void createTable ( SQLiteDatabase db ) { } static void dropTable ( SQLiteDatabase db ) { } public static Action fromJSONObject ( JSONObject json ) { } public static Action fromCursor ( Cursor cur ) { } public static ContentValues toContentValues ( Action action ) { } public static void upsert ( Context context , Action action ) { } public static void upsert ( Context context , List < Action > actions ) { } public static List < Action > getAllOfBoard ( Context context , String boardId ) { } public static Action getLatestActionOfBoard ( Context context , String boardId ) { } static long getBoardLastActionTime ( Context context , String boardId ) { Cursor cur = DBHelper . getDB ( context ) . query ( Action . TABLE , new String [ ] { Action . COL_ID } , ( ( Action . COL_BOARD_ID ) + "<seq2seq4repair_space>=<seq2seq4repair_space>?" ) , new String [ ] { boardId } , null , null , ( ( Action . COL_ID ) + "<seq2seq4repair_space>DESC" ) , "1" ) ; long time = - 1 ; if ( cur . moveToFirst ( ) ) { String id = cur . getString ( 0 ) ; <START_BUG> time = ( Integer . parseInt ( id . substring ( 0 , 8 ) , 16 ) ) * 1000 ; <END_BUG> } cur . close ( ) ; return time ; } public String getId ( ) { } public void setId ( String id ) { } public String getBoardId ( ) { } public void setBoardId ( String boardId ) { } public String getType ( ) { } public void setType ( String type ) { } public String getData ( ) { } public void setData ( String data ) { } public long getFrom ( ) { } public void setFrom ( long from ) { } public long getDuration ( ) { } public void setDuration ( long duration ) { } public String getSender ( ) { } public void setSender ( String sender ) { } }

Fix:
time = ( Long . parseLong ( id . substring ( 0 , 8 ) , 16 ) ) * 1000 ;
Buggy code:
public class Wizard extends Panel implements IWizard , IWizardModelListener { public static final String BUTTONS_ID = "buttons" ; public static final String FEEDBACK_ID = "feedback" ; public static final String HEADER_ID = "header" ; public static final String OVERVIEW_ID = "overview" ; public static final String FORM_ID = "form" ; public static final String VIEW_ID = "view" ; private static final long serialVersionUID = 1L ; private IWizardStep activeStep ; private Form form ; private IWizardModel wizardModel ; public Wizard ( String id ) { } public Wizard ( String id , boolean addDefaultCssStyle ) { } public Wizard ( String id , IWizardModel wizardModel ) { } public Wizard ( String id , IWizardModel wizardModel , boolean addDefaultCssStyle ) { } public final void addDefaultCssStyle ( ) { } public final IWizardStep getActiveStep ( ) { } public Form getForm ( ) { } public final IWizardModel getWizardModel ( ) { } public boolean isVersioned ( ) { } public void onActiveStepChanged ( IWizardStep newStep ) { } public void onCancel ( ) { } public void onFinish ( ) { } protected void init ( IWizardModel wizardModel ) { } protected Component newButtonBar ( String id ) { } protected FeedbackPanel newFeedbackPanel ( String id ) { } protected Form newForm ( String id ) { } protected void onBeforeRender ( ) { super . onBeforeRender ( ) ; <START_BUG> Component buttonBar = getForm ( ) . get ( Wizard . BUTTONS_ID ) ; <END_BUG> if ( buttonBar instanceof IDefaultButtonProvider ) { IFormSubmittingComponent defaultButton = ( ( IDefaultButtonProvider ) ( buttonBar ) ) . getDefaultButton ( wizardModel ) ; form . setDefaultButton ( defaultButton ) ; } } protected Component newOverviewBar ( String id ) { } }

Fix:
Component buttonBar = form . get ( Wizard . BUTTONS_ID ) ;
Buggy code:
public class Snippet328 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new GridLayout ( ) ) ; shell . setText ( "StyledText:<seq2seq4repair_space>Variable<seq2seq4repair_space>tab<seq2seq4repair_space>stops" ) ; Snippet328 . Ruler ruler = new Snippet328 . Ruler ( shell , SWT . NONE ) ; GridData data = new GridData ( ) ; data . heightHint = 10 ; data . horizontalAlignment = SWT . FILL ; ruler . setLayoutData ( data ) ; ruler . setBackground ( display . getSystemColor ( COLOR_INFO_BACKGROUND ) ) ; StyledText styledText = new StyledText ( shell , ( ( ( ( SWT . FULL_SELECTION ) | ( SWT . BORDER ) ) | ( SWT . H_SCROLL ) ) | ( SWT . V_SCROLL ) ) ) ; <START_BUG> styledText . setText ( "0\t1\t2\t3\t4\nDrag\tthe\ttab\tmarks\ton\ttop\tto\tchange\tthe\tpositoin\tof\tthe\ttab\tstops" ) ; <END_BUG> styledText . setTabStops ( new int [ ] { 30 , 70 , 90 , 140 } ) ; styledText . setLineTabStops ( 0 , 1 , new int [ ] { 10 , 60 , 80 } ) ; styledText . setLineTabStops ( 1 , 1 , new int [ ] { 40 , 70 , 100 , 150 } ) ; styledText . setLayoutData ( new GridData ( GridData . FILL_BOTH ) ) ; ruler . setEditor ( styledText ) ; shell . setSize ( 800 , 400 ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } public static class Ruler extends Canvas { StyledText styledText ; int hover = - 1 ; int line = 0 ; public Ruler ( Composite parent , int style ) { } public void setEditor ( StyledText editor ) { } void handleMouseMove ( Event e ) { } void handleDragMark ( Event e ) { } void handlePaint ( Event e ) { } } }

Fix:
styledText . setText ( "0\t1\t2\t3\t4\nDrag\tthe\ttab\tmarks\ton\ttop\tto\tchange\tthe\tposition\tof\tthe\ttab\tstops" ) ;
Buggy code:
public class ProgressView extends ViewPart implements IViewPart { DetailedProgressViewer viewer ; Action cancelAction ; Action clearAllAction ; private ProgressViewerContentProvider provider ; public void createPartControl ( Composite parent ) { } public void setFocus ( ) { } protected void initContentProvider ( ) { } private void initContextMenu ( ) { } private void initPulldownMenu ( ) { } private void initToolBar ( ) { } private IStructuredSelection getSelection ( ) { } JobInfo getSelectedInfo ( ) { } private void createCancelAction ( ) { } private void createClearAllAction ( ) { clearAllAction = new Action ( ProgressMessages . ProgressView_ClearAllAction ) { public void run ( ) { <START_BUG> viewer . clearAll ( ) ; <END_BUG> } } ; clearAllAction . setToolTipText ( NewProgressView_RemoveAllJobsToolTip ) ; ImageDescriptor id = WorkbenchImages . getWorkbenchImageDescriptor ( "//elcl16//progress_remall.gif" ) ; if ( id != null ) clearAllAction . setImageDescriptor ( id ) ; id = WorkbenchImages . getWorkbenchImageDescriptor ( "//dlcl16//progress_remall.gif" ) ; if ( id != null ) clearAllAction . setDisabledImageDescriptor ( id ) ; } public void dispose ( ) { } }

Fix:
FinishedJobs . getInstance ( ) . clearAll ( ) ;
Buggy code:
public class MailSessionService implements Service < Session > { private static final Logger log = Logger . getLogger ( MailSessionService . class ) ; private volatile Properties props ; private final MailSessionConfig config ; private Map < String , OutboundSocketBinding > socketBindings = new HashMap < String , OutboundSocketBinding > ( ) ; public MailSessionService ( MailSessionConfig config ) { } public void start ( StartContext startContext ) throws StartException { } public void stop ( StopContext stopContext ) { } Injector < OutboundSocketBinding > getSocketBindingInjector ( String name ) { } private Properties getProperties ( ) throws StartException { } private void setServerProps ( Properties props , final MailSessionServer server , final String protocol ) throws StartException { } private InetSocketAddress getServerSocketAddress ( MailSessionServer server ) throws StartException { final String ref = server . getOutgoingSocketBinding ( ) ; final OutboundSocketBinding binding = socketBindings . get ( ref ) ; if ( ref == null ) { throw MESSAGES . outboundSocketBindingNotAvailable ( ref ) ; } final InetAddress destinationAddress ; try { destinationAddress = binding . getDestinationAddress ( ) ; } catch ( UnknownHostException uhe ) { <START_BUG> throw MESSAGES . unknownOutboundSocketBindingDesintation ( uhe , ref ) ; <END_BUG> } return new InetSocketAddress ( destinationAddress , binding . getDestinationPort ( ) ) ; } public Session getValue ( ) throws IllegalArgumentException , IllegalStateException { } private static String getHostKey ( final String protocol ) { } private static String getPortKey ( final String protocol ) { } private static String getPropKey ( final String protocol , final String name ) { } public class PasswordAuthentication extends Authenticator { @ Override protected javax . mail . PasswordAuthentication getPasswordAuthentication ( ) { } } }

Fix:
throw MESSAGES . unknownOutboundSocketBindingDestination ( uhe , ref ) ;
Buggy code:
class EJB3SubsystemAdd extends AbstractBoottimeAddStepHandler { static final EJB3SubsystemAdd INSTANCE = new EJB3SubsystemAdd ( ) ; private static final Logger logger = Logger . getLogger ( EJB3SubsystemAdd . class ) ; private EJB3SubsystemAdd ( ) { } protected void populateModel ( ModelNode operation , ModelNode model ) { } protected void performBoottime ( final OperationContext context , ModelNode operation , final ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) { } private void addRemoteInvocationServices ( final OperationContext context , final List < ServiceController < ? > > newControllers ) { <START_BUG> final LocalEjbReceiver localEjbReceiver = new LocalEjbReceiver ( ) ; <END_BUG> newControllers . add ( context . getServiceTarget ( ) . addService ( SERVICE_NAME , localEjbReceiver ) . addDependency ( DeploymentRepository . SERVICE_NAME , DeploymentRepository . class , localEjbReceiver . getDeploymentRepository ( ) ) . install ( ) ) ; EjbClientContextService clientContextService = new EjbClientContextService ( ) ; final ServiceBuilder < EJBClientContext > clientBuilder = context . getServiceTarget ( ) . addService ( DEFAULT_SERVICE_NAME , clientContextService ) ; clientContextService . addReceiver ( clientBuilder , SERVICE_NAME ) ; newControllers . add ( clientBuilder . install ( ) ) ; } }

Fix:
final LocalEjbReceiver localEjbReceiver = new LocalEjbReceiver ( false ) ;
Buggy code:
public class PackageStringResourceLoader extends ComponentStringResourceLoader { private static final Logger log = LoggerFactory . getLogger ( PackageStringResourceLoader . class ) ; private String filename = "package" ; public PackageStringResourceLoader ( ) { } @ Override public String loadStringResource ( Class < ? > clazz , final String key , final Locale locale , final String style , final String variation ) { if ( clazz == null ) { return null ; } IPropertiesFactory propertiesFactory = Application . get ( ) . getResourceSettings ( ) . getPropertiesFactory ( ) ; while ( true ) { String packageName = clazz . getPackage ( ) . getName ( ) ; packageName = packageName . replace ( '.' , '//' ) ; while ( ( packageName . length ( ) ) > 0 ) { String path = ( packageName + "//" ) + ( filename ) ; <START_BUG> ResourceNameIterator iter = new ResourceNameIterator ( path , style , variation , locale , null ) ; <END_BUG> while ( iter . hasNext ( ) ) { String newPath = iter . next ( ) ; final Properties props = propertiesFactory . load ( clazz , newPath ) ; if ( props != null ) { String value = props . getString ( key ) ; if ( value != null ) { if ( PackageStringResourceLoader . log . isDebugEnabled ( ) ) { PackageStringResourceLoader . log . debug ( ( ( ( "Found<seq2seq4repair_space>resource<seq2seq4repair_space>from:<seq2seq4repair_space>" + props ) + ";<seq2seq4repair_space>key:<seq2seq4repair_space>" ) + key ) ) ; } return value ; } } } packageName = Strings . beforeLast ( packageName , '//' ) ; } clazz = clazz . getSuperclass ( ) ; if ( clazz == null ) { break ; } } return null ; } public String getFilename ( ) { } public void setFilename ( String filename ) { } }

Fix:
ResourceNameIterator iter = new ResourceNameIterator ( path , style , variation , locale , null , false ) ;
Buggy code:
public class XMLBeautifier implements PostProcessor { protected XMLMixedContentFormater formater = createFormatter ( ) ; protected String [ ] fileExtensions = new String [ ] { ".xml" , ".xsl" , ".xsd" , ".wsdd" , ".wsdl" } ; protected Log log = XSDLog . getLog ( getClass ( ) ) ; protected Map < String , Object > loadOptions = getDefaultLoadOptions ( ) ; protected Map < String , Object > saveOptions = getDefaultSaveOptions ( ) ; protected URIConverter uriConverter ; public void addLoadOption ( OptionsEntry entry ) { } public void addSaveOption ( OptionsEntry entry ) { } public void afterClose ( FileHandle impl ) { } public void beforeWriteAndClose ( FileHandle impl ) { <START_BUG> String fn = impl . getTargetFile ( ) . getAbsolutePath ( ) ; <END_BUG> boolean isXML = isXmlFile ( fn ) ; URI u = URI . createFileURI ( fn ) ; if ( log . isInfoEnabled ( ) ) { if ( isXML ) log . info ( Msg . create ( "Beautifying<seq2seq4repair_space>" ) . uri ( u ) ) ; else log . info ( Msg . create ( "Ignoring<seq2seq4repair_space>" ) . uri ( u ) . txt ( ( "<seq2seq4repair_space>since<seq2seq4repair_space>the<seq2seq4repair_space>file<seq2seq4repair_space>extension<seq2seq4repair_space>does<seq2seq4repair_space>" + "not<seq2seq4repair_space>match<seq2seq4repair_space>the<seq2seq4repair_space>filter." ) ) ) ; } if ( ! isXML ) return ; ByteArrayInputStream is = new ByteArrayInputStream ( impl . getBuffer ( ) . toString ( ) . trim ( ) . getBytes ( ) ) ; ResourceSet rs = new ResourceSetImpl ( ) ; if ( ( uriConverter ) != null ) rs . setURIConverter ( uriConverter ) ; Resource r = new GenericXMLResourceFactoryImpl ( ) . createResource ( u ) ; rs . getResources ( ) . add ( r ) ; try { r . load ( is , loadOptions ) ; EObject o = r . getContents ( ) . get ( 0 ) ; formater . beautifyMixedContent ( 0 , o ) ; ByteArrayOutputStream os = new ByteArrayOutputStream ( ) ; r . save ( os , saveOptions ) ; impl . setBuffer ( os . toString ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } protected XMLMixedContentFormater createFormatter ( ) { } protected Map < String , Object > getDefaultLoadOptions ( ) { } protected Map < String , Object > getDefaultSaveOptions ( ) { } public boolean isXmlFile ( final String absolutePath ) { } public void setFileExtensions ( final String [ ] fileExtensions ) { } public void setFormatComments ( boolean formatComments ) { } public void setMaxLineWidth ( int maxLineWidth ) { } public void setUriConverter ( URIConverter converter ) { } }

Fix:
String fn = impl . getAbsolutePath ( ) ;
Buggy code:
public class TestDocCount extends LuceneTestCase { public void testSimple ( ) throws Exception { Directory dir = newDirectory ( ) ; RandomIndexWriter iw = new RandomIndexWriter ( random ( ) , dir ) ; int numDocs = atLeast ( 100 ) ; for ( int i = 0 ; i < numDocs ; i ++ ) { iw . addDocument ( doc ( ) ) ; } IndexReader ir = iw . getReader ( ) ; verifyCount ( ir ) ; ir . close ( ) ; iw . forceMerge ( 1 ) ; ir = iw . getReader ( ) ; verifyCount ( ir ) ; ir . close ( ) ; <START_BUG> iw . close ( ) ; <END_BUG> dir . close ( ) ; } private Document doc ( ) { } private void verifyCount ( IndexReader ir ) throws Exception { } }

Fix:
iw . shutdown ( ) ;
Buggy code:
public class TestRingCache { private RingCache ringCache ; private Client thriftClient ; public TestRingCache ( String keyspace ) throws IOException { } private void setup ( String server , int port ) throws Exception { } public static void main ( String [ ] args ) throws Throwable { int minRow ; int maxRow ; String rowPrefix ; String keyspace = "Keyspace1" ; if ( ( args . length ) > 0 ) { keyspace = args [ 0 ] ; rowPrefix = args [ 1 ] ; minRow = Integer . parseInt ( args [ 2 ] ) ; maxRow = minRow + 1 ; } else { minRow = 1 ; maxRow = 10 ; rowPrefix = "row" ; } TestRingCache tester = new TestRingCache ( keyspace ) ; for ( int nRows = minRow ; nRows < maxRow ; nRows ++ ) { String row = rowPrefix + nRows ; ColumnPath col = new ColumnPath ( "Standard1" ) . setSuper_column ( null ) . setColumn ( "col1" . getBytes ( ) ) ; <START_BUG> List < InetAddress > endPoints = tester . ringCache . getEndPoint ( row ) ; <END_BUG> String hosts = "" ; for ( int i = 0 ; i < ( endPoints . size ( ) ) ; i ++ ) hosts = ( hosts + ( i > 0 ? "," : "" ) ) + ( endPoints . get ( i ) ) ; System . out . println ( ( ( ( ( ( "hosts<seq2seq4repair_space>with<seq2seq4repair_space>key<seq2seq4repair_space>" + row ) + "<seq2seq4repair_space>:<seq2seq4repair_space>" ) + hosts ) + ";<seq2seq4repair_space>choose<seq2seq4repair_space>" ) + ( endPoints . get ( 0 ) ) ) ) ; tester . setup ( endPoints . get ( 0 ) . getHostAddress ( ) , DatabaseDescriptor . getRpcPort ( ) ) ; tester . thriftClient . insert ( keyspace , row , col , "val1" . getBytes ( ) , 1 , ONE ) ; Column column = tester . thriftClient . get ( keyspace , row , col , ONE ) . column ; System . out . println ( ( ( ( ( ( ( ( "read<seq2seq4repair_space>row<seq2seq4repair_space>" + row ) + "<seq2seq4repair_space>" ) + ( new String ( column . name ) ) ) + ":" ) + ( new String ( column . value ) ) ) + ":" ) + ( column . timestamp ) ) ) ; } System . exit ( 1 ) ; } }

Fix:
List < InetAddress > endPoints = tester . ringCache . getEndPoint ( row . getBytes ( ) ) ;
Buggy code:
public class GoProjectModel implements TreeModelPrereqs { public String toString ( ) { <START_BUG> return Localizer . localize ( "Tree" , "Project->Package" ) ; <END_BUG> } public Object getRoot ( ) { } public void setRoot ( Object r ) { } public Object getChild ( Object parent , int index ) { } public int getChildCount ( Object parent ) { } public int getIndexOfChild ( Object parent , Object child ) { } public boolean isLeaf ( Object node ) { } public void valueForPathChanged ( TreePath path , Object newValue ) { } public void addTreeModelListener ( TreeModelListener l ) { } public void removeTreeModelListener ( TreeModelListener l ) { } public Vector getPrereqs ( ) { } public Vector getProvidedTypes ( ) { } }

Fix:
return Localizer . localize ( "Tree" , "misc.project.package" ) ;
Buggy code:
public class GraphBuilderTest extends ShiroBaseTest { @ Test public void buildNamedGraph ( ) throws IOException { ParseTreeWalker walker = new ParseTreeWalker ( ) ; Library l = new Library ( ) ; ShiroLexer lex = new ShiroLexer ( new ANTLRInputStream ( this . getClass ( ) . getResourceAsStream ( "graph_named.sro" ) ) ) ; CommonTokenStream tokens = new CommonTokenStream ( lex ) ; ShiroParser parser = new ShiroParser ( tokens ) ; parser . setBuildParseTree ( true ) ; ParseTree tree = parser . shiro ( ) ; DefinitionCollector definitionCollector = new DefinitionCollector ( ) ; walker . walk ( definitionCollector , tree ) ; l . addNodeDefs ( definitionCollector . getNodeDefinitions ( ) ) ; l . addGraphDefs ( definitionCollector . getGraphs ( ) ) ; ParseTree graph = l . getGraphDefs ( ) . get ( "box_calc" ) ; SGraph g = new SGraph ( "box_calc" ) ; ParseTreeWalker w2 = new ParseTreeWalker ( ) ; GraphBuilder graphBuilder = new GraphBuilder ( l , g ) ; w2 . walk ( graphBuilder , graph ) ; graphBuilder . setPass ( SECOND_PASS ) ; w2 . walk ( graphBuilder , graph ) ; Assert . assertEquals ( 1 , g . getNodes ( ) . size ( ) ) ; Assert . assertNotNull ( g . getNode ( "b" ) ) ; <START_BUG> Assert . assertEquals ( 9 , g . getPorts ( ) . size ( ) ) ; <END_BUG> g . evaluate ( ) ; } }

Fix:
Assert . assertEquals ( 12 , g . getPorts ( ) . size ( ) ) ;
Buggy code:
public class MultiProtocolFileSystemBrowserAdapter implements IRemoteFileSystemBrowser { IConnectContext connectContext = null ; Proxy proxy = null ; public void setConnectContextForAuthentication ( IConnectContext connectContext ) { } public void setProxy ( Proxy proxy ) { } public Namespace getDirectoryNamespace ( ) { } public IRemoteFileSystemRequest sendDirectoryRequest ( IFileID directoryID , IRemoteFileSystemListener listener ) throws RemoteFileSystemException { Assert . isNotNull ( directoryID ) ; Assert . isNotNull ( listener ) ; URL url ; try { url = directoryID . getURL ( ) ; } catch ( final MalformedURLException e ) { throw new RemoteFileSystemException ( Messages . AbstractRetrieveFileTransfer_MalformedURLException ) ; } IRemoteFileSystemBrowserContainerAdapter fileSystemBrowser = null ; fileSystemBrowser = Activator . getDefault ( ) . getBrowseFileTransfer ( url . getProtocol ( ) ) ; if ( fileSystemBrowser == null ) { if ( url . getProtocol ( ) . equalsIgnoreCase ( "file" ) ) { <START_BUG> FileSystemBrowser fsb = new FileSystemBrowser ( directoryID , url , listener ) ; <END_BUG> return fsb . sendDirectoryRequest ( ) ; } throw new RemoteFileSystemException ( NLS . bind ( MultiProtocolOutgoingAdapter_EXCEPTION_NO_PROTOCOL_HANDER , directoryID ) ) ; } return fileSystemBrowser . sendDirectoryRequest ( directoryID , listener ) ; } public Object getAdapter ( Class adapter ) { } }

Fix:
FileSystemBrowser fsb = new FileSystemBrowser ( directoryID , listener ) ;
Buggy code:
public class Applet extends WebComponent implements IResourceListener { private static final long serialVersionUID = 1L ; private Class appletInitializerClass ; private List classes = new ArrayList ( 2 ) ; public static Object byteArrayToObject ( final byte [ ] data ) { } public static byte [ ] objectToByteArray ( Object object ) { } public Applet ( final String id , final Class appletInitializerClass ) { } public Applet ( final String id , final IModel model , final Class appletInitializerClass ) { } public void addClass ( final Class c ) { } public void onResourceRequested ( ) { } protected int getHeight ( ) { } protected int getWidth ( ) { } protected void onComponentTag ( final ComponentTag tag ) { } protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { <START_BUG> replaceComponentTagBody ( markupStream , openTag , ( ( ( ( ( "\n<param<seq2seq4repair_space>name=\"component\"<seq2seq4repair_space>value=\"" + ( urlFor ( IResourceListener . class ) ) ) + "\"//>" ) + "\n<param<seq2seq4repair_space>name=\"appletInitializerClassName\"<seq2seq4repair_space>value=\"" ) + ( appletInitializerClass . getName ( ) ) ) + "\"//>\n" ) ) ; <END_BUG> } private void addAppletIntitializerClass ( final Class appletInitializerClass ) { } private byte [ ] jarClasses ( final List classes ) { } }

Fix:
replaceComponentTagBody ( markupStream , openTag , ( ( ( ( ( "\n<param<seq2seq4repair_space>name=\"modelUrl\"<seq2seq4repair_space>value=\"" + ( urlFor ( IResourceListener . class ) ) ) + "\"//>" ) + "\n<param<seq2seq4repair_space>name=\"appletInitializerClassName\"<seq2seq4repair_space>value=\"" ) + ( appletInitializerClass . getName ( ) ) ) + "\"//>\n" ) ) ;