nus-yam/ex-repair huggingface dataset:
Buggy code:
public class TransferMarketController { @ FXML TableView < MarketPlayer > marketTable ; @ FXML private TableColumn < MarketPlayer , String > nameCol ; @ FXML private TableColumn < MarketPlayer , String > pointsCol ; @ FXML private TableColumn < MarketPlayer , String > werthCol ; private ObservableList < MarketPlayer > data ; private ArrayList < Player > players ; private ArrayList < Transaction > transactions ; public TransferMarketController ( ) { } public void init ( ) { } public void addAll ( ) { } public void reloadTable ( ArrayList < Player > players ) { } public void addRow ( MarketPlayer player ) { } public void addPlayer ( ) { } public void showOffers ( ) { GridPane dialog = new GridPane ( ) ; Button but ; int index = 1 ; dialog . add ( new Label ( "player" ) , 0 , 0 ) ; dialog . add ( new Label ( "price" ) , 1 , 0 ) ; dialog . add ( new Label ( "action" ) , 2 , 0 ) ; for ( Transaction tr : transactions ) { if ( tr . isOutgoing ( ) ) { but = new Button ( "remove<seq2seq4repair_space>from<seq2seq4repair_space>market" ) ; but . setOnAction ( new EventHandler < ActionEvent > ( ) { @ Override public void handle ( ActionEvent event ) { Controller . getInstance ( ) . answerOffer ( tr , false ) ; } } ) ; } else { but = new Button ( "accept" ) ; but . setOnAction ( new EventHandler < ActionEvent > ( ) { @ Override public void handle ( ActionEvent event ) { Controller . getInstance ( ) . answerOffer ( tr , true ) ; } } ) ; } dialog . add ( new Label ( tr . getPlayer ( ) . getName ( ) ) , 0 , index ) ; <START_BUG> dialog . add ( new Label ( String . valueOf ( tr . getPrice ( ) ) ) , 1 , index ) ; <END_BUG> dialog . add ( but , 2 , index ) ; index ++ ; } Stage dialogStage = new Stage ( ) ; dialogStage . setResizable ( false ) ; dialogStage . setTitle ( "offers" ) ; dialogStage . initModality ( Modality . WINDOW_MODAL ) ; Scene scene = new Scene ( dialog ) ; dialogStage . setScene ( scene ) ; dialogStage . showAndWait ( ) ; } public void addListener ( ) { } }

Fix:
dialog . add ( new Label ( String . valueOf ( tr . getOfferedPrice ( ) ) ) , 1 , index ) ;
Buggy code:
public class Inventory implements Serializable { private static final long serialVersionUID = - 6119230175750794552L ; public transient EntityLiving owner ; public Item [ ] [ ] items = new Item [ 10 ] [ 8 ] ; public int [ ] [ ] stack = new int [ 10 ] [ 8 ] ; public Item offhandItem = null ; public int offhandStack = 0 ; public Item [ ] [ ] backPack0 = new Item [ 10 ] [ 1 ] ; public Item [ ] [ ] backPack1 = new Item [ 10 ] [ 1 ] ; public Item [ ] [ ] backPack2 = new Item [ 10 ] [ 1 ] ; public int [ ] [ ] stackPack0 = new int [ 10 ] [ 1 ] ; public int [ ] [ ] stackPack1 = new int [ 10 ] [ 1 ] ; public int [ ] [ ] stackPack2 = new int [ 10 ] [ 1 ] ; public boolean unlocked0 = false ; public boolean unlocked1 = false ; public boolean unlocked2 = false ; public ItemArmor [ ] armor = new ItemArmor [ 4 ] ; public ItemDye [ ] armorDye = new ItemDye [ armor . length ] ; public ItemAccessory [ ] accessories = new ItemAccessory [ 4 ] ; public ItemSkill [ ] skills = new ItemSkill [ 4 ] ; public int slotMax = 5 ; public Inventory ( EntityLiving e ) { } public boolean hasItem ( Item i , int min ) { } public void removeItem ( Item i , int amt ) { } public ItemAmmo getFirstAmmo ( EnumWeapon w ) { } public ItemPaint getFirstPaint ( ) { } public ItemDye getFirstDye ( ) { } public ItemWire getFirstWire ( ) { } public void addToInventory ( Item item , int s ) { if ( s <= 0 ) { return ; } Item i = item . clone ( ) ; for ( int y = 0 ; y < ( slotMax ) ; y ++ ) { for ( int x = 0 ; x < 10 ; x ++ ) { if ( ( items [ x ] [ y ] ) == null ) { items [ x ] [ y ] = i ; stack [ x ] [ y ] = s ; if ( ( stack [ x ] [ y ] ) > ( i . maxStack ) ) { int stck = ( stack [ x ] [ y ] ) - ( i . maxStack ) ; stack [ x ] [ y ] = i . maxStack ; addToInventory ( i , stck ) ; } return ; } <START_BUG> if ( ( ( items [ x ] [ y ] . id ) == ( i . id ) ) && ( s <= ( ( items [ x ] [ y ] . maxStack ) - ( stack [ x ] [ y ] ) ) ) ) { <END_BUG> int maxAmt = ( items [ x ] [ y ] . maxStack ) - ( stack [ x ] [ y ] ) ; stack [ x ] [ y ] += Math . min ( s , maxAmt ) ; if ( s > maxAmt ) { addToInventory ( i , ( s - maxAmt ) ) ; } else { return ; } } } } } public void clear ( ) { } }

