nus-yam/ex-repair huggingface dataset:
Buggy code:
public class AppTest { private Makebill bill ; private double error = 0.01 ; @ Test public void nullbill ( ) { } @ Test public void goldBillNoaddNooveruse1 ( ) { } @ Test public void goldBillNoaddNooveruse2 ( ) { } @ Test public void goldBillNoaddoveruse1 ( ) { } @ Test public void goldBillNoaddoveruse2 ( ) { } @ Test public void goldBilladdNooveruse1 ( ) { } @ Test public void goldBilladdNooveruse2 ( ) { } @ Test public void goldBilladdoveruse1 ( ) { } @ Test public void goldBilladdoveruse2 ( ) { } @ Test public void goldBillFaddNooveruse1 ( ) { } @ Test public void goldBillFaddNooveruse2 ( ) { } @ Test public void goldBillFaddoveruse1 ( ) { } @ Test public void goldBillFaddoveruse2 ( ) { } @ Test public void silverBillNoaddNooveruse1 ( ) { } @ Test public void silverBillNoaddNooveruse2 ( ) { } @ Test public void silverBillNoaddoveruse1 ( ) { } @ Test public void silverBillNoaddoveruse2 ( ) { } @ Test public void silverBilladdNooveruse1 ( ) { } @ Test public void silverBilladdNooveruse2 ( ) { } @ Test public void silverBilladdoveruse1 ( ) { } @ Test public void silverBilladdoveruse2 ( ) { } @ Test public void silverBillFaddNooveruse1 ( ) { } @ Test public void silverBillFaddNooveruse2 ( ) { } @ Test public void silverBillFaddoveruse1 ( ) { bill = new Makebill ( "Silver" , 4 , 2000 ) ; <START_BUG> assertEquals ( bill . totalBill ( ) , 533.95 , error ) ; <END_BUG> } @ Test public void silverBillFaddoveruse2 ( ) { } }

Fix:
assertEquals ( bill . totalBill ( ) , 887.95 , error ) ;
Buggy code:
public class MulticastSendingMessageHandler extends UnicastSendingMessageHandler { private int timeToLive = - 1 ; private String localAddress ; public MulticastSendingMessageHandler ( String address , int port ) { } public MulticastSendingMessageHandler ( String address , int port , boolean lengthCheck ) { } public MulticastSendingMessageHandler ( String address , int port , boolean acknowledge , String ackHost , int ackPort , int ackTimeout ) { } public MulticastSendingMessageHandler ( String address , int port , boolean lengthCheck , boolean acknowledge , String ackHost , int ackPort , int ackTimeout ) { } @ Override protected synchronized DatagramSocket getSocket ( ) throws IOException { if ( ( this . getTheSocket ( ) ) == null ) { MulticastSocket socket ; if ( this . isAcknowledge ( ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( ( "Listening<seq2seq4repair_space>for<seq2seq4repair_space>acks<seq2seq4repair_space>on<seq2seq4repair_space>port:<seq2seq4repair_space>" + ( this . getAckPort ( ) ) ) ) ; } if ( ( localAddress ) == null ) { socket = new MulticastSocket ( this . getAckPort ( ) ) ; } else { InetAddress whichNic = InetAddress . getByName ( this . localAddress ) ; socket = new MulticastSocket ( new InetSocketAddress ( whichNic , this . getAckPort ( ) ) ) ; } if ( ( this . getSoReceiveBufferSize ( ) ) > 0 ) { socket . setReceiveBufferSize ( this . getSoReceiveBufferSize ( ) ) ; } } else { socket = new MulticastSocket ( ) ; } if ( ( this . timeToLive ) >= 0 ) { socket . setTimeToLive ( this . timeToLive ) ; } setSocketAttributes ( socket ) ; if ( ( localAddress ) != null ) { InetAddress whichNic = InetAddress . getByName ( this . localAddress ) ; NetworkInterface intfce = NetworkInterface . getByInetAddress ( whichNic ) ; socket . setNetworkInterface ( intfce ) ; } this . setSocket ( socket ) ; } <START_BUG> return this . getSocket ( ) ; <END_BUG> } public void setMinAcksForSuccess ( int minAcksForSuccess ) { } public void setTimeToLive ( int timeToLive ) { } public void setLocalAddress ( String localAddress ) { } }

Fix:
return this . getTheSocket ( ) ;
Buggy code:
public class SqlConfigGui extends AbstractConfigGui { private JTextArea sqlField ; private boolean displayName ; public SqlConfigGui ( ) { } public SqlConfigGui ( boolean displayName ) { } public String getStaticLabel ( ) { } public void configure ( TestElement element ) { <START_BUG> sqlField . setText ( element . getProperty ( QUERY ) . toString ( ) ) ; <END_BUG> super . configure ( element ) ; } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement element ) { } private void init ( ) { } private JPanel createSqlPanel ( ) { } public Dimension getPreferredSize ( ) { } }

Fix:
sqlField . setText ( element . getPropertyAsString ( QUERY ) ) ;
Buggy code:
final class ManagedProcess { private final ProcessManagerMaster master ; private final String processName ; private final List < String > command ; private final Map < String , String > env ; private final String workingDirectory ; private final long [ ] startTimeHistory = new long [ 5 ] ; private boolean start ; private OutputStream commandStream ; private Process process ; ManagedProcess ( final ProcessManagerMaster master , final String processName , final List < String > command , final Map < String , String > env , final String workingDirectory ) { } void start ( ) throws IOException { } void stop ( ) throws IOException { } boolean isStart ( ) { } void send ( final List < String > msg ) throws IOException { final StringBuilder b = new StringBuilder ( ) ; b . append ( "MSG" ) ; for ( String s : msg ) { <START_BUG> b . append ( '' ) . append ( msg ) ; <END_BUG> } b . append ( '\n' ) ; StreamUtils . writeString ( commandStream , b ) ; } private final class OutputStreamHandler implements Runnable { private final InputStream inputStream ; OutputStreamHandler ( final InputStream inputStream ) { } public void run ( ) { } } private static final class ErrorStreamHandler implements Runnable { private static final Logger log = Logger . getLogger ( "org.jboss.as.process.stderr" ) ; private final String processName ; private final InputStream errorStream ; private ErrorStreamHandler ( final String processName , final InputStream errorStream ) { } public void run ( ) { } } private static void safeClose ( final Closeable closeable ) { } }

