nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Locker { public Locker ( Config config ) throws Exception { } public File [ ] fetch ( String [ ] scanIds ) { } public ManifestType save ( File [ ] scans ) throws Exception { ManifestType manifest = new ManifestType ( ) ; manifest . setRoot ( LOCKER ) ; Path locker = new File ( LOCKER ) . toPath ( ) ; File target = null ; String scanId = null ; for ( int i = 0 ; i < ( scans . length ) ; i ++ ) { scanId = getScanId ( scans [ i ] ) ; target = locker . resolve ( scans [ i ] . getName ( ) ) . toFile ( ) ; if ( ! ( target . exists ( ) ) ) { Files . move ( scans [ i ] . toPath ( ) , target . toPath ( ) ) ; generateThumbnail ( target ) ; EntryType image = new EntryType ( ) ; image . setId ( ( scanId + ".jpg" ) ) ; manifest . addImage ( image ) ; EntryType thumbnail = new EntryType ( ) ; thumbnail . setId ( ( ( "thumb-" + scanId ) + ".jpg" ) ) ; <START_BUG> manifest . addImage ( image ) ; <END_BUG> } } return manifest ; } private String LOCKER ; private void generateThumbnail ( File scan ) throws Exception { } private String getScanId ( File scan ) { } }

Fix:
manifest . addImage ( thumbnail ) ;
Buggy code:
public class JmxManagementInterface implements ManagementInterface { private final JMXConnector jmxConnector ; private final String domain ; protected JmxManagementInterface ( JMXConnector jmxConnector , String domain ) { } public void close ( ) { } @ Override public ModelNode execute ( ModelNode operation ) { } private ModelNode doExecute ( ObjectName objectName , ModelNode op ) { } private ModelNode getAttribute ( ObjectName objectName , String name ) { } private ModelNode setAttribute ( ObjectName objectName , String name , Object value ) { } private ModelNode invoke ( ObjectName objectName , String name ) { } private ModelNode getInfo ( ObjectName objectName ) { } private ModelNode [ ] modelNodeAttributesInfo ( MBeanAttributeInfo [ ] attributeInfos , ObjectName objectName ) throws IOException , JMException { MBeanServerConnection connection = getConnection ( ) ; ModelNode attributes = new ModelNode ( ) ; ModelNode filtered = new ModelNode ( ) . setEmptyList ( ) ; ModelNode headers = null ; for ( MBeanAttributeInfo attribute : attributeInfos ) { String attributeName = attribute . getName ( ) ; try { Object attributeValue = connection . getAttribute ( objectName , attributeName ) ; try { attributes . get ( JmxInterfaceStringUtils . toDashCase ( attributeName ) ) . set ( JmxManagementInterface . modelNode ( attributeValue ) ) ; } catch ( UnsupportedOperationException e ) { } } catch ( Exception e ) { String message = e . getMessage ( ) ; if ( ( message . contains ( "WFLYCTL0216" ) ) || ( message . contains ( "WFLYCTL0030" ) ) ) { throw e ; } else <START_BUG> if ( ( message . contains ( "WFLYCTL0313" ) ) || ( message . contains ( "11362" ) ) ) { <END_BUG> filtered . add ( JmxInterfaceStringUtils . toDashCase ( attributeName ) ) ; } else { throw new RuntimeException ( e ) ; } } } if ( ! ( filtered . asList ( ) . isEmpty ( ) ) ) { headers = new ModelNode ( ) ; headers . get ( ACCESS_CONTROL , "filtered-attributes" ) . set ( filtered ) ; } return new ModelNode [ ] { attributes , headers } ; } private ModelNode modelNodeResult ( Object result , Exception exception ) { } private ModelNode modelNodeResult ( Object result , Exception exception , ModelNode headers ) { } private static ModelNode modelNode ( Object obj ) { } private static Object object ( ModelNode node ) { } private ObjectName objectName ( ModelNode operation ) throws MalformedObjectNameException { } public MBeanServerConnection getConnection ( ) { } public static JmxManagementInterface create ( JMXServiceURL url , String username , String password , String domain ) { } }

