nus-yam/ex-repair huggingface dataset:
Buggy code:
public class JGroupsSubsystemAddHandler extends AbstractAddStepHandler { JGroupsSubsystemAddHandler ( AttributeDefinition ... attributes ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > controllers ) throws OperationFailedException { } static Collection < ServiceController < ? > > installRuntimeServices ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler ) throws OperationFailedException { ServiceTarget target = context . getServiceTarget ( ) ; Collection < ServiceController < ? > > controllers = new LinkedList < > ( ) ; controllers . add ( ProtocolDefaultsService . build ( target ) . setInitialMode ( ON_DEMAND ) . install ( ) ) ; InjectedValueServiceBuilder builder = new InjectedValueServiceBuilder ( target ) ; String defaultChannel = ModelNodes . asString ( DEFAULT_CHANNEL . resolveModelAttribute ( context , model ) ) ; if ( ( defaultChannel != null ) && ( ! ( defaultChannel . equals ( DEFAULT ) ) ) ) { controllers . add ( builder . build ( ChannelService . getServiceName ( DEFAULT ) , ChannelService . getServiceName ( defaultChannel ) , Channel . class ) . install ( ) ) ; controllers . add ( builder . build ( ConnectedChannelService . getServiceName ( DEFAULT ) , ConnectedChannelService . getServiceName ( defaultChannel ) , Channel . class ) . install ( ) ) ; <START_BUG> controllers . add ( builder . build ( ChannelService . getStackServiceName ( DEFAULT ) , ChannelService . getStackServiceName ( defaultChannel ) , ChannelFactory . class ) . install ( ) ) ; <END_BUG> for ( GroupServiceInstaller installer : ServiceLoader . load ( ClusteredGroupServiceInstaller . class , ClusteredGroupServiceInstaller . class . getClassLoader ( ) ) ) { Iterator < ServiceName > names = installer . getServiceNames ( defaultChannel ) . iterator ( ) ; for ( ServiceName name : installer . getServiceNames ( DEFAULT ) ) { controllers . add ( builder . build ( name , names . next ( ) , Object . class ) . install ( ) ) ; } } } String defaultStack = ModelNodes . asString ( DEFAULT_STACK . resolveModelAttribute ( context , model ) ) ; if ( ( defaultStack != null ) && ( ! ( defaultStack . equals ( ChannelFactoryService . DEFAULT ) ) ) ) { controllers . add ( builder . build ( ChannelFactoryService . getServiceName ( ChannelFactoryService . DEFAULT ) , ChannelFactoryService . getServiceName ( defaultStack ) , ChannelFactory . class ) . install ( ) ) ; } return controllers ; } }

Fix:
controllers . add ( builder . build ( ChannelService . getFactoryServiceName ( DEFAULT ) , ChannelService . getFactoryServiceName ( defaultChannel ) , ChannelFactory . class ) . install ( ) ) ;
Buggy code:
public class VariableVisibilityQuestionCreator extends ThreeValuesAndOperatorQuestionCreator { public VariableVisibilityQuestionCreator ( ) { } @ Override protected Question setUpQuestionAndAnswers ( ) { Question question = new Question ( ) ; question . setQuestionText ( "Mikä<seq2seq4repair_space>arvo<seq2seq4repair_space>tulostetaan?" ) ; <START_BUG> question . setAnswers ( ( "" + ( startingValue ) ) , ( "" + ( firstModifier ) ) , ( "" + ( secondModifier ) ) , ( "" + ( ( secondModifier ) + ( startingValue ) ) ) , ( "" + ( ( secondModifier ) - ( firstModifier ) ) ) , ( "" + ( ( secondModifier ) + ( firstModifier ) ) ) , ( "" + ( ( ( secondModifier ) + ( startingValue ) ) + ( firstModifier ) ) ) , ( "" + ( ( ( secondModifier ) + ( startingValue ) ) - ( firstModifier ) ) ) ) ; <END_BUG> return question ; } @ Override protected String determineRightAnswer ( ) { } }

Fix:
question . setAnswers ( ( "" + ( startingValue ) ) , ( "" + ( firstModifier ) ) , ( "" + ( secondModifier ) ) , ( "" + ( ( firstModifier ) + ( startingValue ) ) ) , ( "" + ( ( startingValue ) - ( firstModifier ) ) ) , ( "" + ( ( secondModifier ) + ( startingValue ) ) ) , ( "" + ( ( ( secondModifier ) + ( startingValue ) ) + ( firstModifier ) ) ) , ( "" + ( ( ( secondModifier ) + ( startingValue ) ) - ( firstModifier ) ) ) ) ;
Buggy code:
public class Calculator { private double sum = 0 ; private double sumOfSquares = 0 ; private double mean = 0 ; private double deviation = 0 ; private int count = 0 ; private long bytes = 0 ; private long maximum = Long . MIN_VALUE ; private long minimum = Long . MAX_VALUE ; private int errors = 0 ; private final String label ; public Calculator ( ) { } public Calculator ( String label ) { } public void clear ( ) { } public void addValue ( long newValue ) { } private void addValue ( long newValue , int sampleCount ) { } public void addBytes ( long newValue ) { } private long startTime = 0 ; private long elapsedTime = 0 ; public void addSample ( SampleResult res ) { } public long getTotalBytes ( ) { } public double getMean ( ) { } public Number getMeanAsNumber ( ) { <START_BUG> return new Long ( ( ( long ) ( mean ) ) ) ; <END_BUG> } public double getStandardDeviation ( ) { } public long getMin ( ) { } public long getMax ( ) { } public int getCount ( ) { } public String getLabel ( ) { } public double getErrorPercentage ( ) { } public double getRate ( ) { } public double getAvgPageBytes ( ) { } public double getBytesPerSecond ( ) { } public double getKBPerSecond ( ) { } }

Fix:
return Long . valueOf ( ( ( long ) ( mean ) ) ) ;
Buggy code:
public class Parse { public static double evaluate ( String expression ) { } public static void main ( String [ ] args ) { <START_BUG> System . out . println ( Parse . evaluate ( "4//3+2*8//5-7-8" ) ) ; <END_BUG> } }

