nus-yam/ex-repair huggingface dataset:
Buggy code:
public class LibRec { protected static String version = "1.4" ; public static boolean isMeasuresOnly = false ; protected static String tempDirPath = ".//Results//" ; protected FileConfiger cf ; protected List < String > configFiles ; protected String algorithm ; protected float binThold ; protected int [ ] columns ; protected TimeUnit timeUnit ; protected DataDAO rateDao ; protected LineConfiger ratingOptions ; protected LineConfiger outputOptions ; protected SparseMatrix rateMatrix ; protected SparseMatrix timeMatrix ; protected void execute ( String [ ] args ) throws Exception { } protected void readData ( ) throws Exception { } protected void preset ( String configFile ) throws Exception { } public static void main ( String [ ] args ) { } protected void cmdLine ( String [ ] args ) throws Exception { } private void writeMatrix ( SparseMatrix data , String filePath ) throws Exception { } protected void runAlgorithm ( ) throws Exception { } private void runCrossValidation ( LineConfiger params ) throws Exception { } private void runLeaveOneOut ( LineConfiger params ) throws Exception { } private void printEvalInfo ( Recommender algo , Map < Measure , Double > ms ) throws Exception { String result = Recommender . getEvalInfo ( ms ) ; String time = String . format ( "'%s','%s'" , Dates . parse ( ms . get ( TrainTime ) . longValue ( ) ) , Dates . parse ( ms . get ( TestTime ) . longValue ( ) ) ) ; String evalInfo = String . format ( "%s,%s,,%s,%s%s" , algo . algoName , result , algo . toString ( ) , time , ( outputOptions . contains ( "--measures-only" ) ? "" : "\n" ) ) ; Logs . info ( evalInfo ) ; if ( outputOptions . contains ( "--to-clipboard" ) ) { Strings . toClipboard ( evalInfo ) ; Logs . debug ( "Have<seq2seq4repair_space>been<seq2seq4repair_space>copied<seq2seq4repair_space>to<seq2seq4repair_space>clipboard!" ) ; } if ( outputOptions . contains ( "--to-file" ) ) { <START_BUG> String filePath = outputOptions . getString ( "--to-file" ) ; <END_BUG> FileIO . writeString ( filePath , evalInfo , true ) ; Logs . debug ( "Have<seq2seq4repair_space>been<seq2seq4repair_space>collected<seq2seq4repair_space>to<seq2seq4repair_space>file:<seq2seq4repair_space>{}" , filePath ) ; } } protected void notifyMe ( String attachment ) throws Exception { } protected Recommender getRecommender ( SparseMatrix [ ] data , int fold ) throws Exception { } protected void writeData ( SparseMatrix trainMatrix , SparseMatrix testMatrix , int fold ) { } public void setConfigFiles ( String ... configurations ) { } private void about ( ) { } }

