nus-yam/ex-repair huggingface dataset:
Buggy code:
public class StatisticModule extends Module { private StatisticTask task ; private StatisticListener listener ; public StatisticModule ( final CraftoPlugin plugin ) { } @ Override protected void onEnable ( ) { } public final void registerStatistic ( final CraftoPlayer player , final String event , final String extra ) { Validate . notNull ( player , "The<seq2seq4repair_space>player<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null!" ) ; Validate . notNull ( event , "The<seq2seq4repair_space>event<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null!" ) ; Validate . notNull ( extra , "The<seq2seq4repair_space>extra<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null!" ) ; <START_BUG> this . getPlugin ( ) . getScheduler ( ) . registerQuery ( ( ( ( ( ( ( ( ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>`cp_statistics`<seq2seq4repair_space>(`playerid`,<seq2seq4repair_space>`event`,<seq2seq4repair_space>`extra`)<seq2seq4repair_space>" + "VALUES<seq2seq4repair_space>(" ) + ( player . getId ( ) ) ) + ",<seq2seq4repair_space>'" ) + ( event . toLowerCase ( ) ) ) + "',<seq2seq4repair_space>'" ) + ( extra . toUpperCase ( ) ) ) + "')<seq2seq4repair_space>" ) + "ON<seq2seq4repair_space>DUPLICATE<seq2seq4repair_space>KEY<seq2seq4repair_space>UPDATE<seq2seq4repair_space>`count`=`count`+1;" ) ) ; <END_BUG> } public final void registerEvent ( final Event event ) { } No newline ; at end ; of file ; }

Fix:
this . getPlugin ( ) . getScheduler ( ) . registerQuery ( ( ( ( ( ( ( ( ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>`cp_statistics`<seq2seq4repair_space>(`playerid`,<seq2seq4repair_space>`event`,<seq2seq4repair_space>`extra`)<seq2seq4repair_space>" + "VALUES<seq2seq4repair_space>(" ) + ( player . getId ( ) ) ) + ",<seq2seq4repair_space>'" ) + ( event . toUpperCase ( ) ) ) + "',<seq2seq4repair_space>'" ) + ( extra . toUpperCase ( ) ) ) + "')<seq2seq4repair_space>" ) + "ON<seq2seq4repair_space>DUPLICATE<seq2seq4repair_space>KEY<seq2seq4repair_space>UPDATE<seq2seq4repair_space>`count`=`count`+1;" ) ) ;
Buggy code:
public class StringBuilderWriterTest extends TestCase { private static final char [ ] FOOBAR_CHARS = new char [ ] { 'F' , 'o' , 'o' , 'B' , 'a' , 'r' } ; public StringBuilderWriterTest ( String name ) { } public void testAppendConstructCapacity ( ) throws IOException { } public void testAppendConstructStringBuilder ( ) { StringBuilder builder = new StringBuilder ( "Foo" ) ; StringBuilderWriter writer = new StringBuilderWriter ( builder ) ; writer . append ( "Bar" ) ; assertEquals ( "FooBar" , writer . toString ( ) ) ; <START_BUG> assertEquals ( builder , writer . getBuilder ( ) ) ; <END_BUG> } public void testAppendConstructNull ( ) throws IOException { } public void testAppendChar ( ) throws IOException { } public void testAppendCharSequence ( ) throws IOException { } public void testAppendCharSequencePortion ( ) throws IOException { } public void testClose ( ) { } public void testWriteChar ( ) throws IOException { } public void testWriteCharArray ( ) throws IOException { } public void testWriteCharArrayPortion ( ) throws IOException { } public void testWriteString ( ) throws IOException { } public void testWriteStringPortion ( ) throws IOException { } }

Fix:
assertSame ( builder , writer . getBuilder ( ) ) ;
Buggy code:
public class GetAllSegmentLeaderboardTest { @ Test public void testGetAllSegmentLeaderboard_validSegment ( ) { } @ Test public void testGetAllSegmentLeaderboard_invalidSegment ( ) { } @ Test public void testGetAllSegmentLeaderboard_privateSegment ( ) { } @ Test public void testGetAllSegmentLeaderboard_filterByGender ( ) { } @ Test public void testGetAllSegmentLeaderboard_filterByAgeGroup ( ) { } @ Test public void testGetAllSegmentLeaderboard_filterByWeightClass ( ) { } @ Test public void testGetAllSegmentLeaderboard_filterByFollowing ( ) { } @ Test public void testGetAllSegmentLeaderboard_filterByClub ( ) { } @ Test public void testGetAllSegmentLeaderboard_filterByDateRange ( ) { <START_BUG> final StravaSegmentLeaderboard leaderboard = service ( ) . getAllSegmentLeaderboard ( SEGMENT_VALID_ID , null , null , null , null , null , THIS_WEEK ) ; <END_BUG> assertNotNull ( leaderboard ) ; StravaSegmentLeaderboardTest . validate ( leaderboard ) ; } private SegmentServices service ( ) { } }

Fix:
final StravaSegmentLeaderboard leaderboard = service ( ) . getAllSegmentLeaderboard ( SEGMENT_VALID_ID , null , null , null , null , null , TODAY ) ;
Buggy code:
public class IntegerKeyAnalyzer extends AbstractKeyAnalyzer < Integer > { private static final long serialVersionUID = 4928508653722068982L ; public static final IntegerKeyAnalyzer INSTANCE = new IntegerKeyAnalyzer ( ) ; public static final int LENGTH = Integer . SIZE ; private static final int MSB = - 2147483648 ; private static int mask ( final int bit ) { } public int bitsPerElement ( ) { } public int lengthInBits ( final Integer key ) { } public boolean isBitSet ( final Integer key , final int bitIndex , final int lengthInBits ) { <START_BUG> return ( key & ( IntegerKeyAnalyzer . mask ( bitIndex ) ) ) != 0 ; <END_BUG> } public int bitIndex ( final Integer key , final int offsetInBits , final int lengthInBits , final Integer other , final int otherOffsetInBits , final int otherLengthInBits ) { } public boolean isPrefix ( final Integer prefix , final int offsetInBits , final int lengthInBits , final Integer key ) { } }

Fix:
return ( ( key . intValue ( ) ) & ( IntegerKeyAnalyzer . mask ( bitIndex ) ) ) != 0 ;
Buggy code:
public class Utils { public static void copyStream ( InputStream is , OutputStream os ) throws IOException { } public static void copyStream ( InputStream is , OutputStream os , boolean closeOs ) throws IOException { } public static String readStream ( InputStream is ) throws IOException { } public static String validateIndexMetadata ( Map < String , String > metadata , boolean forInsert ) { } static class UrlBuilder { String query_ ; String joiner_ ; URL context_ ; public UrlBuilder ( String base ) throws MalformedURLException { } public void setPath ( String path ) throws MalformedURLException { } public void addQuery ( String key , String value ) throws UnsupportedEncodingException { } public URL toUrl ( ) throws MalformedURLException { } } public static String map2query ( Map < String , String > map ) { String s = "" ; String joiner = "" ; for ( String key : map . keySet ( ) ) { try { s += ( ( joiner + key ) + "=" ) + ( URLEncoder . encode ( map . get ( key ) , "UTF-8" ) ) ; <START_BUG> joiner += "&" ; <END_BUG> } catch ( UnsupportedEncodingException e ) { return null ; } } return s ; } public static HttpURLConnection gapi_connect ( URL url , String method , String accessToken ) throws IOException { } }

Fix:
joiner = "&" ;
Buggy code:
public class Canvas extends Composite { Caret caret ; Canvas ( ) { } public Canvas ( Composite parent , int style ) { } void clearArea ( int x , int y , int width , int height ) { } public Caret getCaret ( ) { } void releaseChildren ( boolean destroy ) { } public void drawBackground ( GC gc , int x , int y , int width , int height ) { checkWidget ( ) ; if ( gc == null ) error ( ERROR_NULL_ARGUMENT ) ; if ( gc . isDisposed ( ) ) error ( ERROR_INVALID_ARGUMENT ) ; RECT rect = new RECT ( ) ; OS . SetRect ( rect , x , y , ( x + width ) , ( y + height ) ) ; int hDC = gc . handle ; <START_BUG> int pixel = ( ( background ) == ( - 1 ) ) ? OS . GetBkColor ( hDC ) : - 1 ; <END_BUG> drawBackground ( hDC , rect , pixel ) ; } public void scroll ( int destX , int destY , int x , int y , int width , int height , boolean all ) { } public void setCaret ( Caret caret ) { } public void setFont ( Font font ) { } LRESULT WM_INPUTLANGCHANGE ( int wParam , int lParam ) { } LRESULT WM_KILLFOCUS ( int wParam , int lParam ) { } LRESULT WM_SETFOCUS ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT WM_WINDOWPOSCHANGED ( int wParam , int lParam ) { } LRESULT WM_WINDOWPOSCHANGING ( int wParam , int lParam ) { } }

Fix:
int pixel = ( ( background ) == ( - 1 ) ) ? gc . getBackground ( ) . handle : - 1 ;
Buggy code:
public class MGPlayer { private String uuid ; private String name ; private RaceType raceType ; private FileConfiguration conf ; private double health ; private int perkpoints ; private ConcurrentMap < AbilityType , Integer > abilities = Maps . newConcurrentMap ( ) ; private void buildMGPlayer ( String uuid , FileConfiguration f ) { } public MGPlayer ( Player p , FileConfiguration f ) { } public MGPlayer ( UUID uuid , FileConfiguration f ) { } public MGPlayer ( String uuid , FileConfiguration f ) { } public void addAbility ( AbilityType type , int level ) { } public void removeAbility ( AbilityType type ) { } public void clearAbilities ( ) { } public boolean hasAbility ( AbilityType ability ) { } public ConcurrentMap < AbilityType , Integer > getAbilities ( ) { } public int getAbilityLevel ( AbilityType ability ) { } public int getPerkPoints ( ) { } public void setPerkPoints ( int newPoints ) { } public void addPerkPoints ( int added ) { } public boolean removePerkPoints ( int removed ) { } public Player getPlayer ( ) { } public RaceType getRaceType ( ) { } public void setRaceType ( RaceType raceType ) { } public UUID getUniqueId ( ) { } public String getUniqueIdAsString ( ) { } public String getName ( ) { } public void setHealth ( ) { <START_BUG> getRaceType ( ) . setHealth ( getPlayer ( ) ) ; <END_BUG> } public void restoreHealth ( ) { } public double getStoredHealth ( ) { } public double getHealth ( ) { } public void updateConfig ( ) { } public FileConfiguration getConfig ( ) { } public void saveFile ( ) { } public void updateHealth ( ) { } public boolean isRace ( RaceType race ) { } }

Fix:
getRaceType ( ) . setHealth ( getPlayer ( ) , health ) ;
Buggy code:
public class EvictionMetricsHandler extends AbstractRuntimeOnlyHandler { @ Override protected void executeRuntimeStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> PathAddress address = context . getCurrentAddress ( ) ; <END_BUG> String containerName = address . getElement ( ( ( address . size ( ) ) - 3 ) ) . getValue ( ) ; String cacheName = address . getElement ( ( ( address . size ( ) ) - 2 ) ) . getValue ( ) ; String name = Operations . getAttributeName ( operation ) ; EvictionMetric metric = EvictionMetric . forName ( name ) ; if ( metric == null ) { context . getFailureDescription ( ) . set ( ROOT_LOGGER . unknownMetric ( name ) ) ; } else { Cache < ? , ? > cache = ServiceContainerHelper . findValue ( context . getServiceRegistry ( false ) , CACHE . getServiceName ( containerName , cacheName ) ) ; if ( cache != null ) { context . getResult ( ) . set ( metric . getValue ( cache ) ) ; } } context . completeStep ( NOOP_RESULT_HANDLER ) ; } }

Fix:
PathAddress address = Operations . getPathAddress ( operation ) ;
Buggy code:
public class ResourceDescriptorSupport extends TestCase { protected ResourceDescriptor createSampleDescriptor ( ) { } protected ResourceDescriptor createNetworkDescriptor ( ) { ResourceDescriptor config = new ResourceDescriptor ( ) ; config . setId ( new String ( "1" ) ) ; Information info = new Information ( ) ; info . setDescription ( "network<seq2seq4repair_space>description" ) ; info . setType ( "network" ) ; info . setName ( "networklayer1.0" ) ; info . setVersion ( "1.0.0" ) ; config . setInformation ( info ) ; CapabilityDescriptor capabilityDescriptor = new CapabilityDescriptor ( ) ; List < CapabilityProperty > properties = new ArrayList < CapabilityProperty > ( ) ; properties . add ( new CapabilityProperty ( "name" , "value" ) ) ; capabilityDescriptor . setCapabilityProperties ( properties ) ; List < CapabilityDescriptor > capabilityDescriptors = new ArrayList < CapabilityDescriptor > ( ) ; capabilityDescriptors . add ( capabilityDescriptor ) ; config . setCapabilityDescriptors ( capabilityDescriptors ) ; <START_BUG> config . setNetworkFileDescriptor ( "network//network_example1.xml" ) ; <END_BUG> config . setNetworkTopology ( MockNetworkDescriptor . newNDLNetworkDescriptor ( ) ) ; return config ; } protected ResourceDescriptor createVirtualResourceDescriptor ( ) { } }

Fix:
config . setNetwork ( "network//network_example1.xml" ) ;
Buggy code:
public class SuggestedItineraryActivity extends ActionBarActivity { public static ArrayList < LinkedList < TourFeature > > itineraryListArray = new ArrayList < LinkedList < TourFeature > > ( ) ; Toolbar toolbar ; ViewPager pager ; ViewPagerAdapter vpadapter ; SlidingTabLayout tabs ; private GlobalsClass globals ; private static SuggestedItineraryActivity ourInstance = new SuggestedItineraryActivity ( ) ; private LinkedList < TourFeature > itineraryItemDay ; public static SuggestedItineraryActivity getInstance ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_itinerary ) ; toolbar = ( ( Toolbar ) ( findViewById ( si_toolbar ) ) ) ; <START_BUG> toolbar . setTitle ( suggested_itinerary ) ; <END_BUG> setSupportActionBar ( toolbar ) ; globals = ( ( GlobalsClass ) ( this . getApplicationContext ( ) ) ) ; toolbar . setBackgroundColor ( getResources ( ) . getColor ( itinerary_primary ) ) ; toolbar . setNavigationIcon ( ic_arrow_back_white_24dp ) ; toolbar . setNavigationOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { finish ( ) ; overridePendingTransition ( slide_content , slide_in ) ; } } ) ; CharSequence [ ] Titles = new CharSequence [ ItineraryList . MAX_ITINERARY_DAYS ] ; for ( int i = 0 ; i < ( ItineraryList . MAX_ITINERARY_DAYS ) ; i ++ ) { Titles [ i ] = "Day<seq2seq4repair_space>" + ( i + 1 ) ; } pager = ( ( ViewPager ) ( findViewById ( R . id . pager ) ) ) ; InitItineraryListArray ( globals ) ; vpadapter = new ViewPagerAdapter ( getSupportFragmentManager ( ) , Titles , ItineraryList . MAX_ITINERARY_DAYS , this ) ; pager . setAdapter ( vpadapter ) ; pager . setOnPageChangeListener ( new ViewPager . OnPageChangeListener ( ) { @ Override public void onPageScrolled ( int position , float positionOffset , int positionOffsetPixels ) { Log . e ( "PAGE" , ( "Scrolled" + position ) ) ; } @ Override public void onPageSelected ( int position ) { Log . e ( "PAGE" , ( "Selected" + position ) ) ; pager . getAdapter ( ) . notifyDataSetChanged ( ) ; } @ Override public void onPageScrollStateChanged ( int state ) { } } ) ; tabs = ( ( SlidingTabLayout ) ( findViewById ( R . id . tabs ) ) ) ; tabs . setDistributeEvenly ( true ) ; tabs . setCustomTabColorizer ( new SlidingTabLayout . TabColorizer ( ) { @ Override public int getIndicatorColor ( int position ) { return getResources ( ) . getColor ( selector ) ; } } ) ; tabs . setViewPager ( pager ) ; } public void InitItineraryListArray ( GlobalsClass globalsClass ) { } @ Override public void onBackPressed ( ) { } }

Fix:
toolbar . setTitle ( title_suggested_itinerary ) ;
Buggy code:
public class Javac12 extends DefaultCompilerAdapter { public boolean execute ( ) throws TaskException { getLogger ( ) . debug ( "Using<seq2seq4repair_space>classic<seq2seq4repair_space>compiler" ) ; Commandline cmd = setupJavacCommand ( true ) ; <START_BUG> OutputStream logstr = new org . apache . tools . ant . taskdefs . exec . LogOutputStream ( m_attributes . hackGetLogger ( ) , true ) ; <END_BUG> try { Class c = Class . forName ( "sun.tools.javac.Main" ) ; Constructor cons = c . getConstructor ( new Class [ ] { OutputStream . class , String . class } ) ; Object compiler = cons . newInstance ( new Object [ ] { logstr , "javac" } ) ; Method compile = c . getMethod ( "compile" , new Class [ ] { String [ ] . class } ) ; Boolean ok = ( ( Boolean ) ( compile . invoke ( compiler , new Object [ ] { cmd . getArguments ( ) } ) ) ) ; return ok . booleanValue ( ) ; } catch ( ClassNotFoundException ex ) { throw new TaskException ( ( "Cannot<seq2seq4repair_space>use<seq2seq4repair_space>classic<seq2seq4repair_space>compiler,<seq2seq4repair_space>as<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>available" + ( "<seq2seq4repair_space>A<seq2seq4repair_space>common<seq2seq4repair_space>solution<seq2seq4repair_space>is<seq2seq4repair_space>to<seq2seq4repair_space>set<seq2seq4repair_space>the<seq2seq4repair_space>environment<seq2seq4repair_space>variable" + "<seq2seq4repair_space>JAVA_HOME<seq2seq4repair_space>to<seq2seq4repair_space>your<seq2seq4repair_space>jdk<seq2seq4repair_space>directory." ) ) ) ; } catch ( Exception ex ) { if ( ex instanceof TaskException ) { throw ( ( TaskException ) ( ex ) ) ; } else { throw new TaskException ( "Error<seq2seq4repair_space>starting<seq2seq4repair_space>classic<seq2seq4repair_space>compiler:<seq2seq4repair_space>" , ex ) ; } } finally { try { logstr . close ( ) ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } } } }

Fix:
OutputStream logstr = new org . apache . tools . ant . taskdefs . exec . LogOutputStream ( getLogger ( ) , true ) ;
Buggy code:
public class HandlerEnable implements OperationStepHandler { public static final HandlerEnable INSTANCE = new HandlerEnable ( ) ; public void execute ( final OperationContext context , ModelNode operation ) { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { public void execute ( final OperationContext context , ModelNode operation ) { final ServiceRegistry serviceRegistry = context . getServiceRegistry ( true ) ; final ServiceController < ? > controller = serviceRegistry . getService ( LogServices . handlerName ( name ) ) ; if ( controller != null ) { controller . addListener ( new org . jboss . msc . service . AbstractServiceListener < Object > ( ) { public void listenerAdded ( ServiceController < ? > serviceController ) { serviceController . setMode ( ACTIVE ) ; } public void serviceStarted ( ServiceController < ? > serviceController ) { context . completeStep ( ) ; } } ) ; } else { context . completeStep ( ) ; } context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . isNormalServer ( ) ) {
Buggy code:
public abstract class SimpleDVConsumer implements Closeable { public abstract NumericDocValuesConsumer addNumericField ( FieldInfo field , long minValue , long maxValue ) throws IOException { } public abstract BinaryDocValuesConsumer addBinaryField ( FieldInfo field , boolean fixedLength , int maxLength ) throws IOException { } public abstract SortedDocValuesConsumer addSortedField ( FieldInfo field , int valueCount , boolean fixedLength , int maxLength ) throws IOException { } public void merge ( MergeState mergeState ) throws IOException { } protected void mergeNumericField ( MergeState mergeState ) throws IOException { long minValue = Long . MAX_VALUE ; long maxValue = Long . MIN_VALUE ; for ( AtomicReader reader : mergeState . readers ) { final int maxDoc = reader . maxDoc ( ) ; final Bits liveDocs = reader . getLiveDocs ( ) ; NumericDocValues docValues = reader . getNumericDocValues ( mergeState . fieldInfo . name ) ; if ( docValues == null ) { docValues = NumericDocValues . DEFAULT ; } for ( int i = 0 ; i < maxDoc ; i ++ ) { if ( ( liveDocs == null ) || ( liveDocs . get ( i ) ) ) { long val = docValues . get ( i ) ; minValue = Math . min ( val , minValue ) ; <START_BUG> maxValue = Math . min ( val , maxValue ) ; <END_BUG> } mergeState . checkAbort . work ( 300 ) ; } } NumericDocValuesConsumer field = addNumericField ( mergeState . fieldInfo , minValue , maxValue ) ; field . merge ( mergeState ) ; } protected void mergeBinaryField ( MergeState mergeState ) throws IOException { } protected void mergeSortedField ( MergeState mergeState ) throws IOException { } }

Fix:
maxValue = Math . max ( val , maxValue ) ;
Buggy code:
public class TestFieldScoreQuery extends FunctionTestSetup { public TestFieldScoreQuery ( ) { } @ Test public void testRankByte ( ) throws Exception { } @ Test public void testRankShort ( ) throws Exception { } @ Test public void testRankInt ( ) throws Exception { } @ Test public void testRankFloat ( ) throws Exception { } private void doTestRank ( String field , FieldScoreQuery . Type tp ) throws Exception { IndexSearcher s = new IndexSearcher ( dir , true ) ; Query q = new FieldScoreQuery ( field , tp ) ; log ( ( "test:<seq2seq4repair_space>" + q ) ) ; <START_BUG> QueryUtils . check ( q , s ) ; <END_BUG> ScoreDoc [ ] h = s . search ( q , null , 1000 ) . scoreDocs ; assertEquals ( "All<seq2seq4repair_space>docs<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>matched!" , N_DOCS , h . length ) ; String prevID = "ID" + ( ( N_DOCS ) + 1 ) ; for ( int i = 0 ; i < ( h . length ) ; i ++ ) { String resID = s . doc ( h [ i ] . doc ) . get ( ID_FIELD ) ; log ( ( ( ( ( i + ".<seq2seq4repair_space>score=" ) + ( h [ i ] . score ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + resID ) ) ; log ( s . explain ( q , h [ i ] . doc ) ) ; assertTrue ( ( ( ( "res<seq2seq4repair_space>id<seq2seq4repair_space>" + resID ) + "<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space><<seq2seq4repair_space>prev<seq2seq4repair_space>res<seq2seq4repair_space>id<seq2seq4repair_space>" ) + prevID ) , ( ( resID . compareTo ( prevID ) ) < 0 ) ) ; prevID = resID ; } s . close ( ) ; } @ Test public void testExactScoreByte ( ) throws Exception { } @ Test public void testExactScoreShort ( ) throws Exception { } @ Test public void testExactScoreInt ( ) throws Exception { } @ Test public void testExactScoreFloat ( ) throws Exception { } private void doTestExactScore ( String field , FieldScoreQuery . Type tp ) throws Exception { } @ Test public void testCachingByte ( ) throws Exception { } @ Test public void testCachingShort ( ) throws Exception { } @ Test public void testCachingInt ( ) throws Exception { } @ Test public void testCachingFloat ( ) throws Exception { } private void doTestCaching ( String field , FieldScoreQuery . Type tp ) throws Exception { } private String testName ( ) { } }

Fix:
QueryUtils . check ( random , q , s ) ;
Buggy code:
public class SpellcheckAction extends FrameAction { public SpellcheckAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> ComposerController composerController = ( ( ComposerController ) ( getFrameController ( ) ) ) ; <END_BUG> String checked = composerController . getComposerSpellCheck ( ) . checkText ( composerController . getEditorController ( ) . getViewText ( ) ) ; composerController . getEditorController ( ) . setViewText ( checked ) ; } }

Fix:
ComposerController composerController = ( ( ComposerController ) ( getFrameMediator ( ) ) ) ;
Buggy code:
public class RowIterationTest extends CleanupHelper { public static final String TABLE1 = "Keyspace2" ; public static final InetAddress LOCAL = FBUtilities . getLocalAddress ( ) ; @ Test public void testRowIteration ( ) throws IOException , InterruptedException , ExecutionException { Table table = Table . open ( RowIterationTest . TABLE1 ) ; ColumnFamilyStore store = table . getColumnFamilyStore ( "Super3" ) ; final int ROWS_PER_SSTABLE = 10 ; Set < DecoratedKey > inserted = new HashSet < DecoratedKey > ( ) ; for ( int i = 0 ; i < ROWS_PER_SSTABLE ; i ++ ) { DecoratedKey key = Util . dk ( String . valueOf ( i ) ) ; RowMutation rm = new RowMutation ( RowIterationTest . TABLE1 , key . key ) ; <START_BUG> rm . add ( new org . apache . cassandra . db . filter . QueryPath ( "Super3" , ByteBufferUtil . bytes ( "sc" ) , ByteBuffer . wrap ( String . valueOf ( i ) . getBytes ( ) ) ) , ByteBuffer . wrap ( new byte [ ( ROWS_PER_SSTABLE * 10 ) - ( i * 2 ) ] ) , i ) ; <END_BUG> rm . apply ( ) ; inserted . add ( key ) ; } store . forceBlockingFlush ( ) ; Assert . assertEquals ( inserted . toString ( ) , inserted . size ( ) , Util . getRangeSlice ( store ) . size ( ) ) ; } @ Test public void testRowIterationDeletionTime ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testRowIterationDeletion ( ) throws IOException , InterruptedException , ExecutionException { } }

Fix:
rm . add ( new org . apache . cassandra . db . filter . QueryPath ( "Super3" , ByteBufferUtil . bytes ( "sc" ) , ByteBufferUtil . bytes ( String . valueOf ( i ) ) ) , ByteBuffer . wrap ( new byte [ ( ROWS_PER_SSTABLE * 10 ) - ( i * 2 ) ] ) , i ) ;
Buggy code:
public class CustomFileIconProviderTest { @ Test public void testIconsExistence ( ) { } private void testIconExistence ( String iconName ) { } private Icon getIcon ( String iconName ) { <START_BUG> return IconManager . getIcon ( FILE_ICON_SET , iconName ) ; <END_BUG> } }

Fix:
return IconManager . getIcon ( FILE , iconName ) ;
Buggy code:
public class TestUmlUseCase extends GenericObjectTestFixture { public TestUmlUseCase ( String arg0 ) { } public void testNamespace ( ) { <START_BUG> Object o = getFactory ( ) . create ( USE_CASE ) ; <END_BUG> assertNotNull ( "Didn't<seq2seq4repair_space>create<seq2seq4repair_space>object" , o ) ; assertTrue ( "Should<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>base" , ModelFacade . isABase ( o ) ) ; assertTrue ( "Should<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>use<seq2seq4repair_space>case" , ModelFacade . isAUseCase ( o ) ) ; runTruthTests ( o ) ; } protected void initializeTruth ( ) { } }

Fix:
Object o = ModelFacade . getFacade ( ) . create ( USE_CASE ) ;
Buggy code:
public class SendMessageThread implements Runnable { private final Map < Player , String > channels ; private final Player player ; private final String channel ; private final String message ; public SendMessageThread ( String channel , Map < Player , String > channels , Player player , String message ) { } @ Override public void run ( ) { int i = 0 ; for ( Player p : channels . keySet ( ) ) { if ( channels . get ( p ) . equals ( channel ) ) { <START_BUG> p . sendMessage ( ( ( ( ( ( ( ( ( ( ChatColor . GRAY ) + "[" ) + ( ChatColor . GREEN ) ) + ( channel ) ) + ( ChatColor . GRAY ) ) + "]" ) + ( p . getDisplayName ( ) ) ) + ":<seq2seq4repair_space>" ) + ( message ) ) ) ; <END_BUG> i ++ ; } } if ( i <= 1 ) player . sendMessage ( ( ( ( ( ChatColor . GOLD ) + "[" ) + ( channel ) ) + "]<seq2seq4repair_space>No<seq2seq4repair_space>hears<seq2seq4repair_space>you.<seq2seq4repair_space>You<seq2seq4repair_space>are<seq2seq4repair_space>alone<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>channel." ) ) ; } }

Fix:
p . sendMessage ( ( ( ( ( ( ( ( ( ( ChatColor . GRAY ) + "[" ) + ( ChatColor . GREEN ) ) + ( channel ) ) + ( ChatColor . GRAY ) ) + "]" ) + ( player . getDisplayName ( ) ) ) + ":<seq2seq4repair_space>" ) + ( message ) ) ) ;
Buggy code:
public class BannedPlayerListener implements Listener { private final BanHandler handler ; private final Set < String > bannedPlayers ; public BannedPlayerListener ( BanHammer plugin ) { } @ EventHandler ( priority = EventPriority . HIGH ) public void onPlayerLogin ( PlayerLoginEvent event ) { String playerName = event . getPlayer ( ) . getName ( ) ; <START_BUG> if ( this . handler . isPlayerBanned ( playerName ) ) { <END_BUG> String message ; BanRecord ban = handler . getPlayerBan ( playerName ) ; if ( ban . isActive ( ) ) { if ( ban . getType ( ) . equals ( PERMENANT ) ) { message = String . format ( "You<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>permanently<seq2seq4repair_space>banned.<seq2seq4repair_space>Reason:<seq2seq4repair_space>%s." , ban . getReason ( ) ) ; } else { Date expiryDate = new Date ( ban . getExpiresAt ( ) ) ; DateFormat dateFormat = new SimpleDateFormat ( "MMM<seq2seq4repair_space>d<seq2seq4repair_space>H:mm<seq2seq4repair_space>a<seq2seq4repair_space>" ) ; String expiryDateString = ( ( ( dateFormat . format ( expiryDate ) ) + "(" ) + ( Calendar . getInstance ( ) . getTimeZone ( ) . getDisplayName ( ) ) ) + ")" ; message = String . format ( "You<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>banned<seq2seq4repair_space>until<seq2seq4repair_space>%s." , expiryDateString ) ; } event . disallow ( KICK_BANNED , message ) ; } else { this . bannedPlayers . remove ( playerName . toLowerCase ( ) ) ; } } } }

Fix:
if ( this . bannedPlayers . contains ( playerName . toLowerCase ( ) ) ) {
Buggy code:
public class TarEntry implements TarConstants { private StringBuffer name ; private int mode ; private int userId ; private int groupId ; private long size ; private long modTime ; private byte linkFlag ; private StringBuffer linkName ; private StringBuffer magic ; private StringBuffer userName ; private StringBuffer groupName ; private int devMajor ; private int devMinor ; private File file ; public static final int MAX_NAMELEN = 31 ; public static final int DEFAULT_DIR_MODE = 16877 ; public static final int DEFAULT_FILE_MODE = 33188 ; public static final int MILLIS_PER_SECOND = 1000 ; private TarEntry ( ) { } public TarEntry ( String name ) { } public TarEntry ( String name , boolean preserveLeadingSlashes ) { } public TarEntry ( String name , byte linkFlag ) { } public TarEntry ( File file ) { } public TarEntry ( byte [ ] headerBuf ) { } public boolean equals ( TarEntry it ) { } public boolean equals ( Object it ) { } public int hashCode ( ) { } public boolean isDescendent ( TarEntry desc ) { } public String getName ( ) { } public void setName ( String name ) { } public void setMode ( int mode ) { } public String getLinkName ( ) { } public int getUserId ( ) { } public void setUserId ( int userId ) { } public int getGroupId ( ) { } public void setGroupId ( int groupId ) { } public String getUserName ( ) { } public void setUserName ( String userName ) { } public String getGroupName ( ) { } public void setGroupName ( String groupName ) { } public void setIds ( int userId , int groupId ) { } public void setNames ( String userName , String groupName ) { } public void setModTime ( long time ) { } public void setModTime ( Date time ) { } public Date getModTime ( ) { } public File getFile ( ) { } public int getMode ( ) { } public long getSize ( ) { } public void setSize ( long size ) { } public boolean isGNULongNameEntry ( ) { } public boolean isDirectory ( ) { } public TarEntry [ ] getDirectoryEntries ( ) { } public void writeEntryHeader ( byte [ ] outbuf ) { } public void parseTarHeader ( byte [ ] header ) { } private static String normalizeFileName ( String fileName , boolean preserveLeadingSlashes ) { <START_BUG> String osname = System . getProperty ( "os.name" ) . toLowerCase ( Locale . US ) ; <END_BUG> if ( osname != null ) { if ( osname . startsWith ( "windows" ) ) { if ( ( fileName . length ( ) ) > 2 ) { char ch1 = fileName . charAt ( 0 ) ; char ch2 = fileName . charAt ( 1 ) ; if ( ( ch2 == ':' ) && ( ( ( ch1 >= 'a' ) && ( ch1 <= 'z' ) ) || ( ( ch1 >= 'A' ) && ( ch1 <= 'Z' ) ) ) ) { fileName = fileName . substring ( 2 ) ; } } } else if ( ( osname . indexOf ( "netware" ) ) > ( - 1 ) ) { int colon = fileName . indexOf ( ':' ) ; if ( colon != ( - 1 ) ) { fileName = fileName . substring ( ( colon + 1 ) ) ; } } } fileName = fileName . replace ( File . separatorChar , '//' ) ; while ( ( ! preserveLeadingSlashes ) && ( fileName . startsWith ( "//" ) ) ) { fileName = fileName . substring ( 1 ) ; } return fileName ; } }

Fix:
String osname = System . getProperty ( "os.name" ) . toLowerCase ( Locale . ENGLISH ) ;
Buggy code:
public class Forklift extends Subsystem { private final Talon forkliftWinch = new Talon ( RobotMap . FORKLIFT_WINCH ) ; private final Solenoid leftArm = new Solenoid ( RobotMap . FORKLIFT_SOLENOID_LEFT ) ; private final Solenoid rightArm = new Solenoid ( RobotMap . FORKLIFT_SOLENOID_RIGHT ) ; private final AnalogInput sensor = new AnalogInput ( RobotMap . FORKLIFT_SENSOR ) ; public void initDefaultCommand ( ) { } public void stop ( ) { } public void close ( ) { } public void open ( ) { } public void setLeft ( boolean open ) { } public void setRight ( boolean open ) { } public void move ( double speed ) { } public double getHeight ( ) { <START_BUG> return ( ( getSensorVoltage ( ) ) // 10 ) * 6.5 ; <END_BUG> } public double getSensorVoltage ( ) { } public void updateForkliftDashboard ( ) { } }

Fix:
return ( ( getSensorVoltage ( ) ) // 5 ) * 5 ;
Buggy code:
class Simbolos { public static int pertence ( String n ) { if ( ( ( ( ( ( ( ( n . equals ( "+" ) ) || ( n . equals ( "-" ) ) ) || ( n . equals ( "*" ) ) ) || ( n . equals ( "//" ) ) ) || ( n . equals ( "%" ) ) ) || ( n . equals ( "^" ) ) ) || ( n . equals ( "(" ) ) ) || ( n . equals ( ")" ) ) ) return 1 ; else if ( n . equals ( "=" ) ) return 2 ; else if ( n . equals ( "if" ) ) return 3 ; else if ( n . equals ( "loop" ) ) return 4 ; else if ( n . equals ( "var" ) ) return 5 ; else if ( n . equals ( "MAIOR" ) ) return 6 ; else if ( n . equals ( "MENOR" ) ) return 7 ; else if ( n . equals ( "MAIORI" ) ) return 8 ; else if ( n . equals ( "MENORI" ) ) return 9 ; else if ( n . equals ( "IGUAL" ) ) return 10 ; else if ( n . equals ( "DIF" ) ) return 11 ; else <START_BUG> if ( n . equals ( "E" ) ) <END_BUG> return 12 ; else if ( n . equals ( "OU" ) ) return 13 ; else if ( n . equals ( ";" ) ) return 14 ; else return - 1 ; } }

Fix:
if ( n . equals ( "EE" ) )
Buggy code:
public class ListNodeData implements Releasable { public final ListNode thisNode ; public final int level ; public final int totalSize ; public final ListNode leftNode ; public final Object value ; public final ListNode rightNode ; protected final ImmutableFactory valueFactory ; public ListNodeData ( ListNode thisNode ) { } public ListNodeData ( ListNode thisNode , int level , int totalSize , ListNode leftNode , Object value , ListNode rightNode ) { } public ListNodeData ( ListNode thisNode , ByteBuffer byteBuffer ) { } public boolean isNil ( ) { } public int getDurableLength ( ) { } public void serialize ( ByteBuffer byteBuffer ) { } public int size ( ) { } public ListNode getListNode ( int ndx ) { } public Object get ( ) { } public int getIndex ( Object value ) { } public int getIndexRight ( Object value ) { } public int findIndex ( Object value ) { } public int findIndexRight ( Object value ) { } public void flatList ( List list ) { } public ListNode skew ( ) { if ( ( isNil ( ) ) || ( leftNode . isNil ( ) ) ) return thisNode ; ListNodeData leftData = leftNode . getData ( ) ; if ( ( leftData . level ) == ( level ) ) { <START_BUG> ListNode t = new ListNode ( thisNode . factory , level , ( ( ( totalSize ) - ( leftData . totalSize ) ) + ( leftData . leftNode . totalSize ( ) ) ) , leftData . rightNode , value , rightNode ) ; <END_BUG> return new ListNode ( thisNode . factory , leftData . level , totalSize , leftData . leftNode , leftData . value , t ) ; } else return thisNode ; } public ListNode split ( ) { } public ListNode add ( int ndx , Object value ) { } private ListNode successor ( ) { } private ListNode leftMost ( ) { } private ListNode predecessor ( ) { } private ListNode rightMost ( ) { } private ListNode decreaseLevel ( ) { } public ListNode remove ( int ndx ) throws IOException { } public String toString ( ) { } @ Override public void releaseAll ( ) throws IOException { } }

Fix:
ListNode t = new ListNode ( thisNode . factory , level , ( ( ( totalSize ) - ( leftData . totalSize ) ) + ( leftData . rightNode . totalSize ( ) ) ) , leftData . rightNode , value , rightNode ) ;
Buggy code:
public class MouseActionSelectNode extends MouseActionState { private List < Node > nodesToPaintIcon = new ArrayList < Node > ( ) ; public MouseActionSelectNode ( MainModel pMM ) { } @ Override public boolean cleanup ( ) { } @ Override public boolean execute ( MouseEvent e ) { } @ Override public void paintOnImage ( Graphics2D g2 ) { } private boolean jumpToNextPath ( Node node ) { Path path = model . getCurrentPath ( ) ; if ( null == path ) return false ; List < Node > nodes = path . getNodes ( ) ; if ( ( null != path ) && ( 0 != ( nodes . size ( ) ) ) ) { int mapID = model . getCurrentMapID ( ) ; List < Node > nodesCross = Database . getAllMapRelationNodesFromMapId ( mapID ) ; if ( nodesCross . contains ( node ) ) { if ( ( nodes . size ( ) ) == 1 ) { model . setNextPath ( ) ; return true ; } <START_BUG> if ( ( ( nodes . get ( 0 ) . getId ( ) ) == ( node . getId ( ) ) ) && ( ( ( model . getCurrentPathIdx ( ) ) - 1 ) == 0 ) ) { <END_BUG> model . setPrivousPath ( ) ; return true ; } if ( ( ( nodes . get ( ( ( nodes . size ( ) ) - 1 ) ) . getId ( ) ) == ( node . getId ( ) ) ) && ( ( ( model . getCurrentPathIdx ( ) ) + 1 ) < ( model . getPaths ( ) . size ( ) ) ) ) { model . setNextPath ( ) ; return true ; } } } return false ; } private AnimationObject addInfoAnimation ( ) { } }

Fix:
if ( ( ( nodes . get ( 0 ) . getId ( ) ) == ( node . getId ( ) ) ) && ( ( ( model . getCurrentPathIdx ( ) ) - 1 ) >= 0 ) ) {
Buggy code:
public class RAWThumbnailer extends Player { private static final Logger LOGGER = LoggerFactory . getLogger ( RAWThumbnailer . class ) ; public static final String ID = "rawthumbs" ; protected String [ ] getDefaultArgs ( ) { } @ Override public String [ ] args ( ) { } @ Override public JComponent config ( ) { } @ Override public String executable ( ) { } @ Override public String id ( ) { } @ Override public ProcessWrapper launchTranscode ( DLNAResource dlna , DLNAMediaInfo media , OutputParams params ) throws IOException { PmsConfiguration prev = configuration ; configuration = ( ( DeviceConfiguration ) ( params . mediaRenderer ) ) ; params . waitbeforestart = 1 ; params . minBufferSize = 1 ; <START_BUG> params . maxBufferSize = 5 ; <END_BUG> params . hidebuffer = true ; final String filename = dlna . getSystemName ( ) ; if ( media == null ) { return null ; } byte [ ] image = null ; try { image = RAWThumbnailer . getThumbnail ( params , filename ) ; } catch ( IOException e ) { RAWThumbnailer . LOGGER . error ( "Error<seq2seq4repair_space>extracting<seq2seq4repair_space>thumbnail" , e ) ; } ProcessWrapper pw = new InternalJavaProcessImpl ( new ByteArrayInputStream ( image ) ) ; configuration = prev ; return pw ; } @ Override public String mimeType ( ) { } @ Override public String name ( ) { } @ Override public int purpose ( ) { } @ Override public int type ( ) { } public static byte [ ] getThumbnail ( OutputParams params , String fileName ) throws IOException { } @ Override public boolean isCompatible ( DLNAResource resource ) { } }

Fix:
params . maxBufferSize = 6 ;
Buggy code:
public class ProjectHandler extends ModelElementHandler { public static final String BASEDIR_ATTR = "basedir" ; public static final String NAME_ATTR = "name" ; public static final String DEFAULT_ATTR = "default" ; public static final String REF_ELEMENT = "ant:ref" ; public static final String INCLUDE_ELEMENT = "ant:include" ; public static final String TARGET_ELEMENT = "target" ; private Project project ; public ProjectHandler ( ) { } public ProjectHandler ( Project project ) { } public Project getProject ( ) throws NoProjectReadException { } public void processElement ( String elementName ) throws SAXParseException { if ( ( project ) == null ) { project = new Project ( getElementSource ( ) , getLocation ( ) ) ; setModelElement ( project ) ; project . setDefaultTarget ( getAttribute ( ProjectHandler . DEFAULT_ATTR ) ) ; project . setBase ( getAttribute ( ProjectHandler . BASEDIR_ATTR ) ) ; project . setName ( getAttribute ( ProjectHandler . NAME_ATTR ) ) ; <START_BUG> project . setAspects ( getAspects ( ) ) ; <END_BUG> } } public void startElement ( String uri , String localName , String qualifiedName , Attributes attributes ) throws SAXParseException { } protected void validateAttribute ( String attributeName , String attributeValue ) throws SAXParseException { } }

Fix:
project . addAspectAttributes ( getAspectAttributes ( ) ) ;
Buggy code:
public class UpgradeTool { private static final Logger LOG = LoggerFactory . getLogger ( UpgradeTool . class ) ; private static final String BATCH_NAME = "cdap-etl-batch" ; private static final String REALTIME_NAME = "cdap-etl-realtime" ; private static final Gson GSON = new GsonBuilder ( ) . setPrettyPrinting ( ) . create ( ) ; private static final int DEFAULT_READ_TIMEOUT_MILLIS = 90 * 1000 ; private final NamespaceClient namespaceClient ; private final ApplicationClient appClient ; private final ArtifactSummary batchArtifact ; private final ArtifactSummary realtimeArtifact ; private final ArtifactClient artifactClient ; @ Nullable private final File errorDir ; private UpgradeTool ( ClientConfig clientConfig , @ Nullable File errorDir ) { } private Set < Id . Application > upgrade ( ) throws Exception { } private Set < Id . Application > upgrade ( Id . Namespace namespace ) throws Exception { } private boolean upgrade ( Id . Application appId ) throws Exception { } private < T extends ETLConfig > void upgrade ( Id . Application appId , ArtifactSummary appArtifact , T config ) throws IOException { AppRequest < T > updateRequest = new AppRequest ( appArtifact , config ) ; try { appClient . update ( appId , updateRequest ) ; } catch ( Exception e ) { UpgradeTool . LOG . error ( "Error<seq2seq4repair_space>upgrading<seq2seq4repair_space>pipeline<seq2seq4repair_space>{}." , appId , e ) ; if ( ( errorDir ) != null ) { File errorFile = new File ( errorDir , String . format ( "%s-%s.json" , appId . getNamespaceId ( ) , appId . getId ( ) ) ) ; UpgradeTool . LOG . error ( "Writing<seq2seq4repair_space>config<seq2seq4repair_space>for<seq2seq4repair_space>pipeline<seq2seq4repair_space>{}<seq2seq4repair_space>to<seq2seq4repair_space>{}<seq2seq4repair_space>for<seq2seq4repair_space>further<seq2seq4repair_space>manual<seq2seq4repair_space>investigation." , appId , errorFile . getAbsolutePath ( ) ) ; try ( OutputStreamWriter outputStreamWriter = new OutputStreamWriter ( new FileOutputStream ( errorFile ) ) ) { <START_BUG> outputStreamWriter . write ( UpgradeTool . GSON . toJson ( config ) ) ; <END_BUG> } } } } public static void main ( String [ ] args ) throws Exception { } private static void printUpgraded ( Set < Id . Application > pipelines ) { } private static ClientConfig getClientConfig ( CommandLine commandLine ) throws IOException { } private static void convertFile ( String configFilePath , String outputFilePath , ArtifactClient artifactClient ) throws Exception { } @ SuppressWarnings ( "unused" ) private static class ETLAppRequest { private ArtifactSummary artifact ; private JsonObject config ; } private static boolean shouldUpgrade ( ArtifactSummary artifactSummary ) { } private static ETLBatchConfig convertBatchConfig ( String artifactVersion , String configStr , UpgradeContext upgradeContext ) { } private static ETLRealtimeConfig convertRealtimeConfig ( String artifactVersion , String configStr , UpgradeContext upgradeContext ) { } }

Fix:
outputStreamWriter . write ( UpgradeTool . GSON . toJson ( updateRequest ) ) ;
Buggy code:
public class CloseAllPerspectivesAction extends Action { private WorkbenchWindow window ; public CloseAllPerspectivesAction ( WorkbenchWindow window ) { } public void run ( ) { WorkbenchPage page = ( ( WorkbenchPage ) ( window . getActivePage ( ) ) ) ; if ( page != null ) <START_BUG> page . close ( ) ; <END_BUG> } }

Fix:
page . closeAllPerspectives ( ) ;
Buggy code:
public class DecoratorsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { private Text descriptionText ; private CheckboxTableViewer checkboxViewer ; protected Control createContents ( Composite parent ) { } private void createDecoratorsArea ( Composite mainComposite ) { } private void createDescriptionArea ( Composite mainComposite ) { } private void populateDecorators ( ) { } private void showDescription ( DecoratorDefinition definition ) { if ( ( ( descriptionText ) == null ) || ( descriptionText . isDisposed ( ) ) ) { return ; } String text = definition . getDescription ( ) ; if ( ( text == null ) || ( ( text . length ( ) ) == 0 ) ) <START_BUG> descriptionText . setText ( WorkbenchMessages . getString ( "DecoratorsPreferencePage.noDescription" ) ) ; <END_BUG> else descriptionText . setText ( text ) ; } private void clearDescription ( ) { } protected void performDefaults ( ) { } public boolean performOk ( ) { } public void init ( IWorkbench workbench ) { } private DecoratorDefinition [ ] getAllDefinitions ( ) { } private DecoratorManager getDecoratorManager ( ) { } }

Fix:
descriptionText . setText ( WorkbenchMessages . getString ( "PreferencePage.noDescription" ) ) ;
Buggy code:
public class ViewExamActivity extends ActionBarActivity { private TextView name_details ; private TextView date_details ; private TextView difficulty_details ; private TextView registered_details ; private Exam exam ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_view_exam ) ; this . exam = ( ( Exam ) ( getIntent ( ) . getSerializableExtra ( "exam" ) ) ) ; name_details = ( ( TextView ) ( findViewById ( details_name ) ) ) ; date_details = ( ( TextView ) ( findViewById ( details_date ) ) ) ; difficulty_details = ( ( TextView ) ( findViewById ( details_difficulty ) ) ) ; registered_details = ( ( TextView ) ( findViewById ( details_registered ) ) ) ; name_details . setText ( exam . getName ( ) ) ; date_details . setText ( new SimpleDateFormat ( "EEE,<seq2seq4repair_space>d<seq2seq4repair_space>MMMM<seq2seq4repair_space>yyyy,<seq2seq4repair_space>HH:mm" , Locale . ITALIAN ) . format ( exam . getExamDate ( ) . getTime ( ) ) ) ; difficulty_details . setText ( exam . getDifficulty ( ) . getName ( ) ) ; <START_BUG> if ( ( exam . isRegistered ( ) ) == true ) <END_BUG> registered_details . setText ( "You've<seq2seq4repair_space>already<seq2seq4repair_space>signed<seq2seq4repair_space>up<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>exam" ) ; else registered_details . setText ( "You<seq2seq4repair_space>haven't<seq2seq4repair_space>signed<seq2seq4repair_space>up<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>exam<seq2seq4repair_space>yet" ) ; getSupportActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void showToastMessage ( String message ) { } }

Fix:
if ( exam . isRegistered ( ) )
Buggy code:
public class BatchHoldbackHandler extends CommandHandlerWithHelp { public BatchHoldbackHandler ( ) { } @ Override public boolean isAvailable ( CommandContext ctx ) { } @ Override protected void doHandle ( CommandContext ctx ) { BatchManager batchManager = ctx . getBatchManager ( ) ; if ( ! ( batchManager . isBatchActive ( ) ) ) { ctx . printLine ( "No<seq2seq4repair_space>active<seq2seq4repair_space>batch<seq2seq4repair_space>to<seq2seq4repair_space>holdback." ) ; return ; } String name = null ; if ( ctx . hasArguments ( ) ) { <START_BUG> name = ctx . getArguments ( ) . get ( 0 ) ; <END_BUG> } if ( batchManager . isHeldback ( name ) ) { ctx . printLine ( ( ( "There<seq2seq4repair_space>already<seq2seq4repair_space>is<seq2seq4repair_space>" + ( name == null ? "unnamed" : ( "'" + name ) + "'" ) ) + "<seq2seq4repair_space>batch<seq2seq4repair_space>held<seq2seq4repair_space>back." ) ) ; return ; } if ( ! ( batchManager . holdbackActiveBatch ( name ) ) ) { ctx . printLine ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>holdback<seq2seq4repair_space>the<seq2seq4repair_space>batch." ) ; } } }

Fix:
name = ctx . getOtherArguments ( ) . get ( 0 ) ;
Buggy code:
public final class PropertyVariableInterpolator extends VariableInterpolator { private final Object model ; private PropertyVariableInterpolator ( final String string , final Object model ) { } public static String interpolate ( final String string , final Object object ) { <START_BUG> if ( ( string . indexOf ( "${" ) ) != ( - 1 ) ) { <END_BUG> return new PropertyVariableInterpolator ( string , object ) . toString ( ) ; } return string ; } @ Override protected String getValue ( final String variableName ) { } }

Fix:
if ( string . contains ( "${" ) ) {