nus-yam/ex-repair huggingface dataset:
Buggy code:
public class WorkManagerAdd extends AbstractBoottimeAddStepHandler { public static final WorkManagerAdd INSTANCE = new WorkManagerAdd ( ) ; public static enum WmParameters { NAME ( SimpleAttributeDefinitionBuilder . create ( "name" , STRING ) . setAllowExpression ( true ) . setAllowNull ( false ) . setMeasurementUnit ( NONE ) . setRestartAllServices ( ) . setXmlName ( "name" ) . build ( ) ) ; private WmParameters ( SimpleAttributeDefinition attribute ) { } public SimpleAttributeDefinition getAttribute ( ) { } private SimpleAttributeDefinition attribute ; } @ Override protected void populateModel ( final ModelNode operation , final ModelNode model ) throws OperationFailedException { } @ Override protected void performBoottime ( final OperationContext context , final ModelNode operation , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { <START_BUG> String name = WorkManagerAdd . WmParameters . NAME . getAttribute ( ) . validateResolvedOperation ( model ) . asString ( ) ; <END_BUG> ServiceTarget serviceTarget = context . getServiceTarget ( ) ; WorkManager wm = new NamedWorkManager ( name ) ; final WorkManagerService wmService = new WorkManagerService ( wm ) ; ServiceBuilder builder = serviceTarget . addService ( WORKMANAGER_SERVICE . append ( name ) , wmService ) ; if ( ( operation . get ( Constants . WORKMANAGER_LONG_RUNNING ) . isDefined ( ) ) && ( operation . get ( Constants . WORKMANAGER_LONG_RUNNING ) . asBoolean ( ) ) ) { builder . addDependency ( EXECUTOR . append ( ( ( name + "-" ) + ( Constants . WORKMANAGER_LONG_RUNNING ) ) ) , Executor . class , wmService . getExecutorLongInjector ( ) ) ; } builder . addDependency ( EXECUTOR . append ( ( ( name + "-" ) + ( Constants . WORKMANAGER_SHORT_RUNNING ) ) ) , Executor . class , wmService . getExecutorShortInjector ( ) ) ; builder . addDependency ( JBOSS_TXN_XA_TERMINATOR , JBossXATerminator . class , wmService . getXaTerminatorInjector ( ) ) . addListener ( verificationHandler ) . setInitialMode ( ACTIVE ) . install ( ) ; } }

Fix:
String name = WorkManagerAdd . WmParameters . NAME . getAttribute ( ) . resolveModelAttribute ( context , model ) . asString ( ) ;
Buggy code:
public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigurationUtilsTests { @ Test public void buildMergedConfigWithoutAnnotation ( ) { } @ Test public void buildMergedConfigWithBareAnnotations ( ) { Class < ? > testClass = BareAnnotations . class ; MergedContextConfiguration mergedConfig = buildMergedContextConfiguration ( testClass ) ; <START_BUG> assertMergedConfig ( mergedConfig , testClass , new String [ ] { "classpath:org//springframework//test//context//support//AbstractContextLoaderUtilsTests$BareAnnotations-context.xml" } , EMPTY_CLASS_ARRAY , DelegatingSmartContextLoader . class ) ; <END_BUG> } @ Test public void buildMergedConfigWithLocalAnnotationAndLocations ( ) { } @ Test public void buildMergedConfigWithMetaAnnotationAndLocations ( ) { } @ Test public void buildMergedConfigWithMetaAnnotationAndClasses ( ) { } private void buildMergedConfigWithMetaAnnotationAndClasses ( Class < ? > testClass ) { } @ Test public void buildMergedConfigWithLocalAnnotationAndClasses ( ) { } @ Test public void buildMergedConfigWithAtWebAppConfigurationWithAnnotationAndClassesOnSuperclass ( ) { } @ Test public void buildMergedConfigWithLocalAnnotationAndOverriddenContextLoaderAndLocations ( ) { } @ Test public void buildMergedConfigWithLocalAnnotationAndOverriddenContextLoaderAndClasses ( ) { } @ Test public void buildMergedConfigWithLocalAndInheritedAnnotationsAndLocations ( ) { } @ Test public void buildMergedConfigWithLocalAndInheritedAnnotationsAndClasses ( ) { } @ Test public void buildMergedConfigWithAnnotationsAndOverriddenLocations ( ) { } @ Test public void buildMergedConfigWithAnnotationsAndOverriddenClasses ( ) { } @ ContextConfiguration @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . TYPE ) public static @ interface SpringAppConfig { Class < ? > [ ] classes ( ) default { } ; } @ BootstrapTestUtilsMergedConfigTests . SpringAppConfig ( classes = { FooConfig . class , BarConfig . class } ) public abstract static class Dog { } public abstract static class WorkingDog extends BootstrapTestUtilsMergedConfigTests . Dog { } public static class GermanShepherd extends BootstrapTestUtilsMergedConfigTests . WorkingDog { } }

Fix:
assertMergedConfig ( mergedConfig , testClass , new String [ ] { "classpath:org//springframework//test//context//support//AbstractContextConfigurationUtilsTests$BareAnnotations-context.xml" } , EMPTY_CLASS_ARRAY , DelegatingSmartContextLoader . class ) ;
Buggy code:
public class Kill implements CommandExecutor { @ Override public boolean onCommand ( CommandSender sender , Command cmd , String label , String [ ] args ) { if ( ! ( sender . hasPermission ( "novau.kill" ) ) ) { sender . sendMessage ( StockMessages . noPermission ( ) ) ; return true ; } if ( ( args . length ) == 0 ) { sender . sendMessage ( StockMessages . usage ( "kill<seq2seq4repair_space><player>" ) ) ; } else if ( ( args . length ) == 1 ) { String args0 = args [ 0 ] ; if ( ( Bukkit . getPlayer ( args0 ) ) == null ) { sender . sendMessage ( StockMessages . offlinePlayer ( ) ) ; return true ; } Player target = Bukkit . getPlayer ( args0 ) ; <START_BUG> target . setHealth ( 20.0 ) ; <END_BUG> sender . sendMessage ( ( ( ( Main . getPrefix ( ) ) + "§bYou<seq2seq4repair_space>killed<seq2seq4repair_space>§e§l" ) + ( args0 . toUpperCase ( ) ) ) ) ; } else { sender . sendMessage ( StockMessages . tooManyArguments ( ) ) ; } return true ; } }

