nus-yam/ex-repair huggingface dataset:
Buggy code:
public class DMDBugsTest extends BaseJDBCTestCase { public DMDBugsTest ( String name ) { } public void testDerby3000 ( ) throws IOException , SQLException { ResultSet rs ; DatabaseMetaData dmd = getConnection ( ) . getMetaData ( ) ; Statement s = createStatement ( ) ; s . executeUpdate ( "CREATE<seq2seq4repair_space>TABLE<seq2seq4repair_space>APP.TAB<seq2seq4repair_space>(i<seq2seq4repair_space>int)" ) ; s . executeUpdate ( "CREATE<seq2seq4repair_space>VIEW<seq2seq4repair_space>APP.V<seq2seq4repair_space>as<seq2seq4repair_space>SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>TAB" ) ; s . executeUpdate ( "CREATE<seq2seq4repair_space>SYNONYM<seq2seq4repair_space>TSYN<seq2seq4repair_space>FOR<seq2seq4repair_space>APP.TAB" ) ; String [ ] withInvalidTableTypes = new String [ ] { "SYNONYM" , "TABLE" , "VIEW" , "GLOBAL<seq2seq4repair_space>TEMPORARY" } ; rs = dmd . getTables ( "%" , "%" , "%" , withInvalidTableTypes ) ; JDBC . assertFullResultSet ( rs , new String [ ] [ ] { new String [ ] { "" , "APP" , "TSYN" , "SYNONYM" , "" , null , null , null , null , null } , new String [ ] { "" , "APP" , "TAB" , "TABLE" , "" , null , null , null , null , null } , new String [ ] { "" , "APP" , "V" , "VIEW" , "" , null , null , null , null , null } } ) ; rs = dmd . getTables ( "%" , "%" , "%" , new String [ ] { "GLOBAL<seq2seq4repair_space>TEMPORARY" } ) ; JDBC . assertEmpty ( rs ) ; rs = dmd . getTables ( "%" , "%" , "%" , new String [ ] { "VIEW" } ) ; JDBC . assertUnorderedResultSet ( rs , new String [ ] [ ] { new String [ ] { "" , "APP" , "V" , "VIEW" , "" , null , null , null , null , null } } ) ; rs = dmd . getTables ( "%" , "%" , "%" , new String [ ] { "TABLE" } ) ; JDBC . assertUnorderedResultSet ( rs , new String [ ] [ ] { new String [ ] { "" , "APP" , "TAB" , "TABLE" , "" , null , null , null , null , null } } ) ; rs = dmd . getTables ( "%" , "%" , "%" , new String [ ] { "SYNONYM" } ) ; JDBC . assertUnorderedResultSet ( rs , new String [ ] [ ] { new String [ ] { "" , "APP" , "TSYN" , "SYNONYM" , "" , null , null , null , null , null } } ) ; rs = dmd . getTables ( "%" , "%" , "%" , new String [ ] { "SYSTEM<seq2seq4repair_space>TABLE" } ) ; <START_BUG> assertEquals ( 19 , JDBC . assertDrainResults ( rs ) ) ; <END_BUG> s . executeUpdate ( "DROP<seq2seq4repair_space>VIEW<seq2seq4repair_space>APP.V" ) ; s . executeUpdate ( "DROP<seq2seq4repair_space>TABLE<seq2seq4repair_space>APP.TAB" ) ; s . executeUpdate ( "DROP<seq2seq4repair_space>SYNONYM<seq2seq4repair_space>APP.TSYN" ) ; } public static Test suite ( ) { } }

Fix:
assertEquals ( 20 , JDBC . assertDrainResults ( rs ) ) ;
Buggy code:
@ Slow @ SuppressCodecs ( { "Appending" , "Lucene3x" , "Lucene40" , "Lucene41" , "Lucene42" } ) public class TestRandomDVFaceting extends SolrTestCaseJ4 { @ BeforeClass public static void beforeTests ( ) throws Exception { } int indexSize ; List < FldType > types ; Map < Comparable , Doc > model = null ; boolean validateResponses = true ; void init ( ) { } void addMoreDocs ( int ndocs ) throws Exception { } void deleteSomeDocs ( ) { Random rand = random ( ) ; int percent = rand . nextInt ( 100 ) ; if ( ( model ) == null ) return ; ArrayList < String > ids = new ArrayList < String > ( model . size ( ) ) ; for ( Comparable id : model . keySet ( ) ) { if ( ( rand . nextInt ( 100 ) ) < percent ) { ids . add ( id . toString ( ) ) ; } } if ( ( ids . size ( ) ) == 0 ) return ; <START_BUG> StringBuffer sb = new StringBuffer ( "id:(" ) ; <END_BUG> for ( String id : ids ) { sb . append ( id ) . append ( '<seq2seq4repair_space>' ) ; model . remove ( id ) ; } sb . append ( ')' ) ; assertU ( delQ ( sb . toString ( ) ) ) ; if ( ( rand . nextInt ( 10 ) ) == 0 ) { assertU ( optimize ( ) ) ; } else { assertU ( commit ( "softCommit" , ( "" + ( ( rand . nextInt ( 10 ) ) != 0 ) ) ) ) ; } } @ Test public void testRandomFaceting ( ) throws Exception { } void doFacetTests ( ) throws Exception { } List < String > multiValuedMethods = Arrays . asList ( new String [ ] { "enum" , "fc" , "dv" } ) ; List < String > singleValuedMethods = Arrays . asList ( new String [ ] { "enum" , "fc" , "fcs" , "dv" } ) ; void doFacetTests ( FldType ftype ) throws Exception { } }

Fix:
StringBuilder sb = new StringBuilder ( "id:(" ) ;
Buggy code:
public class ANTLR extends Task { private CommandlineJava commandline = new CommandlineJava ( ) ; private boolean fork = false ; private File workingdir = null ; private File outputDirectory ; private File target ; public ANTLR ( ) { } public void setDir ( File d ) { } public void setFork ( boolean s ) { } public void setOutputdirectory ( File outputDirectory ) { } public void setTarget ( File target ) { } public Path createClasspath ( ) { } public Argument createJvmarg ( ) { } public void execute ( ) throws TaskException { } protected void addClasspathEntry ( String resource ) { } private File getGeneratedFile ( ) throws TaskException { } private int run ( String [ ] command ) throws TaskException { <START_BUG> Execute exe = new Execute ( new org . apache . tools . ant . taskdefs . exec . LogStreamHandler ( this , Project . MSG_INFO , Project . MSG_WARN ) , null ) ; <END_BUG> if ( ( workingdir ) != null ) { exe . setWorkingDirectory ( workingdir ) ; } exe . setCommandline ( command ) ; try { return exe . execute ( ) ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } } private void validateAttributes ( ) throws TaskException { } }