Fix:
String filePath = outputOptions . getString ( "--to-file" , ( ( ( LibRec . tempDirPath ) + ( algorithm ) ) + ".txt" ) ) ;
Buggy code:
public abstract class SignInPanel extends Panel { private boolean includeRememberMe = true ; private PasswordTextField password ; private boolean rememberMe = true ; private TextField username ; public final class SignInForm extends Form { private final ValueMap properties = new ValueMap ( ) ; public SignInForm ( final String id ) { } public final void onSubmit ( ) { if ( signIn ( getUsername ( ) , getPassword ( ) ) ) { <START_BUG> if ( ! ( getPage ( ) . continueToOriginalDestination ( ) ) ) { <END_BUG> setResponsePage ( getApplication ( ) . getSessionSettings ( ) . getPageFactory ( ) . newPage ( getApplication ( ) . getHomePage ( ) , ( ( PageParameters ) ( null ) ) ) ) ; } } else { final String errmsg = getLocalizer ( ) . getString ( "loginError" , this , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>sign<seq2seq4repair_space>you<seq2seq4repair_space>in" ) ; error ( errmsg ) ; } } } public SignInPanel ( final String id ) { } public SignInPanel ( final String id , final boolean includeRememberMe ) { } public final void forgetMe ( ) { } public String getPassword ( ) { } public boolean getRememberMe ( ) { } public String getUsername ( ) { } public void setPersistent ( boolean enable ) { } public void setRememberMe ( boolean rememberMe ) { } public abstract boolean signIn ( final String username , final String password ) { } }

Fix:
if ( ! ( continueToOriginalDestination ( ) ) ) {
Buggy code:
abstract class TermsCollector extends Collector { final String field ; final BytesRefHash collectorTerms = new BytesRefHash ( ) ; TermsCollector ( String field ) { } public BytesRefHash getCollectorTerms ( ) { } @ Override public void setScorer ( Scorer scorer ) throws IOException { } @ Override public boolean acceptsDocsOutOfOrder ( ) { } static TermsCollector create ( String field , boolean multipleValuesPerDocument ) { } static class MV extends TermsCollector { final BytesRef scratch = new BytesRef ( ) ; private SortedSetDocValues docTermOrds ; MV ( String field ) { } @ Override public void collect ( int doc ) throws IOException { } @ Override public void setNextReader ( AtomicReaderContext context ) throws IOException { docTermOrds = DEFAULT . getDocTermOrds ( context . reader ( ) , field ) ; } } static class SV extends TermsCollector { final BytesRef spare = new BytesRef ( ) ; private BinaryDocValues fromDocTerms ; SV ( String field ) { } @ Override public void collect ( int doc ) throws IOException { } @ Override public void setNextReader ( AtomicReaderContext context ) throws IOException { <START_BUG> fromDocTerms = DEFAULT . getTerms ( context . reader ( ) , field ) ; <END_BUG> } } }

Fix:
fromDocTerms = DEFAULT . getTerms ( context . reader ( ) , field , false ) ;
Buggy code:
public class Util { public List < String > filePaths = new ArrayList < > ( ) ; public String [ ] leDadosTec2 ( String filePath ) throws FileNotFoundException , IOException { } public String [ ] leDadosTec1 ( String filePath ) throws FileNotFoundException , IOException { } public void leDados ( String filePath , Processavel p ) throws FileNotFoundException , IOException { String [ ] dados = new String [ 10 ] ; try ( FileReader fr = new FileReader ( filePath ) ; BufferedReader br = new BufferedReader ( fr ) ) { while ( br . ready ( ) ) { <START_BUG> p . processaLinha ( br ) ; <END_BUG> } br . close ( ) ; fr . close ( ) ; } } private void imprimeArquivo ( String fileName , String texto ) throws IOException { } private void deletaArquivoExistente ( String newFile ) { } public List < String > fileTreePrinter ( File initialPath , int initialDepth , String regex ) { } }

Fix:
p . processaArquivo ( br ) ;
Buggy code:
public class MessageItem { public static final String ID = "id" ; public static final String MESSAGEID = "message_id" ; public static final String TITLE = "title" ; public static final String AUTHOR = "author" ; public static final String CONTENT = "content" ; public static final String CATEGORY = "category" ; public static final String LINK = "link" ; public static final String TAGS = "tags" ; public static final String PUBDATE = "pubdate" ; private int id = 0 ; private int messageId = 0 ; private String title = null ; private String author = null ; private String content = null ; private String category = null ; private String link = null ; private String tags = null ; private String pubdate = null ; public MessageItem ( ) { } public int getId ( ) { } public void setId ( int id ) { } public int getMessageId ( ) { } public void setMessageId ( int messageId ) { } public String getTitle ( ) { } public void setTitle ( String title ) { } public String getAuthor ( ) { } public void setAuthor ( String author ) { } public String getContent ( ) { } public void setContent ( String content ) { } public String getCategory ( ) { } public void setCategory ( String category ) { } public String getLink ( ) { } public void setLink ( String link ) { } public String getTags ( ) { } public void setTags ( String tags ) { } public String getPubdate ( ) { } public void setPubdate ( String pubdate ) { } public String toString ( ) { if ( ( title . length ( ) ) > 20 ) { <START_BUG> return ( title . substring ( 0 , 42 ) ) + "..." ; <END_BUG> } return title ; } }

Fix:
return ( title . substring ( 0 , 20 ) ) + "..." ;
Buggy code:
public class PhoneticEngine { static final class PhonemeBuilder { public static PhoneticEngine . PhonemeBuilder empty ( final Languages . LanguageSet languages ) { } private final Set < Rule . Phoneme > phonemes ; private PhonemeBuilder ( final Rule . Phoneme phoneme ) { } private PhonemeBuilder ( final Set < Rule . Phoneme > phonemes ) { } public void append ( final CharSequence str ) { } public void apply ( final Rule . PhonemeExpr phonemeExpr , final int maxPhonemes ) { <START_BUG> final List < Rule . Phoneme > newPhonemes = new ArrayList < Rule . Phoneme > ( maxPhonemes ) ; <END_BUG> EXPR : for ( final Rule . Phoneme left : this . phonemes ) { for ( final Rule . Phoneme right : phonemeExpr . getPhonemes ( ) ) { final Languages . LanguageSet languages = left . getLanguages ( ) . restrictTo ( right . getLanguages ( ) ) ; if ( ! ( languages . isEmpty ( ) ) ) { final Rule . Phoneme join = new Rule . Phoneme ( left , right , languages ) ; if ( ( newPhonemes . size ( ) ) < maxPhonemes ) { newPhonemes . add ( join ) ; if ( ( newPhonemes . size ( ) ) >= maxPhonemes ) { break EXPR ; } } } } } this . phonemes . clear ( ) ; this . phonemes . addAll ( newPhonemes ) ; } public Set < Rule . Phoneme > getPhonemes ( ) { } public String makeString ( ) { } } private static final class RulesApplication { private final Map < String , List < Rule > > finalRules ; private final CharSequence input ; private PhoneticEngine . PhonemeBuilder phonemeBuilder ; private int i ; private final int maxPhonemes ; private boolean found ; public RulesApplication ( final Map < String , List < Rule > > finalRules , final CharSequence input , final PhoneticEngine . PhonemeBuilder phonemeBuilder , final int i , final int maxPhonemes ) { } public int getI ( ) { } public PhoneticEngine . PhonemeBuilder getPhonemeBuilder ( ) { } public PhoneticEngine . RulesApplication invoke ( ) { } public boolean isFound ( ) { } } private static final Map < NameType , Set < String > > NAME_PREFIXES = new EnumMap < NameType , Set < String > > ( NameType . class ) ; private static String join ( final Iterable < String > strings , final String sep ) { } private static final int DEFAULT_MAX_PHONEMES = 20 ; private final Lang lang ; private final NameType nameType ; private final RuleType ruleType ; private final boolean concat ; private final int maxPhonemes ; public PhoneticEngine ( final NameType nameType , final RuleType ruleType , final boolean concat ) { } public PhoneticEngine ( final NameType nameType , final RuleType ruleType , final boolean concat , final int maxPhonemes ) { } private PhoneticEngine . PhonemeBuilder applyFinalRules ( final PhoneticEngine . PhonemeBuilder phonemeBuilder , final Map < String , List < Rule > > finalRules ) { } public String encode ( final String input ) { } public String encode ( String input , final Languages . LanguageSet languageSet ) { } public Lang getLang ( ) { } public NameType getNameType ( ) { } public RuleType getRuleType ( ) { } public boolean isConcat ( ) { } public int getMaxPhonemes ( ) { } }

Fix:
final Set < Rule . Phoneme > newPhonemes = new LinkedHashSet < Rule . Phoneme > ( maxPhonemes ) ;
Buggy code:
final class JVMOptionAddHandler implements OperationStepHandler , DescriptionProvider { static final String OPERATION_NAME = "add-jvm-option" ; static final JVMOptionAddHandler INSTANCE = new JVMOptionAddHandler ( ) ; private final ParameterValidator validator = new StringLengthValidator ( 1 ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { validator . validateParameter ( JVM_OPTION , operation . get ( JVM_OPTION ) ) ; final Resource resource = context . readResourceForUpdate ( EMPTY_ADDRESS ) ; final ModelNode model = resource . getModel ( ) ; final ModelNode option = operation . require ( JVM_OPTION ) ; ModelNode jvmOptions = model . get ( JVM_OPTIONS ) ; if ( jvmOptions . isDefined ( ) ) { for ( ModelNode optionNode : jvmOptions . asList ( ) ) { if ( optionNode . equals ( option ) ) { throw HostControllerMessages . MESSAGES . jvmOptionAlreadyExists ( option . asString ( ) ) ; } } } model . get ( JVM_OPTIONS ) . add ( option ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class LocationActivity extends BaseActivity implements OnGetGeoCoderResultListener { LocationClient mLocClient ; public LocationActivity . MyLocationListenner myListener = new LocationActivity . MyLocationListenner ( ) ; BitmapDescriptor mCurrentMarker ; MapView mMapView ; BaiduMap mBaiduMap ; private LocationActivity . BaiduReceiver mReceiver ; GeoCoder mSearch = null ; static BDLocation lastLocation = null ; BitmapDescriptor bdgeo = BitmapDescriptorFactory . fromResource ( icon_geo ) ; @ Override public void onCreate ( Bundle savedInstanceState ) { } private void initBaiduMap ( ) { mMapView = ( ( MapView ) ( findViewById ( bmapView ) ) ) ; mBaiduMap = mMapView . getMap ( ) ; mBaiduMap . setMaxAndMinZoomLevel ( 18 , 13 ) ; IntentFilter iFilter = new IntentFilter ( ) ; iFilter . addAction ( SDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_ERROR ) ; iFilter . addAction ( SDK_BROADCAST_ACTION_STRING_NETWORK_ERROR ) ; mReceiver = new LocationActivity . BaiduReceiver ( ) ; registerReceiver ( mReceiver , iFilter ) ; Intent intent = getIntent ( ) ; String type = intent . getStringExtra ( "type" ) ; if ( type . equals ( "select" ) ) { <START_BUG> initTopBarForBoth ( "位置" , btn_login_selector , "发送" , new com . bmob . im . demo . view . HeaderLayout . onRightImageButtonClickListener ( ) { <END_BUG> @ Override public void onClick ( ) { gotoChatPage ( ) ; } } ) ; mHeaderLayout . getRightImageButton ( ) . setEnabled ( false ) ; initLocClient ( ) ; } else { initTopBarForLeft ( "位置" ) ; Bundle b = intent . getExtras ( ) ; LatLng latlng = new LatLng ( b . getDouble ( "latitude" ) , b . getDouble ( "longtitude" ) ) ; mBaiduMap . setMapStatus ( MapStatusUpdateFactory . newLatLng ( latlng ) ) ; OverlayOptions ooA = new MarkerOptions ( ) . position ( latlng ) . icon ( bdgeo ) . zIndex ( 9 ) ; mBaiduMap . addOverlay ( ooA ) ; } mSearch = GeoCoder . newInstance ( ) ; mSearch . setOnGetGeoCodeResultListener ( this ) ; } private void gotoChatPage ( ) { } private void initLocClient ( ) { } public class MyLocationListenner implements BDLocationListener { @ Override public void onReceiveLocation ( BDLocation location ) { } } public class BaiduReceiver extends BroadcastReceiver { public void onReceive ( Context context , Intent intent ) { } } @ Override public void onGetGeoCodeResult ( GeoCodeResult arg0 ) { } @ Override public void onGetReverseGeoCodeResult ( ReverseGeoCodeResult result ) { } @ Override protected void onPause ( ) { } @ Override protected void onResume ( ) { } @ Override protected void onDestroy ( ) { } }

Fix:
initTopBarForBoth ( "位置" , base_action_bar_true_bg_selector , new com . bmob . im . demo . view . HeaderLayout . onRightImageButtonClickListener ( ) {
Buggy code:
public class LanguageNotLoadedProblem extends LanguageMissingProblem { public LanguageNotLoadedProblem ( SLanguage language , SNode instance ) { } public String getMessage ( ) { SLanguage lang = getLanguage ( ) ; String err = ( "Language<seq2seq4repair_space>" + lang ) + "<seq2seq4repair_space>can't<seq2seq4repair_space>be<seq2seq4repair_space>loaded" ; AbstractModule langModule = ( ( AbstractModule ) ( lang . getSourceModule ( ) ) ) ; SModuleReference invalidDep = null ; for ( Dependency dep : Sequence . fromIterable ( langModule . getUnresolvedDependencies ( ) ) ) { <START_BUG> if ( ClassLoaderManager . getInstance ( ) . isValidForClassloading ( dep . getModuleRef ( ) ) ) { <END_BUG> invalidDep = dep . getModuleRef ( ) ; } } if ( invalidDep != null ) { err += ( ":<seq2seq4repair_space>dependency<seq2seq4repair_space>" + ( invalidDep . getModuleName ( ) ) ) + "<seq2seq4repair_space>can't<seq2seq4repair_space>be<seq2seq4repair_space>loaded" ; } return err ; } public String getCategory ( ) { } }

Fix:
if ( ! ( ClassLoaderManager . getInstance ( ) . isValidForClassloading ( dep . getModuleRef ( ) ) ) ) {
Buggy code:
public class NamingStoreService implements Service < ServiceBasedNamingStore > { private ServiceBasedNamingStore store ; public NamingStoreService ( ) { } public NamingStoreService ( ServiceBasedNamingStore store ) { } public synchronized void start ( final StartContext context ) throws StartException { if ( ( store ) == null ) { <START_BUG> store = new org . jboss . as . naming . WritableServiceBasedNamingStore ( context . getController ( ) . getServiceContainer ( ) , context . getController ( ) . getName ( ) ) ; <END_BUG> } } public synchronized void stop ( StopContext context ) { } public synchronized ServiceBasedNamingStore getValue ( ) throws IllegalStateException { } }

Fix:
store = new org . jboss . as . naming . WritableServiceBasedNamingStore ( context . getController ( ) . getServiceContainer ( ) , context . getController ( ) . getName ( ) , context . getChildTarget ( ) ) ;
Buggy code:
public class DropTargetEffect extends DropTargetAdapter { Control control ; public DropTargetEffect ( Control control ) { } public Control getControl ( ) { } public Widget getItem ( int x , int y ) { } Widget getItem ( Table table , int x , int y ) { Point coordinates = new Point ( x , y ) ; coordinates = table . toControl ( coordinates ) ; TableItem item = table . getItem ( coordinates ) ; if ( item != null ) return item ; Rectangle area = table . getClientArea ( ) ; int itemCount = table . getItemCount ( ) ; for ( int i = table . getTopIndex ( ) ; i < itemCount ; i ++ ) { item = table . getItem ( i ) ; Rectangle rect = item . getBounds ( ) ; rect . x = area . x ; rect . width = area . width ; if ( rect . contains ( coordinates ) ) return item ; <START_BUG> if ( ! ( area . contains ( rect . x , rect . y ) ) ) <END_BUG> break ; } return null ; } Widget getItem ( Tree tree , int x , int y ) { } TreeItem nextItem ( Tree tree , TreeItem item ) { } TreeItem previousItem ( Tree tree , TreeItem item ) { } }

Fix:
if ( ( rect . y ) > ( ( area . y ) + ( area . height ) ) )
Buggy code:
public class LawWorld { private World bukkitWorld ; private HashMap < String , Prison > prisons ; private HashMap < Player , Prison > selectedPrisons ; public LawWorld ( World bukkitWorld ) { } public String getName ( ) { } public Prison createPrison ( String name ) throws IllegalNameException , PrisonAlreadyExistsException { if ( prisons . containsKey ( name ) ) { throw new PrisonAlreadyExistsException ( ) ; } else { if ( name . matches ( "[a-zA-Z0-9_-]+" ) ) { Prison prison = new Prison ( this , name ) ; <START_BUG> prisons . put ( prison . getName ( ) , prison ) ; <END_BUG> return prison ; } else { throw new IllegalNameException ( ) ; } } } public Prison getPrison ( String name ) { } public Prison getOrCreatePrison ( String name ) { } public void addPrison ( Prison prison ) { } public Prison removePrison ( String name ) { } public Prison setSelectedPrison ( Player player , String name ) { } public Prison setSelectedPrison ( Player player , String name , Boolean save ) { } public Prison getSelectedPrison ( Player player ) { } public Prison [ ] getPrisons ( ) { } }

Fix:
this . addPrison ( prison ) ;
Buggy code:
@ SuppressWarnings ( "unchecked" ) public class MyHeap < T extends Comparable < T > > { private int size ; private T [ ] data ; private boolean isMax = true ; public MyHeap ( ) { } public MyHeap ( T [ ] array ) { } public MyHeap ( boolean isMax ) { } public MyHeap ( T [ ] array , boolean isMax ) { } private void pushDown ( int k ) { } private void pushUp ( int k ) { } private void heapify ( ) { } public T delete ( ) { if ( ( size ) == 0 ) { throw new IllegalArgumentException ( ) ; } <START_BUG> T ans = data [ 0 ] ; <END_BUG> int counter = 1 ; int k = 1 ; data [ 1 ] = null ; pushDown ( 1 ) ; ( size ) -- ; return ans ; } public T peek ( ) { } public void add ( T x ) { } private void doubleSize ( ) { } public String toString ( ) { } public static void main ( String [ ] args ) { } }

Fix:
T ans = data [ 1 ] ;
Buggy code:
public class Inserter extends Operation { public Inserter ( int index ) { } public void run ( Cassandra . Client client ) throws IOException { List < ByteBuffer > values = generateValues ( ) ; List < Column > columns = new ArrayList < Column > ( ) ; List < SuperColumn > superColumns = new ArrayList < SuperColumn > ( ) ; String format = ( "%0" + ( session . getTotalKeysLength ( ) ) ) + "d" ; for ( int i = 0 ; i < ( session . getColumnsPerKey ( ) ) ; i ++ ) { String columnName = "C" + ( Integer . toString ( i ) ) ; ByteBuffer columnValue = values . get ( ( i % ( values . size ( ) ) ) ) ; <START_BUG> columns . add ( new Column ( ByteBufferUtil . bytes ( columnName ) , columnValue , System . currentTimeMillis ( ) ) ) ; <END_BUG> } if ( ( session . getColumnFamilyType ( ) ) == ( ColumnFamilyType . Super ) ) { for ( int i = 0 ; i < ( session . getSuperColumns ( ) ) ; i ++ ) { String superColumnName = "S" + ( Integer . toString ( i ) ) ; superColumns . add ( new SuperColumn ( ByteBufferUtil . bytes ( superColumnName ) , columns ) ) ; } } String rawKey = String . format ( format , index ) ; Map < ByteBuffer , Map < String , List < Mutation > > > record = new HashMap < ByteBuffer , Map < String , List < Mutation > > > ( ) ; record . put ( ByteBufferUtil . bytes ( rawKey ) , ( ( session . getColumnFamilyType ( ) ) == ( ColumnFamilyType . Super ) ? getSuperColumnsMutationMap ( superColumns ) : getColumnsMutationMap ( columns ) ) ) ; long start = System . currentTimeMillis ( ) ; boolean success = false ; String exceptionMessage = null ; for ( int t = 0 ; t < ( session . getRetryTimes ( ) ) ; t ++ ) { if ( success ) break ; try { client . batch_mutate ( record , session . getConsistencyLevel ( ) ) ; success = true ; } catch ( Exception e ) { exceptionMessage = getExceptionMessage ( e ) ; success = false ; } } if ( ! success ) { error ( String . format ( "Operation<seq2seq4repair_space>[%d]<seq2seq4repair_space>retried<seq2seq4repair_space>%d<seq2seq4repair_space>times<seq2seq4repair_space>-<seq2seq4repair_space>error<seq2seq4repair_space>inserting<seq2seq4repair_space>key<seq2seq4repair_space>%s<seq2seq4repair_space>%s%n" , index , session . getRetryTimes ( ) , rawKey , ( exceptionMessage == null ? "" : ( "(" + exceptionMessage ) + ")" ) ) ) ; } operations . getAndIncrement ( ) ; keys . getAndIncrement ( ) ; latency . getAndAdd ( ( ( System . currentTimeMillis ( ) ) - start ) ) ; } private Map < String , List < Mutation > > getSuperColumnsMutationMap ( List < SuperColumn > superColumns ) { } private Map < String , List < Mutation > > getColumnsMutationMap ( List < Column > columns ) { } }

Fix:
columns . add ( new Column ( ByteBufferUtil . bytes ( columnName ) ) . setValue ( columnValue ) . setTimestamp ( System . currentTimeMillis ( ) ) ) ;
Buggy code:
public interface KDimension < A extends KView , B extends KDimension , C extends KUniverse > { public long key ( ) { } public void parent ( Callback < B > callback ) { } public void children ( Callback < B [ ] > callback ) { } public void fork ( Callback < B > callback ) { } public void save ( Callback < Throwable > callback ) { } public void saveUnload ( Callback < Throwable > callback ) { } public void delete ( Callback < Throwable > callback ) { } public void discard ( Callback < Throwable > callback ) { } <START_BUG> public A time ( Long timePoint ) ; <END_BUG> public C universe ( ) { } public boolean equals ( Object other ) { } public void listen ( ModelListener listener ) { } public void listenAllTimes ( KObject target , ModelListener listener ) { } }

Fix:
public A time ( long timePoint ) ;
Buggy code:
public abstract class AbstractHttpSendingTransportHandler extends AbstractTransportHandler implements SockJsSessionFactory { @ Override public final void handleRequest ( ServerHttpRequest request , ServerHttpResponse response , WebSocketHandler wsHandler , SockJsSession wsSession ) throws SockJsException { } protected void handleRequestInternal ( ServerHttpRequest request , ServerHttpResponse response , AbstractHttpSockJsSession sockJsSession ) throws SockJsException { if ( sockJsSession . isNew ( ) ) { logger . debug ( ( ( "Opening<seq2seq4repair_space>" + ( getTransportType ( ) ) ) + "<seq2seq4repair_space>connection" ) ) ; sockJsSession . handleInitialRequest ( request , response , getFrameFormat ( request ) ) ; } else if ( sockJsSession . isClosed ( ) ) { logger . debug ( "Connection<seq2seq4repair_space>already<seq2seq4repair_space>closed<seq2seq4repair_space>(but<seq2seq4repair_space>not<seq2seq4repair_space>removed<seq2seq4repair_space>yet)" ) ; SockJsFrame frame = SockJsFrame . closeFrameGoAway ( ) ; try { response . getBody ( ) . write ( frame . getContentBytes ( ) ) ; } catch ( IOException ex ) { throw new SockJsException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>send<seq2seq4repair_space>" + frame ) , sockJsSession . getId ( ) , ex ) ; } return ; } else if ( ! ( sockJsSession . isActive ( ) ) ) { logger . debug ( ( ( "starting<seq2seq4repair_space>" + ( getTransportType ( ) ) ) + "<seq2seq4repair_space>async<seq2seq4repair_space>request" ) ) ; <START_BUG> sockJsSession . startLongPollingRequest ( request , response , getFrameFormat ( request ) ) ; <END_BUG> } else { logger . debug ( ( ( ( "another<seq2seq4repair_space>" + ( getTransportType ( ) ) ) + "<seq2seq4repair_space>connection<seq2seq4repair_space>still<seq2seq4repair_space>open:<seq2seq4repair_space>" ) + sockJsSession ) ) ; SockJsFrame frame = getFrameFormat ( request ) . format ( SockJsFrame . closeFrameAnotherConnectionOpen ( ) ) ; try { response . getBody ( ) . write ( frame . getContentBytes ( ) ) ; } catch ( IOException ex ) { throw new SockJsException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>send<seq2seq4repair_space>" + frame ) , sockJsSession . getId ( ) , ex ) ; } } } protected abstract MediaType getContentType ( ) { } protected abstract SockJsFrameFormat getFrameFormat ( ServerHttpRequest request ) { } protected final String getCallbackParam ( ServerHttpRequest request ) { } }

Fix:
sockJsSession . handleSuccessiveRequest ( request , response , getFrameFormat ( request ) ) ;
Buggy code:
public class PreferencesData { static final String PREFS_FILE = "preferences.txt" ; static PreferencesMap defaults ; static PreferencesMap prefs = new PreferencesMap ( ) ; static File preferencesFile ; static boolean doSave = true ; public static void init ( File file ) { } private static void fixPreferences ( ) { String baud = PreferencesData . get ( "serial.debug_rate" ) ; <START_BUG> if ( ( ( "14400" . equals ( baud ) ) || ( "28800" . equals ( baud ) ) ) || ( "38400" . equals ( baud ) ) ) { <END_BUG> PreferencesData . set ( "serial.debug_rate" , "9600" ) ; } } public static String [ ] loadStrings ( InputStream input ) { } protected static void save ( ) { } public static String get ( String attribute ) { } public static String get ( String attribute , String defaultValue ) { } public static boolean has ( String key ) { } public static void remove ( String key ) { } public static String getDefault ( String attribute ) { } public static void set ( String attribute , String value ) { } public static void unset ( String attribute ) { } public static boolean getBoolean ( String attribute ) { } public static void setBoolean ( String attribute , boolean value ) { } public static int getInteger ( String attribute ) { } public static void setInteger ( String key , int value ) { } public static PreferencesMap getMap ( ) { } public static void setDoSave ( boolean value ) { } }

Fix:
if ( ( "14400" . equals ( baud ) ) || ( "28800" . equals ( baud ) ) ) {
Buggy code:
public class GlobalResourceLoader { protected static ClassLoader classLoader ; protected static Hashtable htBundles = new Hashtable ( 80 ) ; protected static ResourceBundle globalBundle ; protected static final String FIX_ME = "FIX<seq2seq4repair_space>ME!" ; private static final String GLOBAL_BUNDLE_PATH = "org.columba.core.i18n.global.global" ; public static Locale [ ] getAvailableLocales ( ) { } protected static void initClassLoader ( ) { File langpack = new File ( ( ( "langpack_" + ( Locale . getDefault ( ) . toString ( ) ) ) + ".jar" ) ) ; if ( ( langpack . exists ( ) ) && ( langpack . isFile ( ) ) ) { if ( MainInterface . DEBUG ) { log . info ( ( "Creating<seq2seq4repair_space>new<seq2seq4repair_space>i18n<seq2seq4repair_space>class<seq2seq4repair_space>loader<seq2seq4repair_space>for<seq2seq4repair_space>" + ( langpack . getPath ( ) ) ) ) ; } try { GlobalResourceLoader . classLoader = new URLClassLoader ( new URL [ ] { langpack . toURL ( ) } ) ; } catch ( MalformedURLException mue ) { } } else { if ( MainInterface . DEBUG ) { <START_BUG> log . warning ( ( "No<seq2seq4repair_space>language<seq2seq4repair_space>pack<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>" + ( Locale . getDefault ( ) . toString ( ) ) ) ) ; <END_BUG> } GlobalResourceLoader . classLoader = ClassLoader . getSystemClassLoader ( ) ; } } protected static String generateBundlePath ( String sPath , String sName ) { } public static String getString ( String sPath , String sName , String sID ) { } public static char getMnemonic ( String sPath , String sName , String sID ) { } public static void reload ( ) { } }

Fix:
log . error ( ( "No<seq2seq4repair_space>language<seq2seq4repair_space>pack<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>" + ( Locale . getDefault ( ) . toString ( ) ) ) ) ;
Buggy code:
public class FetchPlan { public static final String GROUP_ALL = FetchGroup . NAME_ALL ; public static final String GROUP_DEFAULT = FetchGroup . NAME_DEFAULT ; public static final int DEPTH_INFINITE = FetchGroup . DEPTH_INFINITE ; public static final int DEFAULT = FetchConfiguration . DEFAULT ; private final DelegatingFetchConfiguration _fetch ; public FetchPlan ( FetchConfiguration fetch ) { } protected DelegatingFetchConfiguration newDelegatingFetchConfiguration ( FetchConfiguration fetch ) { } public FetchConfiguration getDelegate ( ) { } <START_BUG> public int getMaxFetchDepth ( int depth ) { <END_BUG> return _fetch . getMaxFetchDepth ( ) ; } public FetchPlan setMaxFetchDepth ( int depth ) { } public int getFetchBatchSize ( ) { } public FetchPlan setFetchBatchSize ( int fetchBatchSize ) { } public boolean getQueryResultCache ( ) { } public FetchPlan setQueryResultCache ( boolean cache ) { } public Collection < String > getFetchGroups ( ) { } public FetchPlan addFetchGroup ( String group ) { } public FetchPlan addFetchGroups ( String ... groups ) { } public FetchPlan addFetchGroups ( Collection groups ) { } public FetchPlan removeFetchGroup ( String group ) { } public FetchPlan removeFetchGroups ( String ... groups ) { } public FetchPlan removeFetchGroups ( Collection groups ) { } public FetchPlan clearFetchGroups ( ) { } public FetchPlan resetFetchGroups ( ) { } public Collection < String > getFields ( ) { } public boolean hasField ( String field ) { } public boolean hasField ( Class cls , String field ) { } public FetchPlan addField ( String field ) { } public FetchPlan addField ( Class cls , String field ) { } public FetchPlan addFields ( String ... fields ) { } public FetchPlan addFields ( Class cls , String ... fields ) { } public FetchPlan addFields ( Collection fields ) { } public FetchPlan addFields ( Class cls , Collection fields ) { } public FetchPlan removeField ( String field ) { } public FetchPlan removeField ( Class cls , String field ) { } public FetchPlan removeFields ( String ... fields ) { } public FetchPlan removeFields ( Class cls , String ... fields ) { } public FetchPlan removeFields ( Collection fields ) { } public FetchPlan removeFields ( Class cls , Collection fields ) { } public FetchPlan clearFields ( ) { } private static String toFieldName ( Class cls , String field ) { } private static Collection toFieldNames ( Class cls , Collection fields ) { } public int getLockTimeout ( ) { } public FetchPlan setLockTimeout ( int timeout ) { } public LockModeType getReadLockMode ( ) { } public FetchPlan setReadLockMode ( LockModeType mode ) { } public LockModeType getWriteLockMode ( ) { } public FetchPlan setWriteLockMode ( LockModeType mode ) { } public int hashCode ( ) { } public boolean equals ( Object other ) { } }

Fix:
public int getMaxFetchDepth ( ) {
Buggy code:
public class Struct extends Type { public final HashMap < Token , StructVariable > table = new HashMap < Token , StructVariable > ( ) ; final HashMap < Token , FunctionBasic > funcs = new HashMap < Token , FunctionBasic > ( ) ; final HashMap < Token , Token > overload_funcs ; final HashMap < Token , Position > vfunc_map ; final VirtualTable vtable ; boolean hasDefinedVirtualFunction = false ; final Struct father ; final int father_size ; boolean has_used = false ; int first_used_line = - 1 ; String first_used_file = "" ; public Struct ( Token name ) { } public Struct ( Token name , Struct father ) { } public boolean isCompleted ( ) { } public boolean isChildOf ( Struct t ) { Struct f = this . father ; while ( f != null ) { <START_BUG> if ( f == ( this . father ) ) <END_BUG> return true ; f = f . father ; } return false ; } @ Override public boolean isBuiltInType ( ) { } @ Override public boolean equals ( Type t ) { } public Position getVirtualFunctionPosition ( Token vfname ) { } public StructVariable getMemberVariableType ( Token mname ) { } public StructVariable addMemberVariable ( Token mname , Type t ) { } public void defineVirtualFunction ( Token name , FunctionBasic mf ) { } public FunctionBasic getVirtualFunction ( Token name ) { } public void overrideVirtualFunction ( Token name , FunctionBasic mf ) { } public FunctionBasic getDeclaredFunction ( Token name ) { } public FunctionBasic getFunction ( Token name ) { } public boolean addOverloading ( Token op , FunctionBasic f ) { } public Token getOverloading ( Token op ) { } public FunctionBasic addNormalFunction ( Token fname , FunctionBasic f ) { } public FunctionBasic getNormalFunction ( Token fname ) { } public VirtualTable getVirtualTable ( ) { } public Struct getFather ( ) { } public int getVariableNumber ( ) { } public void setUsed ( int ful , String fuf ) { } public boolean used ( ) { } public int getFirstUsedLine ( ) { } public String getFirstUsedFile ( ) { } @ Override public String toString ( ) { } No newline ; at end ; of file ; }

Fix:
if ( t == f )
Buggy code:
public class CONLLReader extends DependencyReader { protected boolean discourseMode = false ; public CONLLReader ( boolean discourseMode ) { } public DependencyInstance getNext ( ) throws IOException { } protected boolean fileContainsLabels ( String file ) throws IOException { BufferedReader in = new BufferedReader ( new FileReader ( file ) ) ; String line = in . readLine ( ) ; in . close ( ) ; <START_BUG> if ( ( line . trim ( ) . length ( ) ) > 0 ) { <END_BUG> return true ; } else { return false ; } } }

Fix:
if ( ( line . split ( "\t" ) . length ) > 9 ) {
Buggy code:
public class TCMountHandlerTest { @ Rule public ExpectedException thrown = ExpectedException . none ( ) ; @ Before @ After public void unmountAllDrives ( ) { } @ Test public void truecryptAvailable ( ) { } @ Test public void mountAndUnmountTestContainerWindows ( ) throws IOException , InterruptedException { Assume . assumeTrue ( IS_OS_WINDOWS ) ; File tcTestFile = new File ( "src//test//resources//tests//TestTCVol1.tc" ) ; String drive = TCMountHandler . mount ( tcTestFile , "12345" , "J" ) ; <START_BUG> Assert . assertEquals ( "TrueCrypt<seq2seq4repair_space>Testvolume<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>mounted" , true , TCMountHandler . isDriveMounted ( "J" ) ) ; <END_BUG> TCMountHandler . unmount ( drive ) ; Assert . assertEquals ( "TrueCrypt<seq2seq4repair_space>Testvolume<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>unmounted<seq2seq4repair_space>properly" , false , TCMountHandler . isDriveMounted ( drive ) ) ; } @ Test public void mountAndUnmountTestContainerLinux ( ) { } @ Test public void mountVolumeTwiceAtSameTimeLinux ( ) { } @ Test public void mountVolumeTwiceAtSameTimeWindows ( ) throws IOException , InterruptedException { } @ Test public void mountTwiceOnSameDrive ( ) throws IOException , InterruptedException { } @ Test public void unmountAllDrivesTest ( ) throws Exception { } }

Fix:
Assert . assertEquals ( "TrueCrypt<seq2seq4repair_space>Testvolume<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>mounted" , true , TCMountHandler . isDriveMounted ( drive ) ) ;
Buggy code:
public class ModClusterAddCustomMetric implements OperationStepHandler , DescriptionProvider { static final ModClusterAddCustomMetric INSTANCE = new ModClusterAddCustomMetric ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( context . getProcessType ( ) . isServer ( ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode dynamicLoadProvider = context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) . get ( DYNAMIC_LOAD_PROVIDER ) ; final ModelNode metric = new ModelNode ( ) ; List < Property > list = operation . asPropertyList ( ) ; Iterator < Property > it = list . iterator ( ) ; while ( it . hasNext ( ) ) { Property prop = it . next ( ) ; if ( prop . getName ( ) . equals ( "property" ) ) { String properties = prop . getValue ( ) . asString ( ) ; ModelNode props = ModelNode . fromString ( properties ) ; metric . get ( "property" ) . set ( props ) ; } else { metric . get ( prop . getName ( ) ) . set ( prop . getValue ( ) . asString ( ) ) ; } } if ( ! ( metric . get ( "class" ) . isDefined ( ) ) ) { throw new OperationFailedException ( new ModelNode ( ) . set ( ModClusterMessages . MESSAGES . classAttributeRequired ( "add-custom-metric" ) ) ) ; } if ( ! ( dynamicLoadProvider . isDefined ( ) ) ) { dynamicLoadProvider . get ( HISTORY ) . set ( 9 ) ; dynamicLoadProvider . get ( DECAY ) . set ( 2 ) ; } replaceMetric ( dynamicLoadProvider , metric ) ; context . completeStep ( ) ; } private void replaceMetric ( ModelNode dynamicLoadProvider , ModelNode metric ) { List < ModelNode > newlist = Collections . < ModelNode > emptyList ( ) ; if ( dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . isDefined ( ) ) { String classname = metric . get ( "class" ) . asString ( ) ; List < ModelNode > list = dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . asList ( ) ; Iterator < ModelNode > it = list . iterator ( ) ; dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . set ( newlist ) ; while ( it . hasNext ( ) ) { ModelNode node = it . next ( ) ; if ( ! ( node . get ( "class" ) . asString ( ) . equals ( classname ) ) ) { dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . add ( node ) ; } } } else { dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . set ( newlist ) ; } dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . add ( metric ) ; } } , MODEL ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . isNormalServer ( ) ) {
Buggy code:
public class DropDownChoice extends AbstractSingleSelectChoice implements IOnChangeListener { public DropDownChoice ( final String id ) { } public DropDownChoice ( final String id , final List choices ) { } public DropDownChoice ( final String id , final List data , final IChoiceRenderer renderer ) { } public DropDownChoice ( final String id , IModel model , final List choices ) { } public DropDownChoice ( final String id , IModel model , final List data , final IChoiceRenderer renderer ) { } public DropDownChoice ( String id , IModel choices ) { } public DropDownChoice ( String id , IModel model , IModel choices ) { } public DropDownChoice ( String id , IModel choices , IChoiceRenderer renderer ) { } public DropDownChoice ( String id , IModel model , IModel choices , IChoiceRenderer renderer ) { } public final void onSelectionChanged ( ) { } protected void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "select" ) ; if ( wantOnSelectionChangedNotifications ( ) ) { final String url = urlFor ( IOnChangeListener . class ) ; <START_BUG> tag . put ( "onChange" , ( ( ( ( "location.href='" + url ) + "&" ) + ( getPath ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.options[this.selectedIndex].value;" ) ) ; <END_BUG> } super . onComponentTag ( tag ) ; } protected void onSelectionChanged ( final Object newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } }

Fix:
tag . put ( "onChange" , ( ( ( ( "location.href='" + url ) + "&" ) + ( getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.options[this.selectedIndex].value;" ) ) ;
Buggy code:
@ RunWith ( SpringJUnit4ClassRunner . class ) @ org . springframework . test . context . ContextConfiguration ( loader = AnnotationConfigContextLoader . class ) public class OnlineTxnResourceAcceptanceTest extends OnlineTxnResourceTestTemplate { @ Configuration static class ContextConfiguration implements ApplicationContextAware { private ApplicationContext applicationContext ; @ Bean public EnvironmentConfig config ( ) throws IOException { EnvironmentConfig config = new EnvironmentConfig ( ) ; FileSystemResource build = new FileSystemResource ( "build.gradle" ) ; <START_BUG> final File json = build . createRelative ( ( ( "ots-orchestration//environments//" + ( env ( ) ) ) + ".json" ) ) . getFile ( ) . getAbsoluteFile ( ) ; <END_BUG> String baseHostRel = JsonPath . read ( json , "$.ots-services.vars.ots_service_base_host_rel" ) ; if ( StringUtils . isNotBlank ( baseHostRel ) ) { config . setBaseUri ( ( "http:////" + ( JsonPath . < String > read ( json , String . format ( "$.ots-services.%s.host" , baseHostRel ) ) ) ) ) ; } String port = JsonPath . read ( json , "$.ots-services.vars.ots_service_port" ) ; if ( StringUtils . isNotBlank ( port ) ) { config . setPort ( Integer . parseInt ( port ) ) ; } return config ; } private String env ( ) { } @ Override public void setApplicationContext ( ApplicationContext applicationContext ) throws BeansException { } } @ Autowired private EnvironmentConfig config ; @ Override protected String getBaseUri ( ) { } @ Override protected int getPort ( ) { } }

Fix:
final File json = build . createRelative ( ( ( "..//ots-orchestration//environments//" + ( env ( ) ) ) + ".json" ) ) . getFile ( ) . getAbsoluteFile ( ) ;
Buggy code:
public class GroovyshCommandTest extends AbstractCliTest { @ Test public void test ( ) throws Exception { File file = Util . resourceFile ( ThreadDumpFactoryTest . class , "openjdk-1.7.0_60.log" ) ; stdin ( ( ( ( "load('" + ( file . getAbsolutePath ( ) ) ) + "').threads.size();" ) + ( Util . NL ) ) ) ; run ( "groovysh" ) ; assertThat ( out . toString ( ) , containsString ( "<seq2seq4repair_space>35%n" ) ) ; assertThat ( this , succeeded ( ) ) ; <START_BUG> assertThat ( err . toString ( ) , containsString ( "load(String)<seq2seq4repair_space>command<seq2seq4repair_space>is<seq2seq4repair_space>deprecated.<seq2seq4repair_space>Use<seq2seq4repair_space>'$load.threaddump(String)" ) ) ; <END_BUG> } }

Fix:
assertThat ( err . toString ( ) , containsString ( "load(String)<seq2seq4repair_space>command<seq2seq4repair_space>is<seq2seq4repair_space>deprecated.<seq2seq4repair_space>Use<seq2seq4repair_space>'D.load.threaddump(String)" ) ) ;
Buggy code:
@ Test public class CachedApplicationStatusAggregatorTest { public static final StatusDetail OK_DETAIL_ONE = statusDetail ( "one" , OK , "a<seq2seq4repair_space>message" ) ; public static final StatusDetail OK_DETAIL_TWO = statusDetail ( "two" , OK , "a<seq2seq4repair_space>message" ) ; public static final StatusDetail WARNING_DETAIL = statusDetail ( "iHaveAWarning" , WARNING , "a<seq2seq4repair_space>message" ) ; public static final StatusDetail ERROR_DETAIL = statusDetail ( "thatsAnError" , ERROR , "a<seq2seq4repair_space>message" ) ; @ Test public void shouldCacheStatus ( ) throws Exception { final StatusDetailIndicator mockIndicator = someStatusDetailIndicator ( CachedApplicationStatusAggregatorTest . OK_DETAIL_ONE ) ; final ApplicationStatusAggregator statusAggregator = new CachedApplicationStatusAggregator ( mock ( ApplicationInfo . class ) , mock ( SystemInfo . class ) , mock ( VersionInfo . class ) , mock ( TeamInfo . class ) , Collections . singletonList ( mockIndicator ) , Collections . emptyList ( ) ) ; statusAggregator . update ( ) ; statusAggregator . aggregatedStatus ( ) ; statusAggregator . aggregatedStatus ( ) ; statusAggregator . aggregatedStatus ( ) ; <START_BUG> verify ( mockIndicator , times ( 2 ) ) . statusDetails ( ) ; <END_BUG> } @ Test public void shouldAggregateStatusDetails ( ) throws Exception { } @ Test public void shouldAggregateCompositeStatusDetails ( ) throws Exception { } private StatusDetailIndicator someCompositeStatusDetailIndicator ( final StatusDetail ... statusDetails ) { } private StatusDetailIndicator someStatusDetailIndicator ( final StatusDetail statusDetail ) { } No newline ; at end ; of file ; }

Fix:
verify ( mockIndicator , times ( 1 ) ) . statusDetails ( ) ;
Buggy code:
public class CommonMenuAddition implements IContributionItem { protected IConfigurationElement element ; public CommonMenuAddition ( IConfigurationElement element ) { } public String getId ( ) { } public void dispose ( ) { } public void fill ( Composite parent ) { } public void fill ( Menu parent , int index ) { } public void fill ( ToolBar parent , int index ) { } public void fill ( CoolBar parent , int index ) { } public boolean isDirty ( ) { } public boolean isDynamic ( ) { } public boolean isEnabled ( ) { } public boolean isGroupMarker ( ) { } public boolean isSeparator ( ) { } public boolean isVisible ( ) { <START_BUG> return false ; <END_BUG> } public void saveWidgetState ( ) { } public void setParent ( IContributionManager parent ) { } public void setVisible ( boolean visible ) { } public void update ( ) { } public void update ( String id ) { } }

Fix:
return true ;
Buggy code:
public abstract class AddressbookTreeNode extends DefaultMutableTreeNode { protected ImageIcon icon = ImageLoader . getSmallImageIcon ( "stock_book-16.png" ) ; private String name ; protected FolderItem node ; protected static final ImageIcon collapsedIcon = ImageLoader . getSmallImageIcon ( "folder.png" ) ; protected Lock myLock ; private static int nextUid = 0 ; private final Class [ ] FOLDER_ITEM_ARG = new Class [ ] { FolderItem . class } ; private final Class [ ] STRING_ARG = new Class [ ] { String . class } ; public AddressbookTreeNode ( FolderItem item ) { } public FolderItem getFolderItem ( ) { } public ImageIcon getIcon ( ) { } public static final FolderItem getDefaultItem ( String className , XmlElement props ) { } public TreePath getSelectionTreePath ( ) { } public static XmlElement getDefaultProperties ( ) { } public ImageIcon getCollapsedIcon ( ) { } public ImageIcon getExpandedIcon ( ) { } public int getUid ( ) { } public boolean tryToGetLock ( ) { } public void releaseLock ( ) { <START_BUG> myLock . release ( ) ; <END_BUG> } public XmlElement getNode ( ) { } public void setNode ( FolderItem node ) { } public Class getDefaultChild ( ) { } public final Hashtable getAttributes ( ) { } public abstract void createChildren ( WorkerStatusController worker ) { } public void addFolder ( String name , Class childClass ) throws Exception { } public void addFolder ( String name ) throws Exception { } public void addWithXml ( AddressbookTreeNode folder ) { } public String getName ( ) { } public void setName ( String newName ) { } }

Fix:
myLock . release ( null ) ;