Fix:
b . append ( '' ) . append ( s ) ;
Buggy code:
public class Mkdir extends Task { private File dir ; public void execute ( ) throws BuildException { if ( ( dir ) == null ) { throw new BuildException ( "dir<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>required" , location ) ; } if ( dir . isFile ( ) ) { <START_BUG> log ( ( "Warning:<seq2seq4repair_space>Specified<seq2seq4repair_space>directory<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>file:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ; <END_BUG> } if ( ! ( dir . exists ( ) ) ) { boolean result = dir . mkdirs ( ) ; if ( result == false ) { String msg = ( ( "Directory<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>creation<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>" ) + "succesful<seq2seq4repair_space>for<seq2seq4repair_space>an<seq2seq4repair_space>unknown<seq2seq4repair_space>reason" ; throw new BuildException ( msg , location ) ; } log ( ( "Created<seq2seq4repair_space>dir:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ; } } public void setDir ( File dir ) { } }

Fix:
throw new BuildException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>directory<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>file<seq2seq4repair_space>already<seq2seq4repair_space>exists<seq2seq4repair_space>with<seq2seq4repair_space>that<seq2seq4repair_space>name:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ;
Buggy code:
public class WebParsingDeploymentProcessor implements DeploymentUnitProcessor { private static final String WEB_XML = "WEB-INF//web.xml" ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { if ( ! ( WarDeploymentMarker . isWarDeployment ( phaseContext . getDeploymentUnit ( ) ) ) ) { return ; } <START_BUG> final ResourceRoot deploymentRoot = phaseContext . getAttachment ( DEPLOYMENT_ROOT ) ; <END_BUG> final VirtualFile webXml = deploymentRoot . getRoot ( ) . getChild ( WebParsingDeploymentProcessor . WEB_XML ) ; WarMetaData warMetaData = phaseContext . getAttachment ( ATTACHMENT_KEY ) ; assert warMetaData != null ; if ( webXml . exists ( ) ) { InputStream is = null ; try { is = webXml . openStream ( ) ; final XMLInputFactory inputFactory = XMLInputFactory . newInstance ( ) ; inputFactory . setXMLResolver ( NoopXmlResolver . create ( ) ) ; XMLStreamReader xmlReader = inputFactory . createXMLStreamReader ( is ) ; warMetaData . setWebMetaData ( WebMetaDataParser . parse ( xmlReader ) ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>" + webXml ) , e ) ; } finally { try { if ( is != null ) { is . close ( ) ; } } catch ( IOException e ) { } } } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
final ResourceRoot deploymentRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) ;
Buggy code:
public class TestPlan extends AbstractTestElement implements Serializable , TestListener { private static final long serialVersionUID = 233L ; private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String FUNCTIONAL_MODE = "TestPlan.functional_mode" ; private static final String USER_DEFINED_VARIABLES = "TestPlan.user_defined_variables" ; private static final String SERIALIZE_THREADGROUPS = "TestPlan.serialize_threadgroups" ; private static final String CLASSPATHS = "TestPlan.user_define_classpath" ; private static final String CLASSPATH_SEPARATOR = "," ; private static final String BASEDIR = "basedir" ; private transient List < AbstractThreadGroup > threadGroups = new LinkedList < AbstractThreadGroup > ( ) ; private static volatile boolean functionalMode = false ; public TestPlan ( ) { } public TestPlan ( String name ) { } private Object readResolve ( ) { } public void prepareForPreCompile ( ) { } public boolean isFunctionalMode ( ) { } public void setUserDefinedVariables ( Arguments vars ) { } public JMeterProperty getUserDefinedVariablesAsProperty ( ) { } public String getBasedir ( ) { } public void setBasedir ( String b ) { } public Arguments getArguments ( ) { } public Map < String , String > getUserDefinedVariables ( ) { } private Arguments getVariables ( ) { } public void setFunctionalMode ( boolean funcMode ) { } public static boolean getFunctionalMode ( ) { } public void setSerialized ( boolean serializeTGs ) { } public void setTestPlanClasspath ( String text ) { } public void setTestPlanClasspathArray ( String [ ] text ) { } public String [ ] getTestPlanClasspathArray ( ) { } public String getTestPlanClasspath ( ) { } public boolean isSerialized ( ) { } public void addParameter ( String name , String value ) { } @ Override public void addTestElement ( TestElement tg ) { } public void addThreadGroup ( AbstractThreadGroup group ) { } public void testEnded ( ) { } public void testEnded ( String host ) { } public void testIterationStart ( LoopIterationEvent event ) { } public void testStarted ( ) { if ( ( ( getBasedir ( ) ) != null ) && ( ( getBasedir ( ) . length ( ) ) > 0 ) ) { try { org . apache . jmeter . services . FileServer . getFileServer ( ) . setBasedir ( ( ( org . apache . jmeter . services . FileServer . getFileServer ( ) . getBaseDir ( ) ) + ( getBasedir ( ) ) ) ) ; <START_BUG> } catch ( IOException e ) { <END_BUG> TestPlan . log . error ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>set<seq2seq4repair_space>file<seq2seq4repair_space>server<seq2seq4repair_space>base<seq2seq4repair_space>dir<seq2seq4repair_space>with<seq2seq4repair_space>" + ( getBasedir ( ) ) ) , e ) ; } } String [ ] paths = this . getTestPlanClasspathArray ( ) ; for ( int idx = 0 ; idx < ( paths . length ) ; idx ++ ) { NewDriver . addURL ( paths [ idx ] ) ; TestPlan . log . info ( ( ( "add<seq2seq4repair_space>" + ( paths [ idx ] ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>classpath" ) ) ; } } public void testStarted ( String host ) { } }

Fix:
} catch ( IllegalStateException e ) {
Buggy code:
public class FixedOrderComparator < T > implements Serializable , Comparator < T > { private static final long serialVersionUID = 82794675842863201L ; public static enum UnknownObjectBehavior { BEFORE , AFTER , EXCEPTION ; } private final Map < T , Integer > map = new HashMap < T , Integer > ( ) ; private int counter = 0 ; private boolean isLocked = false ; private FixedOrderComparator . UnknownObjectBehavior unknownObjectBehavior = FixedOrderComparator . UnknownObjectBehavior . EXCEPTION ; public FixedOrderComparator ( ) { } public FixedOrderComparator ( final T [ ] items ) { } public FixedOrderComparator ( final List < T > items ) { } public boolean isLocked ( ) { } protected void checkLocked ( ) { } public FixedOrderComparator . UnknownObjectBehavior getUnknownObjectBehavior ( ) { } public void setUnknownObjectBehavior ( final FixedOrderComparator . UnknownObjectBehavior unknownObjectBehavior ) { } public boolean add ( final T obj ) { checkLocked ( ) ; <START_BUG> final Integer position = map . put ( obj , new Integer ( ( ( counter ) ++ ) ) ) ; <END_BUG> return position == null ; } public boolean addAsEqual ( final T existingObj , final T newObj ) { } public int compare ( final T obj1 , final T obj2 ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( final Object object ) { } }

Fix:
final Integer position = map . put ( obj , Integer . valueOf ( ( ( counter ) ++ ) ) ) ;
Buggy code:
public class DefaultRequestTargetResolverStrategy implements IRequestTargetResolverStrategy { public DefaultRequestTargetResolverStrategy ( ) { } public final IRequestTarget resolve ( RequestCycle requestCycle , RequestParameters requestParameters ) { } protected IRequestTarget resolveSharedResource ( final RequestCycle requestCycle , RequestParameters requestParameters ) { } protected IRequestTarget resolveRenderedPage ( RequestCycle requestCycle , RequestParameters requestParameters ) { } protected IRequestTarget resolveListenerInterfaceTarget ( RequestCycle requestCycle , final Page page , final String componentPath , final String interfaceName ) { } protected IRequestTarget resolveBookmarkablePage ( RequestCycle requestCycle , RequestParameters requestParameters ) { } protected IRequestTarget resolveHomePageTarget ( RequestCycle requestCycle , RequestParameters requestParameters ) { Session session = requestCycle . getSession ( ) ; Application application = session . getApplication ( ) ; try { <START_BUG> Class homePageClass = application . getPages ( ) . getHomePage ( ) ; <END_BUG> BookmarkablePageRequestTarget pokeTarget = new BookmarkablePageRequestTarget ( homePageClass ) ; IRequestCodingStrategy requestCodingStrategy = requestCycle . getProcessor ( ) . getRequestCodingStrategy ( ) ; String path = requestCodingStrategy . pathForTarget ( pokeTarget ) ; if ( path != null ) { requestCycle . setRedirect ( true ) ; return pokeTarget ; } PageParameters parameters = new PageParameters ( requestParameters . getParameters ( ) ) ; Page newPage = session . getPageFactory ( ) . newPage ( homePageClass , parameters ) ; IRequestTarget requestTarget = requestCycle . getRequestTarget ( ) ; if ( ! ( ( requestTarget instanceof IPageRequestTarget ) || ( requestTarget instanceof IBookmarkablePageRequestTarget ) ) ) { requestTarget = new wicket . request . target . PageRequestTarget ( newPage ) ; } return requestTarget ; } catch ( WicketRuntimeException e ) { throw new WicketRuntimeException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>home<seq2seq4repair_space>page" , e ) ; } } protected IRequestTarget resolveExternalResource ( RequestCycle requestCycle ) { } }

Fix:
Class homePageClass = application . getRequiredPageSettings ( ) . getHomePage ( ) ;
Buggy code:
@ Controller @ RequestMapping ( ( WebConstants . API_PREFIX ) + "//web//config" ) public class ConfigUpdateController extends BaseController { protected static final Logger LOG = LoggerFactory . getLogger ( ConfigUpdateController . class ) ; @ Autowired private ConfigMgr configMgr ; @ Autowired private ConfigValidator configValidator ; @ Autowired private FileUploadValidator fileUploadValidator ; @ RequestMapping ( value = "//item//{configId}" , method = RequestMethod . PUT ) @ ResponseBody public JsonObjectBase updateItem ( @ PathVariable long configId , String value ) { } @ ResponseBody @ RequestMapping ( value = "//file//{configId}" , method = RequestMethod . POST ) public JsonObjectBase updateFile ( @ PathVariable long configId , @ RequestParam ( "myfilerar" ) MultipartFile file ) { } @ ResponseBody <START_BUG> @ RequestMapping ( value = "//filetext//{configId}" , method = RequestMethod . POST ) <END_BUG> public JsonObjectBase updateFileWithText ( @ PathVariable long configId , @ NotNull String fileContent ) { String emailNotification = "" ; try { String str = new String ( fileContent . getBytes ( ) , "UTF-8" ) ; ConfigUpdateController . LOG . info ( ( "receive<seq2seq4repair_space>file:<seq2seq4repair_space>" + str ) ) ; emailNotification = configMgr . updateItemValue ( configId , str ) ; ConfigUpdateController . LOG . info ( ( ( "update<seq2seq4repair_space>" + configId ) + "<seq2seq4repair_space>ok" ) ) ; } catch ( Exception e ) { ConfigUpdateController . LOG . error ( e . toString ( ) ) ; throw new FileUploadException ( "upload<seq2seq4repair_space>file<seq2seq4repair_space>error" , e ) ; } configMgr . notifyZookeeper ( configId ) ; return buildSuccess ( emailNotification ) ; } @ RequestMapping ( value = "//{configId}" , method = RequestMethod . DELETE ) @ ResponseBody public JsonObjectBase delete ( @ PathVariable long configId ) { } }

Fix:
@ RequestMapping ( value = "//filetext//{configId}" , method = RequestMethod . PUT )
Buggy code:
public class Scale extends Control { boolean ignoreResize ; boolean ignoreSelection ; static final int TrackBarProc ; static final TCHAR TrackBarClass = new TCHAR ( 0 , OS . TRACKBAR_CLASS , true ) ; public Scale ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } int defaultForeground ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void setBackgroundImage ( int hImage ) { } void setBackgroundPixel ( int pixel ) { } void setBounds ( int x , int y , int width , int height , int flags , boolean defer ) { } public void setIncrement ( int increment ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int pageIncrement ) { } public void setSelection ( int value ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_MOUSEWHEEL ( int wParam , int lParam ) { } LRESULT WM_PAINT ( int wParam , int lParam ) { boolean fixPaint = ( findBackgroundControl ( ) ) != null ; if ( ! fixPaint ) { if ( ( ( OS . COMCTL32_MAJOR ) >= 6 ) && ( OS . IsAppThemed ( ) ) ) { Control control = findThemeControl ( ) ; fixPaint = control != null ; } } if ( fixPaint ) { <START_BUG> boolean redraw = ( ( drawCount ) == 0 ) && ( OS . IsWindowVisible ( handle ) ) ; <END_BUG> if ( redraw ) OS . SendMessage ( handle , WM_SETREDRAW , 0 , 0 ) ; ignoreResize = true ; OS . SendMessage ( handle , WM_SIZE , 0 , 0 ) ; ignoreResize = false ; if ( redraw ) { OS . SendMessage ( handle , WM_SETREDRAW , 1 , 0 ) ; OS . InvalidateRect ( handle , null , false ) ; } } return super . WM_PAINT ( wParam , lParam ) ; } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT wmScrollChild ( int wParam , int lParam ) { } }

Fix:
boolean redraw = ( getDrawing ( ) ) && ( OS . IsWindowVisible ( handle ) ) ;
Buggy code:
public class RadioChoice extends AbstractSingleSelectChoice implements IOnChangeListener { public RadioChoice ( final String id ) { } public RadioChoice ( final String id , final List choices ) { } public RadioChoice ( final String id , final List choices , final IChoiceRenderer renderer ) { } public RadioChoice ( final String id , IModel model , final List choices ) { } public RadioChoice ( final String id , IModel model , final List choices , final IChoiceRenderer renderer ) { } public RadioChoice ( String id , IModel choices ) { } public RadioChoice ( String id , IModel model , IModel choices ) { } public RadioChoice ( String id , IModel choices , IChoiceRenderer renderer ) { } public RadioChoice ( String id , IModel model , IModel choices , IChoiceRenderer renderer ) { } public void onSelectionChanged ( ) { } protected void onSelectionChanged ( Object newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } protected String getPrefix ( ) { } protected String getSuffix ( ) { <START_BUG> return "<br>\n" ; <END_BUG> } protected final void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } }

Fix:
return "<br//>\n" ;
Buggy code:
public class PacketHandler { @ SubscribeEvent public void onServerPacket ( ServerCustomPacketEvent event ) { } @ SubscribeEvent public void onClientPacket ( ClientCustomPacketEvent event ) { } public void onPacket ( FMLProxyPacket packet , EntityPlayerMP player ) { } private void handleGUIOpenPacket ( ) throws IOException { } private void handlePropUpdatePacket ( DataInputStream in ) throws IOException { } private void handleGUIClosePacket ( EntityPlayerMP player , DataInputStream in ) throws IOException { } private static HashMap < Byte , FMLProxyPacket > cache ; private static void close ( OutputStream os ) { } public static FMLProxyPacket buildGUIOpenPacket ( ) { } private static FMLProxyPacket doBuildGUIOpenPacket ( ) { } public static FMLProxyPacket buildGUIClosePacket ( ) { } public static FMLProxyPacket doBuildGUIClosePacket ( ) { } public static FMLProxyPacket buildPropUpdatePacket ( int target , Object ... fields ) { ByteBufOutputStream bbos = PacketHandler . unpooled ( ) ; try { bbos . writeByte ( 2 ) ; bbos . writeByte ( target ) ; bbos . writeInt ( ( ( fields . length ) // 2 ) ) ; for ( int i = 0 ; i < ( fields . length ) ; i ++ ) { <START_BUG> bbos . writeByte ( ( ( int ) ( fields [ i ] ) ) ) ; <END_BUG> StreamUtils . writeObject ( fields [ ( ++ i ) ] , bbos ) ; } return new FMLProxyPacket ( bbos . buffer ( ) , Somnia . MOD_ID ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } finally { PacketHandler . close ( bbos ) ; } return null ; } private static ByteBufOutputStream unpooled ( ) { } public static Byte byteOf ( int i ) { } No newline ; at end ; of file ; }

Fix:
bbos . writeByte ( ( ( Integer ) ( fields [ i ] ) ) ) ;
Buggy code:
public class TestDocTermOrdsRewriteMethod extends LuceneTestCase { protected IndexSearcher searcher1 ; protected IndexSearcher searcher2 ; private IndexReader reader ; private Directory dir ; protected String fieldName ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; dir = newDirectory ( ) ; fieldName = ( random ( ) . nextBoolean ( ) ) ? "field" : "" ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) , MockTokenizer . KEYWORD , false ) ) . setMaxBufferedDocs ( TestUtil . nextInt ( random ( ) , 50 , 1000 ) ) ) ; List < String > terms = new ArrayList < > ( ) ; int num = atLeast ( 200 ) ; for ( int i = 0 ; i < num ; i ++ ) { Document doc = new Document ( ) ; doc . add ( newStringField ( "id" , Integer . toString ( i ) , NO ) ) ; int numTerms = random ( ) . nextInt ( 4 ) ; for ( int j = 0 ; j < numTerms ; j ++ ) { String s = TestUtil . randomUnicodeString ( random ( ) ) ; doc . add ( newStringField ( fieldName , s , NO ) ) ; if ( defaultCodecSupportsSortedSet ( ) ) { doc . add ( new org . apache . lucene . document . SortedSetDocValuesField ( fieldName , new BytesRef ( s ) ) ) ; } terms . add ( s ) ; } writer . addDocument ( doc ) ; } if ( VERBOSE ) { Collections . sort ( terms ) ; System . out . println ( "UTF16<seq2seq4repair_space>order:" ) ; for ( String s : terms ) { System . out . println ( ( "<seq2seq4repair_space>" + ( UnicodeUtil . toHexString ( s ) ) ) ) ; } } int numDeletions = random ( ) . nextInt ( ( num // 10 ) ) ; for ( int i = 0 ; i < numDeletions ; i ++ ) { writer . deleteDocuments ( new org . apache . lucene . index . Term ( "id" , Integer . toString ( random ( ) . nextInt ( num ) ) ) ) ; } reader = writer . getReader ( ) ; searcher1 = newSearcher ( reader ) ; searcher2 = newSearcher ( reader ) ; <START_BUG> writer . close ( ) ; <END_BUG> } @ Override public void tearDown ( ) throws Exception { } public void testRegexps ( ) throws Exception { } protected void assertSame ( String regexp ) throws IOException { } public void testEquals ( ) throws Exception { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
final class EditorArea extends BaseXEditor { final BaseXLabel label ; final EditorView view ; private IOFile file ; boolean mod ; boolean opened ; int error = - 1 ; int threadID ; byte [ ] last = EMPTY ; boolean exec = true ; EditorArea ( final EditorView v , final IOFile f ) { } @ Override public void setText ( final byte [ ] t ) { } @ Override public void keyPressed ( final KeyEvent e ) { } @ Override public void mouseReleased ( final MouseEvent e ) { } @ Override public void keyReleased ( final KeyEvent e ) { } @ Override protected void release ( final boolean force ) { final byte [ ] in = getText ( ) ; final boolean eq = eq ( in , last ) ; if ( eq && ( ! force ) ) return ; view . refresh ( ( ( mod ) || ( ! eq ) ) , false ) ; view . pos . setText ( pos ( ) ) ; prop . set ( QUERYPATH , file . path ( ) ) ; last = in ; if ( file . isXML ( ) ) { view . info ( "" , true ) ; exec = false ; } else { final String qu = ( ( in . length ) == 0 ) ? "()" : string ( in ) ; exec = ! ( module ( in ) ) ; if ( ( exec ) && ( force || ( gprop . is ( EXECRT ) ) ) ) { <START_BUG> gui . execute ( false , new XQuery ( qu ) ) ; <END_BUG> } else { final QueryContext ctx = new QueryContext ( gui . context ) ; try { if ( ! ( exec ) ) ctx . module ( qu ) ; else ctx . parse ( qu ) ; view . info ( "" , true ) ; } catch ( final QueryException ex ) { view . info ( ex . getMessage ( ) , false ) ; } } } } void query ( ) { } IOFile file ( ) { } void file ( final IOFile f ) { } void markError ( ) { } private boolean module ( final byte [ ] qu ) { } }

Fix:
gui . execute ( true , new XQuery ( qu ) ) ;
Buggy code:
public class NewlineAtEndOfFileCheckTest extends BaseCheckTestSupport { @ Override protected DefaultConfiguration createCheckerConfig ( Configuration config ) { } @ Test public void testNewlineLfAtEndOfFile ( ) throws Exception { } @ Test public void testNewlineCrlfAtEndOfFile ( ) throws Exception { } @ Test public void testNewlineCrAtEndOfFile ( ) throws Exception { } @ Test public void testAnyNewlineAtEndOfFile ( ) throws Exception { } @ Test public void testNoNewlineLfAtEndOfFile ( ) throws Exception { } @ Test public void testNoNewlineAtEndOfFile ( ) throws Exception { } @ Test ( expected = CheckstyleException . class ) public void testSetLineSeparatorFailure ( ) throws Exception { } @ Test public void testEmptyFileFile ( ) throws Exception { } @ Test public void testWrongFile ( ) throws Exception { final DefaultConfiguration checkConfig = createCheckConfig ( NewlineAtEndOfFileCheck . class ) ; NewlineAtEndOfFileCheck check = new NewlineAtEndOfFileCheck ( ) ; check . configure ( checkConfig ) ; File impossibleFile = new File ( "" ) ; Set < LocalizedMessage > messages = check . process ( impossibleFile , Lists . newArrayList ( "txt" ) ) ; <START_BUG> assertTrue ( ( ( messages . size ( ) ) == 1 ) ) ; <END_BUG> Iterator < LocalizedMessage > iter = messages . iterator ( ) ; assertEquals ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>open<seq2seq4repair_space>''." , iter . next ( ) . getMessage ( ) ) ; } @ Test public void testWrongSeparatorLength ( ) throws Exception { } }

Fix:
assertEquals ( 1 , messages . size ( ) ) ;
Buggy code:
public class AuthorizationTest extends TestCase { public AuthorizationTest ( ) { } public AuthorizationTest ( String name ) { } @ Override protected void setUp ( ) throws Exception { } public void testCreateAllowedComponent ( ) throws Exception { new WicketTester ( ) ; <START_BUG> new wicket . markup . html . WebComponent ( new EmptyPage ( ) , "test" ) ; <END_BUG> } public void testCreateDisallowedComponent ( ) throws Exception { } public void testRenderAllowedComponent ( ) throws Exception { } public void testRenderDisallowedComponent ( ) throws Exception { } public void testEnabledAllowedComponent ( ) throws Exception { } public void testEnabledDisallowedComponent ( ) throws Exception { } private static class DummyAuthorizationStrategy implements IAuthorizationStrategy { public boolean isInstantiationAuthorized ( Class c ) { } public boolean isActionAuthorized ( Component c , Action action ) { } } public static class AuthTestPage1 extends WebPage { private static final long serialVersionUID = 1L ; private AuthorizationTest . Input input ; private boolean submitted = false ; public AuthTestPage1 ( ) { } public AuthorizationTest . Input getTestModel ( ) { } public boolean isSubmitted ( ) { } private class TestForm extends Form < AuthorizationTest . Input > { private static final long serialVersionUID = 1L ; public TestForm ( MarkupContainer parent , String id ) { } @ Override protected void onSubmit ( ) { } } } private static class Input implements Serializable { private static final long serialVersionUID = 1L ; private String stringInput ; public String getStringInput ( ) { } public void setStringInput ( String stringInput ) { } } }

Fix:
new wicket . markup . html . WebComponent ( new MockPageWithOneComponent ( ) , "component" ) ;
Buggy code:
public class App2Test1 { private static final Log log = LogFactory . getLog ( App2Test1 . class ) ; public static void main ( String [ ] args ) throws Exception { <START_BUG> List < String > gets = Arrays . asList ( new String [ ] { "//app2//wicket//bookmarkable//org.apache.wicket.threadtest.apps.app2.Home" } ) ; <END_BUG> SimpleGetCommand getCmd = new SimpleGetCommand ( gets , 5 ) ; Tester tester = new Tester ( getCmd , 50 , false ) ; tester . run ( ) ; } }

Fix:
List < String > gets = Arrays . asList ( "//app2//wicket//bookmarkable//org.apache.wicket.threadtest.apps.app2.Home" ) ;
Buggy code:
public class AttrNSImpl extends AttrImpl { static final long serialVersionUID = - 781906615369795414L ; static final String xmlnsURI = "http:////www.w3.org//2000//xmlns//" ; static final String xmlURI = "http:////www.w3.org//XML//1998//namespace" ; protected String namespaceURI ; protected String localName ; public AttrNSImpl ( ) { } protected AttrNSImpl ( CoreDocumentImpl ownerDocument , String namespaceURI , String qualifiedName ) { } private void setName ( String namespaceURI , String qname ) { } public AttrNSImpl ( CoreDocumentImpl ownerDocument , String namespaceURI , String qualifiedName , String localName ) { } protected AttrNSImpl ( CoreDocumentImpl ownerDocument , String value ) { } void rename ( String namespaceURI , String qualifiedName ) { } public void setValues ( CoreDocumentImpl ownerDocument , String namespaceURI , String qualifiedName , String localName ) { } public String getNamespaceURI ( ) { } public String getPrefix ( ) { } public void setPrefix ( String prefix ) throws DOMException { if ( needsSyncData ( ) ) { synchronizeData ( ) ; } if ( ownerDocument ( ) . errorChecking ) { if ( isReadOnly ( ) ) { String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "NO_MODIFICATION_ALLOWED_ERR" , null ) ; throw new DOMException ( DOMException . NO_MODIFICATION_ALLOWED_ERR , msg ) ; } if ( ( prefix != null ) && ( ( prefix . length ( ) ) != 0 ) ) { <START_BUG> if ( ! ( CoreDocumentImpl . isXMLName ( prefix , ownerDocument ( ) . isXML11Version ( ) ) ) ) { <END_BUG> String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "INVALID_CHARACTER_ERR" , null ) ; throw new DOMException ( DOMException . INVALID_CHARACTER_ERR , msg ) ; } if ( ( ( namespaceURI ) == null ) || ( ( prefix . indexOf ( ':' ) ) >= 0 ) ) { String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "NAMESPACE_ERR" , null ) ; throw new DOMException ( DOMException . NAMESPACE_ERR , msg ) ; } if ( prefix . equals ( "xmlns" ) ) { if ( ! ( namespaceURI . equals ( AttrNSImpl . xmlnsURI ) ) ) { String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "NAMESPACE_ERR" , null ) ; throw new DOMException ( DOMException . NAMESPACE_ERR , msg ) ; } } else if ( prefix . equals ( "xml" ) ) { if ( ! ( namespaceURI . equals ( AttrNSImpl . xmlURI ) ) ) { String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "NAMESPACE_ERR" , null ) ; throw new DOMException ( DOMException . NAMESPACE_ERR , msg ) ; } } else if ( name . equals ( "xmlns" ) ) { String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "NAMESPACE_ERR" , null ) ; throw new DOMException ( DOMException . NAMESPACE_ERR , msg ) ; } } } if ( ( prefix != null ) && ( ( prefix . length ( ) ) != 0 ) ) { name = ( prefix + ":" ) + ( localName ) ; } else { name = localName ; } } public String getLocalName ( ) { } public String getTypeName ( ) { } public boolean isDerivedFrom ( String typeNamespaceArg , String typeNameArg , int derivationMethod ) { } public String getTypeNamespace ( ) { } }

Fix:
if ( ! ( ownerDocument ( ) . isXMLName ( prefix , ownerDocument ( ) . isXML11Version ( ) ) ) ) {
Buggy code:
public class TechnologyGroup { public static class Settings { private TechnologyMechanic . Settings parent ; private TechnologyGroupSettings settings ; private Map < String , Technology . Settings > technologySettings ; public Settings ( TechnologyMechanic . Settings parent , TechnologyGroupSettings settings ) { } public Status validate ( ) { } public TechnologyGroupSettings getSettings ( ) { } public Collection < Technology . Settings > getTechnologySettings ( ) { } public Technology . Settings getTechnologySettings ( String technologyId ) { } public TechnologyGroupState initialState ( ) { } } private TechnologyGroup . Settings settings ; private TechnologyMechanic parent ; private Builder state ; private Map < String , Technology > technologies ; private int research ; public TechnologyGroup ( TechnologyMechanic parent , TechnologyGroup . Settings settings , TechnologyGroupState . Builder state ) { } public Builder getState ( ) { } public TechnologyGroup . Settings getSettings ( ) { } public Collection < Technology > getTechnologies ( ) { } public Technology getTechnology ( String technologyId ) { } public void maybeMakeProgress ( Random random ) { } public int getResearch ( ) { } public int getResearchProgressChance ( ) { } public int getProgressChance ( ) { } public Technology getFirstInProgressTechnology ( ) { } public boolean hasAnyInProgressTechnologies ( ) { <START_BUG> return ( this . getFirstInProgressTechnology ( ) ) == null ; <END_BUG> } public void makeProgress ( ) { } public synchronized void makeResearchMove ( ResearchMove move ) { } }

Fix:
return ( this . getFirstInProgressTechnology ( ) ) != null ;
Buggy code:
public class AssertionsPanel extends ListPanel { public AssertionsPanel ( JDialog parent ) { } boolean isTraversalNeeded ( ) { } public boolean isAddArchivesNeeded ( ) { } public boolean isAddClassesNeeded ( ) { } public boolean isAddFoldersNeeded ( ) { } public String getPropertyKey ( ) { } public String getName ( ) { } public Icon getIcon ( ) { } public boolean isValidInput ( ) { } protected String getClassPath ( ) { } protected JButton getAddClassButton ( ) { } public void setProperties ( Properties props ) { } static class InputDialog extends EscapeDialog { private static final long serialVersionUID = 1L ; private JTextField property = new JTextField ( 30 ) ; private JTextField className = new JTextField ( 30 ) ; private JTextField displayName = new JTextField ( 30 ) ; private JButton okButton = UIUtils . createOKButton ( ) ; private JButton cancelButton = UIUtils . createCancelButton ( ) ; public InputDialog ( JDialog parent , String title , boolean modal ) { } private JPanel getClassNamePanel ( ) { } public String getClassName ( ) { return className . getText ( ) ; } public String getProperty ( ) { } public String getDisplayName ( ) { } @ Override public JButton getOKButton ( ) { } @ Override public JButton getCloseButton ( ) { } } public String getClassName ( ) { <START_BUG> AssertionsPanel . InputDialog dialog = new AssertionsPanel . InputDialog ( getParent ( ) , "Class<seq2seq4repair_space>Name" , true ) ; <END_BUG> dialog . setVisible ( true ) ; if ( dialog . getProperty ( ) . equals ( "" ) ) return null ; return ( ( ( ( dialog . getProperty ( ) ) + ":" ) + ( dialog . getClassName ( ) ) ) + ":" ) + ( dialog . getDisplayName ( ) ) ; } }

Fix:
AssertionsPanel . InputDialog dialog = new AssertionsPanel . InputDialog ( getParent ( ) , "Add<seq2seq4repair_space>Assertion<seq2seq4repair_space>Details" , true ) ;
Buggy code:
public class BorlandGenerateClient extends Task { static final String JAVA_MODE = "java" ; static final String FORK_MODE = "fork" ; boolean debug = false ; File ejbjarfile = null ; File clientjarfile = null ; String mode = BorlandGenerateClient . JAVA_MODE ; Path classpath ; public void setClasspath ( Path classpath ) throws TaskException { } public void setClasspathRef ( Reference r ) throws TaskException { } public void setClientjar ( File clientjar ) { } public void setDebug ( boolean debug ) { } public void setEjbjar ( File ejbfile ) { } public void setMode ( String s ) { } public Path createClasspath ( ) throws TaskException { if ( ( this . classpath ) == null ) { <START_BUG> this . classpath = new Path ( project ) ; <END_BUG> } return this . classpath . createPath ( ) ; } public void execute ( ) throws TaskException { } protected void executeFork ( ) throws TaskException { } protected void executeJava ( ) throws TaskException { } }

Fix:
this . classpath = new Path ( getProject ( ) ) ;
Buggy code:
public interface AnnotatedElement { <START_BUG> boolean hasAnnotation ( ResolvedTypeX ofType ) ; <END_BUG> ResolvedTypeX [ ] getAnnotationTypes ( ) { } }

Fix:
boolean hasAnnotation ( TypeX ofType ) ;
Buggy code:
public class ForbidDependencyManagementInSubModulesRule extends AbstractFilterableRule { public void execute ( EnforcerRuleHelper helper ) throws EnforcerRuleException { Log log = helper . getLog ( ) ; try { MavenProject currentProject = RuleHelper . getSession ( helper ) . getCurrentProject ( ) ; checkForSubmoduleDependencyManagement ( currentProject , log ) ; <START_BUG> if ( ( isShouldBuildFail ( ) ) && ( failureDetected ) ) { <END_BUG> throw new EnforcerRuleException ( "Failing<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>forbidden<seq2seq4repair_space>dependency<seq2seq4repair_space>management<seq2seq4repair_space>in<seq2seq4repair_space>sub<seq2seq4repair_space>modules" ) ; } } catch ( ExpressionEvaluationException e ) { throw new EnforcerRuleException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>lookup<seq2seq4repair_space>an<seq2seq4repair_space>expression<seq2seq4repair_space>" + ( e . getLocalizedMessage ( ) ) ) , e ) ; } } private void checkForSubmoduleDependencyManagement ( final MavenProject project , Log log ) { } }

Fix:
if ( ( shouldBuildFail ( ) ) && ( failureDetected ) ) {
Buggy code:
public class TabItem extends Item { TabFolder parent ; Control control ; String toolTipText ; NSTabViewItem nsItem ; public TabItem ( TabFolder parent , int style ) { } public TabItem ( TabFolder parent , int style , int index ) { } protected void checkSubclass ( ) { } void destroyWidget ( ) { } public Rectangle getBounds ( ) { } public Control getControl ( ) { } public TabFolder getParent ( ) { } public String getToolTipText ( ) { } void releaseHandle ( ) { } void releaseParent ( ) { } void releaseWidget ( ) { } public void setControl ( Control control ) { checkWidget ( ) ; if ( control != null ) { if ( control . isDisposed ( ) ) error ( ERROR_INVALID_ARGUMENT ) ; if ( ( control . parent ) != ( parent ) ) error ( ERROR_INVALID_PARENT ) ; } if ( ( ( this . control ) != null ) && ( this . control . isDisposed ( ) ) ) { this . control = null ; } Control oldControl = this . control ; Control newControl = control ; this . control = control ; int index = parent . indexOf ( this ) ; if ( index != ( parent . getSelectionIndex ( ) ) ) { if ( newControl != null ) newControl . setVisible ( false ) ; } else { if ( newControl != null ) { newControl . setVisible ( true ) ; } if ( oldControl != null ) oldControl . setVisible ( false ) ; } NSView view ; if ( newControl != null ) { view = newControl . topView ( ) ; } else { view = ( ( NSView ) ( new NSView ( ) . alloc ( ) ) ) ; <START_BUG> view . initWithFrame ( new NSRect ( ) ) ; <END_BUG> view . autorelease ( ) ; } nsItem . setView ( view ) ; } public void setImage ( Image image ) { } public void setText ( String string ) { } public void setToolTipText ( String string ) { } void update ( ) { } }

Fix:
view . init ( ) ;
Buggy code:
@ Deprecated class SlowSynonymMap { public CharArrayMap < SlowSynonymMap > submap ; public Token [ ] synonyms ; int flags ; static final int INCLUDE_ORIG = 1 ; static final int IGNORE_CASE = 2 ; public SlowSynonymMap ( ) { } public SlowSynonymMap ( boolean ignoreCase ) { } public boolean includeOrig ( ) { } public boolean ignoreCase ( ) { } public void add ( List < String > singleMatch , List < Token > replacement , boolean includeOrig , boolean mergeExisting ) { SlowSynonymMap currMap = this ; for ( String str : singleMatch ) { if ( ( currMap . submap ) == null ) { <START_BUG> currMap . submap = new CharArrayMap < SlowSynonymMap > ( Version . LUCENE_40 , 1 , ignoreCase ( ) ) ; <END_BUG> } SlowSynonymMap map = currMap . submap . get ( str ) ; if ( map == null ) { map = new SlowSynonymMap ( ) ; map . flags |= ( flags ) & ( SlowSynonymMap . IGNORE_CASE ) ; currMap . submap . put ( str , map ) ; } currMap = map ; } if ( ( ( currMap . synonyms ) != null ) && ( ! mergeExisting ) ) { throw new IllegalArgumentException ( ( "SynonymFilter:<seq2seq4repair_space>there<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>a<seq2seq4repair_space>mapping<seq2seq4repair_space>for<seq2seq4repair_space>" + singleMatch ) ) ; } List < Token > superset = ( ( currMap . synonyms ) == null ) ? replacement : SlowSynonymMap . mergeTokens ( Arrays . asList ( currMap . synonyms ) , replacement ) ; currMap . synonyms = superset . toArray ( new Token [ superset . size ( ) ] ) ; if ( includeOrig ) currMap . flags |= SlowSynonymMap . INCLUDE_ORIG ; } @ Override public String toString ( ) { } public static List < Token > makeTokens ( List < String > strings ) { } public static List < Token > mergeTokens ( List < Token > lst1 , List < Token > lst2 ) { } }

Fix:
currMap . submap = new CharArrayMap < SlowSynonymMap > ( Version . LUCENE_CURRENT , 1 , ignoreCase ( ) ) ;
Buggy code:
public interface CaseClasses { public static void writeEquals ( MethodWriter writer , IClass theClass ) throws BytecodeException { } public static void writeEquals ( MethodWriter writer , IField field ) throws BytecodeException { } public static void writeArrayEquals ( MethodWriter writer , IType type ) throws BytecodeException { } public static void writeHashCode ( MethodWriter writer , IClass theClass ) throws BytecodeException { } public static void writeHashCode ( MethodWriter writer , IType type ) throws BytecodeException { } public static void writeArrayHashCode ( MethodWriter writer , IType type ) throws BytecodeException { } public static void writeToString ( MethodWriter writer , IClass theClass ) throws BytecodeException { } public static void writeToString ( MethodWriter writer , IType type ) throws BytecodeException { if ( type . isArrayType ( ) ) { writer . writeInsn ( SWAP ) ; writer . writeInsn ( DUP_X1 ) ; CaseClasses . writeArrayToString ( writer , type . getElementType ( ) ) ; return ; } StringBuilder desc = new StringBuilder ( ) . append ( '(' ) ; if ( type . isPrimitive ( ) ) { type . appendExtendedName ( desc ) ; } else <START_BUG> if ( type . classEquals ( STRING ) ) { <END_BUG> desc . append ( "Ljava//lang//String;" ) ; } else { desc . append ( "Ljava//lang//Object;" ) ; } desc . append ( ")Ljava//lang//StringBuilder;" ) ; writer . writeInvokeInsn ( INVOKEVIRTUAL , "java//lang//StringBuilder" , "append" , desc . toString ( ) , false ) ; return ; } public static void writeArrayToString ( MethodWriter writer , IType type ) throws BytecodeException { } }

Fix:
if ( type . equals ( STRING ) ) {
Buggy code:
public class SequenceFilesFromLuceneStorageTest extends AbstractLuceneStorageTest { private SequenceFilesFromLuceneStorage lucene2Seq ; private LuceneStorageConfiguration lucene2SeqConf ; private Path seqFilesOutputPath ; private Configuration configuration ; @ Before public void before ( ) throws IOException { <START_BUG> configuration = new Configuration ( ) ; <END_BUG> seqFilesOutputPath = new Path ( getTestTempDirPath ( ) , "seqfiles" ) ; lucene2Seq = new SequenceFilesFromLuceneStorage ( ) ; lucene2SeqConf = new LuceneStorageConfiguration ( configuration , Arrays . asList ( getIndexPath1 ( ) , getIndexPath2 ( ) ) , seqFilesOutputPath , SingleFieldDocument . ID_FIELD , Arrays . asList ( FIELD ) ) ; } @ After public void after ( ) throws IOException { } @ Test public void testRun2Directories ( ) throws Exception { } @ Test public void testRunSkipUnstoredFields ( ) throws IOException { } @ Test public void testRunMaxHits ( ) throws IOException { } @ Test public void testRunQuery ( ) throws IOException { } @ Test public void testRunMultipleFields ( ) throws IOException { } @ Test public void testRunNumericField ( ) throws IOException { } }

Fix:
configuration = getConfiguration ( ) ;
Buggy code:
public class CategoryWrapper { Category c ; static String FQCN = CategoryWrapper . class . getName ( ) ; CategoryWrapper ( String name ) { } public static void main ( String [ ] argv ) { } public void addAppender ( Appender appender ) { } public void print ( String msg ) { <START_BUG> c . log ( ( ( CategoryWrapper . FQCN ) + ".print" ) , Priority . DEBUG , msg , null ) ; <END_BUG> } static void Usage ( String msg ) { } }

Fix:
c . log ( ( ( CategoryWrapper . FQCN ) + ".print" ) , Level . DEBUG , msg , null ) ;
Buggy code:
public class Test_org_eclipse_swt_widgets_FileDialog extends Test_org_eclipse_swt_widgets_Dialog { public Test_org_eclipse_swt_widgets_FileDialog ( String name ) { } public static void main ( String [ ] args ) { } protected void setUp ( ) { } protected void tearDown ( ) { } public void test_ConstructorLorg_eclipse_swt_widgets_Shell ( ) { } public void test_ConstructorLorg_eclipse_swt_widgets_ShellI ( ) { FileDialog fd ; fd = new FileDialog ( shell , SWT . NULL ) ; int style = fd . getStyle ( ) ; style &= ~ ( SWT . LEFT_TO_RIGHT ) ; style &= ~ ( SWT . RIGHT_TO_LEFT ) ; <START_BUG> assertTrue ( ( style == ( SWT . NULL ) ) ) ; <END_BUG> fd = new FileDialog ( shell , SWT . APPLICATION_MODAL ) ; style = fd . getStyle ( ) ; style &= ~ ( SWT . LEFT_TO_RIGHT ) ; style &= ~ ( SWT . RIGHT_TO_LEFT ) ; assertTrue ( ( style == ( SWT . APPLICATION_MODAL ) ) ) ; fd = new FileDialog ( shell , SWT . PRIMARY_MODAL ) ; style = fd . getStyle ( ) ; style &= ~ ( SWT . LEFT_TO_RIGHT ) ; style &= ~ ( SWT . RIGHT_TO_LEFT ) ; assertTrue ( ( style == ( SWT . PRIMARY_MODAL ) ) ) ; fd = new FileDialog ( shell , SWT . SYSTEM_MODAL ) ; style = fd . getStyle ( ) ; style &= ~ ( SWT . LEFT_TO_RIGHT ) ; style &= ~ ( SWT . RIGHT_TO_LEFT ) ; assertTrue ( ( style == ( SWT . SYSTEM_MODAL ) ) ) ; } public void test_getFileName ( ) { } public void test_getFileNames ( ) { } public void test_getFilterExtensions ( ) { } public void test_getFilterNames ( ) { } public void test_getFilterPath ( ) { } public void test_open ( ) { } public void test_setFileNameLjava_lang_String ( ) { } public void test_setFilterExtensions$Ljava_lang_String ( ) { } public void test_setFilterNames$Ljava_lang_String ( ) { } public void test_setFilterPathLjava_lang_String ( ) { } public static Test suite ( ) { } public static Vector methodNames ( ) { } protected void runTest ( ) throws Throwable { } FileDialog fileDialog ; }

Fix:
assertTrue ( ( style == ( SWT . APPLICATION_MODAL ) ) ) ;