Fix:
Execute exe = new Execute ( new org . apache . tools . ant . taskdefs . exec . LogStreamHandler ( this , Project . MSG_INFO , Project . MSG_WARN ) ) ;
Buggy code:
public class DateTime extends Composite { public DateTime ( Composite parent , int style ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public void addSelectionListener ( SelectionListener listener ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { NSDatePicker widget = ( ( NSDatePicker ) ( new SWTDatePicker ( ) . alloc ( ) ) ) ; <START_BUG> widget . initWithFrame ( new NSRect ( ) ) ; <END_BUG> int pickerStyle = OS . NSTextFieldAndStepperDatePickerStyle ; int elementFlags = 0 ; if ( ( ( style ) & ( SWT . CALENDAR ) ) != 0 ) { pickerStyle = OS . NSClockAndCalendarDatePickerStyle ; elementFlags = OS . NSYearMonthDayDatePickerElementFlag ; } else { if ( ( ( style ) & ( SWT . TIME ) ) != 0 ) { elementFlags = ( ( ( style ) & ( SWT . SHORT ) ) != 0 ) ? OS . NSHourMinuteDatePickerElementFlag : OS . NSHourMinuteSecondDatePickerElementFlag ; } if ( ( ( style ) & ( SWT . DATE ) ) != 0 ) { elementFlags = ( ( ( style ) & ( SWT . SHORT ) ) != 0 ) ? OS . NSYearMonthDatePickerElementFlag : OS . NSYearMonthDayDatePickerElementFlag ; } } widget . setDrawsBackground ( true ) ; widget . setDatePickerStyle ( pickerStyle ) ; widget . setDatePickerElements ( elementFlags ) ; NSDate date = NSCalendarDate . calendarDate ( ) ; widget . setDateValue ( date ) ; widget . setTarget ( widget ) ; widget . setAction ( sel_sendSelection ) ; view = widget ; } NSCalendarDate getCalendarDate ( ) { } public int getDay ( ) { } public int getHours ( ) { } public int getMinutes ( ) { } public int getMonth ( ) { } String getNameText ( ) { } public int getSeconds ( ) { } public int getYear ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void sendSelection ( ) { } void setBackground ( float [ ] color ) { } public void setDate ( int year , int month , int day ) { } public void setDay ( int day ) { } void setForeground ( float [ ] color ) { } public void setHours ( int hours ) { } public void setMinutes ( int minutes ) { } public void setMonth ( int month ) { } public void setSeconds ( int seconds ) { } public void setTime ( int hours , int minutes , int seconds ) { } public void setYear ( int year ) { } }

Fix:
widget . init ( ) ;
Buggy code:
public class SelectionOptionsPlugin extends AbstractFolderOptionsPlugin { public SelectionOptionsPlugin ( MailFrameMediator mediator ) { } public void saveOptionsToXml ( IMailbox folder ) { } public void loadOptionsFromXml ( IMailbox folder ) { XmlElement parent = getConfigNode ( folder ) ; IDefaultItem item = new org . columba . core . config . DefaultItem ( parent ) ; TableController tableController = ( ( TableController ) ( ( ( org . columba . mail . gui . frame . TableViewOwner ) ( getMediator ( ) ) ) . getTableController ( ) ) ) ; TableView view = tableController . getView ( ) ; <START_BUG> boolean remember = item . getBoolean ( "remember_last_selection" , true ) ; <END_BUG> boolean ascending = tableController . getTableModelSorter ( ) . getSortingOrder ( ) ; int row = view . getTree ( ) . getRowCount ( ) ; if ( row == 0 ) { tableController . clearSelection ( ) ; return ; } if ( ( ! remember ) || ( ( folder . getLastSelection ( ) ) == null ) ) { Object uid = null ; if ( ascending ) { uid = view . selectLastRow ( ) ; } else { uid = view . selectFirstRow ( ) ; } if ( uid == null ) { return ; } } else { Object [ ] lastSelUids = new Object [ ] { folder . getLastSelection ( ) } ; if ( ( lastSelUids [ 0 ] ) == null ) { return ; } Object uid = lastSelUids [ 0 ] ; if ( ( ( ( org . columba . mail . gui . table . model . HeaderTableModel ) ( tableController . getHeaderTableModel ( ) ) ) . getMessageNode ( uid ) ) == null ) { if ( ascending ) { uid = view . selectLastRow ( ) ; } else { uid = view . selectFirstRow ( ) ; } } else { tableController . setSelected ( new Object [ ] { uid } ) ; } } } public XmlElement createDefaultElement ( boolean global ) { } }

Fix:
boolean remember = item . getBooleanWithDefault ( "remember_last_selection" , true ) ;
Buggy code:
public class NavigationDrawerFragment extends Fragment implements AdapterView . OnItemClickListener { private static final String SELECTION_KEY = "current_selection" ; public static interface NavigationDrawerCallbacks { void onNavigationDrawerItemSelected ( int type , int id ) { } } private NavigationDrawerFragment . NavigationDrawerCallbacks mCallback ; private DrawerLayout mDrawerLayout ; private ListView mMenuList ; private View mFragmentContainerView ; public ActionBarDrawerToggle mDrawerToggle ; private NavigationDrawerAdapter mAdapter ; private int mCategory ; private Hashtable < Integer , Integer > mCategory2Navigation ; private boolean mDrawerHidden ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onResume ( ) { super . onResume ( ) ; <START_BUG> if ( ( Application . getInstance ( ) . queryChange ( DATA_OTHER ) ) || ( Application . getInstance ( ) . queryChange ( DATA_OTHER ) ) ) { <END_BUG> mAdapter . setList ( buildMenuItems ( ) ) ; mAdapter . notifyDataSetChanged ( ) ; select ( ALL_CATEGORY_ID ) ; } } @ Override public void onAttach ( Activity activity ) { } @ Override public void onDetach ( ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { } public void setUp ( int fragmentId , DrawerLayout drawerLayout ) { } private ArrayList < NavMenuItem > buildMenuItems ( ) { } public void remove ( int category ) { } public void select ( int category ) { } public void increaseCounterInMenu ( int category , int delta ) { } public void refreshCategoryCounters ( ) { } public int getCount ( int categoryId ) { } public void lockDrawer ( boolean lock ) { } }

Fix:
if ( ( Application . getInstance ( ) . queryChange ( DATA_OTHER ) ) || ( Application . getInstance ( ) . queryChange ( DATA_ALL ) ) ) {
Buggy code:
public class AddVCardAction extends FrameAction { public AddVCardAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> AddressbookFrameController addressbookFrameController = ( ( AddressbookFrameController ) ( frameController ) ) ; <END_BUG> Folder destinationFolder = ( ( Folder ) ( addressbookFrameController . getTree ( ) . getView ( ) . getSelectedFolder ( ) ) ) ; JFileChooser fc = new JFileChooser ( ) ; fc . setFileSelectionMode ( JFileChooser . FILES_ONLY ) ; fc . setMultiSelectionEnabled ( true ) ; int returnVal = fc . showOpenDialog ( addressbookFrameController . getView ( ) ) ; if ( returnVal == ( JFileChooser . APPROVE_OPTION ) ) { File [ ] files = fc . getSelectedFiles ( ) ; for ( int i = 0 ; i < ( files . length ) ; i ++ ) { try { StringBuffer strbuf = new StringBuffer ( ) ; BufferedReader in = new BufferedReader ( new FileReader ( files [ i ] ) ) ; String str ; while ( ( str = in . readLine ( ) ) != null ) { strbuf . append ( ( str + "\n" ) ) ; } in . close ( ) ; ContactCard card = VCardParser . parse ( strbuf . toString ( ) ) ; destinationFolder . add ( card ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } } addressbookFrameController . getTable ( ) . getView ( ) . setFolder ( destinationFolder ) ; } }

Fix:
AddressbookFrameController addressbookFrameController = ( ( AddressbookFrameController ) ( frameMediator ) ) ;
Buggy code:
public class UserLibraryClasspathContainerInitializer extends ClasspathContainerInitializer { public void initialize ( IPath containerPath , IJavaProject project ) throws CoreException { } private boolean isUserLibraryContainer ( IPath path ) { } public boolean canUpdateClasspathContainer ( IPath containerPath , IJavaProject project ) { } public void requestClasspathContainerUpdate ( IPath containerPath , IJavaProject project , IClasspathContainer containerSuggestion ) throws CoreException { } public String getDescription ( IPath containerPath , IJavaProject project ) { } public Object getComparisonID ( IPath containerPath , IJavaProject project ) { <START_BUG> return containerPath . segment ( 0 ) ; <END_BUG> } }

Fix:
return containerPath ;
Buggy code:
public class Subscriber { private String name ; private String id ; private List < Session > sessions = new ArrayList < Session > ( ) ; private Contract contract ; private Phone phone ; private int additionalVolume ; private int additionalCosts ; public String getName ( ) { } public void setName ( String name ) { } public String getId ( ) { } public void setId ( String id ) { } public int getUsedMinutes ( ) { } public int getLeftMinutes ( ) { } public int getUsedDataVolume ( ) { } public int getLeftDataVolume ( ) { } public Contract getContract ( ) { } public void setContract ( Contract contract ) { } public Phone getPhone ( ) { } public void setPhone ( Phone phone ) { } public int useService ( ServiceType service , int time ) { } public List < Session > getSessions ( ) { } public void resetSessions ( ) { } public void addData ( ) { } public int getCurrentFee ( ) { } public String serialize ( ) { } public static Subscriber deserialize ( String data ) { } public String toString ( ) { <START_BUG> return String . format ( "262-42-%s<seq2seq4repair_space>-<seq2seq4repair_space>%-25s<seq2seq4repair_space>Voice:<seq2seq4repair_space>%4d<seq2seq4repair_space>min,<seq2seq4repair_space>Data:<seq2seq4repair_space>%4d<seq2seq4repair_space>MB,<seq2seq4repair_space>%-20s<seq2seq4repair_space>%s" , getId ( ) , getName ( ) , getUsedMinutes ( ) , getUsedDataVolume ( ) , phone , contract ) ; <END_BUG> } }

Fix:
return String . format ( "262-42-%s<seq2seq4repair_space>-<seq2seq4repair_space>%-25s<seq2seq4repair_space>Voice:<seq2seq4repair_space>%4d<seq2seq4repair_space>min,<seq2seq4repair_space>Data:<seq2seq4repair_space>%4d<seq2seq4repair_space>MB,<seq2seq4repair_space>%s,<seq2seq4repair_space>%s" , getId ( ) , getName ( ) , getUsedMinutes ( ) , getUsedDataVolume ( ) , phone , contract ) ;
Buggy code:
public class CheckGroup extends FormComponent implements IOnChangeListener { private static final long serialVersionUID = 1L ; public CheckGroup ( String id ) { } public CheckGroup ( String id , Collection collection ) { } public CheckGroup ( String id , IModel model ) { } protected Object convertValue ( String [ ] values ) throws ConversionException { } public void updateModel ( ) { } protected final boolean supportsPersistence ( ) { } public final void onSelectionChanged ( ) { <START_BUG> convert ( ) ; <END_BUG> updateModel ( ) ; onSelectionChanged ( ( ( Collection ) ( getModelObject ( ) ) ) ) ; } protected void onSelectionChanged ( final Collection newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } protected boolean getStatelessHint ( ) { } }

Fix:
convertInput ( ) ;
Buggy code:
public class VectorOperations { public static double [ ] add ( final double [ ] A , final double lambda , final double [ ] B ) { } public static double [ ] addi ( double [ ] C , final double [ ] A , final double lambda , final double [ ] B ) { } public static double [ ] mul ( final double [ ] A , final double lambda ) { } public static double [ ] muli ( double [ ] C , final double [ ] A , final double lambda ) { } public static double [ ] prod ( final double [ ] A , final double [ ] B ) { } public static double [ ] prodi ( double [ ] C , final double [ ] A , final double [ ] B ) { int packed = 2 * ( ( A . length ) // 2 ) ; int l = 0 ; for ( l = 0 ; l < packed ; l += 2 ) { C [ l ] = ( A [ l ] ) * ( B [ l ] ) ; <START_BUG> C [ ( l + 1 ) ] = ( A [ ( l + 1 ) ] ) * ( B [ l ] ) ; <END_BUG> } for ( ; l < ( A . length ) ; l ++ ) { C [ l ] = ( A [ l ] ) * ( B [ l ] ) ; } return C ; } public static double dot ( final double [ ] A , final double [ ] B ) { } public static double n2 ( final double [ ] A ) { } public static double n2p2 ( final double [ ] A ) { } public static double d2p2 ( final double [ ] A , final double [ ] B ) { } No newline ; at end ; of file ; }

Fix:
C [ ( l + 1 ) ] = ( A [ ( l + 1 ) ] ) * ( B [ ( l + 1 ) ] ) ;
Buggy code:
public class ConceptTagger { public static List < Sentence > sentences = new ArrayList < Sentence > ( ) ; public HashMap < Integer , List < Triplet < Integer , Integer , String > > > conceptMap ; public void ParseConceptFile ( String dirName , String fileName ) { } public void ParseTextFile ( String dirName , String fileName ) { try ( BufferedReader br = new BufferedReader ( new FileReader ( ( dirName + fileName ) ) ) ) { StringBuffer newString = new StringBuffer ( ) ; int lineNo = 1 ; String currLine ; while ( ( currLine = br . readLine ( ) ) != null ) { List < Triplet < Integer , Integer , String > > tags = conceptMap . get ( lineNo ) ; String [ ] words = currLine . split ( "\\s+" ) ; for ( int i = 0 ; i < ( words . length ) ; ++ i ) { boolean found = false ; newString . append ( words [ i ] ) ; newString . append ( "|" ) ; if ( tags != null ) { for ( Triplet < Integer , Integer , String > tag : tags ) { if ( ( tag . getValue0 ( ) ) == i ) { found = true ; newString . append ( ( "B-" + ( tag . getValue2 ( ) ) ) ) ; break ; } else if ( ( ( tag . getValue0 ( ) ) < i ) && ( ( tag . getValue1 ( ) ) >= i ) ) { found = true ; newString . append ( ( "I-" + ( tag . getValue2 ( ) ) ) ) ; break ; } } } if ( ! found ) { newString . append ( "O" ) ; } newString . append ( "<seq2seq4repair_space>" ) ; } ++ lineNo ; newString . append ( "\n" ) ; } PrintWriter out = new PrintWriter ( ( "C://Users//amit//Desktop//newconcept//" + fileName ) ) ; <START_BUG> out . println ( newString . toString ( ) ) ; <END_BUG> out . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } public void ConvertTextToSentences ( String dirName , String fileName ) { } public static void main ( String [ ] args ) { } }

Fix:
out . println ( newString . toString ( ) . trim ( ) ) ;
Buggy code:
public class SingletonLifecycleCMTTxInterceptor extends CMTTxInterceptor implements Interceptor { private final TransactionAttributeType txAttr ; public SingletonLifecycleCMTTxInterceptor ( final TransactionAttributeType txAttr ) { } @ Override public Object processInvocation ( InterceptorContext invocation ) throws Exception { final EJBComponent component = ( ( EJBComponent ) ( invocation . getPrivateData ( Component . class ) ) ) ; switch ( txAttr ) { case MANDATORY : return mandatory ( invocation , component ) ; case NEVER : return never ( invocation , component ) ; case NOT_SUPPORTED : return notSupported ( invocation , component ) ; case REQUIRED : case REQUIRES_NEW : <START_BUG> return requiresNew ( invocation , component ) ; <END_BUG> case SUPPORTS : return supports ( invocation , component ) ; default : throw new IllegalStateException ( ( ( ( "Unexpected<seq2seq4repair_space>tx<seq2seq4repair_space>attribute<seq2seq4repair_space>" + ( txAttr ) ) + "<seq2seq4repair_space>on<seq2seq4repair_space>" ) + invocation ) ) ; } } public static class Factory extends ComponentInterceptorFactory { private final TransactionAttributeType txAttr ; public Factory ( final TransactionAttributeType txAttr ) { } @ Override protected Interceptor create ( Component component , InterceptorFactoryContext context ) { } } }

Fix:
return requiresNew ( invocation , component , getMethodIntf ( invocation ) ) ;
Buggy code:
public interface IComponentInheritedModel extends IModel { <START_BUG> IModelWrapper wrapOnInheritance ( Component component ) ; <END_BUG> }

Fix:
INestedModelContainer wrapOnInheritance ( Component component ) ;
Buggy code:
public class Loop { public static void main ( String [ ] args ) { Category root = Category . getRoot ( ) ; Category cat = Category . getInstance ( Loop . class . getName ( ) ) ; if ( ( args . length ) != 2 ) Loop . usage ( "Wrong<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>arguments." ) ; String host = args [ 0 ] ; int port = 0 ; try { port = Integer . valueOf ( args [ 1 ] ) . intValue ( ) ; } catch ( NumberFormatException e ) { Loop . usage ( ( ( "Argument<seq2seq4repair_space>[" + ( args [ 1 ] ) ) + "]<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>in<seq2seq4repair_space>proper<seq2seq4repair_space>int<seq2seq4repair_space>form." ) ) ; } SocketAppender sa = new SocketAppender ( host , port ) ; Layout layout = new PatternLayout ( "%5p<seq2seq4repair_space>[%t]<seq2seq4repair_space>%x<seq2seq4repair_space>%c<seq2seq4repair_space>-<seq2seq4repair_space>%m\n" ) ; <START_BUG> FileAppender so = new FileAppender ( layout , System . out ) ; <END_BUG> root . addAppender ( sa ) ; root . addAppender ( so ) ; int i = 0 ; while ( true ) { NDC . push ( ( "" + ( i ++ ) ) ) ; cat . debug ( "Debug<seq2seq4repair_space>message." ) ; root . info ( "Info<seq2seq4repair_space>message." ) ; NDC . pop ( ) ; } } static void usage ( String msg ) { } }

Fix:
Appender so = new ConsoleAppender ( layout , "System.out" ) ;
Buggy code:
public class RenderingRule { private RenderingRuleProperty [ ] properties ; private int [ ] intProperties ; private RenderingRule [ ] attributesRef ; private float [ ] floatProperties ; private List < RenderingRule > ifElseChildren ; private List < RenderingRule > ifChildren ; private boolean isGroup ; private final RenderingRulesStorage storage ; private Map < String , String > attributes ; public RenderingRule ( Map < String , String > attributes , boolean isGroup , RenderingRulesStorage storage ) { } public void storeAttributes ( Map < String , String > attributes ) { } public Map < String , String > getAttributes ( ) { } public void init ( Map < String , String > attributes ) { } private int getPropertyIndex ( String property ) { } public String getStringPropertyValue ( String property ) { } public float getFloatPropertyValue ( String property ) { int i = getPropertyIndex ( property ) ; <START_BUG> if ( i >= 0 ) { <END_BUG> return floatProperties [ i ] ; } return 0 ; } public String getColorPropertyValue ( String property ) { } public int getIntPropertyValue ( String property ) { } protected int getIntProp ( int ind ) { } protected RenderingRule getAttrProp ( int ind ) { } protected float getFloatProp ( int ind ) { } public RenderingRuleProperty [ ] getProperties ( ) { } @ SuppressWarnings ( "unchecked" ) public List < RenderingRule > getIfChildren ( ) { } @ SuppressWarnings ( "unchecked" ) public List < RenderingRule > getIfElseChildren ( ) { } public void addIfChildren ( RenderingRule rr ) { } public void addIfElseChildren ( RenderingRule rr ) { } public void addToBeginIfElseChildren ( RenderingRule rr ) { } public boolean isGroup ( ) { } @ Override public String toString ( ) { } public StringBuilder toString ( String indent , StringBuilder bls ) { } protected void printAttrs ( StringBuilder bls , boolean in ) { } }

Fix:
if ( ( i >= 0 ) && ( ( floatProperties ) != null ) ) {
Buggy code:
public class LocalOutboundConnectionService extends AbstractOutboundConnectionService < LocalOutboundConnectionService > { public static final ServiceName LOCAL_OUTBOUND_CONNECTION_BASE_SERVICE_NAME = SUBSYSTEM_ENDPOINT . append ( "local-outbound-connection" ) ; private static final String LOCAL_URI_SCHEME = "local:////" ; private final InjectedValue < OutboundSocketBinding > destinationOutboundSocketBindingInjectedValue = new InjectedValue < OutboundSocketBinding > ( ) ; private URI connectionURI ; public LocalOutboundConnectionService ( final String connectionName , final OptionMap connectionCreationOptions ) { } @ Override public IoFuture < Connection > connect ( ) throws IOException { } @ Override public String getProtocol ( ) { } Injector < OutboundSocketBinding > getDestinationOutboundSocketBindingInjector ( ) { } private synchronized URI getConnectionURI ( ) throws IOException , URISyntaxException { if ( ( this . connectionURI ) != null ) { return this . connectionURI ; } final OutboundSocketBinding destinationOutboundSocket = this . destinationOutboundSocketBindingInjectedValue . getValue ( ) ; <START_BUG> final InetAddress destinationAddress = destinationOutboundSocket . getDestinationAddress ( ) ; <END_BUG> final int port = destinationOutboundSocket . getDestinationPort ( ) ; this . connectionURI = new URI ( ( ( ( ( LocalOutboundConnectionService . LOCAL_URI_SCHEME ) + ( destinationAddress . getHostAddress ( ) ) ) + ":" ) + port ) ) ; return this . connectionURI ; } @ Override public LocalOutboundConnectionService getValue ( ) throws IllegalArgumentException , IllegalStateException { } }

Fix:
final InetAddress destinationAddress = destinationOutboundSocket . getResolvedDestinationAddress ( ) ;
Buggy code:
public class Utilities { public static Font fontMetric ; public static Font fontGeneral ; public static Color COLOR_TOP ; public static String NEW_LINE = System . getProperty ( "line.separator" ) ; public static void setFontMetric ( Display display ) { } public static void setFontMetric ( IWorkbenchWindow window , FontData [ ] objFontMetric , FontData [ ] objFontGeneric ) { } public static boolean isDifferentFontData ( FontData [ ] fontTarget , FontData [ ] fontSource ) { } public static void dispose ( ) { } private static void storePreferenceFonts ( ) { } private static void resetAllViews ( IWorkbenchWindow window ) { } static ArrayList < AbstractBaseScopeView > getTopView ( IWorkbenchWindow window ) { } public static void resetView ( TreeViewer tree ) { } private static void resetView ( TreeItemManager objItemManager , TreeViewer tree ) { } public static Listener listenerToResetRowHeight ( TreeViewer tree ) { } public static void resetViewRowHeight ( TreeViewer tree ) { } private static void setFontMetric ( IWorkbenchWindow window , int iFontSize ) { } public static void increaseFont ( IWorkbenchWindow window ) { } public static void DecreaseFont ( IWorkbenchWindow window ) { } public static void insertTopRow ( TreeViewer treeViewer , Image imgScope , String [ ] arrText ) { } public static String [ ] getTopRowItems ( TreeViewer treeViewer ) { } public static Image getScopeNavButton ( Scope scope ) { } public static Image getInlineNavButton ( ProcedureScope proc ) { } public static boolean isFileReadable ( Scope scope ) { if ( ( scope . iSourceCodeAvailability ) == ( Scope . SOURCE_CODE_UNKNOWN ) ) { SourceFile newFile = scope . getSourceFile ( ) ; <START_BUG> if ( newFile != null ) { <END_BUG> if ( ( newFile != ( SourceFile . NONE ) ) || ( newFile . isAvailable ( ) ) ) { if ( newFile instanceof FileSystemSourceFile ) { FileSystemSourceFile objFile = ( ( FileSystemSourceFile ) ( newFile ) ) ; if ( objFile != null ) { if ( objFile . isAvailable ( ) ) { scope . iSourceCodeAvailability = Scope . SOURCE_CODE_AVAILABLE ; return true ; } } } } } } else return ( scope . iSourceCodeAvailability ) == ( Scope . SOURCE_CODE_AVAILABLE ) ; scope . iSourceCodeAvailability = Scope . SOURCE_CODE_NOT_AVAILABLE ; return false ; } public static Experiment getActiveExperiment ( IWorkbenchWindow window ) { } }

Fix:
if ( ( newFile != null ) && ( ! ( newFile . getName ( ) . isEmpty ( ) ) ) ) {
Buggy code:
class EESubsystemXmlPersister implements XMLStreamConstants , XMLElementWriter < SubsystemMarshallingContext > { public static final EESubsystemXmlPersister INSTANCE = new EESubsystemXmlPersister ( ) ; private EESubsystemXmlPersister ( ) { } @ Override public void writeContent ( XMLExtendedStreamWriter writer , SubsystemMarshallingContext context ) throws XMLStreamException { context . startSubsystemElement ( EE_2_0 . getUriString ( ) , false ) ; ModelNode eeSubSystem = context . getModelNode ( ) ; GlobalModulesDefinition . INSTANCE . marshallAsElement ( eeSubSystem , writer ) ; EAR_SUBDEPLOYMENTS_ISOLATED . marshallAsElement ( eeSubSystem , writer ) ; SPEC_DESCRIPTOR_PROPERTY_REPLACEMENT . marshallAsElement ( eeSubSystem , writer ) ; JBOSS_DESCRIPTOR_PROPERTY_REPLACEMENT . marshallAsElement ( eeSubSystem , writer ) ; <START_BUG> EJB_ANNOTATION_PROPERTY_REPLACEMENT . marshallAsElement ( eeSubSystem , writer ) ; <END_BUG> writeConcurrentElement ( writer , eeSubSystem ) ; writeDefaultBindingsElement ( writer , eeSubSystem ) ; writer . writeEndElement ( ) ; } private void writeConcurrentElement ( XMLExtendedStreamWriter writer , ModelNode eeSubSystem ) throws XMLStreamException { } private void writeContextServices ( final XMLExtendedStreamWriter writer , final ModelNode subModel ) throws XMLStreamException { } private void writeManagedThreadFactories ( final XMLExtendedStreamWriter writer , final ModelNode subModel ) throws XMLStreamException { } private void writeManagedExecutorServices ( final XMLExtendedStreamWriter writer , final ModelNode subModel ) throws XMLStreamException { } private void writeManagedScheduledExecutorServices ( final XMLExtendedStreamWriter writer , final ModelNode subModel ) throws XMLStreamException { } private void writeDefaultBindingsElement ( XMLExtendedStreamWriter writer , ModelNode eeSubSystem ) throws XMLStreamException { } }

Fix:
ANNOTATION_PROPERTY_REPLACEMENT . marshallAsElement ( eeSubSystem , writer ) ;
Buggy code:
public class Script extends Task { private String language ; private File src ; private String text ; public void execute ( ) throws BuildException { ScriptRunner runner = new ScriptRunner ( ) ; if ( ( language ) != null ) { runner . setLanguage ( language ) ; } if ( ( src ) != null ) { runner . setSrc ( src ) ; } if ( ( text ) != null ) { runner . addText ( text ) ; } runner . addBeans ( getProject ( ) . getProperties ( ) ) ; runner . addBeans ( getProject ( ) . getUserProperties ( ) ) ; runner . addBeans ( getProject ( ) . getTargets ( ) ) ; runner . addBeans ( getProject ( ) . getReferences ( ) ) ; runner . addBean ( "project" , getProject ( ) ) ; runner . addBean ( "self" , this ) ; <START_BUG> runner . executeScript ( "<ANT>" ) ; <END_BUG> } public void setLanguage ( String language ) { } public void setSrc ( String fileName ) { } public void addText ( String text ) { } }

Fix:
runner . executeScript ( "ANT" ) ;
Buggy code:
class WizardFileSystemResourceExportPage1 extends WizardExportResourcesPage implements Listener { private Combo destinationNameField ; private Button destinationBrowseButton ; protected Button overwriteExistingFilesCheckbox ; protected Button createDirectoryStructureButton ; protected Button createSelectionOnlyButton ; private static final int SIZING_TEXT_FIELD_WIDTH = 250 ; private static final String STORE_DESTINATION_NAMES_ID = "WizardFileSystemResourceExportPage1.STORE_DESTINATION_NAMES_ID" ; private static final String STORE_OVERWRITE_EXISTING_FILES_ID = "WizardFileSystemResourceExportPage1.STORE_OVERWRITE_EXISTING_FILES_ID" ; private static final String STORE_CREATE_STRUCTURE_ID = "WizardFileSystemResourceExportPage1.STORE_CREATE_STRUCTURE_ID" ; private static final String DESTINATION_EMPTY_MESSAGE = DataTransferMessages . getString ( "FileExport.destinationEmpty" ) ; private static final String SELECT_DESTINATION_MESSAGE = DataTransferMessages . getString ( "DataTransfer.selectDestination" ) ; protected WizardFileSystemResourceExportPage1 ( String name , IStructuredSelection selection ) { } public WizardFileSystemResourceExportPage1 ( IStructuredSelection selection ) { } protected void addDestinationItem ( String value ) { } public void createControl ( Composite parent ) { } protected void createDestinationGroup ( Composite parent ) { } protected void createOptionsGroupButtons ( Group optionsGroup ) { } protected void createDirectoryStructureOptions ( Group optionsGroup , Font font ) { } protected void createOverwriteExisting ( Group optionsGroup , Font font ) { } protected boolean ensureDirectoryExists ( File directory ) { } protected boolean ensureTargetIsValid ( File targetDirectory ) { } protected boolean executeExportOperation ( FileSystemExportOperation op ) { } public boolean finish ( ) { } protected String getDestinationLabel ( ) { <START_BUG> return DataTransferMessages . getString ( "DataTransfer.directory" ) ; <END_BUG> } protected String getDestinationValue ( ) { } protected void giveFocusToDestination ( ) { } protected void handleDestinationBrowseButtonPressed ( ) { } public void handleEvent ( Event e ) { } protected void internalSaveWidgetValues ( ) { } protected void restoreWidgetValues ( ) { } protected void setDestinationValue ( String value ) { } protected boolean validateDestinationGroup ( ) { } protected String getConflictingContainerNameFor ( String targetDirectory ) { } }

Fix:
return DataTransferMessages . getString ( "FileExport.toDirectory" ) ;
Buggy code:
public class ManifestClassPath extends Task { private String _name ; private File _dir ; private int _maxParentLevels = 2 ; private Path _path ; public void execute ( ) { if ( ( _name ) == null ) { throw new BuildException ( "Missing<seq2seq4repair_space>'property'<seq2seq4repair_space>attribute!" ) ; } if ( ( _dir ) == null ) { throw new BuildException ( "Missing<seq2seq4repair_space>'jarfile'<seq2seq4repair_space>attribute!" ) ; } if ( ( getProject ( ) . getProperty ( _name ) ) != null ) { throw new BuildException ( ( ( "Property<seq2seq4repair_space>'" + ( _name ) ) + "'<seq2seq4repair_space>already<seq2seq4repair_space>set!" ) ) ; } if ( ( _path ) == null ) { throw new BuildException ( "Missing<seq2seq4repair_space>nested<seq2seq4repair_space><classpath>!" ) ; } final FileUtils fileUtils = FileUtils . getFileUtils ( ) ; _dir = fileUtils . normalize ( _dir . getAbsolutePath ( ) ) ; File currDir = _dir ; String [ ] dirs = new String [ ( _maxParentLevels ) + 1 ] ; for ( int i = 0 ; i < ( ( _maxParentLevels ) + 1 ) ; ++ i ) { dirs [ i ] = ( currDir . getAbsolutePath ( ) ) + ( File . separatorChar ) ; currDir = currDir . getParentFile ( ) ; if ( currDir == null ) { _maxParentLevels = i + 1 ; break ; } } String [ ] elements = _path . list ( ) ; StringBuffer buffer = new StringBuffer ( ) ; StringBuffer element = new StringBuffer ( ) ; for ( int i = 0 ; i < ( elements . length ) ; ++ i ) { File pathEntry = new File ( elements [ i ] ) ; pathEntry = fileUtils . normalize ( pathEntry . getAbsolutePath ( ) ) ; String fullPath = pathEntry . getAbsolutePath ( ) ; String relPath = null ; for ( int j = 0 ; j <= ( _maxParentLevels ) ; ++ j ) { String dir = dirs [ j ] ; if ( ! ( fullPath . startsWith ( dir ) ) ) { continue ; } element . setLength ( 0 ) ; for ( int k = 0 ; k < j ; ++ k ) { element . append ( ".." ) ; element . append ( File . separatorChar ) ; } element . append ( fullPath . substring ( dir . length ( ) ) ) ; relPath = element . toString ( ) ; break ; } if ( relPath == null ) { throw new BuildException ( ( ( ( "No<seq2seq4repair_space>suitable<seq2seq4repair_space>relative<seq2seq4repair_space>path<seq2seq4repair_space>from<seq2seq4repair_space>" + ( _dir ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + fullPath ) ) ; } if ( ( File . separatorChar ) != '//' ) { relPath = relPath . replace ( File . separatorChar , '//' ) ; } if ( pathEntry . isDirectory ( ) ) { relPath = relPath + '//' ; } try { <START_BUG> relPath = Locator . encodeUri ( relPath ) ; <END_BUG> } catch ( UnsupportedEncodingException exc ) { throw new BuildException ( exc ) ; } buffer . append ( relPath ) ; buffer . append ( '<seq2seq4repair_space>' ) ; } if ( ( buffer . length ( ) ) > 0 ) { buffer . setLength ( ( ( buffer . length ( ) ) - 1 ) ) ; } getProject ( ) . setNewProperty ( _name , buffer . toString ( ) ) ; } public void setProperty ( String name ) { } public void setJarFile ( File jarfile ) { } public void setMaxParentLevels ( int levels ) { } public void addClassPath ( Path path ) { } }

Fix:
relPath = Locator . encodeURI ( relPath ) ;
Buggy code:
public class Tomcat extends Logger . Helper { private static StringManager sm = StringManager . getManager ( "org.apache.tomcat.resources" ) ; Tomcat ( ) { } void setHelper ( XmlMapper xh ) { } void setConnectorHelper ( XmlMapper xh ) { xh . addRule ( "ContextManager//Connector" , xh . objectCreate ( null , "className" ) ) ; xh . addRule ( "ContextManager//Connector" , xh . setParent ( "setServer" , "java.lang.Object" ) ) ; <START_BUG> xh . addRule ( "ContextManager//Connector" , xh . addChild ( "addServerConnector" , "org.apache.tomcat.core.ServerConnector" ) ) ; <END_BUG> xh . addRule ( "ContextManager//Connector//Parameter" , xh . methodSetter ( "setProperty" , 2 ) ) ; xh . addRule ( "ContextManager//Connector//Parameter" , xh . methodParam ( 0 , "name" ) ) ; xh . addRule ( "ContextManager//Connector//Parameter" , xh . methodParam ( 1 , "value" ) ) ; xh . addRule ( "ContextManager//Connector1" , xh . objectCreate ( null , "className" ) ) ; xh . addRule ( "ContextManager//Connector1" , xh . setParent ( "setContextManager" , "org.apache.tomcat.core.ContextManager" ) ) ; xh . addRule ( "ContextManager//Connector1" , xh . addChild ( "addContextInterceptor" , "org.apache.tomcat.core.ContextInterceptor" ) ) ; xh . addRule ( "ContextManager//Connector1//Parameter" , xh . methodSetter ( "setProperty" , 2 ) ) ; xh . addRule ( "ContextManager//Connector1//Parameter" , xh . methodParam ( 0 , "name" ) ) ; xh . addRule ( "ContextManager//Connector1//Parameter" , xh . methodParam ( 1 , "value" ) ) ; } void setLogHelper ( XmlMapper xh ) { } File getConfigFile ( ContextManager cm ) { } public void execute ( String [ ] args ) throws Exception { } public static void generateServerConfig ( ContextManager cm ) throws TomcatException { } public static void main ( String [ ] args ) { } void stopTomcat ( ) throws TomcatException { } String configFile = null ; static final String DEFAULT_CONFIG = "conf//server.xml" ; boolean doStop = false ; public static void printUsage ( ) { } public boolean processArgs ( String [ ] args ) { } }

Fix:
xh . addRule ( "ContextManager//Connector" , xh . addChild ( "addServerConnector" , "org.apache.tomcat.core.ContextInterceptor" ) ) ;
Buggy code:
public class TermsFilter extends Filter { private final Set < Term > terms = new TreeSet < Term > ( ) ; public void addTerm ( Term term ) { } @ Override public DocIdSet getDocIdSet ( AtomicReaderContext context , Bits acceptDocs ) throws IOException { AtomicReader reader = context . reader ( ) ; FixedBitSet result = new FixedBitSet ( reader . maxDoc ( ) ) ; Fields fields = reader . fields ( ) ; if ( fields == null ) { return result ; } BytesRef br = new BytesRef ( ) ; String lastField = null ; Terms termsC ; TermsEnum termsEnum = null ; DocsEnum docs = null ; for ( Term term : terms ) { if ( ! ( term . field ( ) . equals ( lastField ) ) ) { termsC = fields . terms ( term . field ( ) ) ; if ( termsC == null ) { return result ; } termsEnum = termsC . iterator ( null ) ; lastField = term . field ( ) ; } if ( ( terms ) != null ) { br . copyBytes ( term . bytes ( ) ) ; assert termsEnum != null ; if ( ( termsEnum . seekCeil ( br ) ) == ( SeekStatus . FOUND ) ) { <START_BUG> docs = termsEnum . docs ( acceptDocs , docs , false ) ; <END_BUG> while ( ( docs . nextDoc ( ) ) != ( DocIdSetIterator . NO_MORE_DOCS ) ) { result . set ( docs . docID ( ) ) ; } } } } return result ; } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } }

Fix:
docs = termsEnum . docs ( acceptDocs , docs , 0 ) ;
Buggy code:
public interface PhotoApi < S , P extends AbstractPhoto > { default List < P > createPhotos ( Stream < S > sources , PhotoFactory < S , P > photoFactory ) { List < P > photos = sources . map ( ( s ) -> photoFactory . createPhoto ( s ) ) . collect ( Collectors . toList ( ) ) ; photos . forEach ( ( photo ) -> { CompletableFuture . supplyAsync ( metaDataSupplier ( photo ) ) . thenAccept ( ( m ) -> photo . setMetaData ( m ) ) ; CompletableFuture . supplyAsync ( thumbnailsSupplier ( photo ) ) . thenAccept ( ( thumbnails ) -> thumbnails . forEach ( ( t ) -> photo . addThumbnail ( t ) ) ) ; } ) ; return photos ; } <START_BUG> Supplier < PhotoMetaData > metaDataSupplier ( P photo ) { <END_BUG> } Supplier < List < ImageIcon > > thumbnailsSupplier ( P photo ) { } }

Fix:
Supplier < ? extends PhotoMetaData > metaDataSupplier ( P photo ) {
Buggy code:
public class NameSelector < T extends StrolchElement > implements Selector < T > { private StringMatchMode matchMode ; private String name ; public NameSelector ( String name , StringMatchMode matchMode ) { } @ Override public boolean select ( T element ) { String name = element . getName ( ) ; <START_BUG> return this . matchMode . matches ( this . name , name ) ; <END_BUG> } public StringMatchMode getMatchMode ( ) { } }

Fix:
return this . matchMode . matches ( name , this . name ) ;
Buggy code:
public class InlineGraphBuilderTest extends ShiroBaseTest { private static ParseTree buildParseTree ( String expr ) { } private Library lib ; @ Before public void setup ( ) { } @ Test public void firstPass ( ) { } @ Test public void secondPass ( ) { String code = "node<seq2seq4repair_space>Box<seq2seq4repair_space>begin\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( "<seq2seq4repair_space>input<seq2seq4repair_space>length<seq2seq4repair_space>Double\n" + "<seq2seq4repair_space>input<seq2seq4repair_space>width<seq2seq4repair_space>Double\n" ) + "<seq2seq4repair_space>input<seq2seq4repair_space>height<seq2seq4repair_space>Double\n" ) + "<seq2seq4repair_space>eval<seq2seq4repair_space>update<seq2seq4repair_space>Multiply(length,<seq2seq4repair_space>width)\n" ) + "<seq2seq4repair_space>output<seq2seq4repair_space>area<seq2seq4repair_space>Double(update)\n" ) + "<seq2seq4repair_space>output<seq2seq4repair_space>name<seq2seq4repair_space>String(\"Box\")\n" ) + "end\n" ) + "\n" ) + "length<seq2seq4repair_space>Double(100)\n" ) + "\n" ) + "Box<seq2seq4repair_space>-><seq2seq4repair_space>b\n" ) + "b.length(length)\n" ) + "b.width(20.0)\n" ) + "b.height(7.0)\n" ) ; ParseTree tree = InlineGraphBuilderTest . buildParseTree ( code ) ; ParseTreeWalker walker = new ParseTreeWalker ( ) ; DefinitionCollector definitionCollector = new DefinitionCollector ( ) ; walker . walk ( definitionCollector , tree ) ; lib . addGraphDefs ( definitionCollector . getGraphs ( ) ) ; lib . addNodeDefs ( definitionCollector . getNodeDefinitions ( ) ) ; InlineGraphBuilder inline = new InlineGraphBuilder ( lib ) ; walker . walk ( inline , tree ) ; inline . setPass ( SECOND_PASS ) ; walker . walk ( inline , tree ) ; SGraph graph = lib . getDefaultGraph ( ) ; SNode node = graph . getNode ( "b" ) ; Assert . assertNotNull ( node ) ; Assert . assertNotNull ( lib . getNodeDefs ( ) . get ( "Box" ) ) ; Assert . assertEquals ( 1 , lib . getNodeDefs ( ) . size ( ) ) ; Assert . assertEquals ( 1 , graph . getNodes ( ) . size ( ) ) ; <START_BUG> Assert . assertEquals ( 12 , graph . getPorts ( ) . size ( ) ) ; <END_BUG> } @ Test public void inLineExpression ( ) throws IOException { } }

Fix:
Assert . assertEquals ( 14 , graph . getPorts ( ) . size ( ) ) ;
Buggy code:
public class EjbInjectionSource extends InjectionSource { private final String beanName ; private final String typeName ; private final String bindingName ; private final DeploymentUnit deploymentUnit ; private volatile String error = null ; private volatile ServiceName resolvedViewName ; private volatile RemoteViewManagedReferenceFactory remoteFactory ; private volatile boolean resolved = false ; public EjbInjectionSource ( final String beanName , final String typeName , final String bindingName , final DeploymentUnit deploymentUnit ) { } public EjbInjectionSource ( final String typeName , final String bindingName , final DeploymentUnit deploymentUnit ) { } public void getResourceValue ( final ResolutionContext resolutionContext , final ServiceBuilder < ? > serviceBuilder , final DeploymentPhaseContext phaseContext , final Injector < ManagedReferenceFactory > injector ) throws DeploymentUnitProcessingException { } private void resolve ( ) { } private Set < ViewDescription > getViews ( ) { final EEApplicationDescription applicationDescription = deploymentUnit . getAttachment ( EE_APPLICATION_DESCRIPTION ) ; final ResourceRoot deploymentRoot = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) ; final Set < ViewDescription > componentsForViewName ; if ( ( beanName ) != null ) { componentsForViewName = applicationDescription . getComponents ( beanName , typeName , deploymentRoot . getRoot ( ) ) ; } else { <START_BUG> componentsForViewName = applicationDescription . getComponentsForViewName ( typeName ) ; <END_BUG> } return componentsForViewName ; } public boolean equals ( Object o ) { } public int hashCode ( ) { } private static boolean eq ( Object a , Object b ) { } }

Fix:
componentsForViewName = applicationDescription . getComponentsForViewName ( typeName , deploymentRoot . getRoot ( ) ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class PratilipiMain extends ClaymusMain { private static final Logger logger = Logger . getLogger ( PratilipiMain . class . getName ( ) ) ; @ Override protected Page getPage ( HttpServletRequest request ) { } @ Override protected List < PageContent > getPageContentList ( HttpServletRequest request ) { } @ Override protected List < WebsiteWidget > getWebsiteWidgetList ( HttpServletRequest request ) { } private HtmlContent generateHtmlContentFromFile ( String fileName ) { } private HtmlWidget generateHtmlWidgetFromFile ( String fileName ) throws UnexpectedServerException { } private HtmlWidget generateHeaderWidget ( HttpServletRequest request ) { } private PageContent generateHomePageContent ( HttpServletRequest request ) { List < Long > bookIdList = new LinkedList < > ( ) ; bookIdList . add ( 5206507264147456L ) ; bookIdList . add ( 4843865324388352L ) ; bookIdList . add ( 5716279616864256L ) ; bookIdList . add ( 4920152667717632L ) ; bookIdList . add ( 5345197126844416L ) ; bookIdList . add ( 4685596450619392L ) ; List < Long > storyIdList = new LinkedList < > ( ) ; storyIdList . add ( 5641478634209280L ) ; storyIdList . add ( 4919719815544832L ) ; storyIdList . add ( 5630387149602816L ) ; storyIdList . add ( 5192595495976960L ) ; storyIdList . add ( 5658023921975296L ) ; storyIdList . add ( 5921446345834496L ) ; List < Long > poemIdList = new LinkedList < > ( ) ; poemIdList . add ( 5710246563545088L ) ; poemIdList . add ( 5767896298946560L ) ; poemIdList . add ( 6227279692693504L ) ; poemIdList . add ( 5185244089024512L ) ; poemIdList . add ( 5728306397708288L ) ; <START_BUG> poemIdList . add ( 5657184826294272L ) ; <END_BUG> HomeContent homeContent = HomeContentFactory . newHomeContent ( ) ; homeContent . setBookIdList ( bookIdList ) ; homeContent . setPoemIdList ( poemIdList ) ; homeContent . setStoryIdList ( storyIdList ) ; homeContent . setLastUpdated ( new Date ( 131 ) ) ; return homeContent ; } }

Fix:
poemIdList . add ( 6203856820109312L ) ;