Fix:
target . setHealth ( 0.0 ) ;
Buggy code:
public class AXMLResources { public Context context = null ; public static void main ( String [ ] argv ) { <START_BUG> System . out . println ( new AXMLResources ( null ) . getLayout ( base ) ) ; <END_BUG> } public AXMLResources ( Context context ) { } public String getString ( int id ) { } public Drawable getDrawable ( int id ) { } public ColorStateList getColorStateList ( int id ) { } public int getColor ( int id ) { } public View getLayout ( int id ) { } No newline ; at end ; of file ; }

Fix:
System . out . println ( new AXMLResources ( null ) . getString ( ok ) ) ;
Buggy code:
public class Editor implements OnSeekBarChangeListener , SwapButton . SwapButtonListener { protected Context mContext ; protected View mView ; protected ImageShow mImageShow ; protected FrameLayout mFrameLayout ; protected SeekBar mSeekBar ; Button mEditTitle ; protected Button mFilterTitle ; protected int mID ; private final String LOGTAG = "Editor" ; protected boolean mChangesGeometry = false ; protected FilterRepresentation mLocalRepresentation = null ; protected byte mShowParameter = Editor . SHOW_VALUE_UNDEFINED ; private Button mButton ; public static byte SHOW_VALUE_UNDEFINED = - 1 ; public static byte SHOW_VALUE_OFF = 0 ; public static byte SHOW_VALUE_INT = 1 ; public static void hackFixStrings ( Menu menu ) { } public String calculateUserMessage ( Context context , String effectName , Object parameterValue ) { } protected Editor ( int id ) { } public int getID ( ) { } public byte showParameterValue ( ) { } public boolean showsSeekBar ( ) { } public void setUpEditorUI ( View actionButton , View editControl , Button editTitle , Button stateButton ) { } public boolean showsPopupIndicator ( ) { } public void setUtilityPanelUI ( View actionButton , View editControl ) { } @ Override public void onProgressChanged ( SeekBar sbar , int progress , boolean arg2 ) { } public void setPanel ( ) { } public void createEditor ( Context context , FrameLayout frameLayout ) { } protected void unpack ( int viewid , int layoutid ) { } private ImageShow findImageShow ( View view ) { } public View getTopLevelView ( ) { } public ImageShow getImageShow ( ) { } public void setVisibility ( int visible ) { } public FilterRepresentation getLocalRepresentation ( ) { } public void commitLocalRepresentation ( ) { } public void commitLocalRepresentation ( FilterRepresentation rep ) { } public void commitLocalRepresentation ( Collection < FilterRepresentation > reps ) { } public void finalApplyCalled ( ) { } protected void updateText ( ) { } public void reflectCurrentFilter ( ) { } public boolean useUtilityPanel ( ) { } public void openUtilityPanel ( LinearLayout mAccessoryViewList ) { } protected void setMenuIcon ( boolean on ) { <START_BUG> mEditTitle . setCompoundDrawablesRelativeWithIntrinsicBounds ( 0 , 0 , ( on ? drawable . filtershow_menu_marker : 0 ) , 0 ) ; <END_BUG> } protected void createMenu ( int [ ] strId , View button ) { } public Control [ ] getControls ( ) { } @ Override public void onStartTrackingTouch ( SeekBar arg0 ) { } @ Override public void onStopTrackingTouch ( SeekBar arg0 ) { } @ Override public void swapLeft ( MenuItem item ) { } @ Override public void swapRight ( MenuItem item ) { } public void detach ( ) { } }

Fix:
mEditTitle . setCompoundDrawablesRelativeWithIntrinsicBounds ( 0 , 0 , 0 , ( on ? drawable . filtershow_menu_marker : 0 ) ) ;
Buggy code:
public class EditPropertiesAction extends DefaultTableAction implements TreeSelectionListener { public EditPropertiesAction ( IFrameMediator frameController ) { } public void actionPerformed ( ActionEvent evt ) { AddressbookFrameMediator mediator = ( ( AddressbookFrameMediator ) ( frameMediator ) ) ; FocusOwner focusOwner = FocusManager . getInstance ( ) . getCurrentOwner ( ) ; TableController table = ( ( AddressbookFrameMediator ) ( frameMediator ) ) . getTable ( ) ; boolean tableHasFocus = false ; if ( table . equals ( focusOwner ) ) tableHasFocus = true ; if ( tableHasFocus ) { <START_BUG> Object [ ] uids = mediator . getTable ( ) . getUids ( ) ; <END_BUG> IContactStorage folder = ( ( IContactStorage ) ( mediator . getTree ( ) . getSelectedFolder ( ) ) ) ; if ( ( uids . length ) == 0 ) { return ; } IContactModel card = null ; try { card = ( ( IContactModel ) ( folder . get ( uids [ 0 ] ) ) ) ; } catch ( Exception e ) { if ( Logging . DEBUG ) e . printStackTrace ( ) ; ErrorDialog . createDialog ( e . getMessage ( ) , e ) ; } ContactEditorDialog dialog = new ContactEditorDialog ( mediator . getView ( ) . getFrame ( ) , card ) ; if ( dialog . getResult ( ) ) { try { folder . modify ( uids [ 0 ] , dialog . getDestModel ( ) ) ; } catch ( Exception e1 ) { if ( Logging . DEBUG ) e1 . printStackTrace ( ) ; ErrorDialog . createDialog ( e1 . getMessage ( ) , e1 ) ; } if ( folder instanceof GroupFolder ) mediator . getTree ( ) . setSelectedFolder ( ( ( AbstractFolder ) ( folder ) ) ) ; } } else { GroupFolder folder = ( ( GroupFolder ) ( mediator . getTree ( ) . getSelectedFolder ( ) ) ) ; IGroup card = folder . getGroup ( ) ; EditGroupDialog dialog = new EditGroupDialog ( mediator . getView ( ) . getFrame ( ) , card , ( ( AbstractFolder ) ( folder . getParent ( ) ) ) ) ; if ( dialog . getResult ( ) ) { mediator . getTree ( ) . setSelectedFolder ( folder ) ; } } } public void valueChanged ( ListSelectionEvent event ) { } public void valueChanged ( TreeSelectionEvent e ) { } }

