nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Path implements Cloneable { private Vector elements ; private Project project ; private boolean isReference = false ; private boolean checked = true ; public static Path systemClasspath = new Path ( null , System . getProperty ( "java.class.path" ) ) ; public class PathElement { private String [ ] parts ; public void setLocation ( File loc ) { } public void setPath ( String path ) { } public String [ ] getParts ( ) { } } public Path ( Project p , String path ) { } public Path ( Project project ) { } public void setLocation ( File location ) throws BuildException { } public void setPath ( String path ) throws BuildException { } public void setRefid ( Reference r ) throws BuildException { } public Path . PathElement createPathElement ( ) throws BuildException { } public void addFileset ( FileSet fs ) throws BuildException { } public void addFilesetRef ( Reference r ) throws BuildException { } public Path createPath ( ) throws BuildException { if ( isReference ) { throw noChildrenAllowed ( ) ; } Path p = new Path ( project ) ; <START_BUG> elements . add ( p ) ; <END_BUG> checked = false ; return p ; } public void append ( Path other ) { } public void addExisting ( Path source ) { } public String [ ] list ( ) { } public String toString ( ) { } public static String [ ] translatePath ( Project project , String source ) { } public static String translateFile ( String source ) { } protected static boolean translateFileSep ( StringBuffer buffer , int pos ) { } public int size ( ) { } public Object clone ( ) { } protected void bailOnCircularReference ( Stack stk ) throws BuildException { } private static String resolveFile ( Project project , String relativeName ) { } private static void addUnlessPresent ( Vector v , String s ) { } private BuildException tooManyAttributes ( ) { } private BuildException noChildrenAllowed ( ) { } private BuildException circularReference ( ) { } }

Fix:
elements . addElement ( p ) ;
Buggy code:
public class Header { private int id ; private boolean [ ] flags ; private int rcode ; private int opcode ; private int [ ] counts ; private static Random random = new Random ( ) ; public static final int LENGTH = 12 ; public Header ( int id ) { } public Header ( ) { } Header ( DNSInput in ) throws IOException { } public Header ( byte [ ] b ) throws IOException { } void toWire ( DNSOutput out ) { } public byte [ ] toWire ( ) { } public void setFlag ( int bit ) { } public void unsetFlag ( int bit ) { } public boolean getFlag ( int bit ) { } boolean [ ] getFlags ( ) { } public int getID ( ) { } public void setID ( int id ) { } static int randomID ( ) { } public void setRcode ( int value ) { } public int getRcode ( ) { } public void setOpcode ( int value ) { } public int getOpcode ( ) { } void setCount ( int field , int value ) { } void incCount ( int field ) { } void decCount ( int field ) { } public int getCount ( int field ) { } private void writeFlags ( DNSOutput out ) { } private void readFlags ( DNSInput in ) throws IOException { int flagsval = in . readU16 ( ) ; for ( int i = 0 ; i < 16 ; i ++ ) { flags [ i ] = ( flagsval & ( 1 << ( 15 - i ) ) ) != 0 ; } <START_BUG> opcode = ( ( byte ) ( ( flagsval > > 3 ) & 15 ) ) ; <END_BUG> rcode = ( ( byte ) ( flagsval & 15 ) ) ; } public String printFlags ( ) { } String toStringWithRcode ( int newrcode ) { } public String toString ( ) { } public Object clone ( ) { } }

Fix:
opcode = ( ( byte ) ( ( flagsval > > 11 ) & 15 ) ) ;
Buggy code:
public class OrderedSongTableModel extends AbstractTableModel { private static final int COLUMN_COUNT = 4 ; private final List < Song > songList ; public OrderedSongTableModel ( List < Song > songList ) { } @ Override public int getRowCount ( ) { <START_BUG> return ( songList ) == null ? 1 : songList . size ( ) ; <END_BUG> } @ Override public int getColumnCount ( ) { } @ Override public Object getValueAt ( int rowIndex , int columnIndex ) { } }

Fix:
return ( songList ) == null ? 0 : songList . size ( ) ;
Buggy code:
public class MessageTagTests extends AbstractTagTests { @ SuppressWarnings ( "serial" ) public void testMessageTagWithMessageSourceResolvable ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithCode ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithNullCode ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithCodeAndArgument ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithCodeAndArguments ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithCodeAndStringArgumentWithCustomSeparator ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithCodeAndArrayArgument ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithCodeAndObjectArgument ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithCodeAndArgumentAndNestedArgument ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithCodeAndNestedArgument ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithCodeAndNestedArguments ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithCodeAndText ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithText ( ) throws JspException { PageContext pc = createPageContext ( ) ; final StringBuffer message = new StringBuffer ( ) ; MessageTag tag = new MessageTag ( ) { @ Override protected void writeMessage ( String msg ) { message . append ( msg ) ; } } ; tag . setPageContext ( pc ) ; tag . setText ( "test<seq2seq4repair_space>&<seq2seq4repair_space>text<seq2seq4repair_space>é" ) ; tag . setHtmlEscape ( true ) ; assertTrue ( "Correct<seq2seq4repair_space>doStartTag<seq2seq4repair_space>return<seq2seq4repair_space>value" , ( ( tag . doStartTag ( ) ) == ( Tag . EVAL_BODY_INCLUDE ) ) ) ; assertEquals ( "Correct<seq2seq4repair_space>doEndTag<seq2seq4repair_space>return<seq2seq4repair_space>value" , EVAL_PAGE , tag . doEndTag ( ) ) ; <START_BUG> assertEquals ( "Correct<seq2seq4repair_space>message" , "test<seq2seq4repair_space>&amp;<seq2seq4repair_space>text<seq2seq4repair_space>&eacute;" , message . toString ( ) ) ; <END_BUG> } @ SuppressWarnings ( "serial" ) public void testMessageTagWithTextEncodingEscaped ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithTextAndJavaScriptEscape ( ) throws JspException { } @ SuppressWarnings ( "serial" ) public void testMessageTagWithTextAndHtmlEscapeAndJavaScriptEscape ( ) throws JspException { } public void testMessageWithVarAndScope ( ) throws JspException { } public void testMessageWithVar ( ) throws JspException { } public void testNullMessageSource ( ) throws JspException { } public void testRequestContext ( ) throws ServletException { } }