Fix:
System . out . println ( Parse . evaluate ( "4//3+2*800//50-75-8" ) ) ;
Buggy code:
public class CreateVFolderOnMessageCommand extends FolderCommand { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.folder.command" ) ; public static final String VFOLDER_ON_SUBJECT = "Subject" ; public static final String VFOLDER_ON_FROM = "From" ; public static final String VFOLDER_ON_TO = "To" ; private String vfolderType ; private MessageFolder parentFolder = null ; private VirtualFolder vfolder = null ; public CreateVFolderOnMessageCommand ( FrameMediator frameController , DefaultCommandReference [ ] references , String vfolderType ) { } public void updateGUI ( ) throws Exception { treeModel . nodeStructureChanged ( parentFolder ) ; if ( ( vfolder ) != null ) { <START_BUG> new org . columba . mail . gui . config . filter . ConfigFrame ( vfolder ) ; <END_BUG> } } public void execute ( WorkerStatusController worker ) throws Exception { } public VirtualFolder createVirtualFolder ( String folderName , String headerField , String pattern , MessageFolder parent ) { } }

Fix:
new org . columba . mail . gui . config . filter . ConfigFrame ( getFrameMediator ( ) . getView ( ) . getFrame ( ) , vfolder ) ;
Buggy code:
public class WebResponseExceptionsTest extends WicketTestCase { public void testBufferedExceptionErrorPage ( ) { } public void testExceptionErrorPage ( ) { } public void testExpirePage ( ) { tester . startPage ( TestExpirePage . class ) ; String document = tester . getServletResponse ( ) . getDocument ( ) ; assertTrue ( document . contains ( "Click<seq2seq4repair_space>me<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>an<seq2seq4repair_space>error" ) ) ; AjaxLink link = ( ( AjaxLink ) ( tester . getComponentFromLastRenderedPage ( "link" ) ) ) ; WebRequestCycle cycle = tester . setupRequestAndResponse ( true ) ; tester . getWicketSession ( ) . invalidateNow ( ) ; tester . getWicketSession ( ) . invalidateNow ( ) ; <START_BUG> String callbackUrl = ( ( org . apache . wicket . ajax . AjaxEventBehavior ) ( link . getBehaviors ( ) . get ( 0 ) ) ) . getCallbackUrl ( ) . toString ( ) ; <END_BUG> tester . getServletRequest ( ) . setURL ( callbackUrl ) ; cycle . request ( ) ; document = tester . getServletResponse ( ) . getDocument ( ) ; assertTrue ( document . equals ( "-" ) ) ; tester . assertAjaxLocation ( ) ; } public void testInternalErrorPage ( ) { } }

Fix:
String callbackUrl = ( ( org . apache . wicket . ajax . AjaxEventBehavior ) ( link . getBehaviors ( ) . get ( 0 ) ) ) . getCallbackUrl ( true ) . toString ( ) ;
Buggy code:
public class NoteSheetView extends View { private DrawElementsTouchDetector touchDetector ; private TrackToSymbolsConverter trackConverter ; private List < Symbol > symbols ; private MusicalKey key ; private List < SymbolCoordinates > symbolCoordinates ; private NoteSheetCanvas noteSheetCanvas ; private NoteSheetDrawer noteSheetDrawer ; private int widthBeforeResize ; public NoteSheetView ( Context context , AttributeSet attrs ) { } public boolean checkForScrollAndRecalculateWidth ( ) { } public void redraw ( Track track ) { } @ Override protected void onMeasure ( int widthMeasureSpec , int heightMeasureSpec ) { } private void remeasureDisplayForDrawing ( ) { } @ Override protected void onDraw ( Canvas canvas ) { } @ Override public boolean onTouchEvent ( MotionEvent e ) { if ( ( MotionEvent . ACTION_UP ) == ( e . getAction ( ) ) ) { int index = touchDetector . getIndexOfTouchedDrawElement ( symbolCoordinates , e . getX ( ) , e . getY ( ) ) ; if ( ( - 1 ) != index ) { Symbol symbol = symbols . get ( index ) ; <START_BUG> symbol . setMarked ( symbol . isMarked ( ) ) ; <END_BUG> } } return true ; } No newline ; at end ; of file ; }

Fix:
symbol . setMarked ( ( ! ( symbol . isMarked ( ) ) ) ) ;
Buggy code:
public class Login extends Controller { public static void index ( String email , String password ) { } <START_BUG> public static void loginUser ( @ Required ( message = "Password<seq2seq4repair_space>is<seq2seq4repair_space>required" ) <END_BUG> String email , @ Required ( message = "Password<seq2seq4repair_space>is<seq2seq4repair_space>required" ) String password ) { System . out . println ( ( ( ( "called<seq2seq4repair_space>with<seq2seq4repair_space>" + email ) + "<seq2seq4repair_space>" ) + password ) ) ; if ( validation . hasErrors ( ) ) { System . out . println ( ( "validation<seq2seq4repair_space>errors" + ( validation . errorsMap ( ) ) ) ) ; params . flash ( ) ; validation . keep ( ) ; Login . index ( email , password ) ; } LoginAction loginAction = new LoginAction ( ) ; try { User user = loginAction . login ( email , password ) ; Login . addToSession ( user ) ; flash . success ( ( "Welcome,<seq2seq4repair_space>" + ( user . fullName ) ) ) ; render ( "Login//success.html" ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; flash . error ( e . getMessage ( ) ) ; params . flash ( ) ; validation . keep ( ) ; Login . index ( email , password ) ; } } private static void addToSession ( User user ) { } }

Fix:
public static void loginUser ( @ Required ( message = "Email<seq2seq4repair_space>address<seq2seq4repair_space>is<seq2seq4repair_space>required" )
Buggy code:
@ ManagedBean ( name = "userManager" ) @ ApplicationScoped public class UserManager { private final String FILE_NAME ; private static Map < String , UserData > users = new HashMap < > ( ) ; public UserManager ( ) { } private void makeSomeUsers ( ) { } public void addUsers ( String user , String pass ) { } public void removeUser ( String user , String pass ) { } UserData find ( String username ) { <START_BUG> System . out . println ( ( "Looking<seq2seq4repair_space>up<seq2seq4repair_space>user:<seq2seq4repair_space>f" + username ) ) ; <END_BUG> return UserManager . users . get ( username ) ; } public void saveData ( ) { } public void loadData ( ) { } }

Fix:
System . out . println ( ( "Looking<seq2seq4repair_space>up<seq2seq4repair_space>user:<seq2seq4repair_space>" + username ) ) ;
Buggy code:
@ Mod ( modid = Reference . MOD_ID , name = Reference . MOD_NAME , version = Reference . VERSION , guiFactory = Reference . GUI_FACTORY_CLASS ) public class MiscConfigs { @ Mod . Instance ( Reference . MOD_ID ) public static MiscConfigs instance ; @ SidedProxy ( clientSide = Reference . CLIENT_PROXY_CLASS , serverSide = Reference . SERVER_PROXY_CLASS ) public static IProxy proxy ; public static ClientProxy cProxy ; @ Mod . EventHandler public void preInit ( FMLPreInitializationEvent event ) { } @ Mod . EventHandler public void init ( FMLInitializationEvent event ) { EVENT_BUS . register ( new EventCraftingTable ( ) ) ; <START_BUG> EVENT_BUS . register ( new EventJoinGame ( ) ) ; <END_BUG> FMLCommonHandler . instance ( ) . bus ( ) . register ( new EventNoRain ( ) ) ; LogHelper . info ( StatCollector . translateToLocal ( "log.info.init" ) ) ; } @ Mod . EventHandler public void postInit ( FMLPostInitializationEvent event ) { } @ Mod . EventHandler public void serverLoad ( FMLServerStartingEvent event ) { } }

Fix:
FMLCommonHandler . instance ( ) . bus ( ) . register ( new EventJoinGame ( ) ) ;
Buggy code:
public class CapabilityRequiredVerifier implements ClaimVerifier { private String claim ; private String family ; private String capabilityName ; private int capabilityIndex ; public CapabilityRequiredVerifier ( String theClaim , String theFamily , String theCapabilityName , int theCapabilityIndex ) { } public String getClaim ( ) { } public String getFamily ( ) { } public String getCapabilityName ( ) { } public int getCapabilityIndex ( ) { } @ Override public void verify ( JsonWebToken theToken , AccessResult theResult ) { <START_BUG> Capabilities tokenCapabilities = ( ( Capabilities ) ( theToken . getClaims ( ) . get ( family ) ) ) ; <END_BUG> if ( tokenCapabilities == null ) { theResult . setResult ( MISSING_CLAIM , "claim<seq2seq4repair_space>'%s'<seq2seq4repair_space>is<seq2seq4repair_space>missing" , claim ) ; } else if ( ! ( tokenCapabilities . hasCapability ( capabilityIndex ) ) ) { theResult . setResult ( MISSING_CAPABILITIES , "capability<seq2seq4repair_space>'%s.%s'<seq2seq4repair_space>(index<seq2seq4repair_space>'%s')<seq2seq4repair_space>is<seq2seq4repair_space>missing<seq2seq4repair_space>from<seq2seq4repair_space>claim<seq2seq4repair_space>'%s'" , family , capabilityName , capabilityIndex , claim ) ; } else { theResult . setResult ( VERIFIED ) ; } } }

Fix:
Capabilities tokenCapabilities = ( ( Capabilities ) ( theToken . getClaims ( ) . get ( claim ) ) ) ;
Buggy code:
public class ToList extends DefaultReporter { public Syntax getSyntax ( ) { } public Object report ( Argument [ ] args , Context context ) throws ExtensionException , LogoException { String s = args [ 0 ] . getString ( ) ; LogoListBuilder list = new LogoListBuilder ( ) ; for ( char c : s . toCharArray ( ) ) { <START_BUG> list . add ( s ) ; <END_BUG> } return list . toLogoList ( ) ; } }

Fix:
list . add ( c ) ;
Buggy code:
public abstract class AbstractCrypt implements ICrypt { private static final String DEFAULT_ENCRYPTION_KEY = "WiCkEt-CrYpT" ; private static final String CHARACTER_ENCODING = "UTF-8" ; private static final Logger log = LoggerFactory . getLogger ( AbstractCrypt . class ) ; private String encryptionKey = AbstractCrypt . DEFAULT_ENCRYPTION_KEY ; public AbstractCrypt ( ) { } public final String decryptUrlSafe ( final String text ) { } public final String encryptUrlSafe ( final String plainText ) { } public String getKey ( ) { } public void setKey ( final String key ) { } protected abstract byte [ ] crypt ( final byte [ ] input , final int mode ) throws GeneralSecurityException { } private final byte [ ] decryptByteArray ( final byte [ ] encrypted ) { try { return crypt ( encrypted , Cipher . DECRYPT_MODE ) ; } catch ( GeneralSecurityException e ) { <START_BUG> throw new WicketRuntimeException ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>decrypt<seq2seq4repair_space>the<seq2seq4repair_space>text<seq2seq4repair_space>'" + encrypted ) + "'" ) , e ) ; <END_BUG> } } private final byte [ ] encryptStringToByteArray ( final String plainText ) throws GeneralSecurityException { } }

Fix:
throw new WicketRuntimeException ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>decrypt<seq2seq4repair_space>the<seq2seq4repair_space>text<seq2seq4repair_space>'" + ( encrypted . toString ( ) ) ) + "'" ) , e ) ;
Buggy code:
public class DocumentListFragment extends ListFragment implements LoaderManager . LoaderCallbacks < Cursor > , SwipeRefreshLayout . OnRefreshListener { private static final String PROVIDER = "com.mobilejazz.coltrane.ui.browser.fragment.provider" ; public static final int REQUEST_RESOLVE_PROVIDER_ISSUE = 35092 ; public interface Callbacks { public void onDocumentSelected ( DocumentCursor document ) { } } private static final int LOADER_ID = 0 ; private DocumentListAdapter mAdapter ; private DocumentsProvider mProvider ; private String mCurrentDocumentId ; private DocumentListFragment . Callbacks mListener ; private View mPendingActionView ; private Button mExecutePendingAction ; private TextView mEmptyTextView ; private View mProgressContainer ; private View mListContainer ; private SwipeRefreshLayout mSwipeLayout ; private PendingAction mPendingAction ; public static DocumentListFragment newInstance ( String providerId , String path ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View view = inflater . inflate ( file_list , container , false ) ; mPendingActionView = view . findViewById ( pending_action ) ; mExecutePendingAction = ( ( Button ) ( mPendingActionView . findViewById ( execute_pending_action ) ) ) ; mExecutePendingAction . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { changeEmptyView ( mEmptyTextView ) ; setListShown ( false ) ; <START_BUG> startActivityForResult ( mPendingAction , DocumentListFragment . REQUEST_RESOLVE_PROVIDER_ISSUE ) ; <END_BUG> } } ) ; mEmptyTextView = ( ( TextView ) ( view . findViewById ( empty ) ) ) ; mProgressContainer = view . findViewById ( progressContainer ) ; mListContainer = view . findViewById ( listContainer ) ; return view ; } @ Override public void onViewCreated ( View view , Bundle savedInstanceState ) { } protected void changeEmptyView ( View v ) { } @ Override public void onStart ( ) { } @ Override public void onListItemClick ( ListView l , View v , int position , long id ) { } @ Override public Loader < Cursor > onCreateLoader ( int id , Bundle args ) { } @ Override public void onLoadFinished ( Loader < Cursor > loader , Cursor data ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public void onLoaderReset ( Loader < Cursor > loader ) { } @ Override public void onRefresh ( ) { } @ Override public void setListShown ( boolean shown ) { } @ Override public void setListShownNoAnimation ( boolean shown ) { } private void setListShown ( boolean shown , boolean animate ) { } }

Fix:
mPendingAction . performWith ( DocumentListFragment . this , DocumentListFragment . REQUEST_RESOLVE_PROVIDER_ISSUE ) ;
Buggy code:
public final class LongRange extends Range implements Serializable { private static final long serialVersionUID = 71849363892720L ; private final long min ; private final long max ; private transient Long minObject = null ; private transient Long maxObject = null ; private transient int hashCode = 0 ; private transient String toString = null ; public LongRange ( long number ) { } public LongRange ( Number number ) { } public LongRange ( long number1 , long number2 ) { } public LongRange ( Number number1 , Number number2 ) { } @ Override public Number getMinimumNumber ( ) { } @ Override public long getMinimumLong ( ) { } @ Override public int getMinimumInteger ( ) { } @ Override public double getMinimumDouble ( ) { } @ Override public float getMinimumFloat ( ) { } @ Override public Number getMaximumNumber ( ) { } @ Override public long getMaximumLong ( ) { } @ Override public int getMaximumInteger ( ) { } @ Override public double getMaximumDouble ( ) { } @ Override public float getMaximumFloat ( ) { } @ Override public boolean containsNumber ( Number number ) { } @ Override public boolean containsLong ( long value ) { } @ Override public boolean containsRange ( Range range ) { } @ Override public boolean overlapsRange ( Range range ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { if ( ( toString ) == null ) { <START_BUG> StringBuffer buf = new StringBuffer ( 32 ) ; <END_BUG> buf . append ( "Range[" ) ; buf . append ( min ) ; buf . append ( ',' ) ; buf . append ( max ) ; buf . append ( ']' ) ; toString = buf . toString ( ) ; } return toString ; } public long [ ] toArray ( ) { } }

Fix:
StringBuilder buf = new StringBuilder ( 32 ) ;
Buggy code:
public class DBAdapter { static final String TAG = "DBAdapter" ; static final String DATABASE_NAME = "MyDB" ; static final int DATABASE_VERSION = 1 ; final Context context ; DBAdapter . DatabaseHelper DBHelper ; SQLiteDatabase db ; public DBAdapter ( Context ctx ) { } private static class DatabaseHelper extends SQLiteOpenHelper { DatabaseHelper ( Context context ) { } @ Override public void onCreate ( SQLiteDatabase db ) { } @ Override public void onUpgrade ( SQLiteDatabase db , int oldVersion , int newVersion ) { } } public DBAdapter open ( ) { } public void close ( ) { } public boolean isDataInDb ( String tableName , String dbfield , String fieldValue ) { } public boolean isTableEmpty ( String tableName ) { } public long insertUser ( User user ) { } public long insertRoutine ( Routine routine ) { } public long insertWorkout ( Workout workout ) { ContentValues initialValues = new ContentValues ( ) ; initialValues . put ( "name" , workout . getName ( ) ) ; <START_BUG> initialValues . put ( "description" , workout . getDescription ( ) ) ; <END_BUG> initialValues . put ( "routine_id" , workout . getRoutineId ( ) ) ; return db . insert ( "workout" , null , initialValues ) ; } public long insertWorkoutExercise ( long workoutId , long exerciseId ) { } public long insertExercise ( Exercise exercise ) { } public long insertExerciseWithId ( Exercise exercise ) { } public long insertUserWorkout ( UserWorkout userWorkout ) { } public long insertUserWorkoutExercise ( UserWorkoutExercise userWorkoutExercise ) { } public void insertUserAndRoutine ( User user ) { } public long insertUserExercise ( User user , Exercise exercise ) { } public boolean updateUserExercise ( User user , Exercise exercise ) { } public ArrayList < Exercise > getExercisesByMainMuscle ( String mainMuscle ) { } public Exercise getExercise ( long id ) { } public User getUserAndRoutine ( String userEmail ) { } public Workout getWorkout ( long id ) { } public Routine getRoutine ( long id ) { } public Exercise getUserExerciseData ( User user , Exercise exercise ) { } }

Fix:
initialValues . put ( "description" , workout . getDay ( ) ) ;
Buggy code:
public class JavaViewer { Shell shell ; StyledText text ; JavaLineStyler lineStyler = new JavaLineStyler ( ) ; FileDialog fileDialog ; static ResourceBundle resources = ResourceBundle . getBundle ( "examples_javaviewer" ) ; Menu createFileMenu ( ) { Menu bar = shell . getMenuBar ( ) ; Menu menu = new Menu ( bar ) ; MenuItem item ; <START_BUG> item = new MenuItem ( menu , SWT . CASCADE ) ; <END_BUG> item . setText ( JavaViewer . resources . getString ( "Open_menuitem" ) ) ; item . setAccelerator ( ( ( SWT . MOD1 ) + 'O' ) ) ; item . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent event ) { openFile ( ) ; } } ) ; item = new MenuItem ( menu , SWT . PUSH ) ; item . setText ( JavaViewer . resources . getString ( "Exit_menuitem" ) ) ; item . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { menuFileExit ( ) ; } } ) ; return menu ; } void createMenuBar ( ) { } void createShell ( Display display ) { } void createStyledText ( ) { } void displayError ( String msg ) { } public static void main ( String [ ] args ) { } public Shell open ( Display display ) { } void openFile ( ) { } void open ( String name ) { } void menuFileExit ( ) { } }

Fix:
item = new MenuItem ( menu , SWT . PUSH ) ;
Buggy code:
class AddressSettingsWriteHandler implements OperationStepHandler { static final AddressSettingsWriteHandler INSTANCE = new AddressSettingsWriteHandler ( ) ; public void registerAttributes ( final ManagementResourceRegistration registry ) { } @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final Resource resource = context . readResourceForUpdate ( EMPTY_ADDRESS ) ; final String attribute = operation . require ( NAME ) . asString ( ) ; final AttributeDefinition def = AddressSettingsWriteHandler . getAttributeDefinition ( attribute ) ; if ( def == null ) { context . getFailureDescription ( ) . set ( new ModelNode ( ) . set ( MessagingMessages . MESSAGES . unknownAttribute ( attribute ) ) ) ; } def . getValidator ( ) . validateParameter ( VALUE , operation ) ; resource . getModel ( ) . get ( attribute ) . set ( operation . get ( VALUE ) ) ; if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { <START_BUG> final HornetQServer server = AddressSettingAdd . getServer ( context ) ; <END_BUG> PathAddress address = null ; HierarchicalRepository < AddressSettings > repository = null ; AddressSettings existingSettings = null ; if ( server != null ) { final ModelNode model = resource . getModel ( ) ; address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final AddressSettings settings = AddressSettingAdd . createSettings ( model ) ; repository = server . getAddressSettingsRepository ( ) ; String match = address . getLastElement ( ) . getValue ( ) ; existingSettings = repository . getMatch ( match ) ; repository . addMatch ( match , settings ) ; } if ( ( ( context . completeStep ( ) ) != ( ResultAction . KEEP ) ) && ( existingSettings != null ) ) { repository . addMatch ( address . getLastElement ( ) . getValue ( ) , existingSettings ) ; } } } , RUNTIME ) ; } context . completeStep ( ) ; } static final AttributeDefinition getAttributeDefinition ( final String attributeName ) { } }