Fix:
if ( ( message . contains ( "WFLYCTL0313" ) ) || ( message . contains ( "WFLYJMX0039" ) ) ) {
Buggy code:
public abstract class Continuus extends AbstractTask { private static final String CCM_EXE = "ccm" ; public static final String COMMAND_CREATE_TASK = "create_task" ; public static final String COMMAND_CHECKOUT = "co" ; public static final String COMMAND_CHECKIN = "ci" ; public static final String COMMAND_RECONFIGURE = "reconfigure" ; public static final String COMMAND_DEFAULT_TASK = "default_task" ; private String m_ccmDir = "" ; private String m_ccmAction = "" ; public final void setCcmDir ( final File dir ) { } public void setCcmAction ( final String ccmAction ) { } public String getCcmAction ( ) { } protected final String getCcmCommand ( ) { } protected int run ( final Commandline cmd , final ExecOutputHandler handler ) throws TaskException { try { final Execute2 exe = new Execute2 ( ) ; setupLogger ( exe ) ; if ( null != handler ) { exe . setExecOutputHandler ( handler ) ; } exe . setWorkingDirectory ( getBaseDirectory ( ) ) ; <START_BUG> exe . setCommandline ( cmd . getCommandline ( ) ) ; <END_BUG> return exe . execute ( ) ; } catch ( final IOException ioe ) { throw new TaskException ( "Error" , ioe ) ; } } }

Fix:
exe . setCommandline ( cmd ) ;
Buggy code:
public class TablePanel extends TabSpawnable implements ActionListener , ItemListener , DocumentListener , ListSelectionListener , TabModelTarget { protected static Category cat = Category . getInstance ( TablePanel . class ) ; protected Object _target ; protected JLabel _contextLabel = new JLabel ( "Table<seq2seq4repair_space>view<seq2seq4repair_space>of:<seq2seq4repair_space>XXX" ) ; protected JLabel _sizeLabel = new JLabel ( "<seq2seq4repair_space>[Rows:<seq2seq4repair_space>000]" ) ; protected Vector _tableModels = new Vector ( ) ; protected JComboBox _persCombo = null ; protected JLabel _persLabel = new JLabel ( "Table:" ) ; protected JButton _config = new JButton ( "Config" ) ; protected JComboBox _filterCombo = new JComboBox ( ) ; protected JLabel _filterLabel = new JLabel ( "Filter:" ) ; protected JSortedTable _table = new JSortedTable ( ) ; protected JPanel _mainTablePane = new JPanel ( ) ; protected JPanel _north = new JPanel ( ) ; protected JPanel _content = new JPanel ( ) ; protected TableModelComposite _tableModel = null ; protected JScrollPane _sp1 ; public TablePanel ( String title ) { } protected void setEditors ( JTable t ) { } public void initTableModels ( ) { } public void setTarget ( Object t ) { } public void updateContext ( ) { } public Object getTarget ( ) { } public void refresh ( ) { } public boolean shouldBeEnabled ( Object target ) { } public void setFilter ( ) { } public void setTablePerspective ( ) { } public void insertUpdate ( DocumentEvent e ) { } public void removeUpdate ( DocumentEvent e ) { } public void changedUpdate ( DocumentEvent e ) { } public void itemStateChanged ( ItemEvent e ) { } public void valueChanged ( ListSelectionEvent lse ) { } public void objectSelected ( Object sel ) { <START_BUG> ProjectBrowser pb = ProjectBrowser . TheInstance ; <END_BUG> pb . setTarget ( sel ) ; } public void actionPerformed ( ActionEvent ae ) { } }

Fix:
ProjectBrowser pb = ProjectBrowser . getInstance ( ) ;
Buggy code:
public class HarnessSelectionTest extends TestCase { private static final String SELECT = "testdata//incremental//harness//selectionTest.xml" ; private static final String INCREMENTAL = "testdata//incremental//harness//suite.xml" ; private static Hashtable SPECS = new Hashtable ( ) ; private static Spec getSpec ( String suiteFile ) { } private boolean verbose ; public HarnessSelectionTest ( String name ) { } public void testIncrementalSuite ( ) { if ( ! ( eclipseAvailable ( ) ) ) { System . err . println ( "skipping<seq2seq4repair_space>test<seq2seq4repair_space>-<seq2seq4repair_space>eclipse<seq2seq4repair_space>classes<seq2seq4repair_space>not<seq2seq4repair_space>available" ) ; return ; } String [ ] options = new String [ ] { "!verbose" , "!eclipse" } ; <START_BUG> HarnessSelectionTest . Exp exp = new HarnessSelectionTest . Exp ( 8 , 8 , 0 , 8 , 0 , 0 , 0 ) ; <END_BUG> checkSelection ( HarnessSelectionTest . INCREMENTAL , options , "INFIX<seq2seq4repair_space>IGNORED" , exp ) ; } public void testKeywordSelectionBoth ( ) { } public void testKeywordSelectionRequire ( ) { } public void testKeywordSelectionSkip ( ) { } public void testNoOptions ( ) { } public void testEclipseOptionsSkip ( ) { } public void testAjcEclipseConflict ( ) { } public void testEclipseConflict ( ) { } public void testSinglePR ( ) { } public void testTwoPR ( ) { } private RunResult runSuite ( String suiteFile , String [ ] options , MessageHandler setupHolder ) { } class Exp { public final int tests ; public final int testsRun ; public final int skipped ; public final int passed ; public final int failed ; public final int incomplete ; public final int infix ; Exp ( int tests , int testsRun , int skipped , int passed , int failed , int incomplete , int infix ) { } } public void checkSelection ( String suiteFile , String [ ] options , String infoInfix , HarnessSelectionTest . Exp exp ) { } private boolean ajcAvailable ( ) { } private boolean eclipseAvailable ( ) { } }

Fix:
HarnessSelectionTest . Exp exp = new HarnessSelectionTest . Exp ( 7 , 7 , 0 , 7 , 0 , 0 , 0 ) ;
Buggy code:
public class ScopePeer extends org . tigris . scarab . om . BaseScopePeer { public static List getAllScopes ( ) throws Exception { <START_BUG> return doSelect ( new Criteria ( ) ) ; <END_BUG> } }

Fix:
return doSelect ( new Criteria ( 0 ) ) ;
Buggy code:
public class JarTest extends BuildFileTest { private static final FileUtils FILE_UTILS = FileUtils . getFileUtils ( ) ; private static String tempJar = "tmp.jar" ; private static String tempDir = "jartmp//" ; private Reader r1 ; private Reader r2 ; public JarTest ( String name ) { } public void setUp ( ) { } public void tearDown ( ) { } public void test1 ( ) { } public void test2 ( ) { } public void test3 ( ) { } public void test4 ( ) { } public void testNoRecreateWithoutUpdate ( ) { } public void testNoRecreateWithUpdate ( ) { } private void testNoRecreate ( String secondTarget ) { } public void testRecreateWithoutUpdateAdditionalFiles ( ) { } public void testRecreateWithUpdateAdditionalFiles ( ) { } public void testRecreateWithoutUpdateNewerFile ( ) { } public void testRecreateWithUpdateNewerFile ( ) { } private void testRecreate ( String firstTarget , String secondTarget ) { } public void testManifestStaysIntact ( ) throws IOException , ManifestException { } public void testNoRecreateBasedirExcludesWithUpdate ( ) { } public void testNoRecreateBasedirExcludesWithoutUpdate ( ) { } public void testNoRecreateZipfilesetExcludesWithUpdate ( ) { } public void testNoRecreateZipfilesetExcludesWithoutUpdate ( ) { } public void testRecreateZipfilesetWithoutUpdateAdditionalFiles ( ) { } public void testRecreateZipfilesetWithUpdateAdditionalFiles ( ) { } public void testRecreateZipfilesetWithoutUpdateNewerFile ( ) { } public void testRecreateZipfilesetWithUpdateNewerFile ( ) { } public void testCreateWithEmptyFileset ( ) { } public void testUpdateIfOnlyManifestHasChanged ( ) { } public void testNoDuplicateIndex ( ) throws IOException { } public void testRootFilesInIndex ( ) throws IOException { } public void testManifestOnlyJar ( ) { <START_BUG> executeTarget ( "testManifestOnlyJar" ) ; <END_BUG> File manifestFile = getProject ( ) . resolveFile ( ( ( ( ( JarTest . tempDir ) + "META-INF" ) + ( File . separator ) ) + "MANIFEST.MF" ) ) ; assertTrue ( manifestFile . exists ( ) ) ; } }

Fix:
expectLogContaining ( "testManifestOnlyJar" , "Building<seq2seq4repair_space>MANIFEST-only<seq2seq4repair_space>jar:<seq2seq4repair_space>" ) ;
Buggy code:
public class ExpandItem extends Item { ExpandBar parent ; Control control ; boolean expanded ; int x ; int y ; int width ; int height ; int imageHeight ; int imageWidth ; static final int TEXT_INSET = 6 ; static final int BORDER = 1 ; static final int CHEVRON_SIZE = 24 ; public ExpandItem ( ExpandBar parent , int style ) { } public ExpandItem ( ExpandBar parent , int style , int index ) { } static ExpandBar checkNull ( ExpandBar control ) { } public void dispose ( ) { } void drawChevron ( GC gc , int x , int y ) { } void drawItem ( GC gc , boolean drawFocus ) { } public Control getControl ( ) { } public boolean getExpanded ( ) { } public int getHeaderHeight ( ) { } public int getHeight ( ) { } public ExpandBar getParent ( ) { } int getPreferredWidth ( GC gc ) { } void redraw ( ) { } void setBounds ( int x , int y , int width , int height , boolean move , boolean size ) { } public void setControl ( Control control ) { } public void setExpanded ( boolean expanded ) { checkWidget ( ) ; this . expanded = expanded ; <START_BUG> parent . showItem ( parent . indexOf ( this ) ) ; <END_BUG> } public void setImage ( Image image ) { } public void setHeight ( int height ) { } public void setText ( String string ) { } }

Fix:
parent . showItem ( this ) ;
Buggy code:
public class FileHandleImpl implements FileHandle { private final Log log = LogFactory . getLog ( getClass ( ) ) ; private StringBuffer buffer = new StringBuffer ( ) ; private File targetFile = null ; private Outlet outlet = null ; public FileHandleImpl ( final Outlet outlet , final File f ) { } public Outlet getOutlet ( ) { } public CharSequence getBuffer ( ) { } public void setBuffer ( final CharSequence buffer ) { } public File getTargetFile ( ) { } public boolean isAppend ( ) { } public boolean isOverwrite ( ) { } public String getFileEncoding ( ) { } public void writeAndClose ( ) { try { if ( ( ! ( isOverwrite ( ) ) ) && ( targetFile . exists ( ) ) ) { <START_BUG> log . debug ( ( ( "Skipping<seq2seq4repair_space>file<seq2seq4repair_space>:<seq2seq4repair_space>" + ( targetFile . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>cause<seq2seq4repair_space>it<seq2seq4repair_space>exists<seq2seq4repair_space>allready" ) ) ; <END_BUG> return ; } log . debug ( ( "Opening<seq2seq4repair_space>file<seq2seq4repair_space>:<seq2seq4repair_space>" + ( targetFile . getAbsolutePath ( ) ) ) ) ; final File parentDir = targetFile . getParentFile ( ) ; if ( ! ( parentDir . exists ( ) ) ) { parentDir . mkdirs ( ) ; if ( ! ( parentDir . isDirectory ( ) ) ) throw new RuntimeException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>parent<seq2seq4repair_space>directories<seq2seq4repair_space>of<seq2seq4repair_space>file<seq2seq4repair_space>" + ( targetFile . getAbsolutePath ( ) ) ) ) ; } outlet . beforeWriteAndClose ( this ) ; if ( outlet . shouldWrite ( this ) ) { FileOutputStream out = null ; try { out = new FileOutputStream ( targetFile , isAppend ( ) ) ; out . write ( getBytes ( ) ) ; } finally { if ( out != null ) { try { out . close ( ) ; outlet . afterClose ( this ) ; } catch ( final IOException e ) { throw new RuntimeException ( e ) ; } } } } } catch ( final IOException e ) { throw new RuntimeException ( e ) ; } } public byte [ ] getBytes ( ) { } }

Fix:
log . debug ( ( ( "Skipping<seq2seq4repair_space>file<seq2seq4repair_space>:<seq2seq4repair_space>" + ( targetFile . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>cause<seq2seq4repair_space>it<seq2seq4repair_space>exists<seq2seq4repair_space>already" ) ) ;
Buggy code:
public class GaussNewtonEstimator extends AbstractEstimator implements Serializable { public GaussNewtonEstimator ( int maxCostEval , double convergence , double steadyStateThreshold ) { } public void estimate ( EstimationProblem problem ) throws EstimationException { initializeEstimate ( problem ) ; double [ ] grad = new double [ parameters . length ] ; RealVectorImpl bDecrement = new RealVectorImpl ( parameters . length ) ; double [ ] bDecrementData = bDecrement . getDataRef ( ) ; RealMatrixImpl wGradGradT = new RealMatrixImpl ( parameters . length , parameters . length ) ; double [ ] [ ] wggData = wGradGradT . getDataRef ( ) ; double previous = Double . POSITIVE_INFINITY ; do { incrementJacobianEvaluationsCounter ( ) ; RealVector b = new RealVectorImpl ( parameters . length ) ; RealMatrix a = new RealMatrixImpl ( parameters . length , parameters . length ) ; for ( int i = 0 ; i < ( measurements . length ) ; ++ i ) { if ( ! ( measurements [ i ] . isIgnored ( ) ) ) { double weight = measurements [ i ] . getWeight ( ) ; double residual = measurements [ i ] . getResidual ( ) ; for ( int j = 0 ; j < ( parameters . length ) ; ++ j ) { grad [ j ] = measurements [ i ] . getPartial ( parameters [ j ] ) ; bDecrementData [ j ] = ( weight * residual ) * ( grad [ j ] ) ; } for ( int k = 0 ; k < ( parameters . length ) ; ++ k ) { double [ ] wggRow = wggData [ k ] ; double gk = grad [ k ] ; for ( int l = 0 ; l < ( parameters . length ) ; ++ l ) { wggRow [ l ] = ( weight * gk ) * ( grad [ l ] ) ; } } a = a . add ( wGradGradT ) ; b = b . add ( bDecrement ) ; } } try { RealVector dX = new org . apache . commons . math . linear . LUDecompositionImpl ( a ) . solve ( b ) ; for ( int i = 0 ; i < ( parameters . length ) ; ++ i ) { parameters [ i ] . setEstimate ( ( ( parameters [ i ] . getEstimate ( ) ) + ( dX . getEntry ( i ) ) ) ) ; } } catch ( InvalidMatrixException e ) { <START_BUG> throw new EstimationException ( "unable<seq2seq4repair_space>to<seq2seq4repair_space>solve:<seq2seq4repair_space>singular<seq2seq4repair_space>problem" , new Object [ 0 ] ) ; <END_BUG> } previous = cost ; updateResidualsAndCost ( ) ; } while ( ( ( getCostEvaluations ( ) ) < 2 ) || ( ( ( Math . abs ( ( previous - ( cost ) ) ) ) > ( ( cost ) * ( steadyStateThreshold ) ) ) && ( ( Math . abs ( cost ) ) > ( convergence ) ) ) ) ; } private double steadyStateThreshold ; private double convergence ; private static final long serialVersionUID = 5485001826076289109L ; }

Fix:
throw new EstimationException ( "unable<seq2seq4repair_space>to<seq2seq4repair_space>solve:<seq2seq4repair_space>singular<seq2seq4repair_space>problem" , null ) ;
Buggy code:
public class Netty4Client extends AbstractClient { private static final Logger logger = LoggerFactory . getLogger ( Netty4Client . class ) ; private Bootstrap bootstrap ; private Channel channel ; public Netty4Client ( URL url , ChannelHandler handler ) throws RemotingException { } @ Override protected void doOpen ( ) throws Throwable { EventLoopGroup bossGroup = new io . netty . channel . nio . NioEventLoopGroup ( Constants . DEFAULT_IO_THREADS , new NamedThreadFactory ( "NettyClientBoss" , true ) ) ; final Netty4Handler nettyHandler = new Netty4Handler ( getUrl ( ) , this ) ; bootstrap = new Bootstrap ( ) ; <START_BUG> bootstrap . group ( bossGroup ) . channel ( NioSocketChannel . class ) . option ( SO_KEEPALIVE , true ) . option ( SO_TIMEOUT , getTimeout ( ) ) . option ( TCP_NODELAY , true ) . handler ( new io . netty . channel . ChannelInitializer < NioSocketChannel > ( ) { <END_BUG> @ Override protected void initChannel ( NioSocketChannel ch ) throws Exception { Netty4CodecAdapter adapter = new Netty4CodecAdapter ( getCodec ( ) , getUrl ( ) , Netty4Client . this ) ; ch . pipeline ( ) . addLast ( "decoder" , adapter . getDecoder ( ) ) . addLast ( "encoder" , adapter . getEncoder ( ) ) . addLast ( "handler" , nettyHandler ) ; } } ) ; } @ Override protected void doClose ( ) throws Throwable { } @ Override protected void doConnect ( ) throws Throwable { } @ Override protected void doDisConnect ( ) throws Throwable { } @ Override protected Channel getChannel ( ) { } }

Fix:
bootstrap . group ( bossGroup ) . channel ( NioSocketChannel . class ) . option ( SO_KEEPALIVE , true ) . option ( CONNECT_TIMEOUT_MILLIS , getTimeout ( ) ) . option ( TCP_NODELAY , true ) . handler ( new io . netty . channel . ChannelInitializer < NioSocketChannel > ( ) {
Buggy code:
public abstract class AbstractPageableView extends RefreshingView implements IPageable { private int itemsPerPage = Integer . MAX_VALUE ; private int currentPage ; private int cachedItemCount ; public AbstractPageableView ( String id , IModel model ) { } public AbstractPageableView ( String id ) { } protected Iterator getItemModels ( ) { } protected void onDetach ( ) { } protected abstract Iterator getItemModels ( int offset , int size ) { } private void clearCachedItemCount ( ) { } private void setCachedItemCount ( int itemCount ) { } private int getCachedItemCount ( ) { } private boolean isItemCountCached ( ) { } protected final int internalGetRowsPerPage ( ) { } protected final void internalSetRowsPerPage ( int items ) { if ( items < 1 ) { <START_BUG> throw new IllegalArgumentException ( "Argument<seq2seq4repair_space>[itemsPerPage]<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>less<seq2seq4repair_space>then<seq2seq4repair_space>1" ) ; <END_BUG> } if ( ( itemsPerPage ) != items ) { if ( isVersioned ( ) ) { addStateChange ( new Change ( ) { private static final long serialVersionUID = 1L ; final int old = itemsPerPage ; public void undo ( ) { itemsPerPage = old ; } public String toString ( ) { return ( ( ( "ItemsPerPageChange[component:<seq2seq4repair_space>" + ( getPath ( ) ) ) + ",<seq2seq4repair_space>itemsPerPage:<seq2seq4repair_space>" ) + ( old ) ) + "]" ; } } ) ; } } itemsPerPage = items ; setCurrentPage ( 0 ) ; } protected abstract int internalGetItemCount ( ) { } public final int getRowCount ( ) { } public final int getCurrentPage ( ) { } public final void setCurrentPage ( int page ) { } public final int getPageCount ( ) { } protected int getViewOffset ( ) { } protected int getViewSize ( ) { } private static class CappedIteratorAdapter implements Iterator { private int max ; private int index ; private Iterator delegate ; public CappedIteratorAdapter ( Iterator delegate , int max ) { } public void remove ( ) { } public boolean hasNext ( ) { } public Object next ( ) { } } }

Fix:
throw new IllegalArgumentException ( "Argument<seq2seq4repair_space>[itemsPerPage]<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>less<seq2seq4repair_space>than<seq2seq4repair_space>1" ) ;
Buggy code:
public class ServiceError { private HandlerManager eventBus ; private static VmcheckerConstants constants = GWT . create ( VmcheckerConstants . class ) ; private String URL ; public ServiceError ( HandlerManager eventBus , String URL ) { } public void serverError ( int statusCode , String statusMessage , String text ) { } public void parseError ( String text ) { ErrorResponseDecoder decoder = new ErrorResponseDecoder ( ) ; decoder . parse ( text ) ; if ( ! ( decoder . errorsEncountered ( ) ) ) { ErrorResponse serviceError = decoder . getResult ( ) ; if ( serviceError . isAuthError ( ) ) { eventBus . fireEvent ( new ro . pub . cs . vmchecker . client . event . AuthenticationEvent ( EventType . ERROR ) ) ; } else { eventBus . fireEvent ( new ro . pub . cs . vmchecker . client . event . ErrorDisplayEvent ( ( ( ( ServiceError . constants . serviceError ( ) ) + "<seq2seq4repair_space>" ) + ( serviceError . message ) ) , serviceError . trace ) ) ; } } else { GWT . log ( "[parseError()]" , null ) ; <START_BUG> eventBus . fireEvent ( new ro . pub . cs . vmchecker . client . event . ErrorDisplayEvent ( ( ( ( ServiceError . constants . serviceError ( ) ) + "<seq2seq4repair_space>" ) + ( ServiceError . constants . unknownFormat ( ) ) ) , ( ( ( ( ( ( ( "<b>" + ( ServiceError . constants . serviceErrorUrl ( ) ) ) + "<//b>:<seq2seq4repair_space>" ) + ( URL ) ) + "<br//>" ) + "<b>" ) + ( ServiceError . constants . serviceErrorContent ( ) ) ) + "<//b>:<br//>" ) ) ) ; <END_BUG> } } }

Fix:
eventBus . fireEvent ( new ro . pub . cs . vmchecker . client . event . ErrorDisplayEvent ( ( ( ( ServiceError . constants . serviceError ( ) ) + "<seq2seq4repair_space>" ) + ( ServiceError . constants . unknownFormat ( ) ) ) , ( ( ( ( ( ( ( ( "<b>" + ( ServiceError . constants . serviceErrorUrl ( ) ) ) + "<//b>:<seq2seq4repair_space>" ) + ( URL ) ) + "<br//>" ) + "<b>" ) + ( ServiceError . constants . serviceErrorContent ( ) ) ) + "<//b>:<br//>" ) + text ) ) ) ;
Buggy code:
public class DatePicker extends AbstractBehavior implements IHeaderContributor { private static final class UnableToDetermineFormatException extends WicketRuntimeException { private static final long serialVersionUID = 1L ; public UnableToDetermineFormatException ( ) { } } public static final DateFormat FORMAT_DATE = new SimpleDateFormat ( "MM//dd//yyyy" ) ; public static final DateFormat FORMAT_PAGEDATE = new SimpleDateFormat ( "MM//yyyy" ) ; private static final long serialVersionUID = 1L ; private Component component ; public DatePicker ( ) { } public void bind ( Component component ) { } public void onRendered ( Component component ) { super . onRendered ( component ) ; Response response = component . getResponse ( ) ; response . write ( "\n<span<seq2seq4repair_space>class=\"yui-skin-sam\">&nbsp;<span<seq2seq4repair_space>style=\"" ) ; if ( renderOnLoad ( ) ) { response . write ( "display:block;" ) ; } else { response . write ( "display:none;" ) ; response . write ( "position:absolute;" ) ; } response . write ( "z-index:<seq2seq4repair_space>99999;\"<seq2seq4repair_space>id=\"" ) ; response . write ( getEscapedComponentMarkupId ( ) ) ; response . write ( "Dp\"><//span><img<seq2seq4repair_space>style=\"" ) ; response . write ( getIconStyle ( ) ) ; response . write ( "\"<seq2seq4repair_space>id=\"" ) ; response . write ( getIconId ( ) ) ; response . write ( "\"<seq2seq4repair_space>src=\"" ) ; CharSequence iconUrl = getIconUrl ( ) ; response . write ( Strings . escapeMarkup ( ( iconUrl != null ? iconUrl . toString ( ) : "" ) ) ) ; <START_BUG> response . write ( "\"<seq2seq4repair_space>//>" ) ; <END_BUG> if ( renderOnLoad ( ) ) { response . write ( "<br<seq2seq4repair_space>style=\"clear:left;\"//>" ) ; } response . write ( "<//span>" ) ; } public void renderHead ( IHeaderResponse response ) { } private final void checkComponentProvidesDateFormat ( Component component ) { } private void setWidgetProperty ( Map widgetProperties , String key , String [ ] array ) { } protected boolean alignWithIcon ( ) { } protected void appendToInit ( String markupId , String javascriptId , String javascriptWidgetId , StringBuffer b ) { } protected void configure ( Map widgetProperties ) { } protected final void configureWidgetProperties ( Map widgetProperties ) { } protected final String [ ] filterEmpty ( String [ ] array ) { } protected final String getComponentMarkupId ( ) { } protected String getDatePattern ( ) { } protected final String getEscapedComponentMarkupId ( ) { } protected final String getIconId ( ) { } protected String getIconStyle ( ) { } protected CharSequence getIconUrl ( ) { } protected Locale getLocale ( ) { } protected void localize ( Map widgetProperties ) { } protected boolean notifyComponentOnDateSelected ( ) { } protected final String [ ] substring ( String [ ] array , int len ) { } protected boolean enableMonthYearSelection ( ) { } protected boolean hideOnSelect ( ) { } protected boolean renderOnLoad ( ) { } protected String getAdditionalJavascript ( ) { } public boolean isEnabled ( Component component ) { } }

Fix:
response . write ( "\"<seq2seq4repair_space>alt=\"\"//>" ) ;
Buggy code:
public class TestHighFreqTerms extends LuceneTestCase { private static IndexWriter writer = null ; private static Directory dir = null ; private static IndexReader reader = null ; @ BeforeClass public static void setUpClass ( ) throws Exception { } @ AfterClass public static void tearDownClass ( ) throws Exception { } public void testFirstTermHighestDocFreqAllFields ( ) throws Exception { } public void testFirstTermHighestDocFreq ( ) throws Exception { } public void testOrderedByDocFreqDescending ( ) throws Exception { } public void testNumTerms ( ) throws Exception { } public void testGetHighFreqTerms ( ) throws Exception { } public void testFirstTermHighestTotalTermFreq ( ) throws Exception { } public void testFirstTermHighestTotalTermFreqDifferentField ( ) throws Exception { } public void testOrderedByTermFreqDescending ( ) throws Exception { } public void testGetTermFreqOrdered ( ) throws Exception { } private static void indexDocs ( IndexWriter writer ) throws Exception { Random rnd = random ( ) ; for ( int i = 1 ; i <= 10 ; i ++ ) { Document doc = new Document ( ) ; String content = TestHighFreqTerms . getContent ( i ) ; doc . add ( newTextField ( rnd , "FIELD_1" , content , YES ) ) ; doc . add ( newTextField ( rnd , "different_field" , "diff" , YES ) ) ; writer . addDocument ( doc ) ; } for ( int i = 1 ; i <= 10 ; i ++ ) { Document doc = new Document ( ) ; doc . add ( newTextField ( rnd , "different_field" , "diff" , YES ) ) ; writer . addDocument ( doc ) ; } int highTF = 200 ; Document doc = new Document ( ) ; String content = "" ; for ( int i = 0 ; i < highTF ; i ++ ) { content += "highTF<seq2seq4repair_space>" ; } doc . add ( newTextField ( rnd , "FIELD_1" , content , YES ) ) ; writer . addDocument ( doc ) ; int medium_df = 5 ; for ( int i = 0 ; i < medium_df ; i ++ ) { int tf = 25 ; Document newdoc = new Document ( ) ; String newcontent = "" ; for ( int j = 0 ; j < tf ; j ++ ) { newcontent += "highTFmedDF<seq2seq4repair_space>" ; } newdoc . add ( newTextField ( rnd , "FIELD_1" , newcontent , YES ) ) ; writer . addDocument ( newdoc ) ; } int targetTF = 150 ; doc = new Document ( ) ; content = "" ; for ( int i = 0 ; i < targetTF ; i ++ ) { content += "TF150<seq2seq4repair_space>" ; } doc . add ( newTextField ( rnd , "different_field" , content , YES ) ) ; writer . addDocument ( doc ) ; <START_BUG> writer . close ( ) ; <END_BUG> } private static String getContent ( int i ) { } private static int getExpectedtotalTermFreq ( int i ) { } private static int getExpecteddocFreq ( int i ) { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class CircularProgressView extends View { private Paint mStrokeCirclePaint ; private Paint mProgressStrokePaint ; private int mStrokeColor ; private int mProgressStrokeColor ; private float mStrokeWidth ; private float mProgressStrokeWidth ; private RectF mArcOval ; private float mStrokeStartAngle ; private float mStrokeSweepAngle ; private float mProgressStrokeStartAngle ; private float mProgressStrokeSweepAngle ; private int mMaxProgress = 100 ; private int mCurrentProgress ; private enum Direction { CLOCKWISE , ANTI_CLOCKWISE ; } private CircularProgressView . Direction mDirection ; public CircularProgressView ( Context context ) { } public CircularProgressView ( Context context , AttributeSet attrs ) { } public CircularProgressView ( Context context , AttributeSet attrs , int defStyleAttr ) { } @ TargetApi ( VERSION_CODES . LOLLIPOP ) public CircularProgressView ( Context context , AttributeSet attrs , int defStyleAttr , int defStyleRes ) { } private void init ( ) { } private void loadAttributes ( AttributeSet attrs ) { } private void calculateAngles ( ) { } @ Override protected void onSizeChanged ( int w , int h , int oldw , int oldh ) { } @ Override protected void onMeasure ( int widthMeasureSpec , int heightMeasureSpec ) { } @ Override protected void onDraw ( Canvas canvas ) { } public void setMaxProgress ( int maxProgress ) { <START_BUG> this . mMaxProgress = mMaxProgress ; <END_BUG> } public void setProgress ( int progress ) { } }

Fix:
this . mMaxProgress = maxProgress ;
Buggy code:
public class Main { private static Logger logger = LoggerFactory . getLogger ( Main . class ) ; public static void main ( String [ ] args ) { } private static void startApplication ( ) throws ClassNotFoundException , IllegalAccessException , InstantiationException , InterruptedException , URISyntaxException { } private static void checkForOldSubstanceJar ( ) { } private static void architectureCheck ( ) { try { if ( ! ( JavaVersionChecker . VERSION_OK ) ) { StringBuilder builder = new StringBuilder ( ) ; builder . append ( "Cannot<seq2seq4repair_space>run<seq2seq4repair_space>Entrainer.<seq2seq4repair_space>Minimum<seq2seq4repair_space>version<seq2seq4repair_space>required<seq2seq4repair_space>is<seq2seq4repair_space>" ) ; builder . append ( MIN_VERSION ) ; builder . append ( ".\nYou<seq2seq4repair_space>are<seq2seq4repair_space>running<seq2seq4repair_space>version<seq2seq4repair_space>" ) ; builder . append ( CURRENT ) ; builder . append ( ".\nPlease<seq2seq4repair_space>visit<seq2seq4repair_space>http:////java.oracle.com<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>latest<seq2seq4repair_space>Java<seq2seq4repair_space>Runtime<seq2seq4repair_space>Environment" ) ; <START_BUG> GuiUtil . handleProblem ( new RuntimeException ( builder . toString ( ) ) ) ; <END_BUG> System . exit ( ( - 1 ) ) ; } } catch ( Throwable e ) { Main . logger . error ( ( "Cannot<seq2seq4repair_space>evaluate<seq2seq4repair_space>java<seq2seq4repair_space>version<seq2seq4repair_space>" + ( System . getProperty ( "java.version" ) ) ) , e ) ; } } private static void showGui ( final EntrainerFXSplash splash ) { } private static void errorOnStartup ( Throwable e ) { } }

Fix:
GuiUtil . handleProblem ( new RuntimeException ( builder . toString ( ) ) , true ) ;
Buggy code:
class JSFSubsystemAdd extends AbstractBoottimeAddStepHandler { static final JSFSubsystemAdd INSTANCE = new JSFSubsystemAdd ( ) ; @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performBoottime ( OperationContext context , ModelNode operation , final ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) { context . addStep ( new AbstractDeploymentChainStep ( ) { protected void execute ( DeploymentProcessorTarget processorTarget ) { processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_JSF_VERSION , new org . jboss . as . jsf . deployment . JSFVersionProcessor ( model ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_JSF_SHARED_TLDS , new JSFSharedTldsProcessor ( ) ) ; <START_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_JSF_MANAGED_BEANS , new JSFManagedBeanProcessor ( ) ) ; <END_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , DEPENDENCIES , DEPENDENCIES_JSF , new JSFDependencyProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_JSF_MANAGED_BEANS , new JSFManagedBeanProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_JSF_ANNOTATIONS , new JSFAnnotationProcessor ( ) ) ; } } , RUNTIME ) ; } @ Override protected boolean requiresRuntimeVerification ( ) { } }

Fix:
processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , POST_MODULE_JSF_MANAGED_BEANS , new JSFManagedBeanProcessor ( ) ) ;
Buggy code:
public class DoomsdayEffect { public final Doomsday dday ; public final EntityPlayer player ; public int timeBetweenUpdates ; public final boolean isInstant ; public final boolean isCommandActivated ; public final PropertyDoom doom ; public boolean isActive ; public boolean crucMoment ; public int iterations ; public int inheritedCooldown ; public final Random rand ; public List utilityList ; public Entity utilityEntity ; public boolean utilityFlag ; public int utilityInt ; public int sneakTicks ; public DoomsdayEffect ( int id , PropertyDoom doom ) { } public DoomsdayEffect ( int id , PropertyDoom doom , boolean commandActive ) { } public DoomsdayEffect inheritCooldown ( DoomsdayEffect ext , DoomsdayEffect ins ) { } public void onDoomsdayUpdate ( ) { <START_BUG> if ( ( this . iterations ) >= ( dday . getMaxIterations ( ) ) ) { <END_BUG> this . isActive = false ; return ; } if ( ( this . sneakTicks ) >= 10 ) this . isActive = false ; if ( ( doom . getPlayer ( ) . isSneaking ( ) ) && ( ! ( this . isInstant ) ) ) { ( this . sneakTicks ) ++ ; return ; } if ( ( this . sneakTicks ) > 0 ) this . sneakTicks = 0 ; if ( ( ( this . timeBetweenUpdates ) > 0 ) && ( ! ( this . isInstant ) ) ) { ( this . timeBetweenUpdates ) -- ; } if ( ( this . timeBetweenUpdates ) == 0 ) { if ( TragicConfig . allowCrucialMoments ) crucMoment = ( rand . nextInt ( 100 ) ) <= ( TragicConfig . crucialMomentChance ) ; try { if ( ( this . iterations ) == 0 ) dday . doInitialEffects ( this , doom , player , crucMoment ) ; if ( this . isCommandActivated ) { this . dday . useDoomsday ( this , doom , player , crucMoment ) ; ( iterations ) ++ ; this . timeBetweenUpdates = dday . getWaitTime ( ) ; } else { if ( this . dday . doesCurrentDoomMeetRequirement ( doom ) ) { this . dday . useDoomsday ( this , doom , player , crucMoment ) ; if ( this . isInstant ) this . isActive = false ; ( iterations ) ++ ; this . timeBetweenUpdates = dday . getWaitTime ( ) ; } else { this . isActive = false ; } } } catch ( Exception e ) { logger . info ( ( ( "Exception<seq2seq4repair_space>thrown<seq2seq4repair_space>while<seq2seq4repair_space>updating<seq2seq4repair_space>a<seq2seq4repair_space>DoomsdayEffect<seq2seq4repair_space>for<seq2seq4repair_space>Doomsday:<seq2seq4repair_space>" + ( this . dday ) ) + ",<seq2seq4repair_space>it<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>aborted<seq2seq4repair_space>to<seq2seq4repair_space>prevent<seq2seq4repair_space>a<seq2seq4repair_space>crash.<seq2seq4repair_space>Displaying<seq2seq4repair_space>stack<seq2seq4repair_space>trace." ) ) ; logger . catching ( e ) ; this . isActive = false ; } } } public boolean equals ( DoomsdayEffect effect ) { } }

Fix:
if ( ( ( ( this . iterations ) >= ( dday . getMaxIterations ( ) ) ) || ( ( this . player ) == null ) ) || ( ( this . player . getHealth ( ) ) <= 0.0F ) ) {
Buggy code:
public final class MarkupParserTest extends WicketTestCase { private static final Logger log = LoggerFactory . getLogger ( MarkupParserTest . class ) ; public MarkupParserTest ( String name ) { } private MarkupFragment parse ( final String namespace , final String markup ) throws IOException , ResourceStreamNotFoundException { } private MarkupFragment parse ( final String markup ) throws IOException , ResourceStreamNotFoundException { } private MarkupResourceStream newMarkupResourceStream ( final IResourceStreamFactory locator , final Class c , final String style , final Locale locale , final String extension ) { <START_BUG> IResourceStream resource = locator . locate ( c , c . getName ( ) . replace ( '.' , '//' ) , style , locale , extension ) ; <END_BUG> MarkupResourceStream res = new MarkupResourceStream ( resource , null , null ) ; return res ; } private MarkupFragment parse ( final MarkupResourceStream resource ) throws IOException , ResourceStreamNotFoundException { } public final void testTagParsing ( ) throws Exception { } public final void testTagParsingFragments ( ) throws Exception { } public final void test ( ) throws Exception { } public final void testXhtmlDocument ( ) throws Exception { } public final void testFileDocument ( ) throws IOException , ParseException , ResourceStreamNotFoundException { } public final void testWicketTag ( ) throws IOException , ParseException , ResourceStreamNotFoundException { } public final void testDefaultWicketTag ( ) throws IOException , ParseException , ResourceStreamNotFoundException { } public final void testScript ( ) throws IOException , ParseException , ResourceStreamNotFoundException { } public final void testCDATA ( ) throws IOException , ParseException , ResourceStreamNotFoundException { } public final void testBalancing ( ) throws IOException , ResourceStreamNotFoundException { } }

Fix:
IResourceStream resource = locator . newResourceStream ( c , c . getName ( ) . replace ( '.' , '//' ) , style , locale , extension ) ;
Buggy code:
public class BecomeWorkingCopyOperation extends JavaModelOperation { IProblemRequestor problemRequestor ; public BecomeWorkingCopyOperation ( CompilationUnit workingCopy , IProblemRequestor problemRequestor ) { } protected void executeOperation ( ) throws JavaModelException { CompilationUnit workingCopy = getWorkingCopy ( ) ; JavaModelManager . getJavaModelManager ( ) . getPerWorkingCopyInfo ( workingCopy , true , true , this . problemRequestor ) ; workingCopy . openWhenClosed ( workingCopy . createElementInfo ( ) , this . progressMonitor ) ; if ( ! ( workingCopy . isPrimary ( ) ) ) { JavaElementDelta delta = new JavaElementDelta ( getJavaModel ( ) ) ; delta . added ( workingCopy ) ; addDelta ( delta ) ; } else { if ( workingCopy . getResource ( ) . isAccessible ( ) ) { JavaElementDelta delta = new JavaElementDelta ( getJavaModel ( ) ) ; delta . changed ( workingCopy , IJavaElementDelta . F_PRIMARY_WORKING_COPY ) ; addDelta ( delta ) ; } else { <START_BUG> JavaElementDelta delta = new JavaElementDelta ( this . getJavaModel ( ) ) ; <END_BUG> delta . added ( workingCopy , IJavaElementDelta . F_PRIMARY_WORKING_COPY ) ; addDelta ( delta ) ; } } this . resultElements = new IJavaElement [ ] { workingCopy } ; } protected CompilationUnit getWorkingCopy ( ) { } public boolean isReadOnly ( ) { } }

Fix:
JavaElementDelta delta = new JavaElementDelta ( getJavaModel ( ) ) ;
Buggy code:
public enum Command { ADD ( "add" , "-a" ) , DELETE ( "delete" , "-d" ) , UPDATE ( "update" , "-u" ) , SEARCH ( "search" , "-s" ) , FROM ( "//from" , "-f" ) , TO ( "//to" , "-t" ) , ON ( "//on" , "-o" ) , BY ( "//by" , "-b" ) , CATEGORY ( "////" , "////" ) , PRIORITY_HIGH ( "//high" , "//***" ) , PRIORITY_MEDIUM ( "//medium" , "//**" ) , PRIORITY_LOW ( "//low" , "//*" ) , RECURRING_WEEKLY ( "//weekly" , "-w" ) , RECURRING_MONTHLY ( "//monthly" , "-m" ) , RECURRING_YEARLY ( "//yearly" , "-y" ) , RECURRING_UNTIL ( "//until" , "-u" ) ; private final String _COMMAND_BASIC ; private final String _COMMAND_ADVANCED ; private Command ( String commandBasic , String commandAdvanced ) { } public String getBasicCommand ( ) { } public String getAdvancedCommand ( ) { } public static Command verifyCrudCommands ( String commandLine ) { } public static Command verifyPriorityCommands ( String commandLine ) { } public boolean hasCommand ( String commandLine ) { } public static Command verifyRecurringCommands ( String commandLine ) { } public boolean hasValidRecurringCommand ( String commandLine ) { } public static boolean hasRecurringCommands ( String commandLine ) { } public static boolean hasCategoryCommand ( String commandLine ) { } public boolean hasActionCommand ( String commandLine ) { } public static boolean isValidNumOfDateCommands ( String commandLine ) { } public static String executeUserInput ( String userInput , HeaderController headerController , MainController mainController ) { } private String executeCommand ( String userInput , HeaderController headerController , MainController mainController ) { } private static String executeAdd ( String userInput ) { } private static String executeDelete ( String userInput ) { } private static String executeRetrieveOriginalText ( String userInput , HeaderController headerController ) { } private static String executeUpdate ( String userInput , HeaderController headerController ) { } private static String executeSearch ( String userInput ) { String systemMsg = null ; Pair < ArrayList < Task > , String > searchResultsPair = list . searchTheList ( userInput ) ; Main . searchResults = searchResultsPair . getKey ( ) ; systemMsg = searchResultsPair . getValue ( ) ; if ( ( searchResults . isEmpty ( ) ) && ( systemMsg == null ) ) { systemMsg = Constant . MSG_NO_RESULTS ; } else if ( systemMsg != null ) { systemMsg = Constant . MSG_SEARCH_INVALID ; } else { <START_BUG> systemMsg = MSG_SEARCH_SUCCESS . replace ( DELIMETER_SEARCH , String . valueOf ( searchResults . size ( ) ) ) ; <END_BUG> } return systemMsg ; } }

Fix:
systemMsg = MSG_SEARCH_SUCCESS . replace ( DELIMETER_REPLACE , String . valueOf ( searchResults . size ( ) ) ) ;
Buggy code:
public class Jspc { Hashtable attributes = new Hashtable ( ) ; String [ ] args ; String installDir ; ClassLoader parentL ; public Jspc ( ) { } public void setArgs ( String [ ] args ) { } public void setInstall ( String s ) { } static Jdk11Compat jdk11Compat = Jdk11Compat . getJdkCompat ( ) ; public void execute ( ) throws Exception { if ( ( args ) != null ) processArgs ( args ) ; Vector v = new Vector ( ) ; <START_BUG> String commonDir = ( ( ( ( installDir ) + ( File . separator ) ) + "lib" ) + ( File . separator ) ) + "container" ; <END_BUG> IntrospectionUtils . addToClassPath ( v , commonDir ) ; IntrospectionUtils . addToolsJar ( v ) ; String containerDir = ( ( ( ( installDir ) + ( File . separator ) ) + "lib" ) + ( File . separator ) ) + "container" ; IntrospectionUtils . addToClassPath ( v , containerDir ) ; String appsDir = ( ( ( ( installDir ) + ( File . separator ) ) + "lib" ) + ( File . separator ) ) + "apps" ; IntrospectionUtils . addToClassPath ( v , appsDir ) ; URL [ ] commonCP = IntrospectionUtils . getClassPath ( v ) ; ClassLoader commonCL = Jspc . jdk11Compat . newClassLoaderInstance ( commonCP , parentL ) ; Class jspcClass = commonCL . loadClass ( "org.apache.jasper.JspC" ) ; IntrospectionUtils . callMain ( jspcClass , args ) ; } public boolean processArgs ( String [ ] args ) { } public void setProperty ( String s , Object v ) { } public void setAttribute ( String s , Object o ) { } public static void main ( String [ ] args ) { } private static int dL = 10 ; private void debug ( String s ) { } }

Fix:
String commonDir = ( ( ( ( installDir ) + ( File . separator ) ) + "lib" ) + ( File . separator ) ) + "common" ;
Buggy code:
public final class RDFSpeedIT extends AbstractSpeedIT { private static final Logger log = LoggerFactory . getLogger ( RDFSpeedIT . class ) ; private static final int NUM_INPUT = 1000 ; @ Test public void testRDFSpeedRegression ( ) throws Exception { } @ Test public void testRDFSpeedClassification ( ) throws Exception { } private static void checkProbability ( int majorityCount , int count , BinomialDistribution dist ) { double expected = 0.9 * count ; <START_BUG> double probAsExtreme = ( majorityCount <= expected ) ? dist . cumulativeProbability ( majorityCount ) : 1.0 - ( dist . cumulativeProbability ( majorityCount ) ) ; <END_BUG> assertTrue ( ( ( ( ( ( majorityCount + "<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>about<seq2seq4repair_space>" ) + expected ) + "<seq2seq4repair_space>(~90%<seq2seq4repair_space>of<seq2seq4repair_space>" ) + count ) + ")" ) , ( probAsExtreme >= 0.001 ) ) ; } }

Fix:
double probAsExtreme = ( majorityCount <= expected ) ? dist . cumulativeProbability ( majorityCount ) : ( 1.0 - ( dist . cumulativeProbability ( majorityCount ) ) ) + ( dist . probability ( majorityCount ) ) ;
Buggy code:
public class ExecURL extends GenericSharedObject { public static Trace debug = Trace . create ( "urlsharedobject" ) ; ID receiver ; String url ; public ExecURL ( ID rcvr , String url ) { } public ExecURL ( ) { } public void init ( ISharedObjectConfig config ) throws SharedObjectInitException { } public ExecURL ( String url ) { } protected void debug ( String msg ) { } protected void debug ( Throwable t , String msg ) { } protected String getURL ( ) { } protected SharedObjectDescription getReplicaDescription ( ID remoteMember ) { } protected void replicate ( ID remoteMember ) { } public void activated ( ID [ ] others ) { debug ( "activated()" ) ; try { <START_BUG> if ( ! ( getContext ( ) . isGroupServer ( ) ) ) { <END_BUG> GetExec . showURL ( url , true ) ; } else { debug ( "Not<seq2seq4repair_space>executing<seq2seq4repair_space>commands<seq2seq4repair_space>because<seq2seq4repair_space>is<seq2seq4repair_space>server" ) ; } } catch ( Exception e ) { debug ( e , "Exception<seq2seq4repair_space>on<seq2seq4repair_space>startup()" ) ; } super . activated ( others ) ; destroySelfLocal ( ) ; } }

Fix:
if ( ! ( getContext ( ) . isGroupManager ( ) ) ) {