Fix:
assertTrue ( "Correct<seq2seq4repair_space>message" , message . toString ( ) . startsWith ( "test<seq2seq4repair_space>&amp;<seq2seq4repair_space>text<seq2seq4repair_space>&" ) ) ;
Buggy code:
public class BlurDialogEngine { static final float DEFAULT_BLUR_DOWN_SCALE_FACTOR = 4.0F ; static final int DEFAULT_BLUR_RADIUS = 8 ; static final boolean DEFAULT_DIMMING_POLICY = false ; static final boolean DEFAULT_DEBUG_POLICY = false ; static final boolean DEFAULT_ACTION_BAR_BLUR = false ; static final boolean DEFAULT_USE_RENDERSCRIPT = false ; private static final String TAG = BlurDialogEngine . class . getSimpleName ( ) ; private ImageView mBlurredBackgroundView ; private LayoutParams mBlurredBackgroundLayoutParams ; private BlurDialogEngine . BlurAsyncTask mBluringTask ; private boolean mDebugEnable = false ; private float mDownScaleFactor = BlurDialogEngine . DEFAULT_BLUR_DOWN_SCALE_FACTOR ; private int mBlurRadius = BlurDialogEngine . DEFAULT_BLUR_RADIUS ; private Activity mHoldingActivity ; private Toolbar mToolbar ; private int mAnimationDuration ; private boolean mBlurredActionBar ; private boolean mUseRenderScript ; public BlurDialogEngine ( Activity holdingActivity ) { } public void onResume ( boolean retainedInstance ) { } @ SuppressLint ( "NewApi" ) public void onDismiss ( ) { } public void onDestroy ( ) { } public void debug ( boolean enable ) { } public void setDownScaleFactor ( float factor ) { } public void setBlurRadius ( int radius ) { } public void setUseRenderScript ( boolean useRenderScript ) { } public void setBlurActionBar ( boolean enable ) { } public void setToolbar ( Toolbar toolbar ) { } private void blur ( Bitmap bkg , View view ) { } private int getActionBarHeight ( ) { } private int getStatusBarHeight ( ) { } private int getNavigationBarOffset ( ) { int result = 0 ; Resources resources = mHoldingActivity . getResources ( ) ; <START_BUG> if ( ( VERSION . SDK_INT ) == ( VERSION_CODES . LOLLIPOP ) ) { <END_BUG> int resourceId = resources . getIdentifier ( "navigation_bar_height" , "dimen" , "android" ) ; if ( resourceId > 0 ) { result = resources . getDimensionPixelSize ( resourceId ) ; } } return result ; } @ TargetApi ( VERSION_CODES . KITKAT ) private boolean isStatusBarTranslucent ( ) { } private void removeBlurredView ( ) { } private class BlurAsyncTask extends AsyncTask < Void , Void , Void > { private Bitmap mBackground ; private View mBackgroundView ; @ Override protected void onPreExecute ( ) { } @ Override protected Void doInBackground ( Void ... params ) { } @ Override @ SuppressLint ( "NewApi" ) protected void onPostExecute ( Void aVoid ) { } } }