Fix:
String [ ] uids = mediator . getTable ( ) . getUids ( ) ;
Buggy code:
public class Snippet151 { static int [ ] data = new int [ 0 ] ; public static void main ( String [ ] args ) { final Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new FillLayout ( ) ) ; final Table table = new Table ( shell , ( ( SWT . BORDER ) | ( SWT . VIRTUAL ) ) ) ; table . addListener ( SetData , new Listener ( ) { public void handleEvent ( Event e ) { TableItem item = ( ( TableItem ) ( e . item ) ) ; int index = table . indexOf ( item ) ; item . setText ( ( "Item<seq2seq4repair_space>" + ( Snippet151 . data [ index ] ) ) ) ; } } ) ; Thread thread = new Thread ( ) { public void run ( ) { int count = 0 ; Random random = new Random ( ) ; while ( ( count ++ ) < 500 ) { if ( table . isDisposed ( ) ) return ; int grow = 10 ; int [ ] newData = new int [ ( Snippet151 . data . length ) + grow ] ; System . arraycopy ( Snippet151 . data , 0 , newData , 0 , Snippet151 . data . length ) ; int index = Snippet151 . data . length ; Snippet151 . data = newData ; for ( int j = 0 ; j < grow ; j ++ ) { Snippet151 . data [ ( index ++ ) ] = random . nextInt ( ) ; } Arrays . sort ( Snippet151 . data ) ; display . syncExec ( new Runnable ( ) { public void run ( ) { if ( table . isDisposed ( ) ) return ; table . setItemCount ( Snippet151 . data . length ) ; table . clearAll ( ) ; } } ) ; try { Thread . sleep ( 500 ) ; } catch ( Throwable t ) { } } } } ; thread . start ( ) ; shell . open ( ) ; <START_BUG> while ( ( ! ( shell . isDisposed ( ) ) ) || ( thread . isAlive ( ) ) ) { <END_BUG> if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
while ( ! ( shell . isDisposed ( ) ) ) {
Buggy code:
public class HexTest { private static final String BAD_ENCODING_NAME = "UNKNOWN" ; private static final boolean LOG = false ; private boolean charsetSanityCheck ( String name ) { } private void checkDecodeHexOddCharacters ( char [ ] data ) { } private void log ( String s ) { } private void log ( Throwable t ) { } @ Test public void testCustomCharset ( ) throws UnsupportedEncodingException , DecoderException { } private void testCustomCharset ( String name , String parent ) throws UnsupportedEncodingException , DecoderException { } @ Test public void testCustomCharsetBadNameEncodeByteArray ( ) throws UnsupportedEncodingException { } @ Test public void testCustomCharsetBadNameEncodeObject ( ) { } @ Test public void testCustomCharsetBadNameDecodeObject ( ) throws UnsupportedEncodingException { } @ Test public void testCustomCharsetToString ( ) { } @ Test public void testDecodeArrayOddCharacters ( ) { } @ Test public void testDecodeBadCharacterPos0 ( ) { } @ Test public void testDecodeBadCharacterPos1 ( ) { } @ Test public void testDecodeClassCastException ( ) { } @ Test public void testDecodeHexOddCharacters1 ( ) { } @ Test public void testDecodeHexOddCharacters3 ( ) { } @ Test public void testDecodeHexOddCharacters5 ( ) { } @ Test public void testDecodeStringOddCharacters ( ) { } @ Test public void testDencodeEmpty ( ) throws DecoderException { } @ Test public void testEncodeClassCastException ( ) { } @ Test public void testEncodeDecodeRandom ( ) throws DecoderException , EncoderException { } @ Test public void testEncodeEmpty ( ) throws EncoderException { } @ Test public void testEncodeZeroes ( ) { } @ Test public void testHelloWorldLowerCaseHex ( ) { byte [ ] b = StringUtils . getBytesUtf8 ( "Hello<seq2seq4repair_space>World" ) ; final String expected = "48656c6c6f20576f726c64" ; char [ ] actual ; actual = Hex . encodeHex ( b ) ; assertEquals ( expected , new String ( actual ) ) ; actual = Hex . encodeHex ( b , true ) ; assertEquals ( expected , new String ( actual ) ) ; actual = Hex . encodeHex ( b , false ) ; <START_BUG> assertEquals ( expected . toUpperCase ( ) , new String ( actual ) ) ; <END_BUG> } @ Test public void testHelloWorldUpperCaseHex ( ) { } @ Test public void testRequiredCharset ( ) throws UnsupportedEncodingException , DecoderException { } }

Fix:
assertFalse ( expected . equals ( new String ( actual ) ) ) ;
Buggy code:
public class UserFunction implements IFunction { private static BigDecimal TRUE = new BigDecimal ( 1 ) ; private String name = null ; private String condition = null ; private String expression = null ; private String returnexpression = null ; private String [ ] parameters = null ; public UserFunction ( String name , String [ ] parameters , String expression ) { } public UserFunction ( String name , String [ ] parameters , String expression , String condition , String returnexpression ) { } public String getName ( ) { } public String getConditional ( ) { } public String getExpression ( ) { } public String getReturnExpression ( ) { } public String [ ] getParameters ( ) { } protected String [ ] getParametersSrc ( ) { } @ Override public BigDecimal run ( List < BigDecimal > params , ExpressionEnvironment env ) { if ( ( params . size ( ) ) != ( parameters . length ) ) throw new ExpressionException ( ( ( ( ( getName ( ) ) + ":<seq2seq4repair_space>requires<seq2seq4repair_space>exactly<seq2seq4repair_space>" ) + ( parameters . length ) ) + "<seq2seq4repair_space>parameters!" ) ) ; ExpressionEnvironment useenv = getWorkingEnvironment ( params , env ) ; String condition = getConditional ( ) ; if ( condition != null ) { Expression exp = new Expression ( condition , useenv ) ; if ( ( exp . calculate ( ) . compareTo ( UserFunction . TRUE ) ) != 0 ) { exp = new Expression ( getExpression ( ) , useenv ) ; return exp . calculate ( ) ; } return new Expression ( getReturnExpression ( ) , useenv ) . calculate ( ) ; } <START_BUG> return new Expression ( getExpression ( ) , env ) . calculate ( ) ; <END_BUG> } private ExpressionEnvironment getWorkingEnvironment ( List < BigDecimal > params , ExpressionEnvironment env ) { } @ Override public String toString ( ) { } }

Fix:
return new Expression ( getExpression ( ) , useenv ) . calculate ( ) ;
Buggy code:
public class Value { public int getValue ( ArrayList < Integer > cards ) { int j = 0 ; for ( int i : cards ) { if ( i == 0 ) { <START_BUG> if ( ( ( j + i ) + 1 ) >= 21 ) <END_BUG> j = j + 1 ; else j = j + 11 ; } else j = ( j + i ) + 1 ; } return j ; } public boolean getBlackJack ( ArrayList < Integer > cards ) { } public void wins ( ArrayList < DealerPlayer > player ) { } public void loses ( ArrayList < DealerPlayer > player ) { } public void pushes ( ArrayList < DealerPlayer > player ) { } }

Fix:
if ( ( j + 11 ) > 21 )
Buggy code:
public abstract class EntitySystem extends EntityObserver { private final int index ; private final Aspect aspect ; private final IntBag actives ; private final OpenBitSet activeBits ; private final MutableBitIterator bitIterator ; private int minModifiedId = Integer . MAX_VALUE ; public EntitySystem ( final Aspect aspect ) { } protected void begin ( ) { } @ Override public final void process ( ) { } private final void rebuildEntityList ( ) { } protected void end ( ) { } protected abstract void processEntities ( ImmutableIntBag entities ) { } protected void inserted ( final int eid ) { } protected void removed ( final int eid ) { } private final void removeFromSystem ( final int eid ) { } private final void insertToSystem ( final int eid ) { } @ Override public void added ( final ImmutableIntBag entities ) { } @ Override public void changed ( final ImmutableIntBag entities ) { } @ Override public void deleted ( final ImmutableIntBag entities ) { } @ Override public void disabled ( final ImmutableIntBag entities ) { } private final void removeAll ( final ImmutableIntBag entities ) { } @ Override public void enabled ( final ImmutableIntBag entities ) { } private final void checkAll ( final ImmutableIntBag entities ) { final Aspect asp = aspect ; if ( asp == null ) { return ; } final OpenBitSet acBits = activeBits ; <START_BUG> final FixedBitSet [ ] componentBits = world . componentManager ( ) . getComponentBits ( ) ; <END_BUG> final int [ ] array = ( ( IntBag ) ( entities ) ) . data ( ) ; final int size = entities . size ( ) ; for ( int i = 0 ; i < size ; ++ i ) { final int eid = array [ i ] ; int flags = ( acBits . getBit ( eid ) ) << 1 ; flags |= ( asp . isInteresting ( componentBits [ eid ] ) ) ? 1 : 0 ; switch ( flags ) { case 1 : { insertToSystem ( eid ) ; continue ; } case 2 : { removeFromSystem ( eid ) ; continue ; } default : continue ; } } } public int getIndex ( ) { } public ImmutableIntBag getActives ( ) { } }

Fix:
final FixedBitSet [ ] componentBits = world . componentManager ( ) . getComponentBits ( ) . data ( ) ;
Buggy code:
public class StatefulRemoveInterceptor implements Interceptor { private final boolean retainIfException ; public StatefulRemoveInterceptor ( final boolean retainIfException ) { } @ Override public Object processInvocation ( InterceptorContext context ) throws Exception { final Component component = context . getPrivateData ( Component . class ) ; final ComponentView view = context . getPrivateData ( ComponentView . class ) ; if ( view != null ) { Ejb2xViewType viewType = view . getPrivateData ( Ejb2xViewType . class ) ; if ( viewType != null ) { final StatefulTransactionMarker marker = context . getPrivateData ( StatefulTransactionMarker . class ) ; <START_BUG> if ( ! ( marker . isFirstInvocation ( ) ) ) { <END_BUG> throw MESSAGES . cannotRemoveWhileParticipatingInTransaction ( ) ; } } } if ( ( component instanceof StatefulSessionComponent ) == false ) { throw EjbMessages . MESSAGES . unexpectedComponent ( component , StatefulSessionComponent . class ) ; } final StatefulSessionComponent statefulComponent = ( ( StatefulSessionComponent ) ( component ) ) ; Object invocationResult = null ; try { invocationResult = context . proceed ( ) ; } catch ( Exception e ) { if ( ( this . isApplicationException ( statefulComponent , e . getClass ( ) , context . getMethod ( ) ) ) && ( this . retainIfException ) ) { throw e ; } final StatefulSessionComponentInstance statefulComponentInstance = ( ( StatefulSessionComponentInstance ) ( context . getPrivateData ( ComponentInstance . class ) ) ) ; final SessionID sessionId = statefulComponentInstance . getId ( ) ; statefulComponent . removeSession ( sessionId ) ; throw e ; } final StatefulSessionComponentInstance statefulComponentInstance = ( ( StatefulSessionComponentInstance ) ( context . getPrivateData ( ComponentInstance . class ) ) ) ; final SessionID sessionId = statefulComponentInstance . getId ( ) ; statefulComponent . removeSession ( sessionId ) ; return invocationResult ; } private boolean isApplicationException ( final EJBComponent ejbComponent , final Class < ? > exceptionClass , final Method invokedMethod ) { } }

Fix:
if ( ( marker != null ) && ( ! ( marker . isFirstInvocation ( ) ) ) ) {
Buggy code:
public final class GtasksSyncService { @ Autowired MetadataService metadataService ; @ Autowired MetadataDao metadataDao ; @ Autowired GtasksMetadataService gtasksMetadataService ; @ Autowired TaskDao taskDao ; @ Autowired GtasksPreferenceService gtasksPreferenceService ; @ Autowired GtasksTaskListUpdater gtasksTaskListUpdater ; public GtasksSyncService ( ) { } private final LinkedBlockingQueue < GtasksSyncService . SyncOnSaveOperation > operationQueue = new LinkedBlockingQueue < GtasksSyncService . SyncOnSaveOperation > ( ) ; private abstract class SyncOnSaveOperation { } private class TaskPushOp extends GtasksSyncService . SyncOnSaveOperation { protected Task model ; public TaskPushOp ( Task model ) { } } class MoveOp extends GtasksSyncService . SyncOnSaveOperation { protected Metadata metadata ; public MoveOp ( Metadata metadata ) { } } public void initialize ( ) { new Thread ( new Runnable ( ) { public void run ( ) { while ( true ) { GtasksSyncService . SyncOnSaveOperation op ; try { op = operationQueue . take ( ) ; } catch ( InterruptedException e ) { continue ; } try { if ( ! ( gtasksPreferenceService . isOngoing ( ) ) ) { GtasksInvoker invoker = new GtasksInvoker ( gtasksPreferenceService . getToken ( ) ) ; if ( op instanceof GtasksSyncService . TaskPushOp ) { GtasksSyncService . TaskPushOp taskPush = ( ( GtasksSyncService . TaskPushOp ) ( op ) ) ; <START_BUG> pushTaskOnSave ( taskPush . model , taskPush . model . getSetValues ( ) , invoker , true ) ; <END_BUG> } else if ( op instanceof GtasksSyncService . MoveOp ) { GtasksSyncService . MoveOp move = ( ( GtasksSyncService . MoveOp ) ( op ) ) ; pushMetadataOnSave ( move . metadata , invoker ) ; } } } catch ( IOException e ) { System . err . println ( "Sync<seq2seq4repair_space>on<seq2seq4repair_space>save<seq2seq4repair_space>failed" ) ; } } } } ) . start ( ) ; taskDao . addListener ( new com . todoroo . andlib . data . DatabaseDao . ModelUpdateListener < Task > ( ) { public void onModelUpdated ( final Task model ) { if ( Flags . checkAndClear ( GTASKS_SUPPRESS_SYNC ) ) return ; if ( gtasksPreferenceService . isOngoing ( ) ) return ; final ContentValues setValues = model . getSetValues ( ) ; if ( ( setValues == null ) || ( ! ( checkForToken ( ) ) ) ) return ; if ( ! ( checkValuesForProperties ( setValues , GtasksSyncService . TASK_PROPERTIES ) ) ) return ; operationQueue . offer ( new GtasksSyncService . TaskPushOp ( ( ( Task ) ( model . clone ( ) ) ) ) ) ; } } ) ; } private static final Property < ? > [ ] TASK_PROPERTIES = new Property < ? > [ ] { Task . TITLE , Task . NOTES , Task . DUE_DATE , Task . COMPLETION_DATE , Task . DELETION_DATE } ; private boolean checkValuesForProperties ( ContentValues values , Property < ? > [ ] properties ) { } public void triggerMoveForMetadata ( final Metadata metadata ) { } public void pushTaskOnSave ( Task task , ContentValues values , GtasksInvoker invoker , boolean sleep ) throws IOException { } public void pushMetadataOnSave ( Metadata model , GtasksInvoker invoker ) throws IOException { } private boolean checkForToken ( ) { } }

Fix:
pushTaskOnSave ( taskPush . model , taskPush . model . getMergedValues ( ) , invoker , true ) ;
Buggy code:
public class OSMPoint extends Point { public long id ; public String str = "" ; public Map < String , String > tags = new HashMap < String , String > ( ) ; @ Override public void fromText ( Text text ) { } @ Override public Text toText ( Text text ) { TextSerializerHelper . serializeDouble ( x , text , ',' ) ; <START_BUG> TextSerializerHelper . serializeDouble ( y , text , ( tags . isEmpty ( ) ? '' : ',' ) ) ; <END_BUG> text . append ( str . getBytes ( ) , 0 , str . length ( ) ) ; return text ; } @ Override public void write ( DataOutput out ) throws IOException { } @ Override public void readFields ( DataInput in ) throws IOException { } @ Override public Point clone ( ) { } }

Fix:
TextSerializerHelper . serializeDouble ( y , text , ( str . isEmpty ( ) ? '' : ',' ) ) ;
Buggy code:
public class ResponseStatusExceptionResolverTests { private ResponseStatusExceptionResolver exceptionResolver ; private MockHttpServletRequest request ; private MockHttpServletResponse response ; @ Before public void setUp ( ) { } @ Test public void statusCode ( ) { } @ Test public void statusCodeAndReason ( ) { } @ Test public void statusCodeAndReasonMessage ( ) { Locale locale = Locale . CHINESE ; LocaleContextHolder . setLocale ( locale ) ; try { StaticMessageSource messageSource = new StaticMessageSource ( ) ; messageSource . addMessage ( "gone.reason" , locale , "Gone<seq2seq4repair_space>reason<seq2seq4repair_space>message" ) ; exceptionResolver . setMessageSource ( messageSource ) ; ResponseStatusExceptionResolverTests . StatusCodeAndReasonMessageException ex = new ResponseStatusExceptionResolverTests . StatusCodeAndReasonMessageException ( ) ; <START_BUG> ModelAndView mav = exceptionResolver . resolveException ( request , response , null , ex ) ; <END_BUG> assertEquals ( "Invalid<seq2seq4repair_space>status<seq2seq4repair_space>reason" , "Gone<seq2seq4repair_space>reason<seq2seq4repair_space>message" , response . getErrorMessage ( ) ) ; } finally { LocaleContextHolder . resetLocaleContext ( ) ; } } @ Test public void notAnnotated ( ) { } @ ResponseStatus ( HttpStatus . BAD_REQUEST ) @ SuppressWarnings ( "serial" ) private static class StatusCodeException extends Exception { } @ ResponseStatus ( value = HttpStatus . GONE , reason = "You<seq2seq4repair_space>suck!" ) @ SuppressWarnings ( "serial" ) private static class StatusCodeAndReasonException extends Exception { } @ ResponseStatus ( value = HttpStatus . GONE , reason = "gone.reason" ) @ SuppressWarnings ( "serial" ) private static class StatusCodeAndReasonMessageException extends Exception { } }

Fix:
exceptionResolver . resolveException ( request , response , null , ex ) ;
Buggy code:
interface TypedObject { <START_BUG> short getType ( ) ; <END_BUG> }

Fix:
int getType ( ) ;
Buggy code:
public class StubDAO implements WimmDAO { @ Override public long addEntity ( WimmEntity entity ) { } @ Override public boolean updateEntity ( WimmEntity entity ) { } @ Override <START_BUG> public boolean deleteEntity ( WimmEntity entity ) { <END_BUG> return true ; } @ Override public List < WimmEntity > getEntityList ( ) { } @ Override public WimmEntity getEntity ( long id ) { } }

Fix:
public boolean deleteEntity ( long id ) {
Buggy code:
public class Panel < T > extends WebMarkupContainerWithAssociatedMarkup < T > { private static final long serialVersionUID = 1L ; private static final String PANEL = "panel" ; private boolean wasOpenCloseTag = false ; public Panel ( MarkupContainer parent , final String id ) { } public Panel ( MarkupContainer parent , final String id , final IModel < T > model ) { } protected MarkupFragment getMarkupFragment ( final String id ) { <START_BUG> return Panel . getAssociatedMarkupFragment ( true ) . getChildFragment ( id , true ) ; <END_BUG> } @ Override protected void onComponentTag ( final ComponentTag tag ) { } @ Override protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } @ Override public void renderHead ( HeaderContainer container ) { } }

Fix:
return Panel . getAssociatedMarkup ( true ) . getChildFragment ( id , true ) ;
Buggy code:
public class OAuthDoubanProvider { private String apiKey = DefaultConfigs . API_KEY ; private String secretKey = DefaultConfigs . SECRET_KEY ; private String authUrl = DefaultConfigs . AUTH_URL ; private String redirectUrl = null ; private String responseType = "code" ; private String grantType = "authorization_code" ; private List < RequestGrantScope > scopes = new ArrayList < RequestGrantScope > ( ) ; private static final Logger logger = Logger . getLogger ( OAuthDoubanProvider . class . getName ( ) ) ; public String getApiKey ( ) { } public OAuthDoubanProvider setApiKey ( String apiKey ) { } public String getSecretKey ( ) { } public OAuthDoubanProvider setSecretKey ( String secretKey ) { } public String getAuthUrl ( ) { } public OAuthDoubanProvider setAuthUrl ( String authUrl ) { } public String getRedirectUrl ( ) { } public OAuthDoubanProvider setRedirectUrl ( String redirectUrl ) { } public String getResponseType ( ) { } public OAuthDoubanProvider setResponseType ( String type ) { } public String getGrantType ( ) { } public OAuthDoubanProvider setGrantType ( String grantType ) { } public OAuthDoubanProvider addScope ( RequestGrantScope scope ) { } public String getGetCodeRedirectUrl ( ) { } public AccessToken tradeAccessTokenWithCode ( String code ) throws DoubanException { try { Map < String , String > params = new HashMap < String , String > ( ) ; params . put ( "client_id" , this . apiKey ) ; params . put ( "client_secret" , this . secretKey ) ; <START_BUG> params . put ( "redirect_uri" , ACCESS_TOKEN_REDIRECT_URL ) ; <END_BUG> params . put ( "grant_type" , "authorization_code" ) ; params . put ( "code" , code ) ; String responseStr = new HttpManager ( ) . postEncodedEntry ( ACCESS_TOKEN_URL , params , false ) ; return Converters . stringToAccessToken ( responseStr ) ; } catch ( UnsupportedEncodingException ex ) { throw ErrorHandler . getCustomDoubanException ( 100 , ( "Exception<seq2seq4repair_space>in<seq2seq4repair_space>trading<seq2seq4repair_space>access<seq2seq4repair_space>token<seq2seq4repair_space>:<seq2seq4repair_space>" + ( ex . toString ( ) ) ) ) ; } catch ( IOException ex ) { throw ErrorHandler . getCustomDoubanException ( 100 , ( "Exception<seq2seq4repair_space>in<seq2seq4repair_space>trading<seq2seq4repair_space>access<seq2seq4repair_space>token<seq2seq4repair_space>:<seq2seq4repair_space>" + ( ex . toString ( ) ) ) ) ; } } private String generateScopeString ( ) { } }

Fix:
params . put ( "redirect_uri" , this . redirectUrl ) ;
Buggy code:
public class ActivityEnabler { private static final int ALL = 2 ; private static final int NONE = 0 ; private static final int SOME = 1 ; private IWorkbenchActivitySupport activitySupport ; private ISelectionChangedListener selectionListener = new ISelectionChangedListener ( ) { public void selectionChanged ( SelectionChangedEvent event ) { } } ; private ICheckStateListener checkListener = new ICheckStateListener ( ) { public void checkStateChanged ( CheckStateChangedEvent event ) { } } ; private CheckboxTreeViewer dualViewer ; private Set managedActivities = new HashSet ( 7 ) ; private ActivityCategoryContentProvider provider = new ActivityCategoryContentProvider ( ) ; private Text descriptionText ; public ActivityEnabler ( IWorkbenchActivitySupport activitySupport ) { } public Control createControl ( Composite parent ) { Composite mainComposite = new Composite ( parent , SWT . NONE ) ; mainComposite . setLayout ( new GridLayout ( 2 , false ) ) ; Composite c = new Composite ( mainComposite , SWT . NONE ) ; c . setLayoutData ( new GridData ( GridData . FILL_VERTICAL ) ) ; c . setLayout ( new GridLayout ( 1 , true ) ) ; Label label = new Label ( c , SWT . NONE ) ; label . setText ( ActivityMessages . getString ( "ActivityEnabler.activities" ) ) ; label . setLayoutData ( new GridData ( GridData . FILL_HORIZONTAL ) ) ; label . setFont ( parent . getFont ( ) ) ; dualViewer = new CheckboxTreeViewer ( c ) ; dualViewer . setSorter ( new ViewerSorter ( ) ) ; dualViewer . setAutoExpandLevel ( ALL_LEVELS ) ; dualViewer . setLabelProvider ( new ActivityCategoryLabelProvider ( ) ) ; dualViewer . setContentProvider ( provider ) ; dualViewer . setInput ( activitySupport . getActivityManager ( ) ) ; dualViewer . getControl ( ) . setLayoutData ( new GridData ( GridData . FILL_BOTH ) ) ; dualViewer . getControl ( ) . setFont ( parent . getFont ( ) ) ; c = new Composite ( mainComposite , SWT . NONE ) ; c . setLayoutData ( new GridData ( GridData . FILL_BOTH ) ) ; c . setLayout ( new GridLayout ( 1 , true ) ) ; label = new Label ( c , SWT . NONE ) ; label . setText ( ActivityMessages . getString ( "ActivityEnabler.description" ) ) ; label . setLayoutData ( new GridData ( GridData . FILL_HORIZONTAL ) ) ; label . setFont ( parent . getFont ( ) ) ; <START_BUG> descriptionText = new Text ( c , ( ( SWT . READ_ONLY ) | ( SWT . WRAP ) ) ) ; <END_BUG> descriptionText . setFont ( parent . getFont ( ) ) ; descriptionText . setLayoutData ( new GridData ( ( ( GridData . FILL_BOTH ) | ( GridData . VERTICAL_ALIGN_BEGINNING ) ) ) ) ; setInitialStates ( ) ; dualViewer . addCheckStateListener ( checkListener ) ; dualViewer . addSelectionChangedListener ( selectionListener ) ; dualViewer . setSelection ( new StructuredSelection ( ) ) ; return mainComposite ; } private Collection getCategoryActivityIds ( String categoryId ) { } private void setInitialStates ( ) { } public void updateActivityStates ( ) { } }

Fix:
descriptionText = new Text ( c , ( ( ( SWT . READ_ONLY ) | ( SWT . WRAP ) ) | ( SWT . BORDER ) ) ) ;
Buggy code:
public class Assert { protected Assert ( ) { } public static void assertTrue ( String message , boolean condition ) { } public static void assertTrue ( boolean condition ) { } public static void assertFalse ( String message , boolean condition ) { } public static void assertFalse ( boolean condition ) { } public static void fail ( String message ) { } public static void fail ( ) { } public static void assertEquals ( String message , Object expected , Object actual ) { } public static void assertEquals ( Object expected , Object actual ) { } public static void assertEquals ( String message , double expected , double actual , double delta ) { } public static void assertEquals ( double expected , double actual , double delta ) { } public static void assertEquals ( String message , float expected , float actual , float delta ) { } public static void assertEquals ( float expected , float actual , float delta ) { } public static void assertEquals ( String message , long expected , long actual ) { } public static void assertEquals ( long expected , long actual ) { } public static void assertEquals ( String message , boolean expected , boolean actual ) { } public static void assertEquals ( boolean expected , boolean actual ) { } public static void assertEquals ( String message , byte expected , byte actual ) { } public static void assertEquals ( byte expected , byte actual ) { } public static void assertEquals ( String message , char expected , char actual ) { } public static void assertEquals ( char expected , char actual ) { } public static void assertEquals ( String message , short expected , short actual ) { } public static void assertEquals ( short expected , short actual ) { } public static void assertEquals ( String message , int expected , int actual ) { } public static void assertEquals ( int expected , int actual ) { } public static void assertNotNull ( Object object ) { } public static void assertNotNull ( String message , Object object ) { } public static void assertNull ( Object object ) { } public static void assertNull ( String message , Object object ) { } public static void assertSame ( String message , Object expected , Object actual ) { } public static void assertSame ( Object expected , Object actual ) { } public static void assertNotSame ( String message , Object expected , Object actual ) { } public static void assertNotSame ( Object expected , Object actual ) { } private static void failSame ( String message , Object expected , Object actual ) { } private static void failNotSame ( String message , Object expected , Object actual ) { } private static void failNotEquals ( String message , Object expected , Object actual ) { <START_BUG> throw new ComparisonFailure ( message , expected . toString ( ) , actual . toString ( ) ) ; <END_BUG> } }

Fix:
throw new ComparisonFailure ( message , ( expected == null ? "null" : expected . toString ( ) ) , ( actual == null ? "null" : actual . toString ( ) ) ) ;
Buggy code:
public abstract class Unpack extends AbstractTask { private File m_dest ; private File m_src ; public void setDest ( final File dest ) { } public void setSrc ( final File src ) { } public void execute ( ) throws TaskException { } protected abstract String getDefaultExtension ( ) { } protected abstract InputStream getUnpackingStream ( InputStream input ) throws IOException , TaskException { } private void extract ( ) throws TaskException { } private File createDestFile ( ) { } private void validate ( ) throws TaskException { if ( null == ( m_src ) ) { <START_BUG> final String message = ( "No<seq2seq4repair_space>Src<seq2seq4repair_space>for<seq2seq4repair_space>" + ( getName ( ) ) ) + "<seq2seq4repair_space>specified" ; <END_BUG> throw new TaskException ( message ) ; } if ( ! ( m_src . exists ( ) ) ) { final String message = "Src<seq2seq4repair_space>doesn't<seq2seq4repair_space>exist" ; throw new TaskException ( message ) ; } if ( m_src . isDirectory ( ) ) { final String message = "Cannot<seq2seq4repair_space>expand<seq2seq4repair_space>a<seq2seq4repair_space>directory" ; throw new TaskException ( message ) ; } if ( null == ( m_dest ) ) { m_dest = new File ( m_src . getParent ( ) ) ; } if ( m_dest . isDirectory ( ) ) { m_dest = createDestFile ( ) ; } } protected final File getDest ( ) { } protected final File getSrc ( ) { } }

Fix:
final String message = ( "No<seq2seq4repair_space>Src<seq2seq4repair_space>for<seq2seq4repair_space>" + ( getContext ( ) . getName ( ) ) ) + "<seq2seq4repair_space>specified" ;
Buggy code:
public class CSVPrinter implements Closeable , Flushable { private final Appendable out ; private final CSVFormat format ; private boolean newLine = true ; public CSVPrinter ( final Appendable out , final CSVFormat format ) { } public void println ( ) throws IOException { <START_BUG> out . append ( format . getLineSeparator ( ) ) ; <END_BUG> newLine = true ; } public void flush ( ) throws IOException { } public void printRecord ( final Object ... values ) throws IOException { } public void printRecord ( final Iterable < ? > values ) throws IOException { } public void printComment ( final String comment ) throws IOException { } private void print ( Object object , final CharSequence value , final int offset , final int len ) throws IOException { } void printDelimiter ( ) throws IOException { } void printAndEscape ( final CharSequence value , final int offset , final int len ) throws IOException { } void printAndQuote ( Object object , final CharSequence value , final int offset , final int len ) throws IOException { } public void print ( final Object value ) throws IOException { } public void printRecords ( Object [ ] values ) throws IOException { } public void printRecords ( Iterable < ? > values ) throws IOException { } public void printRecords ( ResultSet resultSet ) throws IOException , SQLException { } public void close ( ) throws IOException { } }

Fix:
out . append ( format . getRecordSeparator ( ) ) ;
Buggy code:
public class Songs { private final SongDAO songsRepository ; private TitleDAO titleRepository ; private final CategoryDAO categoryRepository ; private final SongTextDAO songTextDAO ; public Songs ( SongDAO songsRepository , TitleDAO titleRepository , CategoryDAO categoryRepository , SongTextDAO songTextDAO ) { } public Song findBy ( int songId ) { } public List < Song > findBy ( int singerId , int poetId , int startFrom , String filteredLetter , Boolean randomSongsEnabled ) { } private List < Song > findBy ( int songId , int singerId , int poetId , int startFrom , String filteredLetter , Boolean randomSongsEnabled ) { } public Song update ( Song updatableSong ) { Long id = updatableSong . getId ( ) ; Song originalSongData = songsRepository . findById ( id ) ; if ( ( ( updatableSong . getSongTitle ( ) ) != null ) && ( ( updatableSong . getSongTitle ( ) . getId ( ) ) == 0 ) ) { Title songTitle = new Title ( updatableSong . getSongTitle ( ) ) ; songTitle . setCategory ( categoryRepository . getSongTitleCategory ( ) ) ; <START_BUG> titleRepository . create ( updatableSong . getSongTitle ( ) ) ; <END_BUG> updatableSong . setSongTitle ( songTitle ) ; } if ( ( ( updatableSong . getTitle ( ) ) != null ) && ( ( updatableSong . getTitle ( ) . getId ( ) ) == 0 ) ) { Title umbrellaTitle = new Title ( updatableSong . getTitle ( ) ) ; umbrellaTitle . setCategory ( categoryRepository . getUmbrellaTitleCategory ( ) ) ; titleRepository . create ( umbrellaTitle ) ; updatableSong . setTitle ( umbrellaTitle ) ; } if ( ( updatableSong . getSongText ( ) ) != null ) { songTextDAO . create ( updatableSong . getSongText ( ) ) ; } originalSongData = invokeAllSetters ( originalSongData , updatableSong ) ; return songsRepository . updateSong ( originalSongData ) ; } public List < Song > getVersions ( int songId ) { } public Song save ( Song song ) { } public Song invokeAllSetters ( Song originalSongData , Song updatableSongData ) { } public List < Song > findAll ( ) { } }

Fix:
titleRepository . create ( songTitle ) ;
Buggy code:
public class LogglyRandomGenerator { public static void main ( String [ ] args ) throws InterruptedException { final String apiKey = args [ 0 ] ; if ( ( apiKey == null ) || ( apiKey == "" ) ) { System . out . println ( "You<seq2seq4repair_space>must<seq2seq4repair_space>specify<seq2seq4repair_space>your<seq2seq4repair_space>loggly<seq2seq4repair_space>api<seq2seq4repair_space>key<seq2seq4repair_space>to<seq2seq4repair_space>test<seq2seq4repair_space>this<seq2seq4repair_space>code" ) ; System . exit ( ( - 1 ) ) ; } <START_BUG> TestConfigHelper . configureLoggingToConsole ( apiKey ) ; <END_BUG> Logger logger = Logger . getLogger ( LOGGER_NAME ) ; Level [ ] levels = new Level [ ] { Level . TRACE , Level . DEBUG , Level . INFO , Level . WARN , Level . ERROR } ; long id = 0 ; Random rand = new Random ( ) ; while ( true ) { id ++ ; int level = rand . nextInt ( levels . length ) ; logger . log ( levels [ level ] , ( ( ( "Id=" + id ) + "<seq2seq4repair_space>The<seq2seq4repair_space>time<seq2seq4repair_space>is<seq2seq4repair_space>now<seq2seq4repair_space>" ) + ( System . currentTimeMillis ( ) ) ) ) ; Thread . sleep ( ( ( long ) ( ( 30 * 1000 ) * ( rand . nextFloat ( ) ) ) ) ) ; } } }

Fix:
TestConfigHelper . setupLogging ( apiKey ) ;
Buggy code:
public abstract class AbstractServiceRegisterTest extends AbstractDistributionTest { private static final int REGISTER_WAIT = 60000 ; public void testRegisterServer ( ) throws Exception { } protected ServiceTracker createProxyServiceTracker ( String clazz ) throws InvalidSyntaxException { } public void testGetProxy ( ) throws Exception { } public void testGetAndUseProxy ( ) throws Exception { } public void testGetAndUseIRemoteService ( ) throws Exception { } public void testGetExposedServicesFromDistributionProvider ( ) throws Exception { } public void testGetRemoteServicesFromDistributionProvider ( ) throws Exception { String classname = TestServiceInterface1 . class . getName ( ) ; ServiceTracker st = new ServiceTracker ( getContext ( ) , DistributionProvider . class . getName ( ) , null ) ; st . open ( ) ; DistributionProvider distributionProvider = ( ( DistributionProvider ) ( st . getService ( ) ) ) ; assertNotNull ( distributionProvider ) ; Collection remoteServices = distributionProvider . getRemoteServices ( ) ; assertNotNull ( remoteServices ) ; Properties props = new Properties ( ) ; IContainer serverContainer = getServer ( ) ; props . put ( SERVICE_CONTAINER_ID , serverContainer . getID ( ) ) ; props . put ( OSGI_REMOTE_INTERFACES , new String [ ] { OSGI_REMOTE_INTERFACES_WILDCARD } ) ; ServiceRegistration registration = registerService ( classname , new TestService1 ( ) , props ) ; Thread . sleep ( AbstractServiceRegisterTest . REGISTER_WAIT ) ; remoteServices = distributionProvider . getRemoteServices ( ) ; assertNotNull ( remoteServices ) ; int remotesLength = remoteServices . size ( ) ; assertTrue ( ( remotesLength > 0 ) ) ; for ( Iterator i = remoteServices . iterator ( ) ; i . hasNext ( ) ; ) { Object o = ( ( ServiceReference ) ( i . next ( ) ) ) . getProperty ( OSGI_REMOTE ) ; assertTrue ( ( o != null ) ) ; } registration . unregister ( ) ; st . close ( ) ; Thread . sleep ( AbstractServiceRegisterTest . REGISTER_WAIT ) ; remoteServices = distributionProvider . getRemoteServices ( ) ; assertNotNull ( remoteServices ) ; <START_BUG> assertTrue ( ( ( remoteServices . size ( ) ) == ( remotesLength - 1 ) ) ) ; <END_BUG> } protected IRemoteCall createRemoteCall ( Class clazz ) { } }

Fix:
assertTrue ( ( ( remoteServices . size ( ) ) < remotesLength ) ) ;
Buggy code:
public class BridgeJSWebActivity extends DroidBridge { @ Override public void onCreate ( Bundle savedInstanceState ) { getWindow ( ) . requestFeature ( FEATURE_NO_TITLE ) ; setContentView ( main ) ; browser = ( ( BridgeJSBrowser ) ( findViewById ( browser ) ) ) ; super . onCreate ( savedInstanceState ) ; <START_BUG> String url = "http:////dev.sencha.com//deploy//touch//examples//production//kitchensink//index.html" ; <END_BUG> String defaultUrl = url ; url = getUrlFromIntent ( getIntent ( ) , defaultUrl ) ; loadUrlWithPlugins ( url ) ; } No newline ; at end ; of file ; }

Fix:
String url = "http:////www.bridgejs.com//" ;
Buggy code:
public class TestComboStringEditor extends TestCase { public TestComboStringEditor ( String name ) { } private void testSetGet ( ComboStringEditor e , Object value ) throws Exception { } private void testSetGetAsText ( ComboStringEditor e , String text ) throws Exception { } public void testSetGet ( ) throws Exception { } public void testSetGetAsText ( ) throws Exception { ComboStringEditor e = new ComboStringEditor ( ) ; testSetGetAsText ( e , "any<seq2seq4repair_space>string" ) ; testSetGetAsText ( e , "" ) ; testSetGetAsText ( e , null ) ; testSetGetAsText ( e , "${var}" ) ; <START_BUG> e . setAsText ( UNDEFINED . toString ( ) ) ; <END_BUG> assertNotNull ( e . getAsText ( ) ) ; } }

Fix:
e . setAsText ( e . UNDEFINED . toString ( ) ) ;
Buggy code:
public class SharedResources { private final ResourceReferenceRegistry registry ; public SharedResources ( ResourceReferenceRegistry registry ) { } private static final class SharedResourceReference extends ResourceReference { private static final long serialVersionUID = 1L ; private final IResource resource ; public SharedResourceReference ( Class < ? > scope , String name , Locale locale , String style , String variation , IResource resource ) { } @ Override public IResource getResource ( ) { } } public final void add ( final Class < ? > scope , final String name , final Locale locale , final String style , final String variation , final IResource resource ) { } public final void add ( final String name , final Locale locale , final IResource resource ) { } public final void add ( final String name , final IResource resource ) { } public ResourceReference get ( Class < ? > scope , String name , Locale locale , String style , String variation , boolean strict ) { <START_BUG> return registry . getResourceReference ( scope , name , locale , style , variation , strict ) ; <END_BUG> } }

Fix:
return registry . getResourceReference ( scope , name , locale , style , variation , strict , true ) ;