Fix:
if ( ( ( items [ x ] [ y ] . toJSON ( ) ) == ( i . toJSON ( ) ) ) && ( s <= ( ( items [ x ] [ y ] . maxStack ) - ( stack [ x ] [ y ] ) ) ) ) {
Buggy code:
public class CorrelatedRandomVectorGeneratorTest extends TestCase { public CorrelatedRandomVectorGeneratorTest ( String name ) { } public void testRank ( ) { } public void testRootMatrix ( ) { } public void testMeanAndCovariance ( ) throws DimensionMismatchException { VectorialMean meanStat = new VectorialMean ( mean . length ) ; <START_BUG> VectorialCovariance covStat = new VectorialCovariance ( mean . length ) ; <END_BUG> for ( int i = 0 ; i < 5000 ; ++ i ) { double [ ] v = generator . nextVector ( ) ; meanStat . increment ( v ) ; covStat . increment ( v ) ; } double [ ] estimatedMean = meanStat . getResult ( ) ; RealMatrix estimatedCovariance = covStat . getResult ( ) ; for ( int i = 0 ; i < ( estimatedMean . length ) ; ++ i ) { assertEquals ( mean [ i ] , estimatedMean [ i ] , 0.07 ) ; for ( int j = 0 ; j <= i ; ++ j ) { assertEquals ( covariance . getEntry ( i , j ) , estimatedCovariance . getEntry ( i , j ) , ( ( 0.1 * ( 1.0 + ( Math . abs ( mean [ i ] ) ) ) ) * ( 1.0 + ( Math . abs ( mean [ j ] ) ) ) ) ) ; } } } public void setUp ( ) { } public void tearDown ( ) { } public static Test suite ( ) { } private double [ ] mean ; private RealMatrixImpl covariance ; private CorrelatedRandomVectorGenerator generator ; }

Fix:
VectorialCovariance covStat = new VectorialCovariance ( mean . length , true ) ;
Buggy code:
public class SearchClassCommandTest extends ManualSearchClassCommandTest { public void testAlternativeInputCommand ( ) throws Exception { SearchClassCommand command = getCommand ( ) ; doTest ( command ) ; <START_BUG> assertEquals ( "org.impalaframework.classloader.ModuleClassLoader" , command . getClassName ( ) ) ; <END_BUG> } protected CommandLineInputCapturer getInputCapturer ( ) { } }

Fix:
assertEquals ( "org.impalaframework.spring.resource.FileSystemResourceLoader" , command . getClassName ( ) ) ;
Buggy code:
public class ReadPhotosJob extends Logger { private List < Album > albums ; private List < Thread > threads = new ArrayList < Thread > ( ) ; private int albumIndex = - 1 ; public ReadPhotosJob ( List < Album > albums ) { } public List < Album > read ( ) throws ImageProcessingException , IOException { } private synchronized Album getNextAlbum ( ) { } private class ReadPhotosRunnable implements Runnable { @ Override public void run ( ) { Album a = getNextAlbum ( ) ; while ( a != null ) { String [ ] fileNames = a . getDir ( ) . list ( ) ; for ( int i = 0 ; i < ( fileNames . length ) ; i ++ ) { String fileName = fileNames [ i ] ; <START_BUG> info ( ( ( ( ( ( ( ( ( ( ( ( ( "Reading<seq2seq4repair_space>photo<seq2seq4repair_space>\t" + ( i + 1 ) ) + "//" ) + ( fileNames . length ) ) + "<seq2seq4repair_space>\t(" ) + ( ( albumIndex ) + 1 ) ) + "//" ) + ( albums . size ( ) ) ) + ")" ) + ":<seq2seq4repair_space>\t" ) + ( a . getTitle ( ) ) ) + "//" ) + fileName ) ) ; <END_BUG> File file = new File ( ( ( ( a . getDir ( ) . getAbsolutePath ( ) ) + "//" ) + fileName ) ) ; try { a . addPhoto ( file ) ; } catch ( ImageProcessingException | IOException e ) { error ( e . getMessage ( ) , e ) ; } } a = getNextAlbum ( ) ; } } } No newline ; at end ; of file ; }

Fix:
info ( ( ( ( ( ( ( ( ( ( ( ( ( "Read<seq2seq4repair_space>\t" + ( i + 1 ) ) + "//" ) + ( fileNames . length ) ) + "<seq2seq4repair_space>\t(" ) + ( ( albumIndex ) + 1 ) ) + "//" ) + ( albums . size ( ) ) ) + ")" ) + ":<seq2seq4repair_space>\t" ) + ( a . getTitle ( ) ) ) + "//" ) + fileName ) ) ;
Buggy code:
public final class Utils42 { public static int getTypeAsInt ( Agent agent , SQLType sqlType ) throws SQLException { if ( sqlType instanceof JDBCType ) { return ( ( JDBCType ) ( sqlType ) ) . getVendorTypeNumber ( ) ; } <START_BUG> throw new SqlException ( agent . logWriter_ , new ClientMessageId ( org . apache . derby . shared . common . reference . SQLState . DATA_TYPE_NOT_SUPPORTED ) , sqlType . toString ( ) ) . getSQLException ( ) ; <END_BUG> } }

Fix:
throw new SqlException ( agent . logWriter_ , new ClientMessageId ( org . apache . derby . shared . common . reference . SQLState . DATA_TYPE_NOT_SUPPORTED ) , sqlType ) . getSQLException ( ) ;
Buggy code:
public class ExtendedProvenanceMetric implements QualityMetric { private ConcurrentMap < String , ExtendedProvenanceMetric . Entity > entityDirectory = new ConcurrentHashMap < String , ExtendedProvenanceMetric . Entity > ( ) ; private ConcurrentMap < String , ExtendedProvenanceMetric . Activity > activityDirectory = new ConcurrentHashMap < String , ExtendedProvenanceMetric . Activity > ( ) ; private static Logger logger = LoggerFactory . getLogger ( ExtendedProvenanceMetric . class ) ; @ Override public void compute ( Quad quad ) { } private ExtendedProvenanceMetric . Entity getOrPutEntity ( String uri ) { } private ExtendedProvenanceMetric . Activity getOrPutActivity ( String uri ) { } @ Override public double metricValue ( ) { double val = 0.0 ; for ( ExtendedProvenanceMetric . Entity e : entityDirectory . values ( ) ) val += e . getBasicValue ( ) ; <START_BUG> return val // ( ( double ) ( entityDirectory . size ( ) ) ) ; <END_BUG> } @ Override public Resource getMetricURI ( ) { } @ Override public ProblemList < ? > getQualityProblems ( ) { } @ Override public boolean isEstimate ( ) { } @ Override public Resource getAgentURI ( ) { } class Entity { protected String uri = null ; protected String agent = null ; protected boolean publisherOrCreator = false ; protected List < ExtendedProvenanceMetric . Activity > activities = new ArrayList < ExtendedProvenanceMetric . Activity > ( ) ; protected double getBasicValue ( ) { } } class Activity { protected String uri = null ; protected String agent = null ; protected String datasource = null ; protected double getBasicValue ( ) { } } }

Fix:
return ( entityDirectory . size ( ) ) == 0 ? 0.0 : val // ( ( double ) ( entityDirectory . size ( ) ) ) ;
Buggy code:
public class RaAdd extends AbstractRaOperation implements OperationStepHandler { static final RaAdd INSTANCE = new RaAdd ( ) ; protected void populateModel ( ModelNode operation , ModelNode model ) { } public void execute ( OperationContext context , ModelNode operation ) { final ModelNode subModel = context . readModelForUpdate ( EMPTY_ADDRESS ) ; populateModel ( operation , subModel ) ; final ModelNode address = operation . require ( OP_ADDR ) ; final String archive = PathAddress . pathAddress ( address ) . getLastElement ( ) . getValue ( ) ; <START_BUG> operation . get ( Constants . ARCHIVE ) . set ( archive ) ; <END_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { context . addStep ( new OperationStepHandler ( ) { public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler ( ) ; ModifiableResourceAdaptors resourceAdapters = buildResourceAdaptersObject ( operation ) ; final ServiceController < ? > raService = context . getServiceRegistry ( false ) . getService ( RESOURCEADAPTERS_SERVICE ) ; ServiceController < ? > controller = null ; if ( raService == null ) { controller = serviceTarget . addService ( RESOURCEADAPTERS_SERVICE , new ResourceAdaptersService ( resourceAdapters ) ) . setInitialMode ( ACTIVE ) . addListener ( verificationHandler ) . install ( ) ; } else { ( ( ModifiableResourceAdaptors ) ( raService . getValue ( ) ) ) . addAllResourceAdapters ( resourceAdapters . getResourceAdapters ( ) ) ; } context . addStep ( verificationHandler , VERIFY ) ; if ( ( context . completeStep ( ) ) == ( ResultAction . ROLLBACK ) ) { if ( controller != null ) { context . removeService ( RESOURCEADAPTERS_SERVICE ) ; } } } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
operation . get ( Constants . ARCHIVE . getName ( ) ) . set ( archive ) ;
Buggy code:
public class Board extends JFrame { private int cellWidth = 30 ; private int cellHeight = 30 ; Board . DrawBoard drw ; public Board ( String name , ArrayList < ArrayList < Character > > map ) { } public void movePackman ( Packman packman , Packman . Moves move ) { } class DrawBoard extends JPanel { int counter = 0 ; boolean growing = true ; @ Override protected void paintComponent ( Graphics grphcs ) { grphcs . setColor ( Color . BLACK ) ; grphcs . fillRect ( 0 , 0 , getWidth ( ) , getHeight ( ) ) ; double cellWidth = ( ( getWidth ( ) ) * 1.0 ) // ( map . size ( ) ) ; double cellHeight = ( ( getHeight ( ) ) * 1.0 ) // ( map . get ( 0 ) . size ( ) ) ; for ( int i = 0 ; i < ( map . size ( ) ) ; i ++ ) { for ( int j = 0 ; j < ( map . get ( i ) . size ( ) ) ; j ++ ) { char c = map . get ( i ) . get ( j ) ; if ( c == '%' ) { grphcs . setColor ( Color . BLUE ) ; grphcs . fillRect ( ( i * ( ( int ) ( cellWidth ) ) ) , ( j * ( ( int ) ( cellHeight ) ) ) , ( ( int ) ( cellWidth ) ) , ( ( int ) ( cellHeight ) ) ) ; } else if ( c == 'P' ) { grphcs . setColor ( Color . YELLOW ) ; grphcs . fillArc ( ( i * ( ( int ) ( cellWidth ) ) ) , ( j * ( ( int ) ( cellHeight ) ) ) , ( ( int ) ( cellWidth ) ) , ( ( int ) ( cellHeight ) ) , ( 30 - ( counter ) ) , ( 300 + ( 2 * ( counter ) ) ) ) ; } else if ( c == '.' ) { grphcs . setColor ( Color . WHITE ) ; <START_BUG> grphcs . fillArc ( ( i * ( ( int ) ( cellWidth + ( cellWidth // 4 ) ) ) ) , ( j * ( ( int ) ( cellHeight + ( cellHeight // 4 ) ) ) ) , ( ( int ) ( cellWidth // 2 ) ) , ( ( ( int ) ( cellHeight ) ) // 2 ) , 0 , 360 ) ; <END_BUG> } } } if ( growing ) counter += 5 ; else counter -= 5 ; if ( ( counter ) > 30 ) growing = false ; else if ( ( counter ) < 0 ) growing = true ; } } }

Fix:
grphcs . fillArc ( ( ( i * ( ( int ) ( cellWidth ) ) ) + ( ( ( int ) ( cellWidth ) ) // 4 ) ) , ( ( j * ( ( int ) ( cellHeight ) ) ) + ( ( ( int ) ( cellHeight ) ) // 4 ) ) , ( ( int ) ( cellWidth // 2 ) ) , ( ( ( int ) ( cellHeight ) ) // 2 ) , 0 , 360 ) ;
Buggy code:
public class ApiAuthenticator implements Authenticator { private static final String TAG = ApiAuthenticator . class . getSimpleName ( ) ; final AccountManager accountManager ; final Application app ; final String authtokenType ; final String accountType ; public ApiAuthenticator ( Application application , String authtokenType , String accountType ) { } @ Override public Request authenticate ( Proxy proxy , Response response ) throws IOException { Log . d ( ApiAuthenticator . TAG , "Calling<seq2seq4repair_space>ApiAuthenticator.authenticate" ) ; if ( response . request ( ) . uri ( ) . getPath ( ) . startsWith ( "//oauth" ) ) return null ; <START_BUG> Account account = AuthUtils . getActiveAccount ( app ) ; <END_BUG> String oldToken = accountManager . peekAuthToken ( account , authtokenType ) ; if ( oldToken != null ) { Log . d ( ApiAuthenticator . TAG , "Invalidating<seq2seq4repair_space>auth<seq2seq4repair_space>token." ) ; accountManager . invalidateAuthToken ( accountType , oldToken ) ; } try { Log . d ( ApiAuthenticator . TAG , "calling<seq2seq4repair_space>accountManager.blockingGetAuthToken" ) ; String token = accountManager . blockingGetAuthToken ( account , authtokenType , false ) ; if ( token == null ) { accountManager . removeAccount ( account , null , null ) ; } else { return response . request ( ) . newBuilder ( ) . header ( "Authorization" , ( "Bearer<seq2seq4repair_space>" + token ) ) . build ( ) ; } } catch ( Exception e ) { Log . e ( ApiAuthenticator . TAG , "Failed<seq2seq4repair_space>to<seq2seq4repair_space>retrieve<seq2seq4repair_space>auth<seq2seq4repair_space>token." , e ) ; } return null ; } @ Override public Request authenticateProxy ( Proxy proxy , Response response ) throws IOException { } }

Fix:
Account account = AuthUtils . getActiveAccount ( app , accountType ) ;
Buggy code:
public class Node implements Comparable < Node > { private Point coor ; private Node lastNode ; private float fromB ; private float toE ; public Node ( Point p , Node lastNode , float fromB , float toE ) { } public Point getCoor ( ) { } public float getTotal ( ) { } public Node getFirst ( ) { Node temp = this ; <START_BUG> while ( ( this . lastNode ) != null ) { <END_BUG> temp = temp . lastNode ; } return temp ; } @ Override public int compareTo ( Node o ) { } }

Fix:
while ( ( temp . lastNode ) != null ) {
Buggy code:
public class DoStatement extends Statement { public Expression condition ; public Statement action ; private Label breakLabel ; private Label continueLabel ; int mergedInitStateIndex = - 1 ; public DoStatement ( Expression condition , Statement action , int s , int e ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { breakLabel = new Label ( ) ; continueLabel = new Label ( ) ; LoopingFlowContext loopingContext = new LoopingFlowContext ( flowContext , this , breakLabel , continueLabel , currentScope ) ; Constant cst = condition . constant ; boolean isConditionTrue = ( cst != ( NotAConstant ) ) && ( ( cst . booleanValue ( ) ) == true ) ; cst = condition . optimizedBooleanConstant ( ) ; boolean isConditionOptimizedTrue = ( cst != ( NotAConstant ) ) && ( ( cst . booleanValue ( ) ) == true ) ; boolean isConditionOptimizedFalse = ( cst != ( NotAConstant ) ) && ( ( cst . booleanValue ( ) ) == false ) ; int previousMode = flowInfo . reachMode ( ) ; if ( ( ( action ) != null ) && ( ! ( action . isEmptyBlock ( ) ) ) ) { flowInfo = action . analyseCode ( currentScope , loopingContext , flowInfo ) ; if ( ( ! ( flowInfo . isReachable ( ) ) ) && ( ! ( loopingContext . initsOnContinue . isReachable ( ) ) ) ) { continueLabel = null ; } } flowInfo . setReachMode ( previousMode ) ; flowInfo = condition . analyseCode ( currentScope , loopingContext , ( ( action ) == null ? flowInfo : flowInfo . mergedWith ( loopingContext . initsOnContinue ) ) ) ; if ( ( ! isConditionOptimizedFalse ) && ( ( continueLabel ) != null ) ) { loopingContext . complainOnFinalAssignmentsInLoop ( currentScope , flowInfo ) ; } <START_BUG> FlowInfo mergedInfo = FlowInfo . mergedOptimizedBranches ( loopingContext . initsOnBreak , isConditionOptimizedTrue , flowInfo . initsWhenFalse ( ) , isConditionOptimizedFalse , ( ! isConditionTrue ) ) ; <END_BUG> mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( mergedInfo ) ; return mergedInfo ; } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resetStateForCodeGeneration ( ) { } public void resolve ( BlockScope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
FlowInfo mergedInfo = FlowInfo . mergedOptimizedBranches ( loopingContext . initsOnBreak , isConditionOptimizedTrue , flowInfo . initsWhenFalse ( ) , false , ( ! isConditionTrue ) ) ;
Buggy code:
class TimeFilter implements IFilter { private long timeLimit_ ; private boolean isDone_ ; TimeFilter ( long timeLimit ) { } public ColumnFamily filter ( String cf , ColumnFamily columnFamily ) { if ( columnFamily == null ) return columnFamily ; String [ ] values = RowMutation . getColumnAndColumnFamily ( cf ) ; ColumnFamily filteredCf = new ColumnFamily ( columnFamily . name ( ) , columnFamily . type ( ) ) ; if ( ( ( values . length ) == 1 ) && ( ! ( columnFamily . isSuper ( ) ) ) ) { Collection < IColumn > columns = columnFamily . getAllColumns ( ) ; int i = 0 ; for ( IColumn column : columns ) { if ( ( column . timestamp ( ) ) >= ( timeLimit_ ) ) { filteredCf . addColumn ( column ) ; ++ i ; } else { break ; } } if ( i < ( columns . size ( ) ) ) { isDone_ = true ; } } else if ( ( ( values . length ) == 2 ) && ( columnFamily . isSuper ( ) ) ) { Collection < IColumn > columns = columnFamily . getAllColumns ( ) ; for ( IColumn column : columns ) { SuperColumn superColumn = ( ( SuperColumn ) ( column ) ) ; SuperColumn filteredSuperColumn = new SuperColumn ( superColumn . name ( ) ) ; filteredCf . addColumn ( filteredSuperColumn ) ; Collection < IColumn > subColumns = superColumn . getSubColumns ( ) ; int i = 0 ; for ( IColumn subColumn : subColumns ) { if ( ( subColumn . timestamp ( ) ) >= ( timeLimit_ ) ) { <START_BUG> filteredSuperColumn . addColumn ( subColumn . name ( ) , subColumn ) ; <END_BUG> ++ i ; } else { break ; } } if ( i < ( filteredSuperColumn . getColumnCount ( ) ) ) { isDone_ = true ; } } } else { throw new UnsupportedOperationException ( ) ; } return filteredCf ; } public IColumn filter ( IColumn column , DataInputStream dis ) throws IOException { } public boolean isDone ( ) { } public DataInputBuffer next ( String key , String cfName , SSTable ssTable ) throws IOException { } }

Fix:
filteredSuperColumn . addColumn ( subColumn ) ;
Buggy code:
public class DistributableSession extends AbstractDistributableSession < Session < LocalSessionContext > > { private static final String AUTHENTICATED_SESSION_ATTRIBUTE_NAME = ( CachedAuthenticatedSessionHandler . class . getName ( ) ) + ".AuthenticatedSession" ; private final UndertowSessionManager manager ; private volatile Map . Entry < Session < LocalSessionContext > , SessionConfig > entry ; private final Batch batch ; public DistributableSession ( UndertowSessionManager manager , Session < LocalSessionContext > session , SessionConfig config , Batch batch ) { } @ Override public SessionManager getSessionManager ( ) { } @ Override protected Session < LocalSessionContext > getSession ( ) { } @ Override public void requestDone ( HttpServerExchange exchange ) { } @ Override public void setMaxInactiveInterval ( int interval ) { } @ Override public Object getAttribute ( String name ) { } @ Override public Object setAttribute ( String name , Object value ) { } @ Override public Object removeAttribute ( String name ) { } @ Override public void invalidate ( HttpServerExchange exchange ) { } @ Override public String changeSessionId ( HttpServerExchange exchange , SessionConfig config ) { Session < LocalSessionContext > oldSession = this . getSession ( ) ; SessionManager < LocalSessionContext > manager = this . manager . getSessionManager ( ) ; <START_BUG> String id = manager . createSessionId ( ) ; <END_BUG> Session < LocalSessionContext > newSession = manager . createSession ( id ) ; for ( String name : oldSession . getAttributes ( ) . getAttributeNames ( ) ) { newSession . getAttributes ( ) . setAttribute ( name , oldSession . getAttributes ( ) . getAttribute ( name ) ) ; } newSession . getMetaData ( ) . setMaxInactiveInterval ( oldSession . getMetaData ( ) . getMaxInactiveInterval ( java . util . concurrent . TimeUnit . MILLISECONDS ) , java . util . concurrent . TimeUnit . MILLISECONDS ) ; newSession . getMetaData ( ) . setLastAccessedTime ( oldSession . getMetaData ( ) . getLastAccessedTime ( ) ) ; newSession . getLocalContext ( ) . setAuthenticatedSession ( oldSession . getLocalContext ( ) . getAuthenticatedSession ( ) ) ; config . setSessionId ( exchange , id ) ; this . entry = new java . util . AbstractMap . SimpleImmutableEntry ( newSession , config ) ; oldSession . invalidate ( ) ; return id ; } }

Fix:
String id = manager . createIdentifier ( ) ;
Buggy code:
public class JsonpTransportHandler extends AbstractHttpReceivingTransportHandler { @ Override public TransportType getTransportType ( ) { } @ Override public void handleRequestInternal ( ServerHttpRequest request , ServerHttpResponse response , SockJsSessionSupport sockJsSession ) throws Exception { if ( APPLICATION_FORM_URLENCODED . equals ( request . getHeaders ( ) . getContentType ( ) ) ) { if ( ( request . getQueryParams ( ) . getFirst ( "d" ) ) == null ) { response . setStatusCode ( INTERNAL_SERVER_ERROR ) ; response . getBody ( ) . write ( "Payload<seq2seq4repair_space>expected." . getBytes ( "UTF-8" ) ) ; return ; } } <START_BUG> super . handleRequest ( request , response , sockJsSession ) ; <END_BUG> response . getBody ( ) . write ( "ok" . getBytes ( "UTF-8" ) ) ; } @ Override protected String [ ] readMessages ( ServerHttpRequest request ) throws IOException { } @ Override protected HttpStatus getResponseStatus ( ) { } }

Fix:
super . handleRequestInternal ( request , response , sockJsSession ) ;
Buggy code:
@ SuppressWarnings ( "ThrowableResultOfMethodCallIgnored" ) final class Worker < T > { private final MessageRepository repository ; private final Throttler throttler ; private final Monitors monitors ; private final T message ; private final MessageConsumer < T > consumer ; private final KeepAlive keepAlive ; private final Clock clock = new Clock . SystemClock ( ) ; private MessageProcessingUpdate < T > update ; public Worker ( MessageRepository repository , Throttler throttler , Monitors monitors , MessageProcessingUpdate < T > update , T message ) { } public void consume ( ) throws InterruptedException , Worker . MessageUpdateConflict { } private synchronized boolean notReachedMaxRetries ( ) { <START_BUG> return ( update . getRetries ( ) ) <= ( consumer . maxRetries ) ; <END_BUG> } private synchronized void notifyOnWorkerStart ( ) { } private Exception tryToConsume ( ) { } private synchronized void keepAlive ( ) { } private synchronized void retry ( Exception e ) throws InterruptedException { } private synchronized void failed ( Exception e ) { } private synchronized void completed ( ) { } private void updateRepo ( MessageProcessingUpdate < T > update ) { } private KeepAlive createKeepAlive ( ) { } static class MessageUpdateConflict extends RuntimeException { final MessageProcessingUpdate < ? > update ; MessageUpdateConflict ( MessageProcessingUpdate < ? > update ) { } } }

Fix:
return ( ( consumer . maxRetries ) >= 0 ) && ( ( update . getRetries ( ) ) < ( consumer . maxRetries ) ) ;
Buggy code:
public class Finalize { static Category CAT = Category . getInstance ( Finalize . class . getName ( ) ) ; public static void main ( String [ ] argv ) { } static void Usage ( String msg ) { } static void init ( String configFile ) { } static void test ( ) { } static void foo ( Category cat ) { } static void delay ( int amount ) { try { <START_BUG> Thread . currentThread ( ) . sleep ( amount ) ; <END_BUG> } catch ( Exception e ) { } } }

Fix:
Thread . sleep ( amount ) ;
Buggy code:
@ Entity @ Table ( name = "bsm_service" ) @ Inheritance ( strategy = InheritanceType . SINGLE_TABLE ) public class BusinessService { private Long m_id ; private String m_name ; private Map < String , String > m_attributes = Maps . newLinkedHashMap ( ) ; private Set < OnmsMonitoredService > m_ipServices = Sets . newLinkedHashSet ( ) ; private Set < String > m_reductionKeys = Sets . newLinkedHashSet ( ) ; @ Id @ SequenceGenerator ( name = "opennmsSequence" , sequenceName = "opennmsNxtId" ) @ GeneratedValue ( generator = "opennmsSequence" ) @ Column ( name = "id" , nullable = false ) public Long getId ( ) { } public void setId ( Long id ) { } @ Column ( name = "name" , nullable = false ) public String getName ( ) { } public void setName ( String name ) { } @ ElementCollection @ JoinTable ( name = "bsm_service_attributes" , joinColumns = @ JoinColumn ( name = "bsm_service_id" , referencedColumnName = "id" ) ) @ MapKeyColumn ( name = "key" ) @ Column ( name = "value" , nullable = false ) public Map < String , String > getAttributes ( ) { } public void setAttributes ( Map < String , String > attributes ) { } public void setAttribute ( String key , String value ) { } public String removeAttribute ( String key ) { } @ OneToMany ( fetch = FetchType . LAZY ) @ JoinTable ( name = "bsm_service_ifservices" , joinColumns = @ JoinColumn ( name = "bsm_service_id" , referencedColumnName = "id" ) , inverseJoinColumns = @ JoinColumn ( name = "ifserviceid" ) ) public Set < OnmsMonitoredService > getIpServices ( ) { } public void setIpServices ( Set < OnmsMonitoredService > ipServices ) { } public void addIpService ( OnmsMonitoredService ipService ) { } public void removeIpService ( OnmsMonitoredService ipService ) { } @ Transient private Set < Integer > getIpServiceIds ( ) { } @ ElementCollection @ JoinTable ( name = "bsm_service_reductionkeys" , joinColumns = @ JoinColumn ( name = "bsm_service_id" , referencedColumnName = "id" ) ) @ Column ( name = "reductionkey" , nullable = false ) public Set < String > getReductionKeys ( ) { } public void setReductionKeys ( Set < String > m_reductionKeys ) { } public void addReductionKey ( String reductionKey ) { } public void addReductionKeys ( Set < String > reductionKeys ) { } @ Transient public Set < String > getAllReductionKeys ( ) { Set < String > allReductionKeys = Sets . newHashSet ( ) ; for ( OnmsMonitoredService ipService : getIpServices ( ) ) { <START_BUG> allReductionKeys . addAll ( ipService . getReductionKeys ( ) ) ; <END_BUG> } allReductionKeys . addAll ( getReductionKeys ( ) ) ; return allReductionKeys ; } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } }

Fix:
allReductionKeys . addAll ( OnmsMonitoredServiceHelper . getReductionKeys ( ipService ) ) ;
Buggy code:
public abstract class AjaxFormChoiceComponentUpdatingBehavior extends AbstractDefaultAjaxBehavior { private static final long serialVersionUID = 1L ; public AjaxFormChoiceComponentUpdatingBehavior ( ) { } @ Override public void renderHead ( IHeaderResponse response ) { super . renderHead ( response ) ; AppendingStringBuffer asb = new AppendingStringBuffer ( ) ; asb . append ( "function<seq2seq4repair_space>attachChoiceHandlers(markupId,<seq2seq4repair_space>callbackScript)<seq2seq4repair_space>{\n" ) ; asb . append ( "<seq2seq4repair_space>var<seq2seq4repair_space>inputNodes<seq2seq4repair_space>=<seq2seq4repair_space>wicketGet(markupId).getElementsByTagName(\'input\');\n" ) ; asb . append ( "<seq2seq4repair_space>for<seq2seq4repair_space>(var<seq2seq4repair_space>i<seq2seq4repair_space>=<seq2seq4repair_space>0<seq2seq4repair_space>;<seq2seq4repair_space>i<seq2seq4repair_space><<seq2seq4repair_space>inputNodes.length<seq2seq4repair_space>;<seq2seq4repair_space>i<seq2seq4repair_space>++)<seq2seq4repair_space>{\n" ) ; asb . append ( "<seq2seq4repair_space>var<seq2seq4repair_space>inputNode<seq2seq4repair_space>=<seq2seq4repair_space>inputNodes[i];\n" ) ; asb . append ( "<seq2seq4repair_space>if<seq2seq4repair_space>(!inputNode.type)<seq2seq4repair_space>continue;\n" ) ; <START_BUG> asb . append ( "<seq2seq4repair_space>if<seq2seq4repair_space>(!(inputNode.className.indexOf(\'wicket-\'+markupId)===0))<seq2seq4repair_space>continue;\n" ) ; <END_BUG> asb . append ( "<seq2seq4repair_space>var<seq2seq4repair_space>inputType<seq2seq4repair_space>=<seq2seq4repair_space>inputNode.type.toLowerCase();\n" ) ; asb . append ( "<seq2seq4repair_space>if<seq2seq4repair_space>(inputType<seq2seq4repair_space>==<seq2seq4repair_space>\'checkbox\'<seq2seq4repair_space>||<seq2seq4repair_space>inputType<seq2seq4repair_space>==<seq2seq4repair_space>\'radio\')<seq2seq4repair_space>{\n" ) ; asb . append ( "<seq2seq4repair_space>Wicket.Event.add(inputNode,<seq2seq4repair_space>\'click\',<seq2seq4repair_space>callbackScript);\n" ) ; asb . append ( "<seq2seq4repair_space>}\n" ) ; asb . append ( "<seq2seq4repair_space>}\n" ) ; asb . append ( "}\n" ) ; response . renderJavascript ( asb , "attachChoice" ) ; response . renderOnLoadJavascript ( ( ( ( ( "attachChoiceHandlers('" + ( getComponent ( ) . getMarkupId ( ) ) ) + "',<seq2seq4repair_space>function()<seq2seq4repair_space>{" ) + ( getEventHandler ( ) ) ) + "});" ) ) ; } protected abstract void onUpdate ( AjaxRequestTarget target ) { } protected void onError ( AjaxRequestTarget target , RuntimeException e ) { } @ Override protected void onBind ( ) { } protected final FormComponent < ? > getFormComponent ( ) { } protected final CharSequence getEventHandler ( ) { } @ Override protected final void respond ( final AjaxRequestTarget target ) { } }

Fix:
asb . append ( "<seq2seq4repair_space>if<seq2seq4repair_space>(!(inputNode.className.indexOf(\'wicket-\'+markupId)===0)&&!(inputNode.id.indexOf(markupId+\'-\')===0))<seq2seq4repair_space>continue;\n" ) ;
Buggy code:
public class XMPPBot extends Bot { private XMPPConnection xmppConnection ; private BotManager botManager ; private Chat chat ; private String trustedSender ; private String receiver ; private boolean forwardMessages ; public XMPPBot ( ConfigurationManager configuration , BotManager botManager ) throws IOException , IrcException , NickAlreadyInUseException , XMPPException { } protected void onMessage ( String channel , String sender , String login , String hostname , String message ) { if ( message . equalsIgnoreCase ( "time" ) ) { String time = new Date ( ) . toString ( ) ; botManager . sendMessage ( channel , ( ( sender + ":<seq2seq4repair_space>The<seq2seq4repair_space>time<seq2seq4repair_space>is<seq2seq4repair_space>now<seq2seq4repair_space>" ) + time ) ) ; } else if ( message . equalsIgnoreCase ( "!help" ) ) { botManager . sendMessage ( channel , ( ( sender + ":<seq2seq4repair_space>I<seq2seq4repair_space>am<seq2seq4repair_space>twibot.<seq2seq4repair_space>" ) + "I<seq2seq4repair_space>log<seq2seq4repair_space>everything<seq2seq4repair_space>that<seq2seq4repair_space>is<seq2seq4repair_space>being<seq2seq4repair_space>said<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>channel<seq2seq4repair_space>and<seq2seq4repair_space>post<seq2seq4repair_space>it<seq2seq4repair_space>to<seq2seq4repair_space>twitter." ) ) ; } else if ( ( message . equalsIgnoreCase ( "!stop" ) ) && ( sender . startsWith ( trustedSender ) ) ) { forwardMessages = false ; botManager . sendMessage ( channel , "Stopped<seq2seq4repair_space>forwarding<seq2seq4repair_space>messages." ) ; } else if ( ( message . equalsIgnoreCase ( "!start" ) ) && ( sender . startsWith ( trustedSender ) ) ) { forwardMessages = true ; botManager . sendMessage ( channel , "Resumed<seq2seq4repair_space>forwarding<seq2seq4repair_space>messages." ) ; } else { try { <START_BUG> if ( ( forwardMessages ) && ( sender . startsWith ( trustedSender ) ) ) <END_BUG> chat . sendMessage ( ( ( ( "<" + sender ) + "><seq2seq4repair_space>" ) + message ) ) ; } catch ( Exception e ) { System . err . println ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>send<seq2seq4repair_space>XMPP<seq2seq4repair_space>message." ) ; e . printStackTrace ( ) ; } } } private Bot getThis ( ) { } private class MessageParrot implements MessageListener { private Message msg ; MessageParrot ( ) { } public void processMessage ( Chat chat , Message message ) { } } @ Override protected void onPrivateMessage ( String sender , String login , String hostname , String message ) { } @ Override protected void onJoin ( String channel , String sender , String login , String hostname ) { } @ Override protected void onPart ( String channel , String sender , String login , String hostname ) { } @ Override protected void onQuit ( String sourceNick , String sourceLogin , String sourceHostname , String reason ) { } }

Fix:
if ( ( forwardMessages ) && ( ! ( sender . startsWith ( trustedSender ) ) ) )
Buggy code:
public class StartState extends BasicGameState { private MainGame mainGame ; private Button playButton ; private Button play2Button ; private Button optionsButton ; private Button quitButton ; private static final int LOGO_X = 160 ; private static final int LOGO_Y = 110 ; private static final int SEPARATOR_X = 164 ; private static final int SEPARATOR_Y = 190 ; private static final int BOTTOM_TEXT_OFFSET_X = 250 ; private static final int BOTTOM_TEXT_OFFSET_Y = 75 ; private static final int BUTTON_WIDTH = 1000 ; private static final int BUTTON_HEIGHT = 50 ; private static final int BUTTON_X = 150 ; private static final int PLAYBUTTON_Y = 225 ; private static final int PLAYBUTTON2_Y = 275 ; private static final int OPTIONSBUTTON_Y = 325 ; private static final int QUITBUTTON_Y = 375 ; private static final int MOUSE_OVER_RECT_X = 500 ; public StartState ( MainGame mainGame ) { } public void init ( GameContainer container , StateBasedGame arg1 ) throws SlickException { } @ Override public void enter ( GameContainer container , StateBasedGame arg1 ) throws SlickException { } public void exit ( GameContainer container , StateBasedGame sbg , int delta ) { if ( mainGame . getShouldSwitchState ( ) ) { if ( ( RND . getOpacity ( ) ) > 0.0F ) { int fadeTimer = mainGame . getOpacityFadeTimer ( ) ; if ( ( mainGame . getSwitchState ( ) ) == ( - 1 ) ) { fadeTimer = ( ( 2 * 2 ) * 2 ) * fadeTimer ; } RND . setOpacity ( ( ( RND . getOpacity ( ) ) - ( ( ( float ) ( delta ) ) // fadeTimer ) ) ) ; } else { if ( ( mainGame . getSwitchState ( ) ) == ( - 1 ) ) { <START_BUG> mainGame . closeRequested ( ) ; <END_BUG> } else { sbg . enterState ( mainGame . getSwitchState ( ) ) ; } } } } public void update ( GameContainer container , StateBasedGame sbg , int delta ) throws SlickException { } public void render ( GameContainer container , StateBasedGame arg1 , Graphics graphics ) throws SlickException { } private void renderButtons ( GameContainer container , Graphics graphics ) { } @ Override public int getID ( ) { } public MainGame getMainGame ( ) { } }

Fix:
System . exit ( 0 ) ;
Buggy code:
class GenomicCoordinate implements Comparable < GenomicCoordinate > { private String chr ; private int pos ; public GenomicCoordinate ( String chr , int pos ) { } @ Override public int compareTo ( GenomicCoordinate other ) { if ( this . onSameChromosome ( other ) ) { if ( ( this . pos ) < ( other . pos ) ) return - 1 ; if ( ( this . pos ) > ( other . pos ) ) return 1 ; <START_BUG> return 0 ; <END_BUG> } return compareChromosomes ( other ) ; } public String getChr ( ) { } public int getPos ( ) { } public boolean onSameChromosome ( GenomicCoordinate other ) { } public int distanceTo ( GenomicCoordinate other ) { } @ Override public String toString ( ) { } private int compareChromosomes ( GenomicCoordinate other ) { } No newline ; at end ; of file ; }

Fix:
return this . chr . compareTo ( other . chr ) ;
Buggy code:
public class CoolBar extends Composite { Control [ ] children ; CoolItem [ ] items ; int parentingHandle ; int itemCount ; int childCount ; static boolean IsVertical ; public CoolBar ( Composite parent , int style ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } void addChild ( Control widget ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } void createItem ( CoolItem item , int index ) { } void createWidget ( ) { } int defaultBackground ( ) { <START_BUG> return OS . Colors_Transparent ( ) ; <END_BUG> } void deregister ( ) { } void destroyItem ( CoolItem item ) { } Control [ ] _getChildren ( ) { } int [ ] logicalToVisualIndices ( ) { } public CoolItem getItem ( int index ) { } public int getItemCount ( ) { } public int [ ] getItemOrder ( ) { } public CoolItem [ ] getItems ( ) { } public Point [ ] getItemSizes ( ) { } Point getLocation ( Control child ) { } public boolean getLocked ( ) { } public int [ ] getWrapIndices ( ) { } void HandleSizeChanged ( int sender , int e ) { } void hookEvents ( ) { } public int indexOf ( CoolItem item ) { } int parentingHandle ( ) { } void register ( ) { } void releaseChildren ( boolean destroy ) { } void releaseHandle ( ) { } void removeChild ( Control control ) { } void removeControl ( Control control ) { } int setBounds ( int x , int y , int width , int height , int flags ) { } public void setItemLayout ( int [ ] itemOrder , int [ ] wrapIndices , Point [ ] sizes ) { } void setItemOrder ( int [ ] itemOrder ) { } void setItemSizes ( Point [ ] sizes ) { } public void setLocked ( boolean locked ) { } public void setWrapIndices ( int [ ] indices ) { } int topHandle ( ) { } }

Fix:
return OS . Colors_Transparent ;
Buggy code:
public class Java extends Task { private CommandlineJava cmdl = new CommandlineJava ( ) ; private boolean fork = false ; private File dir = null ; private PrintStream outStream = null ; private boolean failOnError = false ; private File out ; public void setClassname ( String s ) throws TaskException { } public void setClasspath ( Path s ) throws TaskException { } public void setDir ( File d ) { } public void setFailonerror ( boolean fail ) { } public void setFork ( boolean s ) { } public void setJar ( File jarfile ) throws TaskException { } public void setJvm ( String s ) { } public void setMaxmemory ( String max ) { } public void setOutput ( File out ) { } public void addSysproperty ( EnvironmentVariable sysp ) { } public void clearArgs ( ) { } public Argument createArg ( ) { } public Path createClasspath ( ) throws TaskException { <START_BUG> return cmdl . createClasspath ( getProject ( ) ) . createPath ( ) ; <END_BUG> } public Argument createJvmarg ( ) { } public void execute ( ) throws TaskException { } public int executeJava ( ) throws TaskException { } protected void handleErrorOutput ( String line ) { } protected void handleOutput ( String line ) { } protected void run ( String classname , ArrayList args ) throws TaskException { } private void run ( CommandlineJava command ) throws TaskException { } private int run ( String [ ] command ) throws TaskException { } }

Fix:
return cmdl . createClasspath ( ) . createPath ( ) ;
Buggy code:
public class RadioChoice extends AbstractSingleSelectChoice implements IOnChangeListener { private static final long serialVersionUID = 1L ; private class SuffixChange extends Change { private static final long serialVersionUID = 1L ; final String prevSuffix ; SuffixChange ( String prevSuffix ) { } public void undo ( ) { } public String toString ( ) { } } private class PrefixChange extends Change { private static final long serialVersionUID = 1L ; private final String prevPrefix ; PrefixChange ( String prevSuffix ) { } public void undo ( ) { } public String toString ( ) { } } private String prefix = "" ; private String suffix = "<br<seq2seq4repair_space>//>\n" ; public RadioChoice ( final String id ) { } public RadioChoice ( final String id , final List choices ) { } public RadioChoice ( final String id , final List choices , final IChoiceRenderer renderer ) { } public RadioChoice ( final String id , IModel model , final List choices ) { } public RadioChoice ( final String id , IModel model , final List choices , final IChoiceRenderer renderer ) { } public RadioChoice ( String id , IModel choices ) { } public RadioChoice ( String id , IModel model , IModel choices ) { } public RadioChoice ( String id , IModel choices , IChoiceRenderer renderer ) { } public RadioChoice ( String id , IModel model , IModel choices , IChoiceRenderer renderer ) { } protected void onComponentTag ( ComponentTag tag ) { } public void onSelectionChanged ( ) { <START_BUG> convert ( ) ; <END_BUG> updateModel ( ) ; onSelectionChanged ( getModelObject ( ) ) ; } protected void onSelectionChanged ( Object newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } protected boolean getStatelessHint ( ) { } public final String getPrefix ( ) { } public final RadioChoice setPrefix ( String prefix ) { } public final String getSuffix ( ) { } public final RadioChoice setSuffix ( String suffix ) { } protected final void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } }

Fix:
convertInput ( ) ;
Buggy code:
public class Browser extends Composite { WebBrowser webBrowser ; int userStyle ; boolean isClosing ; static final String PACKAGE_PREFIX = "org.eclipse.swt.browser." ; static final String NO_INPUT_METHOD = "org.eclipse.swt.internal.gtk.noInputMethod" ; public Browser ( Composite parent , int style ) { } static Composite checkParent ( Composite parent ) { } static int checkStyle ( int style ) { } protected void checkWidget ( ) { } public static void clearSessions ( ) { } public static String getCookie ( String name , String url ) { } public static boolean setCookie ( String value , String url ) { if ( value == null ) SWT . error ( ERROR_NULL_ARGUMENT ) ; if ( url == null ) SWT . error ( ERROR_NULL_ARGUMENT ) ; <START_BUG> return WebBrowser . SetCookie ( value , url ) ; <END_BUG> } public void addAuthenticationListener ( AuthenticationListener listener ) { } public void addCloseWindowListener ( CloseWindowListener listener ) { } public void addLocationListener ( LocationListener listener ) { } public void addOpenWindowListener ( OpenWindowListener listener ) { } public void addProgressListener ( ProgressListener listener ) { } public void addStatusTextListener ( StatusTextListener listener ) { } public void addTitleListener ( TitleListener listener ) { } public void addVisibilityWindowListener ( VisibilityWindowListener listener ) { } public boolean back ( ) { } protected void checkSubclass ( ) { } public boolean execute ( String script ) { } public boolean close ( ) { } public Object evaluate ( String script ) throws SWTException { } public boolean forward ( ) { } public String getBrowserType ( ) { } public boolean getJavascriptEnabled ( ) { } public int getStyle ( ) { } public String getText ( ) { } public String getUrl ( ) { } public Object getWebBrowser ( ) { } public boolean isBackEnabled ( ) { } public boolean isFocusControl ( ) { } public boolean isForwardEnabled ( ) { } public void refresh ( ) { } public void removeAuthenticationListener ( AuthenticationListener listener ) { } public void removeCloseWindowListener ( CloseWindowListener listener ) { } public void removeLocationListener ( LocationListener listener ) { } public void removeOpenWindowListener ( OpenWindowListener listener ) { } public void removeProgressListener ( ProgressListener listener ) { } public void removeStatusTextListener ( StatusTextListener listener ) { } public void removeTitleListener ( TitleListener listener ) { } public void removeVisibilityWindowListener ( VisibilityWindowListener listener ) { } public void setJavascriptEnabled ( boolean enabled ) { } public boolean setText ( String html ) { } public boolean setUrl ( String url ) { } public boolean setUrl ( String url , String postData , String [ ] headers ) { } public void stop ( ) { } }

Fix:
return WebBrowser . SetCookie ( value , url , true ) ;
Buggy code:
public class PlayerDestination implements MVDestination { private String player ; private boolean isValid ; private JavaPlugin plugin ; @ Override public String getIdentifier ( ) { } @ Override public boolean isThisType ( JavaPlugin plugin , String destination ) { } @ Override public Location getLocation ( Entity e ) { Player p = plugin . getServer ( ) . getPlayer ( this . player ) ; Player plLoc = null ; if ( e instanceof Player ) { plLoc = ( ( Player ) ( e ) ) ; } else if ( ( e . getPassenger ( ) ) instanceof Player ) { plLoc = ( ( Player ) ( e . getPassenger ( ) ) ) ; } <START_BUG> if ( ( ( p != null ) && ( plLoc != null ) ) && ( ! ( plLoc . getName ( ) . equalsIgnoreCase ( p . getName ( ) ) ) ) ) { <END_BUG> return p . getLocation ( ) ; } return null ; } @ Override public boolean isValid ( ) { } @ Override public void setDestination ( JavaPlugin plugin , String destination ) { } @ Override public String getType ( ) { } @ Override public String getName ( ) { } @ Override public String toString ( ) { } @ Override public String getRequiredPermission ( ) { } public Vector getVelocity ( ) { } @ Override public boolean useSafeTeleporter ( ) { } }

Fix:
if ( ( p != null ) && ( plLoc != null ) ) {