Fix:
if ( ( VERSION . SDK_INT ) >= ( VERSION_CODES . LOLLIPOP ) ) {
Buggy code:
public abstract class SLPCore { private static volatile boolean isMulticastSocketInitialized = false ; private static volatile boolean isInitialized = false ; protected static PlatformAbstraction platform ; static final Locale DEFAULT_LOCALE = Locale . getDefault ( ) ; static final int SLP_PORT ; static final int SLP_RESERVED_PORT = 427 ; static final String SLP_MCAST_ADDRESS = "239.255.255.253" ; static final InetAddress MCAST_ADDRESS ; static final SLPConfiguration CONFIG ; static final boolean TCP_ONLY = false ; static final String SLP_DA_TYPE = "service:directory-agent" ; static String [ ] myIPs ; static final boolean noDiscovery ; protected static final Constructor advertiser ; protected static final Constructor locator ; private static final Constructor daemonConstr ; private static SLPDaemon daemon ; private static Thread multicastThread ; private static MulticastSocket mtcSocket ; private static short nextXid ; private static Map replyListeners = new HashMap ( ) ; static Map dAs = new HashMap ( ) ; static Map dASPIs = new HashMap ( ) ; static InetAddress LOCALHOST ; protected static void init ( ) { } protected static void initMulticastSocket ( ) { } static InetAddress getMyIP ( ) { } public static List findScopes ( ) throws ServiceLocationException { } private static SLPMessage handleMessage ( final SLPMessage message ) throws ServiceLocationException { } static short nextXid ( ) { } static void daLookup ( final List scopes ) throws ServiceLocationException { } static ReplyMessage sendMessageTCP ( final SLPMessage msg ) throws ServiceLocationException { try { if ( ( msg . xid ) == 0 ) { msg . xid = SLPCore . nextXid ( ) ; } Socket socket = new Socket ( msg . address , msg . port ) ; socket . setSoTimeout ( SLPCore . CONFIG . getTCPTimeout ( ) ) ; DataOutputStream out = new DataOutputStream ( socket . getOutputStream ( ) ) ; DataInputStream in = new DataInputStream ( socket . getInputStream ( ) ) ; <START_BUG> msg . writeTo ( out ) ; <END_BUG> final ReplyMessage reply = ( ( ReplyMessage ) ( SLPMessage . parse ( msg . address , msg . port , in , true ) ) ) ; socket . close ( ) ; return reply ; } catch ( Exception e ) { throw new ServiceLocationException ( ServiceLocationException . NETWORK_ERROR , e . getMessage ( ) ) ; } } static ReplyMessage sendMessage ( final SLPMessage msg , final boolean expectReply ) throws ServiceLocationException { } static List multicastConvergence ( final RequestMessage msg ) throws ServiceLocationException { } private static boolean isLocalResponder ( InetAddress addr ) { } private static void setupReceiverThread ( final DatagramSocket socket , final long minLifetime , final SLPMessage msg ) { } }

Fix:
out . write ( msg . getBytes ( ) ) ;
Buggy code:
class FilterRefAdd extends AbstractAddStepHandler { FilterRefAdd ( ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; Predicate predicate = null ; if ( model . hasDefined ( FilterRefDefinition . PREDICATE . getName ( ) ) ) { String predicateString = model . get ( FilterRefDefinition . PREDICATE . getName ( ) ) . asString ( ) ; predicate = PredicateParser . parse ( predicateString , getClass ( ) . getClassLoader ( ) ) ; } final FilterRef service = new FilterRef ( predicate ) ; final ServiceTarget target = context . getServiceTarget ( ) ; <START_BUG> ServiceController < ? > sc = target . addService ( UndertowService . getFilterRefServiceName ( address , name ) , service ) . addDependency ( FILTER . append ( name ) , FilterService . class , service . getFilter ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ; <END_BUG> if ( newControllers != null ) { newControllers . add ( sc ) ; } } }

Fix:
ServiceController < ? > sc = target . addService ( UndertowService . getFilterRefServiceName ( address , name ) , service ) . addDependency ( FILTER . append ( name ) , FilterService . class , service . getFilter ( ) ) . setInitialMode ( ON_DEMAND ) . install ( ) ;
Buggy code:
public class BlockEnderUtilitiesInventory extends BlockEnderUtilitiesTileEntity { public BlockEnderUtilitiesInventory ( int index , String name , float hardness ) { } public BlockEnderUtilitiesInventory ( int index , String name , float hardness , Material material ) { } @ Override public void breakBlock ( World world , BlockPos pos , IBlockState iBlockState ) { <START_BUG> Machine machine = Machine . getMachine ( this . blockIndex , world . getBlockState ( pos ) . getBlock ( ) . getMetaFromState ( iBlockState ) ) ; <END_BUG> if ( machine != null ) { if ( ( machine . breakBlock ( world , pos , iBlockState ) ) == true ) { world . removeTileEntity ( pos ) ; return ; } } TileEntity te = world . getTileEntity ( pos ) ; if ( ( te != null ) && ( te instanceof TileEntityEnderUtilitiesInventory ) ) { TileEntityEnderUtilitiesInventory teeui = ( ( TileEntityEnderUtilitiesInventory ) ( te ) ) ; for ( int i = 0 ; i < ( teeui . getSizeInventory ( ) ) ; ++ i ) { BlockEnderUtilitiesInventory . dropItemStacks ( world , pos , teeui . getStackInSlot ( i ) , ( - 1 ) , false ) ; } } world . removeTileEntity ( pos ) ; } public static void dropItemStacks ( World world , BlockPos pos , ItemStack stack , int amount , boolean dropFullStacks ) { } @ Override public boolean hasComparatorInputOverride ( ) { } @ Override public int getComparatorInputOverride ( World world , BlockPos pos ) { } }

Fix:
Machine machine = Machine . getMachine ( this . blockIndex , this . getMetaFromState ( iBlockState ) ) ;
Buggy code:
class VAJRemoteUtil implements VAJUtil { Task caller ; String remoteServer ; public VAJRemoteUtil ( Task caller , String remote ) { } public void exportPackages ( File destDir , String [ ] includePatterns , String [ ] excludePatterns , boolean exportClasses , boolean exportDebugInfo , boolean exportResources , boolean exportSources , boolean useDefaultExcludes , boolean overwrite ) { } public void importFiles ( String importProject , File srcDir , String [ ] includePatterns , String [ ] excludePatterns , boolean importClasses , boolean importResources , boolean importSources , boolean useDefaultExcludes ) { } private String assembleImportExportParams ( File dir , String [ ] includePatterns , String [ ] excludePatterns , boolean includeClasses , boolean includeResources , boolean includeSources , boolean useDefaultExcludes ) { <START_BUG> String result = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( VAJToolsServlet . DIR_PARAM ) + "=" ) + ( URLEncoder . encode ( dir . getAbsolutePath ( ) ) ) ) + "&" ) + ( VAJToolsServlet . CLASSES_PARAM ) ) + "=" ) + includeClasses ) + "&" ) + ( VAJToolsServlet . RESOURCES_PARAM ) ) + "=" ) + includeResources ) + "&" ) + ( VAJToolsServlet . SOURCES_PARAM ) ) + "=" ) + includeSources ) + "&" ) + ( VAJToolsServlet . DEFAULT_EXCLUDES_PARAM ) ) + "=" ) + useDefaultExcludes ; <END_BUG> if ( includePatterns != null ) { for ( int i = 0 ; i < ( includePatterns . length ) ; i ++ ) { result = ( ( ( result + "&" ) + ( VAJExportServlet . INCLUDE_PARAM ) ) + "=" ) + ( URLEncoder . encode ( includePatterns [ i ] ) ) ; } } if ( excludePatterns != null ) { for ( int i = 0 ; i < ( excludePatterns . length ) ; i ++ ) { result = ( ( ( result + "&" ) + ( VAJExportServlet . EXCLUDE_PARAM ) ) + "=" ) + ( URLEncoder . encode ( excludePatterns [ i ] ) ) ; } } return result ; } public void loadProjects ( Vector projectDescriptions ) { } public void log ( String msg , int level ) { } private void sendRequest ( String request ) { } }