Fix:
final HornetQServer server = AddressSettingAdd . getServer ( context , operation ) ;
Buggy code:
public class PaintLineListener extends DrawShapeListener { private int x1 ; private int y1 ; private int y2 ; private int x2 ; private boolean canvasClicked ; public PaintLineListener ( Canvas canvas ) { } @ Override public void mouseDragged ( MouseEvent e ) { } public void mouseMoved ( MouseEvent e ) { } public void setPointOrigin ( int x1 , int y1 ) { } public void setPointNext ( int x2 , int y2 ) { } public void setClicked ( boolean b ) { } public boolean isClicked ( ) { } public void drawLine ( Graphics2D g2 ) { } public int [ ] getNextPoint ( ) { } @ Override public void draw ( Graphics2D g2 ) { super . draw ( g2 ) ; <START_BUG> getNetworkModule ( ) . sendMessage ( new friedman . paint . messages . LineMessage ( x1 , y1 , x2 , y2 , canvas . getPaintColor ( ) . getRGB ( ) , 10 ) ) ; <END_BUG> } }

Fix:
getNetworkModule ( ) . sendMessage ( new friedman . paint . messages . LineMessage ( x1 , y1 , x2 , y2 , canvas . getPaintColor ( ) . getRGB ( ) , STROKE_WIDTH ) ) ;
Buggy code:
public class PLReader { private final String [ ] variables ; public PLReader ( ) { } public Problem read ( File file ) throws FileNotFoundException , IOException { } public Problem read ( String content ) throws IOException { } public Problem read ( Reader reader ) throws IOException { } private boolean hasValidLength ( String [ ] buffer ) { <START_BUG> return ( ( buffer . length ) > 8 ) && ( ( ( ( buffer . length ) - 3 ) % 5 ) == 0 ) ; <END_BUG> } private ProblemType readProblemType ( String [ ] buffer ) throws IOException { } private Linear readObjectiveFunction ( String [ ] buffer ) throws IOException { } private Relationship parseRelationship ( String character ) throws IOException { } private Constraint [ ] readConstraints ( String [ ] buffer ) throws IOException { } }