Fix:
String result = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( VAJToolsServlet . DIR_PARAM ) + "=" ) + ( URLEncoder . encode ( dir . getPath ( ) ) ) ) + "&" ) + ( VAJToolsServlet . CLASSES_PARAM ) ) + "=" ) + includeClasses ) + "&" ) + ( VAJToolsServlet . RESOURCES_PARAM ) ) + "=" ) + includeResources ) + "&" ) + ( VAJToolsServlet . SOURCES_PARAM ) ) + "=" ) + includeSources ) + "&" ) + ( VAJToolsServlet . DEFAULT_EXCLUDES_PARAM ) ) + "=" ) + useDefaultExcludes ;
Buggy code:
public class NativeCameraLauncher extends CordovaPlugin { private static final String LOG_TAG = "NativeCameraLauncher" ; private int mQuality ; private int targetWidth ; private int targetHeight ; private Uri imageUri ; private File photo ; private static final String _DATA = "_data" ; private CallbackContext callbackContext ; private String date = null ; private String captureButtonColor ; private static int CAMERA_CANCELD = 12345 ; private static String CAPTURE_BUTTON_COLOR_ID = "capture_button_color" ; public NativeCameraLauncher ( ) { } void failPicture ( String reason ) { } void cancelPicture ( ) { } @ Override public boolean execute ( String action , JSONArray args , CallbackContext callbackContext ) throws JSONException { PluginResult . Status status = Status . OK ; String result = "" ; this . callbackContext = callbackContext ; try { if ( action . equals ( "takePicture" ) ) { this . targetHeight = 0 ; this . targetWidth = 0 ; this . mQuality = 80 ; this . targetHeight = args . getInt ( 4 ) ; this . targetWidth = args . getInt ( 3 ) ; this . mQuality = args . getInt ( 0 ) ; <START_BUG> this . captureButtonColor = args . getInt ( 12 ) ; <END_BUG> this . takePicture ( ) ; PluginResult r = new PluginResult ( Status . NO_RESULT ) ; r . setKeepCallback ( true ) ; callbackContext . sendPluginResult ( r ) ; return true ; } return false ; } catch ( JSONException e ) { e . printStackTrace ( ) ; callbackContext . sendPluginResult ( new PluginResult ( Status . JSON_EXCEPTION ) ) ; return true ; } } public void takePicture ( ) { } private File createCaptureFile ( ) { } public void onActivityResult ( int requestCode , int resultCode , Intent intent ) { } public Bitmap scaleBitmap ( Bitmap bitmap ) { } private Bitmap getRotatedBitmap ( int rotate , Bitmap bitmap , ExifHelper exif ) { } private String getTempDirectoryPath ( Context ctx ) { } No newline ; at end ; of file ; }

Fix:
this . captureButtonColor = args . getString ( 12 ) ;
Buggy code:
public class SourceIndexer extends AbstractIndexer implements SuffixConstants { protected DefaultProblemFactory problemFactory = new DefaultProblemFactory ( Locale . getDefault ( ) ) ; public SourceIndexer ( SearchDocument document ) { } public void indexDocument ( ) { SourceIndexerRequestor requestor = new SourceIndexerRequestor ( this ) ; String documentPath = this . document . getPath ( ) ; IPath path = new Path ( documentPath ) ; IProject project = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . getProject ( path . segment ( 0 ) ) ; SourceElementParser parser = new SourceElementParser ( requestor , this . problemFactory , new CompilerOptions ( JavaCore . create ( project ) . getOptions ( true ) ) , true ) ; <START_BUG> parser . javadocParser . checkJavadoc = true ; <END_BUG> char [ ] source = null ; char [ ] name = null ; try { source = document . getCharContents ( ) ; name = documentPath . toCharArray ( ) ; } catch ( Exception e ) { } if ( ( source == null ) || ( name == null ) ) return ; CompilationUnit compilationUnit = new CompilationUnit ( source , name ) ; try { parser . parseCompilationUnit ( compilationUnit , true ) ; } catch ( Exception e ) { if ( JobManager . VERBOSE ) { e . printStackTrace ( ) ; } } } }

Fix:
parser . javadocParser . checkDocComment = true ;
Buggy code:
public class MockMultipartFile implements MultipartFile { private static final String CONTENT_TYPE = "Content-Type" ; private final String name ; private String originalFilename ; private String contentType ; private final byte [ ] content ; public MockMultipartFile ( String name , byte [ ] content ) { } public MockMultipartFile ( String name , InputStream contentStream ) throws IOException { } public MockMultipartFile ( String name , String originalFilename , String contentType , byte [ ] content ) { } public MockMultipartFile ( String name , String originalFilename , String contentType , InputStream contentStream ) throws IOException { } public String getName ( ) { } public String getOriginalFilename ( ) { } public String getContentType ( ) { } public boolean isEmpty ( ) { } public long getSize ( ) { } public byte [ ] getBytes ( ) throws IOException { } public InputStream getInputStream ( ) throws IOException { } public void transferTo ( File dest ) throws IOException , IllegalStateException { } public String getHeader ( String name ) { } public String [ ] getHeaders ( String name ) { } <START_BUG> public Iterator < String > getHeaderNames ( String name ) { <END_BUG> return Collections . singleton ( MockMultipartFile . CONTENT_TYPE ) . iterator ( ) ; } }

Fix:
public Iterator < String > getHeaderNames ( ) {
Buggy code:
public class StompBrokerRelayMessageHandlerTests { private StompBrokerRelayMessageHandler brokerRelay ; private StompBrokerRelayMessageHandlerTests . StubTcpOperations tcpClient ; @ Before public void setup ( ) { this . tcpClient = new StompBrokerRelayMessageHandlerTests . StubTcpOperations ( ) ; this . brokerRelay = new StompBrokerRelayMessageHandler ( new StubMessageChannel ( ) , new StubMessageChannel ( ) , new StubMessageChannel ( ) , Arrays . asList ( "//topic" ) ) ; <START_BUG> this . brokerRelay . setTcpClient ( tcpClient ) ; <END_BUG> } @ Test public void testVirtualHostHeader ( ) { } @ Test public void testDestinationExcluded ( ) { } private static ListenableFutureTask < Void > getFuture ( ) { } private static class StubTcpOperations implements TcpOperations < byte [ ] > { private StompBrokerRelayMessageHandlerTests . StubTcpConnection connection = new StompBrokerRelayMessageHandlerTests . StubTcpConnection ( ) ; @ Override public ListenableFuture < Void > connect ( TcpConnectionHandler < byte [ ] > connectionHandler ) { } @ Override public ListenableFuture < Void > connect ( TcpConnectionHandler < byte [ ] > connectionHandler , ReconnectStrategy reconnectStrategy ) { } @ Override public ListenableFuture < Void > shutdown ( ) { } } private static class StubTcpConnection implements TcpConnection < byte [ ] > { private final List < Message < byte [ ] > > messages = new ArrayList < > ( ) ; @ Override public ListenableFuture < Void > send ( Message < byte [ ] > message ) { } @ Override public void onReadInactivity ( Runnable runnable , long duration ) { } @ Override public void onWriteInactivity ( Runnable runnable , long duration ) { } @ Override public void close ( ) { } } }

Fix:
this . brokerRelay . setTcpClient ( this . tcpClient ) ;
Buggy code:
public class WritableSimpleFiles extends SimpleFiles { private static final Logger LOG = LoggerFactory . getLogger ( WritableSimpleFiles . class ) ; private WritableFilesDataUnit writableDataUnit = null ; public void add ( final File file , final String fileName ) throws DPUException { } public File create ( final String fileName ) throws DPUException { } @ Override public void preInit ( String param ) throws DPUException { } @ Override public void afterInit ( Context context ) throws DPUException { } private void afterInitExecution ( ExecContext execContext ) throws DPUException { final Object dpu = execContext . getDpu ( ) ; final Field field ; try { field = dpu . getClass ( ) . getField ( dataUnitName ) ; } catch ( NoSuchFieldException | SecurityException ex ) { throw new DPUException ( ( ( "Wrong<seq2seq4repair_space>initial<seq2seq4repair_space>parameters<seq2seq4repair_space>for<seq2seq4repair_space>SimpleRdf:<seq2seq4repair_space>" + ( dataUnitName ) ) + ".<seq2seq4repair_space>Can't<seq2seq4repair_space>access<seq2seq4repair_space>such<seq2seq4repair_space>field." ) , ex ) ; } try { final Object value = field . get ( dpu ) ; if ( value == null ) { return ; } <START_BUG> if ( WritableRDFDataUnit . class . isAssignableFrom ( value . getClass ( ) ) ) { <END_BUG> writableDataUnit = ( ( WritableFilesDataUnit ) ( value ) ) ; } else { throw new DPUException ( ( ( "Class" + ( value . getClass ( ) . getCanonicalName ( ) ) ) + "<seq2seq4repair_space>can't<seq2seq4repair_space>be<seq2seq4repair_space>assigned<seq2seq4repair_space>to<seq2seq4repair_space>WritableRDFDataUnit." ) ) ; } } catch ( IllegalAccessException | IllegalArgumentException ex ) { throw new DPUException ( ( "Can't<seq2seq4repair_space>get<seq2seq4repair_space>value<seq2seq4repair_space>for:<seq2seq4repair_space>" + ( dataUnitName ) ) , ex ) ; } } }

Fix:
if ( WritableFilesDataUnit . class . isAssignableFrom ( value . getClass ( ) ) ) {
Buggy code:
public class MessageBuilderHelper { public static boolean isAlreadyReply ( String subject , String pattern ) { } public static String createReplySubject ( String subject ) { } public static String createForwardSubject ( String subject ) { } public static String createTo ( Header header ) { } public static String createToAll ( Header header ) { } public static String createToMailinglist ( Header header ) { } public static void createMailingListHeaderItems ( Header header , ComposerModel model ) { } private static String removeDoubleEntries ( String input ) { } public static AccountItem getAccountItem ( Integer accountUid ) { } public static String createBodyText ( MimePart mimePart ) throws IOException { } public static String createQuotedBodyText ( CharSequence bodyText , boolean html ) throws IOException { } public static boolean isHTMLEnabled ( ) { } public static void addAddressesToAddressbook ( Address [ ] addresses ) { try { IContactFacade contactFacade = ServiceConnector . getContactFacade ( ) ; IFolderFacade folderFacade = ServiceConnector . getFolderFacade ( ) ; IModelFacade modelFacade = ServiceConnector . getModelFacade ( ) ; IFolder folder = folderFacade . getCollectedAddresses ( ) ; for ( int i = 0 ; i < ( addresses . length ) ; i ++ ) { try { IContactItem contactItem = modelFacade . createContactItem ( ) ; Address addr = addresses [ i ] ; FacadeUtil . getInstance ( ) . initContactItem ( contactItem , addr . getDisplayName ( ) , addr . getMailAddress ( ) ) ; <START_BUG> contactFacade . addContact ( folder . getId ( ) , null ) ; <END_BUG> } catch ( StoreException e ) { e . printStackTrace ( ) ; } } } catch ( ServiceNotFoundException e ) { e . printStackTrace ( ) ; } } }

Fix:
contactFacade . addContact ( folder . getId ( ) , contactItem ) ;
Buggy code:
public class BreakStatement extends Statement { public static final ChildPropertyDescriptor LABEL_PROPERTY = new ChildPropertyDescriptor ( BreakStatement . class , "label" , SimpleName . class , ASTNode . OPTIONAL , ASTNode . NO_CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private SimpleName optionalLabel = null ; BreakStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { BreakStatement result = new BreakStatement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . copyLeadingComment ( this ) ; result . setLabel ( ( ( SimpleName ) ( ASTNode . copySubtree ( target , getLabel ( ) ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public SimpleName getLabel ( ) { } public void setLabel ( SimpleName label ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class BaseStreamFormatter extends BaseFormatter { public static final String FILE_KEY = "file" ; private PrintWriter writer ; public void init ( Properties props ) throws BuildException { <START_BUG> String file = props . getProperty ( "file" ) ; <END_BUG> OutputStream os = null ; if ( file != null ) { try { os = new FileOutputStream ( file ) ; } catch ( IOException e ) { throw new BuildException ( e ) ; } } else { os = new KeepAliveOutputStream ( System . out ) ; } setOutput ( os ) ; } protected void setOutput ( OutputStream value ) { } protected void close ( ) { } protected final PrintWriter getWriter ( ) { } }

Fix:
String file = props . getProperty ( BaseStreamFormatter . FILE_KEY ) ;
Buggy code:
public class MultipartEncryptedRenderer extends MimePartRenderer { private StreamableMimePart controlPart ; private MimeHeader encryptedHeader ; public MultipartEncryptedRenderer ( ) { } public String getRegisterString ( ) { } public InputStream render ( MimePart part ) throws Exception { Vector streams = new Vector ( ( ( 2 * 2 ) + 3 ) ) ; MimeHeader header = part . getHeader ( ) ; String boundary = createUniqueBoundary ( ) . toString ( ) ; header . putContentParameter ( "boundary" , boundary ) ; byte [ ] startBoundary = ( ( "\r\n--" + boundary ) + "\r\n" ) . getBytes ( ) ; byte [ ] endBoundary = ( ( "\r\n--" + boundary ) + "--\r\n" ) . getBytes ( ) ; header . putContentParameter ( "protocol" , "application//pgp-encrypted" ) ; streams . add ( header . getHeader ( ) . getInputStream ( ) ) ; SecurityItem pgpItem = ( ( org . columba . mail . message . PGPMimePart ) ( part ) ) . getPgpItem ( ) ; streams . add ( new ByteArrayInputStream ( startBoundary ) ) ; streams . add ( MimeTreeRenderer . getInstance ( ) . renderMimePart ( controlPart ) ) ; streams . add ( new ByteArrayInputStream ( startBoundary ) ) ; StreamableMimePart encryptedPart ; encryptedPart = null ; JSCFController controller = JSCFController . getInstance ( ) ; JSCFConnection con = controller . getConnection ( ) ; JSCFStatement stmt = con . createStatement ( ) ; JSCFResultSet res = stmt . executeEncrypt ( MimeTreeRenderer . getInstance ( ) . renderMimePart ( part . getChild ( 0 ) ) , pgpItem . get ( "recipients" ) ) ; if ( res . isError ( ) ) { <START_BUG> JOptionPane . showMessageDialog ( null , StreamUtils . readInString ( res . getErrorStream ( ) ) . toString ( ) ) ; <END_BUG> } encryptedPart = new org . columba . ristretto . message . InputStreamMimePart ( encryptedHeader , res . getResultStream ( ) ) ; streams . add ( MimeTreeRenderer . getInstance ( ) . renderMimePart ( encryptedPart ) ) ; streams . add ( new ByteArrayInputStream ( endBoundary ) ) ; return new SequenceInputStream ( streams ) ; } }

Fix:
JOptionPane . showMessageDialog ( null , StreamUtils . readCharacterStream ( res . getErrorStream ( ) ) . toString ( ) ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) throws Exception { Options options = new Options ( args ) ; System . out . println ( options ) ; if ( ( ( options . train ) && ( ( options . trainPath ) != "" ) ) && ( ( options . modelPath ) != "" ) ) <START_BUG> Trainer . train ( options , 37 , options . tagDictionaryPath ) ; <END_BUG> else if ( ( ( ( options . tag ) && ( ( options . inputPath ) != "" ) ) && ( ( options . modelPath ) != "" ) ) && ( ( options . outputPath ) != "" ) ) { Tagger tagger = new Tagger ( options . modelPath ) ; tagger . tag ( options . inputPath , options . outputPath , options . delim , options . scoreFile ) ; } else if ( ( ( ( options . tagPartial ) && ( ( options . inputPath ) != "" ) ) && ( ( options . modelPath ) != "" ) ) && ( ( options . outputPath ) != "" ) ) { Tagger tagger = new Tagger ( options . modelPath ) ; tagger . partialTag ( options . inputPath , options . outputPath , options . delim , options . scoreFile ) ; } else System . out . println ( options . showHelp ( ) ) ; } }

Fix:
Trainer . train ( options , 30 , options . tagDictionaryPath ) ;
Buggy code:
public class VersionedExtension2 extends VersionedExtensionCommon { private static final PathElement NEW_ELEMENT = PathElement . pathElement ( "new-element" ) ; private static final PathElement RENAMED = PathElement . pathElement ( "renamed" , "element" ) ; @ Override public void initialize ( final ExtensionContext context ) { final SubsystemRegistration subsystem = context . registerSubsystem ( SUBSYSTEM_NAME , 2 , 0 , 0 ) ; final ManagementResourceRegistration registration = initializeSubsystem ( subsystem ) ; registration . registerOperationHandler ( "update" , new OperationStepHandler ( ) { @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final Resource resource = context . readResourceForUpdate ( EMPTY_ADDRESS ) ; final ModelNode model = resource . getModel ( ) ; model . get ( "test-attribute" ) . set ( "test" ) ; context . getResult ( ) . set ( model ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } } , new org . jboss . as . controller . descriptions . DefaultOperationDescriptionProvider ( "update" , TEST_RESOURCE_DESCRIPTION_RESOLVER ) ) ; registration . registerSubModel ( new TestResourceDefinition ( VersionedExtension2 . NEW_ELEMENT ) ) ; registration . registerSubModel ( new TestResourceDefinition ( VersionedExtension2 . RENAMED ) ) ; final TransformersSubRegistration transformers = subsystem . registerModelTransformers ( ModelVersion . create ( 1 , 0 , 0 ) , new ResourceTransformer ( ) { @ Override public void transformResource ( ResourceTransformationContext context , PathAddress address , Resource resource ) throws OperationFailedException { final ResourceTransformationContext childContext = context . addTransformedResource ( EMPTY_ADDRESS , resource ) ; for ( final Resource . ResourceEntry entry : resource . getChildren ( "renamed" ) ) { childContext . processChild ( PathElement . pathElement ( "element" , "renamed" ) , entry ) ; } } } ) ; transformers . registerOperationTransformer ( "update" , new VersionedExtension2 . UpdateTransformer ( ) ) ; final TransformersSubRegistration newElement = transformers . registerSubResource ( VersionedExtension2 . NEW_ELEMENT ) ; newElement . discardOperations ( COMMON_OPERATIONS ) ; final TransformersSubRegistration renamed = transformers . registerSubResource ( VersionedExtension2 . RENAMED , AliasOperationTransformer . replaceLastElement ( PathElement . pathElement ( "element" , "renamed" ) ) ) ; } @ Override protected void addChildElements ( List < ModelNode > list ) { } static class UpdateTransformer implements OperationTransformer { @ Override public TransformedOperation transformOperation ( final TransformationContext context , final PathAddress address , final ModelNode operation ) { } } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class BinarySearchTree < K extends Comparable < K > , V > implements SymbolTable < K , V > { private Node < K , V > root = null ; private void put ( K key , V value , Node < K , V > curNode ) { } @ Override public void put ( K key , V value ) { } @ Override public V get ( K key ) { } private V get ( Node < K , V > node , K key ) { } @ Override public void remove ( K key ) { } public Node < K , V > remove ( Node < K , V > node , K key ) { if ( ( node . getKey ( ) . compareTo ( key ) ) == 0 ) { if ( ( node . getRight ( ) ) != null ) { Node < K , V > rNode = min ( node . getRight ( ) ) ; node . setValue ( rNode . getValue ( ) ) ; deleteMin ( node . getRight ( ) ) ; <START_BUG> return rNode ; <END_BUG> } else { return node . getLeft ( ) ; } } else if ( ( key . compareTo ( node . getKey ( ) ) ) < 0 ) { node . setLeft ( remove ( node . getLeft ( ) , key ) ) ; return node ; } else { node . setRight ( remove ( node . getRight ( ) , key ) ) ; return node ; } } public void deleteMin ( ) { } private Node < K , V > deleteMin ( Node < K , V > node ) { } public void deleteMax ( ) { } public Node < K , V > deleteMax ( Node < K , V > node ) { } public K max ( ) { } public K min ( ) { } public Node < K , V > min ( Node < K , V > node ) { } public Node < K , V > max ( Node < K , V > node ) { } @ Override public int size ( ) { } private int size ( Node < K , V > node ) { } @ Override public boolean isEmpty ( ) { } }

Fix:
return node ;
Buggy code:
public abstract class AbstractCurveFitter { public double [ ] fit ( Collection < WeightedObservedPoint > points ) { } protected LeastSquaresOptimizer getOptimizer ( ) { <START_BUG> return LevenbergMarquardtOptimizer . create ( ) ; <END_BUG> } protected abstract LeastSquaresProblem getProblem ( Collection < WeightedObservedPoint > points ) { } protected static class TheoreticalValuesFunction { private final ParametricUnivariateFunction f ; private final double [ ] points ; public TheoreticalValuesFunction ( final ParametricUnivariateFunction f , final Collection < WeightedObservedPoint > observations ) { } public MultivariateVectorFunction getModelFunction ( ) { } public MultivariateMatrixFunction getModelFunctionJacobian ( ) { } } }

Fix:
return new LevenbergMarquardtOptimizer ( ) ;
Buggy code:
@ MultipartConfig public class DemoServlet extends HttpServlet { private static Logger logger = Logger . getLogger ( DemoServlet . class . getName ( ) ) ; private static final long serialVersionUID = 1L ; private String serviceName = "tradeoff_analytics" ; private String baseURL = "<url>" ; private String username = "<username>" ; private String password = "<password>" ; @ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } @ Override protected void doPost ( final HttpServletRequest req , final HttpServletResponse resp ) throws IOException , ServletException { DemoServlet . logger . info ( "doPost" ) ; req . setCharacterEncoding ( "UTF-8" ) ; try { String queryStr = req . getQueryString ( ) ; String url = ( baseURL ) + "//v1//dilemmas" ; if ( queryStr != null ) { url += "?" + queryStr ; } URI uri = new URI ( url ) . normalize ( ) ; Request newReq = Request . Post ( uri ) ; newReq . addHeader ( "Accept" , "application//json" ) ; InputStreamEntity entity = new InputStreamEntity ( req . getInputStream ( ) ) ; <START_BUG> newReq . bodyString ( EntityUtils . toString ( entity ) , APPLICATION_JSON ) ; <END_BUG> Executor executor = Executor . newInstance ( ) . auth ( username , password ) ; Response response = executor . execute ( newReq ) ; ServletOutputStream servletOutputStream = resp . getOutputStream ( ) ; response . returnResponse ( ) . getEntity ( ) . writeTo ( servletOutputStream ) ; servletOutputStream . flush ( ) ; servletOutputStream . close ( ) ; } catch ( Exception e ) { DemoServlet . logger . log ( Level . SEVERE , ( "got<seq2seq4repair_space>error:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) , e ) ; resp . setStatus ( SC_BAD_GATEWAY ) ; } } private JSONObject getVcapServices ( ) { } @ Override public void init ( ) throws ServletException { } private void processVCAP_Services ( ) { } }

Fix:
newReq . bodyString ( EntityUtils . toString ( entity , "UTF-8" ) , APPLICATION_JSON ) ;
Buggy code:
public class SuperConstructorInvocation extends Statement { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( SuperConstructorInvocation . class , "expression" , Expression . class , ASTNode . OPTIONAL , ASTNode . CYCLE_RISK ) ; public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY = new ChildListPropertyDescriptor ( SuperConstructorInvocation . class , "typeArguments" , Type . class , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor ARGUMENTS_PROPERTY = new ChildListPropertyDescriptor ( SuperConstructorInvocation . class , "arguments" , Expression . class , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS_2_0 ; private static final List PROPERTY_DESCRIPTORS_3_0 ; public static List propertyDescriptors ( int apiLevel ) { } private Expression optionalExpression = null ; private ASTNode . NodeList typeArguments = null ; private ASTNode . NodeList arguments = new ASTNode . NodeList ( SuperConstructorInvocation . ARGUMENTS_PROPERTY ) ; SuperConstructorInvocation ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { SuperConstructorInvocation result = new SuperConstructorInvocation ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . copyLeadingComment ( this ) ; result . setExpression ( ( ( Expression ) ( ASTNode . copySubtree ( target , getExpression ( ) ) ) ) ) ; if ( ( this . ast . apiLevel ) >= ( AST . JLS3 ) ) { result . typeArguments ( ) . addAll ( ASTNode . copySubtrees ( target , typeArguments ( ) ) ) ; } result . arguments ( ) . addAll ( ASTNode . copySubtrees ( target , arguments ( ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } public List typeArguments ( ) { } public List arguments ( ) { } public IMethodBinding resolveConstructorBinding ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
final class ObjectToCollectionGenericConverter implements GenericConverter { private final GenericConversionService conversionService ; public ObjectToCollectionGenericConverter ( GenericConversionService conversionService ) { } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { Collection target = CollectionFactory . createCollection ( targetType . getType ( ) , 1 ) ; TypeDescriptor targetElementType = targetType . getElementTypeDescriptor ( ) ; if ( ( targetElementType == ( TypeDescriptor . NULL ) ) || ( sourceType . isAssignableTo ( targetElementType ) ) ) { target . add ( source ) ; } else { GenericConverter converter = this . conversionService . getConverter ( sourceType , targetElementType ) ; if ( converter == null ) { <START_BUG> throw new org . springframework . core . convert . ConverterNotFoundException ( sourceType , targetType ) ; <END_BUG> } target . add ( converter . convert ( source , sourceType , targetElementType ) ) ; } return target ; } }

Fix:
throw new org . springframework . core . convert . ConverterNotFoundException ( sourceType , targetElementType ) ;
Buggy code:
public class MainActivity extends ActionBarActivity { public static int mScore ; private Button trueButton ; private Button falseButton ; private Button nextButton ; private Button previousButton ; private int mCurrentIndex = 0 ; private Intent myIntent ; private TrueFalse [ ] mQuestionBank = new TrueFalse [ ] { new TrueFalse ( string . question_ocean , true ) , new TrueFalse ( string . question_mideast , false ) , new TrueFalse ( string . question_africa , false ) , new TrueFalse ( string . question_americas , true ) , new TrueFalse ( string . question_asia , true ) } ; private TextView mQuestionTextView ; public void updateQuestion ( ) { } private void checkAnswer ( boolean userPressedTrue ) { } private void updateScore ( ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; trueButton = ( ( Button ) ( findViewById ( true_button ) ) ) ; trueButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { checkAnswer ( true ) ; updateScore ( ) ; } } ) ; falseButton = ( ( Button ) ( findViewById ( false_button ) ) ) ; falseButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { checkAnswer ( false ) ; updateScore ( ) ; } } ) ; nextButton = ( ( Button ) ( findViewById ( next_button ) ) ) ; nextButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { <START_BUG> if ( ( mCurrentIndex ) == ( mQuestionBank . length ) ) { <END_BUG> myIntent = new Intent ( MainActivity . this , FinishedActivity . class ) ; MainActivity . this . startActivity ( myIntent ) ; } else { mCurrentIndex = ( ( mCurrentIndex ) + 1 ) % ( mQuestionBank . length ) ; updateQuestion ( ) ; } } } ) ; updateQuestion ( ) ; previousButton = ( ( Button ) ( findViewById ( previous_button ) ) ) ; previousButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( ( mCurrentIndex ) == 0 ) { Toast . makeText ( MainActivity . this , "This<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>first<seq2seq4repair_space>question" , LENGTH_SHORT ) . show ( ) ; } else { mCurrentIndex = ( ( mCurrentIndex ) - 1 ) % ( mQuestionBank . length ) ; updateQuestion ( ) ; } } } ) ; updateQuestion ( ) ; } }

Fix:
if ( ( mCurrentIndex ) == ( ( mQuestionBank . length ) - 1 ) ) {
Buggy code:
public class ReconcileWorkingCopyOperation extends JavaModelOperation { boolean forceProblemDetection ; public ReconcileWorkingCopyOperation ( IJavaElement workingCopy , boolean forceProblemDetection ) { } protected void executeOperation ( ) throws JavaModelException { if ( ( fMonitor ) != null ) { if ( fMonitor . isCanceled ( ) ) return ; fMonitor . beginTask ( Util . bind ( "element.reconciling" ) , 10 ) ; } CompilationUnit workingCopy = getWorkingCopy ( ) ; boolean wasConsistent = workingCopy . isConsistent ( ) ; JavaElementDeltaBuilder deltaBuilder = null ; try { if ( ! wasConsistent ) { deltaBuilder = new JavaElementDeltaBuilder ( workingCopy ) ; workingCopy . makeConsistent ( fMonitor ) ; deltaBuilder . buildDeltas ( ) ; } if ( ( fMonitor ) != null ) fMonitor . worked ( 2 ) ; if ( ( forceProblemDetection ) && wasConsistent ) { if ( ( ( fMonitor ) != null ) && ( fMonitor . isCanceled ( ) ) ) return ; <START_BUG> IProblemRequestor problemRequestor = workingCopy . owner . getProblemRequestor ( ) ; <END_BUG> if ( ( problemRequestor != null ) && ( problemRequestor . isActive ( ) ) ) { problemRequestor . beginReporting ( ) ; CompilationUnitProblemFinder . process ( workingCopy , problemRequestor , fMonitor ) ; problemRequestor . endReporting ( ) ; } } if ( deltaBuilder != null ) { if ( ( ( deltaBuilder . delta ) != null ) && ( ( deltaBuilder . delta . getAffectedChildren ( ) . length ) > 0 ) ) { addReconcileDelta ( workingCopy , deltaBuilder . delta ) ; } } } finally { if ( ( fMonitor ) != null ) fMonitor . done ( ) ; } } protected CompilationUnit getWorkingCopy ( ) { } public boolean isReadOnly ( ) { } protected IJavaModelStatus verify ( ) { } }

Fix:
IProblemRequestor problemRequestor = ( ( IProblemRequestor ) ( JavaModelManager . getJavaModelManager ( ) . getInfo ( workingCopy ) ) ) ;