Fix:
return ( ( buffer . length ) >= 8 ) && ( ( ( ( buffer . length ) - 3 ) % 5 ) == 0 ) ;
Buggy code:
public interface PerClause { PerClauseKind getKind ( ) { } <START_BUG> String getPointcutExpression ( ) ; <END_BUG> }

Fix:
PointcutExpression getPointcutExpression ( ) ;
Buggy code:
public class SocketNode implements Runnable { Socket socket ; LoggerRepository hierarchy ; ObjectInputStream ois ; static Logger logger = Category . getInstance ( SocketNode . class ) ; public SocketNode ( Socket socket , LoggerRepository hierarchy ) { } public void run ( ) { LoggingEvent event ; Logger remoteLogger ; try { while ( true ) { event = ( ( LoggingEvent ) ( ois . readObject ( ) ) ) ; <START_BUG> remoteLogger = hierarchy . getLogger ( event . loggerName ) ; <END_BUG> event . logger = remoteLogger ; if ( event . level . isGreaterOrEqual ( remoteLogger . getChainedLevel ( ) ) ) { remoteLogger . callAppenders ( event ) ; } } } catch ( EOFException e ) { SocketNode . logger . info ( "Caught<seq2seq4repair_space>java.io.EOFException<seq2seq4repair_space>closing<seq2seq4repair_space>conneciton." ) ; } catch ( SocketException e ) { SocketNode . logger . info ( "Caught<seq2seq4repair_space>java.net.SocketException<seq2seq4repair_space>closing<seq2seq4repair_space>conneciton." ) ; } catch ( IOException e ) { SocketNode . logger . info ( ( "Caught<seq2seq4repair_space>java.io.IOException:<seq2seq4repair_space>" + e ) ) ; SocketNode . logger . info ( "Closing<seq2seq4repair_space>connection." ) ; } catch ( Exception e ) { SocketNode . logger . error ( "Unexpected<seq2seq4repair_space>exception.<seq2seq4repair_space>Closing<seq2seq4repair_space>conneciton." , e ) ; } try { ois . close ( ) ; } catch ( Exception e ) { SocketNode . logger . info ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>close<seq2seq4repair_space>connection." , e ) ; } } }

Fix:
remoteLogger = hierarchy . getLogger ( event . categoryName ) ;
Buggy code:
@ Path ( "//vocabulary//" ) @ Component public class VocabularyService extends AbstractDaoService { private final RowMapper < Concept > rowMapper = new RowMapper < Concept > ( ) { @ Override public Concept mapRow ( final ResultSet resultSet , final int arg1 ) throws SQLException { } } ; @ Path ( "search" ) @ POST @ Produces ( MediaType . APPLICATION_JSON ) @ Consumes ( MediaType . APPLICATION_JSON ) public Collection < Concept > executeSearch ( ConceptSearch search ) { } @ Path ( "search//{query}" ) @ GET @ Produces ( MediaType . APPLICATION_JSON ) public Collection < Concept > executeSearch ( @ PathParam ( "query" ) String query ) { } @ GET @ Path ( "concept//{id}" ) @ Produces ( MediaType . APPLICATION_JSON ) public Concept getConcept ( @ PathParam ( "id" ) final long id ) { String sql_statement = ResourceHelper . GetResourceAsString ( "//resources//vocabulary//sql//getConcept.sql" ) ; sql_statement = SqlRender . renderSql ( sql_statement , new String [ ] { "id" , "CDM_schema" } , new String [ ] { String . valueOf ( id ) , getCdmSchema ( ) } ) ; sql_statement = SqlTranslate . translateSql ( sql_statement , "sql<seq2seq4repair_space>server" , getDialect ( ) ) ; Concept concept = null ; try { concept = getJdbcTemplate ( ) . queryForObject ( sql_statement , this . rowMapper ) ; } catch ( EmptyResultDataAccessException e ) { <START_BUG> log . debug ( String . format ( "Request<seq2seq4repair_space>for<seq2seq4repair_space>conceptId=%s<seq2seq4repair_space>resulted<seq2seq4repair_space>in<seq2seq4repair_space>0<seq2seq4repair_space>results" , id ) , e ) ; <END_BUG> throw new javax . ws . rs . WebApplicationException ( Status . NOT_FOUND ) ; } return concept ; } @ GET @ Path ( "concept//{id}//related" ) @ Produces ( MediaType . APPLICATION_JSON ) public Collection < RelatedConcept > getRelatedConcepts ( @ PathParam ( "id" ) final Long id ) { } @ GET @ Path ( "concept//{id}//descendants" ) @ Produces ( MediaType . APPLICATION_JSON ) public Collection < RelatedConcept > getDescendantConcepts ( @ PathParam ( "id" ) final Long id ) { } @ GET @ Path ( "domains" ) @ Produces ( MediaType . APPLICATION_JSON ) public Collection < Domain > getDomains ( ) { } @ GET @ Path ( "vocabularies" ) @ Produces ( MediaType . APPLICATION_JSON ) public Collection < Vocabulary > getVocabularies ( ) { } private void addRelationships ( final Map < Long , RelatedConcept > concepts , final ResultSet resultSet ) throws SQLException { } @ GET @ Path ( "info" ) @ Produces ( MediaType . APPLICATION_JSON ) public VocabularyInfo getInfo ( ) { } private String JoinArray ( final String [ ] array ) { } }

Fix:
log . debug ( String . format ( "Request<seq2seq4repair_space>for<seq2seq4repair_space>conceptId=%s<seq2seq4repair_space>resulted<seq2seq4repair_space>in<seq2seq4repair_space>0<seq2seq4repair_space>results" , id ) ) ;
Buggy code:
public class TernModuleMetadata { public static String ANY_VERSION = "?" ; private static final String NAME_FIELD = "name" ; private static final String LABEL_FIELD = "label" ; private static final String DESCRIPTION_FIELD = "description" ; private static final String HOMEPAGE_FIELD = "homepage" ; private static final String AUTHOR_FIELD = "author" ; private static final String REPOSITORY_FIELD = "repository" ; private static final String BUGS_FIELD = "bugs" ; private static final String HELP_FIELD = "help" ; private static final String LINTER_FIELD = "linter" ; private static final String URL_FIELD = "url" ; private static final String DEPENDENCIES_FIELD = "dependencies" ; private static final String OPTIONS_FIELD = "options" ; private final String name ; private final String label ; private final String description ; private final String homepage ; private final String author ; private final String repositoryURL ; private final String bugsURL ; private final String helpURL ; private final boolean linter ; private final Map < String , Collection < String > > dependencies ; private final Map < String , Collection < String > > requiredDependencies ; private final Collection < TernModuleMetadataOption > options ; public TernModuleMetadata ( JsonObject json ) { } private Map < String , Collection < String > > getRequiredDependencies ( ) { } public String getURL ( JsonObject json , String name ) { } private Map < String , Collection < String > > parseDependencies ( JsonValue jsonDependencies ) { } private Map < String , Collection < String > > parseDependencies ( JsonArray jsonDependencies ) { } private void parseDependencies ( JsonArray jsonDependencies , String version , Map < String , Collection < String > > dependenciesMap ) { } private Map < String , Collection < String > > parseDependencies ( JsonObject jsonDependencies ) { } private Collection < TernModuleMetadataOption > parseOptions ( JsonArray jsonOptions ) { } public String getLabel ( ) { } public String getName ( ) { } public String getDescription ( ) { } public String getHomePage ( ) { } public String getAuthor ( ) { } public String getRepositoryURL ( ) { } public String getBugsURL ( ) { } public String getHelpURL ( ) { } public Collection < TernModuleMetadataOption > getOptions ( ) { } @ SuppressWarnings ( "unchecked" ) public Collection < String > getDependencies ( String version ) { } @ SuppressWarnings ( "unchecked" ) public Collection < String > getRequiredDependencies ( String version ) { } public boolean isLinter ( ) { } public boolean hasOptions ( ) { <START_BUG> return ( options ) != null ; <END_BUG> } }

Fix:
return ( ( options ) != null ) && ( ( options . size ( ) ) > 0 ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { <START_BUG> Game g = new Game ( new Human ( ) , new battleberger . model . player . Computer ( new StrategyDiagonal ( ) ) , new Window ( ) ) ; <END_BUG> g . play ( ) ; } }

Fix:
Game g = new Game ( new Human ( ) , new Computer ( ) , new Window ( ) ) ;
Buggy code:
public class TestWindowsMMap extends LuceneTestCase { private static final String alphabet = "abcdefghijklmnopqrstuvwzyz" ; private Random random ; @ Override public void setUp ( ) throws Exception { } private String randomToken ( ) { } private String randomField ( ) { } private static final String storePathname = new File ( System . getProperty ( "tempDir" ) , "testLuceneMmap" ) . getAbsolutePath ( ) ; public void testMmapIndex ( ) throws Exception { rmDir ( new File ( TestWindowsMMap . storePathname ) ) ; FSDirectory storeDirectory = new MMapDirectory ( new File ( TestWindowsMMap . storePathname ) , null ) ; <START_BUG> StandardAnalyzer analyzer = new StandardAnalyzer ( Version . LUCENE_CURRENT , Collections . emptySet ( ) ) ; <END_BUG> IndexWriter writer = new IndexWriter ( storeDirectory , analyzer , true , MaxFieldLength . LIMITED ) ; writer . commit ( ) ; IndexSearcher searcher = new IndexSearcher ( storeDirectory , true ) ; for ( int dx = 0 ; dx < 1000 ; dx ++ ) { String f = randomField ( ) ; Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . Field ( "data" , f , Store . YES , Index . ANALYZED ) ) ; writer . addDocument ( doc ) ; } searcher . close ( ) ; writer . close ( ) ; rmDir ( new File ( TestWindowsMMap . storePathname ) ) ; } private void rmDir ( File dir ) { } }

Fix:
StandardAnalyzer analyzer = new StandardAnalyzer ( TEST_VERSION_CURRENT , Collections . emptySet ( ) ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class HelpfulHints extends JFrame { private JTextArea area ; private JPanel panel ; private JButton close ; private JButton previous ; private JButton next ; private List < String > tips = new ArrayList < String > ( ) ; private int displayedTipIndex = 0 ; public HelpfulHints ( ) { } private class ButtonHandler implements ActionListener { @ Override public void actionPerformed ( ActionEvent e ) { if ( ( e . getSource ( ) ) == ( next ) ) { ( displayedTipIndex ) ++ ; area . setText ( tips . get ( displayedTipIndex ) ) ; if ( ( displayedTipIndex ) >= ( ( tips . size ( ) ) - 1 ) ) { next . setEnabled ( false ) ; } previous . setEnabled ( true ) ; } if ( ( e . getSource ( ) ) == ( previous ) ) { ( displayedTipIndex ) -- ; area . setText ( tips . get ( displayedTipIndex ) ) ; if ( ( displayedTipIndex ) < 1 ) { previous . setEnabled ( false ) ; } next . setEnabled ( true ) ; } if ( ( e . getSource ( ) ) == ( close ) ) { <START_BUG> System . exit ( 0 ) ; <END_BUG> } } } No newline ; at end ; of file ; }

Fix:
dispose ( ) ;
Buggy code:
public class JMSQueueAdd extends AbstractJMSSubsystemUpdate < Void > { private static final long serialVersionUID = 5900849533546313463L ; private final String name ; private Set < String > bindings ; private String selector ; private Boolean durable ; static JMSQueueAdd create ( final JMSQueueElement queue ) { } public JMSQueueAdd ( String name ) { } protected void applyUpdate ( JMSSubsystemElement element ) throws UpdateFailedException { } protected < P > void applyUpdate ( UpdateContext context , UpdateResultHandler < ? super Void , P > handler , P param ) { final JMSQueueService service = new JMSQueueService ( name , selector , durableDefault ( ) , jndiBindings ( ) ) ; final ServiceName serviceName = JMS_QUEUE_BASE . append ( name ) ; <START_BUG> context . getBatchBuilder ( ) . addService ( serviceName , service ) . addDependency ( JMS_MANAGER , JMSServerManager . class , service . getJmsServer ( ) ) . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( handler , param ) ) . setInitialMode ( ACTIVE ) . install ( ) ; <END_BUG> } public AbstractSubsystemUpdate < JMSSubsystemElement , ? > getCompensatingUpdate ( JMSSubsystemElement original ) { } public Set < String > getBindings ( ) { } public void setBindings ( Set < String > bindings ) { } public String getSelector ( ) { } public void setSelector ( String selector ) { } public Boolean getDurable ( ) { } public void setDurable ( Boolean durable ) { } public String getName ( ) { } private boolean durableDefault ( ) { } private String [ ] jndiBindings ( ) { } }

Fix:
context . getServiceTarget ( ) . addService ( serviceName , service ) . addDependency ( JMS_MANAGER , JMSServerManager . class , service . getJmsServer ( ) ) . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( handler , param ) ) . setInitialMode ( ACTIVE ) . install ( ) ;
Buggy code:
public interface CacheManager { class SERVICE { private SERVICE ( ) { } public static CacheManager getInstance ( Project project ) { } } @ NotNull PsiFile [ ] getFilesWithWord ( @ NotNull String word , short occurenceMask , @ NotNull GlobalSearchScope scope , final boolean caseSensitively ) { } boolean processFilesWithWord ( @ NotNull Processor < PsiFile > processor , @ NotNull String word , short occurenceMask , @ NotNull GlobalSearchScope scope , final boolean caseSensitively ) { } <START_BUG> public void collectVirtualFilesWithWord ( @ NotNull <END_BUG> final CommonProcessors . CollectProcessor < VirtualFile > fileProcessor , @ NotNull final String word , final short occurrenceMask , @ NotNull final GlobalSearchScope scope , final boolean caseSensitively ) { } @ NotNull PsiFile [ ] getFilesWithTodoItems ( ) { } int getTodoCount ( @ NotNull VirtualFile file , final IndexPatternProvider patternProvider ) { } int getTodoCount ( @ NotNull VirtualFile file , IndexPattern pattern ) { } }

Fix:
public boolean collectVirtualFilesWithWord ( @ NotNull
Buggy code:
public abstract class DataAggregationManager { private static final Logger logger = LoggerFactory . getLogger ( DataAggregationManager . class ) ; protected List < DLPQuality > qualities = new ArrayList < DLPQuality > ( ) ; protected List < Double > parameters = new ArrayList < Double > ( ) ; protected OcelotlParameters ocelotlParameters ; public List < Double > getParameters ( ) { } public List < DLPQuality > getQualities ( ) { } public abstract void computeDichotomy ( ) { } public void getDichotomyValue ( ) throws OcelotlException { } public File checkForValidCache ( ) { } public void loadDichoCache ( File aDichoCacheFile ) { } public void saveDichotomyValues ( ) { } public String dichoValueToCSV ( ) { } public boolean noFiltering ( ) { if ( ( ocelotlParameters . getCurrentProducers ( ) . size ( ) ) != ( ocelotlParameters . getEventProducerHierarchy ( ) . getEventProducers ( ) . size ( ) ) ) { DataAggregationManager . logger . debug ( "At<seq2seq4repair_space>least<seq2seq4repair_space>one<seq2seq4repair_space>event<seq2seq4repair_space>producer<seq2seq4repair_space>is<seq2seq4repair_space>filtered:<seq2seq4repair_space>dichotomy<seq2seq4repair_space>cache<seq2seq4repair_space>will<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>used//generated." ) ; return false ; } if ( ocelotlParameters . isHasLeaveAggregated ( ) ) { DataAggregationManager . logger . debug ( "Some<seq2seq4repair_space>event<seq2seq4repair_space>producers<seq2seq4repair_space>are<seq2seq4repair_space>aggregated:<seq2seq4repair_space>dichotomy<seq2seq4repair_space>cache<seq2seq4repair_space>will<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>used//generated." ) ; return false ; } <START_BUG> if ( ( ocelotlParameters . getTraceTypeConfig ( ) . getTypes ( ) . size ( ) ) != ( ocelotlParameters . getUnfilteredEventProducers ( ) . size ( ) ) ) { <END_BUG> DataAggregationManager . logger . debug ( "At<seq2seq4repair_space>least<seq2seq4repair_space>one<seq2seq4repair_space>event<seq2seq4repair_space>type<seq2seq4repair_space>is<seq2seq4repair_space>filtered:<seq2seq4repair_space>dichotomy<seq2seq4repair_space>cache<seq2seq4repair_space>will<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>used//generated." ) ; return false ; } return true ; } }

Fix:
if ( ( ocelotlParameters . getTraceTypeConfig ( ) . getTypes ( ) . size ( ) ) != ( ocelotlParameters . getAllEventTypes ( ) . size ( ) ) ) {
Buggy code:
public class InvadeTurn implements TurnState { private PlayerI opponent ; private CountryI invadingCountry ; private CountryI defendingCountry ; private StringBuilder sb ; private int maxDefDice = 0 ; private int maxInvDice = 0 ; private static final int MAX_RECRUITMENT = 3 ; private Die dice = new Die ( ) ; @ Override public void pull ( Turn turn ) { } void setMaxDice ( ) { } private void invade ( ) { setMaxDice ( ) ; int [ ] invaderDice = new int [ maxInvDice ] ; int [ ] defenderDice = new int [ maxDefDice ] ; dice . roll ( invaderDice ) ; dice . roll ( defenderDice ) ; <START_BUG> for ( int i = 0 ; i < ( defenderDice . length ) ; i ++ ) { <END_BUG> int a = max ( invaderDice ) ; int d = max ( defenderDice ) ; sb . append ( String . format ( "%d<seq2seq4repair_space>-<seq2seq4repair_space>%d\n" , invaderDice [ a ] , defenderDice [ d ] ) ) ; if ( ( invaderDice [ a ] ) > ( defenderDice [ d ] ) ) { ( maxDefDice ) -- ; defendingCountry . setSoldiers ( ( ( defendingCountry . getSoldiers ( ) ) - 1 ) ) ; } else { invadingCountry . setSoldiers ( ( ( invadingCountry . getSoldiers ( ) ) - 1 ) ) ; ( maxInvDice ) -- ; } invaderDice [ a ] = 0 ; defenderDice [ d ] = 0 ; } } public CountryI winner ( ) { } private int max ( int [ ] a ) { } public void setDie ( Die d ) { } }

Fix:
for ( int i = 0 ; ( i < ( defenderDice . length ) ) && ( i < ( invaderDice . length ) ) ; i ++ ) {
Buggy code:
public class CompletionOnJavadocTypeParamReference extends JavadocSingleTypeReference implements CompletionOnJavadoc { public int completionFlags = CompletionOnJavadoc . JAVADOC ; public char [ ] [ ] missingParams ; public CompletionOnJavadocTypeParamReference ( char [ ] name , long pos , int start , int end ) { } public CompletionOnJavadocTypeParamReference ( JavadocSingleTypeReference typeRef ) { } public void addCompletionFlags ( int flags ) { } public int getCompletionFlags ( ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { <START_BUG> output . append ( "<CompleteOnJavadocSingleNameReference:" ) ; <END_BUG> if ( ( this . token ) != null ) super . printExpression ( indent , output ) ; return output . append ( '>' ) ; } public TypeBinding reportError ( BlockScope scope ) { } }

Fix:
output . append ( "<CompleteOnJavadocSingleTypeReference:" ) ;
Buggy code:
public class MaxEmbeddedBlobFieldStrategy extends MaxEmbeddedLobFieldStrategy { private static final Localizer _loc = Localizer . forPackage ( MaxEmbeddedBlobFieldStrategy . class ) ; private int _maxSize = 0 ; protected int getExpectedJavaType ( ) { } protected void update ( OpenJPAStateManager sm , Row row ) throws SQLException { byte [ ] b = ( ( byte [ ] ) ( sm . getImplData ( field . getIndex ( ) ) ) ) ; <START_BUG> if ( ( b == null ) || ( ( b . length ) > ( _maxSize ) ) ) <END_BUG> row . setNull ( field . getColumns ( ) [ 0 ] , true ) ; else { sm . setImplData ( field . getIndex ( ) , null ) ; DBDictionary . SerializedData dat = new DBDictionary . SerializedData ( b ) ; row . setObject ( field . getColumns ( ) [ 0 ] , dat ) ; } } protected Boolean isCustom ( OpenJPAStateManager sm , JDBCStore store ) { } protected void putData ( OpenJPAStateManager sm , ResultSet rs , DBDictionary dict ) throws SQLException { } public void map ( boolean adapt ) { } public void initialize ( ) { } }

Fix:
if ( ( b == null ) || ( ( ( b . length ) > ( _maxSize ) ) && ( ! ( field . getColumns ( ) [ 0 ] . isNotNull ( ) ) ) ) )
Buggy code:
public class MessageSink { private final String topic = Consts . KAFKA_TOPIC ; private final KafkaProducer < String , String > producer ; public MessageSink ( String brokerList ) { } public void send ( String json ) { <START_BUG> Future < RecordMetadata > future = producer . send ( new org . apache . kafka . clients . producer . ProducerRecord ( topic , json ) ) ; <END_BUG> try { future . get ( 30 , TimeUnit . SECONDS ) ; } catch ( Exception e ) { throw Throwables . propagate ( e ) ; } } }

Fix:
Future < RecordMetadata > future = producer . send ( new org . apache . kafka . clients . producer . ProducerRecord < String , String > ( topic , json ) ) ;
Buggy code:
public class ClasspathJar implements FileSystem . Classpath { ZipFile zipFile ; Hashtable packageCache ; boolean closeZipFileAtEnd ; public ClasspathJar ( File file ) throws IOException { } public ClasspathJar ( ZipFile zipFile , boolean closeZipFileAtEnd ) { } public NameEnvironmentAnswer findClass ( char [ ] typeName , String qualifiedPackageName , String qualifiedBinaryFileName ) { if ( ! ( isPackage ( qualifiedPackageName ) ) ) return null ; try { ClassFileReader reader = ClassFileReader . read ( this . zipFile , qualifiedBinaryFileName ) ; if ( reader != null ) <START_BUG> return new NameEnvironmentAnswer ( reader ) ; <END_BUG> } catch ( Exception e ) { } return null ; } public boolean isPackage ( String qualifiedPackageName ) { } public void reset ( ) { } public String toString ( ) { } }

Fix:
return new NameEnvironmentAnswer ( reader , null ) ;