nus-yam/ex-repair huggingface dataset:
Buggy code:
public class LGGTest { private static final String baseIRI = "http:////test.org//" ; private static QueryTreeFactory treeFactory ; private static Model model ; private static AbstractReasonerComponent reasoner ; private static LGGGenerator lggGenSimple ; private static LGGGenerator lggGenRDFS ; @ BeforeClass public static void init ( ) throws ComponentInitException { } @ Test public void testPropertyEntailment ( ) { } @ Test public void testClassEntailment ( ) { } @ Test public void testPerformance ( ) { } public void correctness ( ) { LGGTest . treeFactory . setMaxDepth ( 2 ) ; <START_BUG> LGGTest . treeFactory . addDropFilters ( ( ( Filter < Statement > [ ] ) ( new org . dllearner . algorithms . qtl . experiments . DBpediaEvaluationDataset ( org . dllearner . kb . sparql . SparqlEndpoint . getEndpointDBpedia ( ) ) . getQueryTreeFilters ( ) . toArray ( new Filter [ ] { } ) ) ) ) ; <END_BUG> Model model = ModelFactory . createDefaultModel ( ) ; RDFDataMgr . read ( model , this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "org//dllearner//algorithms//qtl//dbpedia-Battle_Arena_Toshinden_3.ttl" ) , TURTLE ) ; RDFResourceTree tree1 = LGGTest . treeFactory . getQueryTree ( "http:////dbpedia.org//resource//Battle_Arena_Toshinden_3" , model ) ; model = ModelFactory . createDefaultModel ( ) ; RDFDataMgr . read ( model , this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "org//dllearner//algorithms//qtl//dbpedia-Metal_Gear_Solid_2:_Sons_of_Liberty.ttl" ) , TURTLE ) ; RDFResourceTree tree2 = LGGTest . treeFactory . getQueryTree ( "http:////dbpedia.org//resource//Metal_Gear_Solid_2:_Sons_of_Liberty" , model ) ; long start = System . currentTimeMillis ( ) ; RDFResourceTree lggSimple = LGGTest . lggGenSimple . getLGG ( tree1 , tree2 ) ; long end = System . currentTimeMillis ( ) ; System . out . println ( ( ( "Operation<seq2seq4repair_space>took<seq2seq4repair_space>" + ( end - start ) ) + "ms" ) ) ; System . out . println ( lggSimple . getStringRepresentation ( ) ) ; } }

Fix:
LGGTest . treeFactory . addDropFilters ( ( ( Filter < Statement > [ ] ) ( new org . dllearner . algorithms . qtl . experiments . DBpediaEvaluationDataset ( new java . io . File ( "//tmp//lggtest" ) , org . dllearner . kb . sparql . SparqlEndpoint . getEndpointDBpedia ( ) ) . getQueryTreeFilters ( ) . toArray ( new Filter [ ] { } ) ) ) ) ;
Buggy code:
public enum StandardHeaderStyle implements HeaderStyle { JavaDoc ( "//**" , "<seq2seq4repair_space>*<seq2seq4repair_space>" , "" , "<seq2seq4repair_space>*//" , null , "(\\s|\\t)*//\\*.*$" , ".*\\*//(\\s|\\t)*$" , false , true , false ) , SlashStar ( "//*" , "<seq2seq4repair_space>*<seq2seq4repair_space>" , "" , "<seq2seq4repair_space>*//" , null , "(\\s|\\t)*//\\*.*$" , ".*\\*//(\\s|\\t)*$" , false , true , false ) , Sharp ( "###" , "#<seq2seq4repair_space>" , "" , "###" , "^#!.*$" , "#.*$" , "#.*$" , false , false , false ) , XML ( "<!--" , "<seq2seq4repair_space>" , "" , "-->" , "^<\\?xml.*>$" , "(\\s|\\t)*<!--.*$" , ".*-->(\\s|\\t)*$" , true , true , false ) , Semicolon ( ";" , ";<seq2seq4repair_space>" , "" , ";" , null , ";.*$" , ";.*$" , false , false , false ) , SlashDouble ( "////" , "////<seq2seq4repair_space>" , "" , "////" , null , "////.*$" , "////.*$" , false , false , false ) , SlashTriple ( "//////" , "//////<seq2seq4repair_space>" , "" , "//////" , null , "//////.*$" , "//////.*$" , false , false , false ) , Batch ( "@REM" , "@REM<seq2seq4repair_space>" , "" , "@REM" , null , "@REM.*$" , "@REM.*$" , false , false , false ) , Unknown ( "" , "" , "" , "" , null , null , null , false , false , false ) ; private final String firstLine ; private final String beforeEachLine ; private final String afterEachLine ; private final String endLine ; private final Pattern skipLinePattern ; private final Pattern firstLineDetectionPattern ; private final Pattern endLineDetectionPattern ; private final boolean allowBlankLines ; private final boolean isMultiline ; private final boolean padLines ; private StandardHeaderStyle ( String firstLine , String beforeEachLine , String afterEachLine , String endLine , String skipLinePattern , String firstLineDetectionPattern , String endLineDetectionPattern , boolean allowBlankLines , boolean isMultiline , boolean padLines ) { } private Pattern compile ( String regexp ) { } @ Override public boolean isSkipLine ( String line ) { } @ Override public boolean isFirstHeaderLine ( String line ) { } @ Override public boolean isEndHeaderLine ( String line ) { } @ Override public List < String > decorate ( List < String > text ) { List < String > header = new ArrayList ( ) ; header . add ( firstLine ) ; for ( String line : text ) { String concat = beforeEachLine . concat ( line ) . concat ( afterEachLine ) ; <START_BUG> while ( Character . isWhitespace ( concat . charAt ( ( ( concat . length ( ) ) - 1 ) ) ) ) { <END_BUG> concat = concat . substring ( 0 , ( ( concat . length ( ) ) - 1 ) ) ; } header . add ( concat ) ; } header . add ( endLine ) ; return header ; } }

Fix:
while ( ( ! ( concat . isEmpty ( ) ) ) && ( Character . isWhitespace ( concat . charAt ( ( ( concat . length ( ) ) - 1 ) ) ) ) ) {
Buggy code:
public class HttpManagementRemoveHandler extends AbstractRemoveStepHandler { private final LocalHostControllerInfoImpl hostControllerInfo ; private final HostControllerEnvironment environment ; public HttpManagementRemoveHandler ( final LocalHostControllerInfoImpl hostControllerInfo , final HostControllerEnvironment environment ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void recoverServices ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { HttpManagementAddHandler . populateHostControllerInfo ( hostControllerInfo , context , model ) ; <START_BUG> HttpManagementAddHandler . installHttpManagementServices ( context . getServiceTarget ( ) , hostControllerInfo , environment , null ) ; <END_BUG> } static void clearHostControllerInfo ( LocalHostControllerInfoImpl hostControllerInfo ) { } static void removeHttpManagementService ( final OperationContext context ) { } }

Fix:
HttpManagementAddHandler . installHttpManagementServices ( context . getRunningMode ( ) , context . getServiceTarget ( ) , hostControllerInfo , environment , null ) ;
Buggy code:
public final class StatisticalSummaryValuesTest extends TestCase { public StatisticalSummaryValuesTest ( String name ) { } public void setUp ( ) { } public static Test suite ( ) { } public void testSerialization ( ) { } public void testEqualsAndHashCode ( ) { StatisticalSummaryValues u = new StatisticalSummaryValues ( 1 , 2 , 3 , 4 , 5 , 6 ) ; StatisticalSummaryValues t = null ; assertTrue ( "reflexive" , u . equals ( u ) ) ; assertFalse ( "non-null<seq2seq4repair_space>compared<seq2seq4repair_space>to<seq2seq4repair_space>null" , u . equals ( t ) ) ; <START_BUG> assertFalse ( "wrong<seq2seq4repair_space>type" , u . equals ( new Double ( 0 ) ) ) ; <END_BUG> t = new StatisticalSummaryValues ( 1 , 2 , 3 , 4 , 5 , 6 ) ; assertTrue ( "instances<seq2seq4repair_space>with<seq2seq4repair_space>same<seq2seq4repair_space>data<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>equal" , t . equals ( u ) ) ; assertEquals ( "hash<seq2seq4repair_space>code" , u . hashCode ( ) , t . hashCode ( ) ) ; u = new StatisticalSummaryValues ( Double . NaN , 2 , 3 , 4 , 5 , 6 ) ; t = new StatisticalSummaryValues ( 1 , Double . NaN , 3 , 4 , 5 , 6 ) ; assertFalse ( "instances<seq2seq4repair_space>based<seq2seq4repair_space>on<seq2seq4repair_space>different<seq2seq4repair_space>data<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>different" , ( ( u . equals ( t ) ) || ( t . equals ( u ) ) ) ) ; } private void verifyEquality ( StatisticalSummaryValues s , StatisticalSummaryValues u ) { } }

Fix:
assertFalse ( "wrong<seq2seq4repair_space>type" , u . equals ( Double . valueOf ( 0 ) ) ) ;
Buggy code:
public class DefaultExceptionResponseStrategy implements IExceptionResponseStrategy { public DefaultExceptionResponseStrategy ( ) { } public final void respond ( RequestCycle requestCycle , RuntimeException e ) { final Session session = requestCycle . getSession ( ) ; final Application application = session . getApplication ( ) ; final IExceptionSettings settings = application . getExceptionSettings ( ) ; final Page responsePage = requestCycle . getResponsePage ( ) ; Page override = onRuntimeException ( responsePage , e ) ; if ( override != null ) { requestCycle . setResponsePage ( override ) ; requestCycle . setRedirect ( true ) ; } else if ( ( settings . getUnexpectedExceptionDisplay ( ) ) != ( Settings . SHOW_NO_EXCEPTION_PAGE ) ) { <START_BUG> Class internalErrorPageClass = application . getRequiredPageSettings ( ) . getInternalErrorPage ( ) ; <END_BUG> Class responseClass = ( responsePage != null ) ? responsePage . getClass ( ) : null ; if ( ( responseClass != internalErrorPageClass ) && ( ( settings . getUnexpectedExceptionDisplay ( ) ) == ( Settings . SHOW_INTERNAL_ERROR_PAGE ) ) ) { final IPageFactory pageFactory ; IRequestTarget requestTarget = requestCycle . getRequestTarget ( ) ; if ( requestTarget instanceof IPageRequestTarget ) { pageFactory = session . getPageFactory ( ( ( IPageRequestTarget ) ( requestTarget ) ) . getPage ( ) ) ; } else { pageFactory = session . getPageFactory ( ) ; } requestCycle . setResponsePage ( pageFactory . newPage ( internalErrorPageClass ) ) ; } else if ( responseClass != ( ExceptionErrorPage . class ) ) { requestCycle . setResponsePage ( new ExceptionErrorPage ( e , requestCycle . getResponsePage ( ) ) ) ; } else { throw new WicketRuntimeException ( ( "Internal<seq2seq4repair_space>Error:<seq2seq4repair_space>Could<seq2seq4repair_space>not<seq2seq4repair_space>render<seq2seq4repair_space>error<seq2seq4repair_space>page<seq2seq4repair_space>" + internalErrorPageClass ) , e ) ; } requestCycle . setRedirect ( true ) ; } } protected Page onRuntimeException ( Page page , RuntimeException e ) { } }

Fix:
Class internalErrorPageClass = application . getApplicationSettings ( ) . getInternalErrorPage ( ) ;
Buggy code:
public abstract class OperationHistoryActionHandler extends Action implements IAdaptable , ActionFactory . IWorkbenchAction { private static final int MAX_LABEL_LENGTH = 32 ; private class PartListener implements IPartListener { public void partActivated ( IWorkbenchPart part ) { } public void partBroughtToTop ( IWorkbenchPart part ) { } public void partClosed ( IWorkbenchPart part ) { } public void partDeactivated ( IWorkbenchPart part ) { } public void partOpened ( IWorkbenchPart part ) { } } private class HistoryListener implements IOperationHistoryListener { public void historyNotification ( final OperationHistoryEvent event ) { } } private boolean contextActive = false ; private boolean pruning = false ; private IPartListener partListener = new OperationHistoryActionHandler . PartListener ( ) ; private IOperationHistoryListener historyListener = new OperationHistoryActionHandler . HistoryListener ( ) ; private TimeTriggeredProgressMonitorDialog progressDialog ; private IUndoContext undoContext = null ; IWorkbenchPartSite site ; OperationHistoryActionHandler ( IWorkbenchPartSite site , IUndoContext context ) { } public void dispose ( ) { } abstract void flush ( ) { } abstract String getCommandString ( ) { } abstract String getTooltipString ( ) { } abstract String getSimpleCommandString ( ) { } abstract String getSimpleTooltipString ( ) { } IOperationHistory getHistory ( ) { } abstract IUndoableOperation getOperation ( ) { } public final void run ( ) { if ( isInvalid ( ) ) { return ; } Shell parent = getWorkbenchWindow ( ) . getShell ( ) ; progressDialog = new TimeTriggeredProgressMonitorDialog ( parent , getWorkbenchWindow ( ) . getWorkbench ( ) . getProgressService ( ) . getLongOperationTime ( ) ) ; IRunnableWithProgress runnable = new IRunnableWithProgress ( ) { public void run ( IProgressMonitor pm ) throws InvocationTargetException { try { runCommand ( pm ) ; } catch ( ExecutionException e ) { if ( pruning ) { flush ( ) ; } throw new InvocationTargetException ( e ) ; } } } ; try { boolean runInBackground = false ; if ( ( getOperation ( ) ) instanceof IAdvancedUndoableOperation2 ) { runInBackground = ( ( IAdvancedUndoableOperation2 ) ( getOperation ( ) ) ) . runInBackground ( ) ; } progressDialog . run ( runInBackground , true , runnable ) ; } catch ( InvocationTargetException e ) { <START_BUG> Throwable t = e . getCause ( ) ; <END_BUG> if ( t == null ) { reportException ( e ) ; } else { reportException ( t ) ; } } catch ( InterruptedException e ) { } catch ( OperationCanceledException e ) { } finally { progressDialog = null ; } } abstract IStatus runCommand ( IProgressMonitor pm ) throws ExecutionException { } public Object getAdapter ( Class adapter ) { } private IWorkbenchWindow getWorkbenchWindow ( ) { } abstract boolean shouldBeEnabled ( ) { } public void setContext ( IUndoContext context ) { } public void setPruneHistory ( boolean prune ) { } public void update ( ) { } private String shortenText ( String message ) { } final void reportException ( Throwable t ) { } final boolean isInvalid ( ) { } final IUndoContext getUndoContext ( ) { } }

Fix:
Throwable t = e . getTargetException ( ) ;
Buggy code:
public class BytesUtil { public static final byte [ ] EMPTY_BYTE_ARRAY = new byte [ 0 ] ; public static void writeLong ( long num , byte [ ] bytes , int offset , int size ) { } public static void writeUnsigned ( int num , byte [ ] bytes , int offset , int size ) { } public static long readLong ( byte [ ] bytes , int offset , int size ) { } public static int readUnsigned ( byte [ ] bytes , int offset , int size ) { } public static void writeSigned ( int num , byte [ ] bytes , int offset , int size ) { } public static int readSigned ( byte [ ] bytes , int offset , int size ) { } public static int sizeForValue ( int maxValue ) { } public static int compareByteUnsigned ( byte b1 , byte b2 ) { } public static byte [ ] subarray ( byte [ ] bytes , int start , int end ) { } public static int compareBytes ( byte [ ] src , int srcOffset , byte [ ] dst , int dstOffset , int length ) { } public static void writeVInt ( int i , ByteBuffer out ) { } public static void writeVLong ( long i , ByteBuffer out ) { } public static long readVLong ( ByteBuffer in ) { } public static int readVInt ( ByteBuffer in ) { } private static boolean isNegativeVInt ( byte value ) { } private static int decodeVIntSize ( byte value ) { } public static void writeUnsigned ( int num , int size , ByteBuffer out ) { } public static int readUnsigned ( ByteBuffer in , int size ) { int integer = 0 ; for ( int i = 0 ; i < size ; i ++ ) { integer = integer << 8 ; <START_BUG> integer += in . get ( ) ; <END_BUG> } return integer ; } public static void writeLong ( long num , ByteBuffer out ) { } public static long readLong ( ByteBuffer in ) { } public static void writeUTFString ( String str , ByteBuffer out ) { } public static String readUTFString ( ByteBuffer in ) { } public static void writeAsciiString ( String str , ByteBuffer out ) { } public static String readAsciiString ( ByteBuffer in ) { } public static void writeAsciiStringArray ( String [ ] strs , ByteBuffer out ) { } public static String [ ] readAsciiStringArray ( ByteBuffer in ) { } public static void writeIntArray ( int [ ] array , ByteBuffer out ) { } public static int [ ] readIntArray ( ByteBuffer in ) { } public static void writeByteArray ( byte [ ] array , ByteBuffer out ) { } public static void writeByteArray ( byte [ ] array , int offset , int length , ByteBuffer out ) { } public static byte [ ] readByteArray ( ByteBuffer in ) { } public static int peekByteArrayLength ( ByteBuffer in ) { } public static void writeBooleanArray ( boolean [ ] array , ByteBuffer out ) { } public static boolean [ ] readBooleanArray ( ByteBuffer in ) { } public static byte [ ] toBytes ( Writable writable ) { } public static String toReadableText ( byte [ ] array ) { } public static byte [ ] fromReadableText ( String text ) { } public static String toHex ( byte [ ] array ) { } public static String toHex ( ImmutableBytesWritable bytes ) { } public static void main ( String [ ] args ) throws Exception { } }

Fix:
integer |= ( in . get ( ) ) & 255 ;
Buggy code:
public class RollingCalendar extends GregorianCalendar { static final Logger logger = Logger . getLogger ( RollingCalendar . class ) ; static final TimeZone GMT_TIMEZONE = TimeZone . getTimeZone ( "GMT" ) ; public static final int TOP_OF_TROUBLE = - 1 ; public static final int TOP_OF_SECOND = 0 ; public static final int TOP_OF_MINUTE = 1 ; public static final int TOP_OF_HOUR = 2 ; public static final int HALF_DAY = 3 ; public static final int TOP_OF_DAY = 4 ; public static final int TOP_OF_WEEK = 5 ; public static final int TOP_OF_MONTH = 6 ; int type = RollingCalendar . TOP_OF_TROUBLE ; public RollingCalendar ( ) { } public RollingCalendar ( TimeZone tz , Locale locale ) { } public void init ( String datePattern ) { } public void setType ( int type ) { } public long getNextCheckMillis ( Date now ) { } public int computeTriggeringPeriod ( String datePattern ) { <START_BUG> RollingCalendar rollingCalendar = new RollingCalendar ( RollingCalendar . GMT_TIMEZONE , Locale . ENGLISH ) ; <END_BUG> Date epoch = new Date ( 0 ) ; if ( datePattern != null ) { for ( int i = RollingCalendar . TOP_OF_SECOND ; i <= ( RollingCalendar . TOP_OF_MONTH ) ; i ++ ) { SimpleDateFormat simpleDateFormat = new SimpleDateFormat ( datePattern ) ; simpleDateFormat . setTimeZone ( RollingCalendar . GMT_TIMEZONE ) ; String r0 = simpleDateFormat . format ( epoch ) ; rollingCalendar . setType ( i ) ; Date next = new Date ( rollingCalendar . getNextCheckMillis ( epoch ) ) ; String r1 = simpleDateFormat . format ( next ) ; if ( ( ( r0 != null ) && ( r1 != null ) ) && ( ! ( r0 . equals ( r1 ) ) ) ) { return i ; } } } return RollingCalendar . TOP_OF_TROUBLE ; } public void printPeriodicity ( ) { } public Date getNextCheckDate ( Date now ) { } }

Fix:
RollingCalendar rollingCalendar = new RollingCalendar ( RollingCalendar . GMT_TIMEZONE , Locale . getDefault ( ) ) ;
Buggy code:
public class SLF4JBridgeHandler extends Handler { private static final String FQCN = Logger . class . getName ( ) ; private static final String UNKNOWN_LOGGER_NAME = "unknown.jul.logger" ; private static final int TRACE_LEVEL_THRESHOLD = Level . FINEST . intValue ( ) ; private static final int DEBUG_LEVEL_THRESHOLD = Level . FINE . intValue ( ) ; private static final int INFO_LEVEL_THRESHOLD = Level . INFO . intValue ( ) ; private static final int WARN_LEVEL_THRESHOLD = Level . WARNING . intValue ( ) ; public static void install ( ) { } private static Logger getRootLogger ( ) { } public static void uninstall ( ) throws SecurityException { } public static boolean isInstalled ( ) throws SecurityException { } public static void removeHandlersForRootLogger ( ) { } public SLF4JBridgeHandler ( ) { } public void close ( ) { } public void flush ( ) { } protected org . slf4j . Logger getSLF4JLogger ( LogRecord record ) { } protected void callLocationAwareLogger ( LocationAwareLogger lal , LogRecord record ) { } protected void callPlainSLF4JLogger ( org . slf4j . Logger slf4jLogger , LogRecord record ) { } private String getMessageI18N ( LogRecord record ) { String message = record . getMessage ( ) ; if ( message == null ) { return null ; } ResourceBundle bundle = record . getResourceBundle ( ) ; if ( bundle != null ) { try { message = bundle . getString ( message ) ; } catch ( MissingResourceException e ) { } } Object [ ] params = record . getParameters ( ) ; <START_BUG> if ( params != null ) { <END_BUG> message = MessageFormat . format ( message , params ) ; } return message ; } public void publish ( LogRecord record ) { } }

Fix:
if ( ( params != null ) && ( ( params . length ) > 0 ) ) {
Buggy code:
public class ReconstructionChartComposite extends Composite { private int [ ] playerID = new int [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 } ; private BigInteger [ ] shares = new BigInteger [ ] { new BigInteger ( "4" ) , new BigInteger ( "7" ) , new BigInteger ( "10" ) , new BigInteger ( "11" ) , new BigInteger ( "12" ) , new BigInteger ( "13" ) , new BigInteger ( "14" ) , new BigInteger ( "22" ) } ; private Polynomial reconstructedPolynom = new Polynomial ( new BigInteger [ ] { new BigInteger ( ( "" + 123 ) ) , new BigInteger ( ( "" + 25 ) ) } ) ; private JFreeChart chart ; private Composite body ; private StyledText stDescription ; private ChartComposite chartComposite ; private String generatedPolynom ; private int secret ; public void setSecret ( int secret ) { } public int getSecret ( ) { } public String getPolynom ( ) { } public void setPolynom ( String polynom ) { } public int [ ] getPlayerID ( ) { } public void setPlayerID ( int [ ] playerID ) { } public BigInteger [ ] getShares ( ) { } public void setShares ( BigInteger [ ] shares ) { } public void setReconstructedPolynom ( Polynomial reconstructedPolynom ) { } public void redrawChart ( ) { } public ReconstructionChartComposite ( final Composite parent , final int style , VerifiableSecretSharingView verifiableSecretSharingView ) { } private void createHead ( ) { } private void createBody ( ) { } private XYDataset createDataset ( ) { } private JFreeChart createChart ( final XYDataset dataset ) { final JFreeChart chart = ChartFactory . createXYLineChart ( "" , "" , "" , dataset , VERTICAL , true , false , false ) ; XYPlot plot = ( ( XYPlot ) ( chart . getPlot ( ) ) ) ; plot . setBackgroundPaint ( Color . lightGray ) ; plot . setDomainGridlinePaint ( Color . white ) ; plot . setDomainGridlinesVisible ( true ) ; plot . setRangeGridlinePaint ( Color . white ) ; final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer ( ) ; renderer . setSeriesLinesVisible ( 0 , false ) ; renderer . setSeriesLinesVisible ( 3 , false ) ; renderer . setSeriesShapesVisible ( 1 , false ) ; NumberAxis domain = ( ( NumberAxis ) ( plot . getDomainAxis ( ) ) ) ; <START_BUG> domain . setRange ( ( - 0.1 ) , ( ( playerID . length ) + 0.1 ) ) ; <END_BUG> domain . setTickUnit ( new NumberTickUnit ( 1 ) ) ; domain . setVerticalTickLabels ( false ) ; NumberFormat format = NumberFormat . getNumberInstance ( ) ; format . setMaximumFractionDigits ( 0 ) ; XYItemLabelGenerator generator = new StandardXYItemLabelGenerator ( StandardXYItemLabelGenerator . DEFAULT_ITEM_LABEL_FORMAT , format , format ) ; renderer . setBaseItemLabelGenerator ( generator ) ; renderer . setBaseItemLabelsVisible ( true ) ; plot . setRenderer ( renderer ) ; return chart ; } }

Fix:
domain . setRange ( ( - 0.1 ) , ( ( playerID [ ( ( playerID . length ) - 1 ) ] ) + 0.1 ) ) ;
Buggy code:
public class Controller implements IController { private IView _view ; public Controller ( ) { } public IView getView ( ) { } public void setView ( IView value ) { } @ Override public void initialize ( ) { } @ Override public void operationSelected ( ) { } @ Override public void executeOperation ( ) { } private void validateUser ( ) { } private void getProjects ( ) { } private void getSampleImage ( ) { ClientCommunicator communicator = new ClientCommunicator ( _view . getHost ( ) , Integer . parseInt ( _view . getPort ( ) ) ) ; String [ ] paramValues = getView ( ) . getParameterValues ( ) ; User user = new User ( paramValues [ 0 ] , paramValues [ 1 ] ) ; GetSampleImage_Params params = new GetSampleImage_Params ( user , Integer . parseInt ( paramValues [ 2 ] ) ) ; GetSampleImage_Result result = null ; try { result = communicator . getSampleImage ( params ) ; } catch ( ClientException e ) { e . printStackTrace ( ) ; System . out . println ( e . getMessage ( ) ) ; _view . setResponse ( "FAILED\n" ) ; return ; } if ( ( result . getImageURL ( ) ) == null ) { _view . setResponse ( "FAILED\n" ) ; } else { <START_BUG> _view . setResponse ( result . toString ( ) ) ; <END_BUG> } } private void downloadBatch ( ) { } private void getFields ( ) { } private void submitBatch ( ) { } private void search ( ) { } }

Fix:
_view . setResponse ( ( ( ( ( ( "http:////" + ( _view . getHost ( ) ) ) + ":" ) + ( _view . getPort ( ) ) ) + "//" ) + ( result . toString ( ) ) ) ) ;
Buggy code:
public class StyleAdmin extends AbstractAdmin { public StyleAdmin ( ActorRef database ) { } public static Props props ( ActorRef database ) { } @ Override protected void preStartAdmin ( ) { } private CompletableFuture < Page < Style > > handleListStyles ( ) { } private CompletableFuture < Optional < Style > > handleGetStyle ( String styleId ) { } private CompletableFuture < Response < ? > > handlePutStyle ( Style theStyle ) { String styleId = theStyle . id ( ) ; String styleName = theStyle . name ( ) ; log . debug ( ( "handle<seq2seq4repair_space>update//create<seq2seq4repair_space>style:<seq2seq4repair_space>" + styleId ) ) ; return db . transactional ( ( tx ) -> tx . query ( ) . from ( style ) . where ( style . name . eq ( styleId ) ) . singleResult ( style . name ) . thenCompose ( ( msg ) -> { if ( ! ( msg . isPresent ( ) ) ) { log . debug ( ( "Inserting<seq2seq4repair_space>new<seq2seq4repair_space>style<seq2seq4repair_space>with<seq2seq4repair_space>name:<seq2seq4repair_space>" + styleName ) ) ; <START_BUG> return tx . insert ( style ) . set ( style . identification , UUID . randomUUID ( ) . toString ( ) ) . set ( style . name , styleId ) . set ( style . version , theStyle . version ( ) ) . set ( style . format , theStyle . format ( ) ) . set ( style . definition , theStyle . definition ( ) ) . execute ( ) . thenApply ( ( l ) -> new Response < String > ( CrudOperation . CREATE , CrudResponse . OK , styleName ) ) ; <END_BUG> } else { log . debug ( ( "Updating<seq2seq4repair_space>style<seq2seq4repair_space>with<seq2seq4repair_space>name:<seq2seq4repair_space>" + styleName ) ) ; return tx . update ( style ) . set ( style . version , theStyle . version ( ) ) . set ( style . format , theStyle . format ( ) ) . set ( style . definition , theStyle . definition ( ) ) . where ( style . identification . eq ( styleId ) ) . execute ( ) . thenApply ( ( l ) -> new Response < String > ( CrudOperation . UPDATE , CrudResponse . OK , styleName ) ) ; } } ) ) ; } private CompletableFuture < Response < ? > > handleDeleteStyle ( String styleId ) { } }

Fix:
return tx . insert ( style ) . set ( style . identification , UUID . randomUUID ( ) . toString ( ) ) . set ( style . name , styleName ) . set ( style . version , theStyle . version ( ) ) . set ( style . format , theStyle . format ( ) ) . set ( style . definition , theStyle . definition ( ) ) . execute ( ) . thenApply ( ( l ) -> new Response < String > ( CrudOperation . CREATE , CrudResponse . OK , styleName ) ) ;
Buggy code:
public class EjbDependencyDeploymentUnitProcessor implements DeploymentUnitProcessor { private static final ModuleIdentifier JAVAEE_MODULE_IDENTIFIER = ModuleIdentifier . create ( "javaee.api" ) ; private static final ModuleIdentifier EJB_SUBSYSTEM = ModuleIdentifier . create ( "org.jboss.as.ejb3" ) ; private static final ModuleIdentifier EJB_CLIENT = ModuleIdentifier . create ( "org.jboss.ejb-client" ) ; private static final ModuleIdentifier EJB_IIOP_CLIENT = ModuleIdentifier . create ( "org.jboss.iiop-client" ) ; private static final ModuleIdentifier JACORB = ModuleIdentifier . create ( "org.jboss.as.jacorb" ) ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; <START_BUG> moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , EjbDependencyDeploymentUnitProcessor . EJB_CLIENT , false , false , false , false ) ) ; <END_BUG> moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , EjbDependencyDeploymentUnitProcessor . EJB_IIOP_CLIENT , false , false , false , false ) ) ; moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , EjbDependencyDeploymentUnitProcessor . EJB_SUBSYSTEM , false , false , false , false ) ) ; if ( JacORBDeploymentMarker . isJacORBDeployment ( deploymentUnit ) ) { moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , EjbDependencyDeploymentUnitProcessor . JACORB , false , false , false , false ) ) ; } if ( ( ! ( EjbDeploymentMarker . isEjbDeployment ( deploymentUnit ) ) ) && ( ! ( DeploymentTypeMarker . isType ( APPLICATION_CLIENT , deploymentUnit ) ) ) ) { return ; } if ( Boolean . getBoolean ( "org.jboss.as.ejb3.EMBEDDED" ) ) moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , ModuleIdentifier . CLASSPATH , false , false , false , false ) ) ; moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , EjbDependencyDeploymentUnitProcessor . JAVAEE_MODULE_IDENTIFIER , false , false , false , false ) ) ; } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , EjbDependencyDeploymentUnitProcessor . EJB_CLIENT , false , false , true , false ) ) ;
Buggy code:
public class IndentPrinter extends Printer { private StringBuffer _line ; private StringBuffer _text ; private int _spaces ; private int _thisIndent ; private int _nextIndent ; public IndentPrinter ( Writer writer , OutputFormat format ) { } public void enterDTD ( ) { } public String leaveDTD ( ) { } public void printText ( String text ) { } public void printText ( StringBuffer text ) { <START_BUG> _text . append ( text ) ; <END_BUG> } public void printText ( char ch ) { } public void printText ( char [ ] chars , int start , int length ) { } public void printSpace ( ) { } public void breakLine ( ) { } public void breakLine ( boolean preserveSpace ) { } public void flushLine ( boolean preserveSpace ) { } public void flush ( ) { } public void indent ( ) { } public void unindent ( ) { } public int getNextIndent ( ) { } public void setNextIndent ( int indent ) { } public void setThisIndent ( int indent ) { } }

Fix:
_text . append ( text . toString ( ) ) ;
Buggy code:
@ Service public class ActivityService extends BaseService < Activity , Long > { @ Autowired private PeopleService peopleService ; @ Autowired private CompanyService companyService ; @ Autowired private PeopleCompanyService peopleCompanyService ; @ Autowired private JobService jobService ; @ Autowired private MessageService messageService ; @ Autowired private ActivityRepository getActivityRepository ( ) { } public List < Activity > findByAccountId ( Long accountId ) { } public Activity addActivity ( Activity activity ) { } public ActivityRound addActivityRound ( long activityId , ActivityRound activityRound ) { } public Activity addActivityRound ( long activityId , ActivityForm activityForm , Account account ) { Activity activity = getActivityRepository ( ) . findOne ( activityId ) ; if ( activity != null ) { People interviewee = activity . getPeople ( ) ; People interviewer = new People ( ) ; interviewer . setAccount ( account ) ; interviewer . setMdn ( activityForm . getInterviewerMdn ( ) ) ; interviewer . setFullName ( activityForm . getInterviewerName ( ) ) ; interviewer . setEmail ( activityForm . getInterviewerEmail ( ) ) ; interviewer . setSelf ( false ) ; peopleService . saveAndFlush ( interviewer ) ; ActivityRound round = new ActivityRound ( ) ; round . setAddress ( activityForm . getAddress ( ) ) ; <START_BUG> round . setStartDate ( activityForm . getStratTime ( ) ) ; <END_BUG> round . setEndDate ( activityForm . getEndTime ( ) ) ; int maxRound = 0 ; for ( ActivityRound r : activity . getActivityRounds ( ) ) { if ( ( r . getRound ( ) ) > maxRound ) { maxRound = r . getRound ( ) ; } } round . setRound ( ( maxRound + 1 ) ) ; activity . getActivityRounds ( ) . add ( round ) ; round . setActivity ( activity ) ; ActivityPeopleConn peopleConn = new ActivityPeopleConn ( ) ; peopleConn . setActivityRound ( round ) ; peopleConn . setPeople ( interviewee ) ; peopleConn . setPeopleRole ( INTERVIEE ) ; ActivityPeopleConn interviewerConn = new ActivityPeopleConn ( ) ; interviewerConn . setActivityRound ( round ) ; interviewerConn . setPeople ( interviewer ) ; interviewerConn . setPeopleRole ( INTERVIEWER ) ; round . getPeople ( ) . add ( peopleConn ) ; round . getPeople ( ) . add ( interviewerConn ) ; activity = saveAndFlush ( activity ) ; } return activity ; } public FeedBack updateFeedBack ( long activityRoundId , FeedBackForm feedBackForm , Account loginUser ) { } }

Fix:
round . setStartDate ( activityForm . getStartTime ( ) ) ;
Buggy code:
public class DalekUtils { public static boolean debug = false ; public static String header = "var<seq2seq4repair_space>u<seq2seq4repair_space>=<seq2seq4repair_space>require('.//l.js');" + ( ( ( ( ( ( "\n" + "var<seq2seq4repair_space>multipleBackspaces<seq2seq4repair_space>=<seq2seq4repair_space>\'\'<seq2seq4repair_space>+<seq2seq4repair_space>(new<seq2seq4repair_space>Array(500).join(\'\'));" ) + "\n" ) + "module.exports<seq2seq4repair_space>=<seq2seq4repair_space>{" ) + "\n" ) + "<seq2seq4repair_space>'DalekJS<seq2seq4repair_space>E2E<seq2seq4repair_space>Test<seq2seq4repair_space>for<seq2seq4repair_space>{{}}':<seq2seq4repair_space>function<seq2seq4repair_space>(test)<seq2seq4repair_space>{" ) + "\n" ) ; public static String footer = ".done();" + ( ( ( "\n" + "<seq2seq4repair_space>}" ) + "\n" ) + "};" ) ; private String firstLine = "" ; public String getFirstLine ( ) { } public String toScript ( String v ) { } public String parse ( String seleniumString ) { StringBuffer sb = new StringBuffer ( ) ; if ( ! ( StringUtils . isEmpty ( seleniumString ) ) ) { long lineNotIgnored = 0 ; String t = null ; String t1 = null ; StringTokenizer st = new StringTokenizer ( seleniumString , "\n" , true ) ; while ( st . hasMoreElements ( ) ) { t = ( ( String ) ( st . nextElement ( ) ) ) ; if ( ( ! ( StringUtils . isEmpty ( t . trim ( ) ) ) ) && ( lineNotIgnored == 0 ) ) { <START_BUG> firstLine = t ; <END_BUG> lineNotIgnored ++ ; } if ( DalekUtils . debug ) { System . out . print ( t ) ; System . out . print ( "<seq2seq4repair_space>---><seq2seq4repair_space>" ) ; } t1 = toScript ( t ) ; if ( DalekUtils . debug ) { System . out . println ( t1 ) ; } sb . append ( t1 ) ; if ( ( ( ( t1 != null ) && ( ( t1 . trim ( ) ) != "" ) ) && ( ( t1 . trim ( ) . length ( ) ) > 1 ) ) || ( ( t1 . trim ( ) . indexOf ( "////" ) ) == 0 ) ) { sb . append ( "\n" ) ; } } } return sb . toString ( ) ; } public static void main ( String [ ] args ) { } }

Fix:
firstLine = t . trim ( ) ;
Buggy code:
public class newCERPlugin extends AbstractBotPlugin { public newCERPlugin ( ManalithBot bot ) { } public String getName ( ) { } public String getNamespace ( ) { <START_BUG> return "cer" ; <END_BUG> } public String getHelp ( ) { } public void onJoin ( String channel , String sender , String login , String hostname ) { } public void onMessage ( MessageEvent event ) { } }

Fix:
return "curex" ;
Buggy code:
public class LocalPatchRollbackHandler implements OperationStepHandler { public static final LocalPatchRollbackHandler INSTANCE = new LocalPatchRollbackHandler ( ) ; @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final String patchId = PATCH_ID . resolveModelAttribute ( context , operation ) . asString ( ) ; final boolean rollbackTo = ROLLBACK_TO . resolveModelAttribute ( context , operation ) . asBoolean ( ) ; final boolean restoreConfiguration = RESTORE_CONFIGURATION . resolveModelAttribute ( context , operation ) . asBoolean ( ) ; context . acquireControllerLock ( ) ; final PatchInfoService service = ( ( PatchInfoService ) ( context . getServiceRegistry ( false ) . getRequiredService ( NAME ) . getValue ( ) ) ) ; if ( service . requiresRestart ( ) ) { throw PatchMessages . MESSAGES . serverRequiresRestart ( ) ; } <START_BUG> final PatchInfo info = service . getPatchInfo ( ) ; <END_BUG> final DirectoryStructure structure = service . getStructure ( ) ; final PatchTool runner = Factory . create ( info , structure ) ; final ContentVerificationPolicy policy = Factory . create ( operation ) ; try { final PatchingResult result = runner . rollback ( patchId , policy , rollbackTo , restoreConfiguration ) ; service . restartRequired ( ) ; context . restartRequired ( ) ; context . completeStep ( new OperationContext . ResultHandler ( ) { @ Override public void handleResult ( OperationContext . ResultAction resultAction , OperationContext context , ModelNode operation ) { if ( resultAction == ( ResultAction . KEEP ) ) { result . commit ( ) ; } else { service . clearRestartRequired ( ) ; context . revertRestartRequired ( ) ; result . rollback ( ) ; } } } ) ; } catch ( PatchingException e ) { if ( e . hasConflicts ( ) ) { final ModelNode failureDescription = context . getFailureDescription ( ) ; for ( final ContentItem item : e . getConflicts ( ) ) { final ContentType type = item . getContentType ( ) ; switch ( type ) { case BUNDLE : failureDescription . get ( BUNDLES ) . add ( item . getRelativePath ( ) ) ; break ; case MODULE : failureDescription . get ( MODULES ) . add ( item . getRelativePath ( ) ) ; break ; case MISC : failureDescription . get ( MISC ) . add ( item . getRelativePath ( ) ) ; break ; } } context . stepCompleted ( ) ; } else { throw new OperationFailedException ( e . getMessage ( ) , e ) ; } } finally { } } }

Fix:
final PatchInfo info = service . getValue ( ) ;
Buggy code:
public class ContactGenerator { private static ContactGenerator instance = new ContactGenerator ( ) ; private static long nextId = 1 ; public static ContactGenerator getInstance ( ) { } private String [ ] firstNames = new String [ ] { "Jacob" , "Emily" , "Michael" , "Sarah" , "Matthew" , "Brianna" , "Nicholas" , "Samantha" , "Christopher" , "Hailey" , "Abner" , "Abby" , "Joshua" , "Douglas" , "Jack" , "Keith" , "Gerald" , "Samuel" , "Willie" , "Larry" , "Jose" , "Timothy" , "Sandra" , "Kathleen" , "Pamela" , "Virginia" , "Debra" , "Maria" , "Linda" } ; private String [ ] lastNames = new String [ ] { "Smiith" , "Johnson" , "Williams" , "Jones" , "Brown" , "Donahue" , "Bailey" , "Rose" , "Allen" , "Black" , "Davis" , "Clark" , "Hall" , "Lee" , "Baker" , "Gonzalez" , "Nelson" , "Moore" , "Wilson" , "Graham" , "Fisher" , "Cruz" , "Ortiz" , "Gomez" , "Murray" } ; private ContactGenerator ( ) { } public synchronized long generateId ( ) { } public Contact generate ( ) { } <START_BUG> public void generate ( Collection collection , int count ) { <END_BUG> for ( int i = 0 ; i < count ; i ++ ) { collection . add ( generate ( ) ) ; } } private String generatePhoneNumber ( ) { } private int rint ( int min , int max ) { } private String randomString ( String [ ] choices ) { } }

Fix:
public void generate ( Collection < Contact > collection , int count ) {
Buggy code:
public class A { public static void main ( String [ ] argv ) { } aspect X ; T Utils ; max ( T first , T second ) { <START_BUG> if ( first > second ) <END_BUG> return first ; else return second ; } }

Fix:
if ( ( first . intValue ( ) ) > ( second . intValue ( ) ) )
Buggy code:
public class Localizer { private Application application ; public Localizer ( final Application application ) { } public String getString ( final String key , final Component component , final IModel model , final Locale locale , final String style , final String defaultValue ) throws MissingResourceException { String string = null ; final ApplicationSettings settings = application . getSettings ( ) ; if ( settings == null ) { throw new IllegalStateException ( "Application<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>contain<seq2seq4repair_space>configured<seq2seq4repair_space>settings" ) ; } for ( final Iterator iterator = settings . getStringResourceLoaders ( ) . iterator ( ) ; iterator . hasNext ( ) ; ) { IStringResourceLoader loader = ( ( IStringResourceLoader ) ( iterator . next ( ) ) ) ; string = loader . loadStringResource ( component , key , locale , style ) ; if ( string != null ) { return substituteOgnl ( string , model ) ; } } if ( ( settings . getUseDefaultOnMissingResource ( ) ) && ( defaultValue != null ) ) { return defaultValue ; } if ( settings . getThrowExceptionOnMissingResource ( ) ) { throw new MissingResourceException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>resource:<seq2seq4repair_space>" + key ) , getClass ( ) . getName ( ) , key ) ; } else { <START_BUG> return ( "??" + key ) + "??" ; <END_BUG> } } public String getString ( final String key , final Component component , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final Component component ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model ) throws MissingResourceException { } public String getString ( final String key , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key ) throws MissingResourceException { } public String getString ( final String key , final IModel model , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final IModel model ) throws MissingResourceException { } private String substituteOgnl ( String string , final IModel model ) { } }

Fix:
return ( "[Warning:<seq2seq4repair_space>String<seq2seq4repair_space>resource<seq2seq4repair_space>for<seq2seq4repair_space>'" + key ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>found]" ;
Buggy code:
public class MapActivity extends ActionBarActivity implements OnMapReadyCallback { private String tag = getClass ( ) . getSimpleName ( ) ; private String resultString ; private double lat ; private double lng ; MediaPlayer mp ; String currentReviewPlaying = "NONE" ; @ TargetApi ( VERSION_CODES . HONEYCOMB ) @ SuppressLint ( "NewApi" ) @ Override protected void onCreate ( Bundle savedInstanceState ) { } private List < DisplayObject > makeResultsList ( String resultString ) { } private List < MarkerOptions > makeMarkers ( List < DisplayObject > objectList ) { } @ Override public void onMapReady ( GoogleMap map ) { map . setMyLocationEnabled ( true ) ; map . moveCamera ( CameraUpdateFactory . newLatLngZoom ( new LatLng ( lat , lng ) , 0 ) ) ; map . animateCamera ( CameraUpdateFactory . zoomIn ( ) ) ; map . animateCamera ( CameraUpdateFactory . zoomTo ( 12 ) , 2000 , null ) ; List < MarkerOptions > markerList = makeMarkers ( makeResultsList ( resultString ) ) ; for ( int i = 0 ; i < ( markerList . size ( ) ) ; i ++ ) { map . addMarker ( markerList . get ( i ) ) ; } map . setOnInfoWindowClickListener ( new OnInfoWindowClickListener ( ) { @ Override public void onInfoWindowClick ( Marker marker ) { if ( currentReviewPlaying . equals ( marker . getId ( ) ) ) { if ( ( mp ) != null ) { mp . stop ( ) ; currentReviewPlaying = "NONE" ; } } else { <START_BUG> int songId = ( Integer . parseInt ( marker . getId ( ) . replace ( "m" , "" ) ) ) % 10 ; <END_BUG> Log . d ( tag , ( "song<seq2seq4repair_space>id<seq2seq4repair_space>:" + songId ) ) ; currentReviewPlaying = marker . getId ( ) ; if ( ( mp ) != null ) { mp . stop ( ) ; } playSound ( getApplicationContext ( ) , AppController . SOUNDS_LIST [ songId ] ) ; } } } ) ; map . setOnMarkerClickListener ( new OnMarkerClickListener ( ) { @ Override public boolean onMarkerClick ( Marker marker ) { if ( marker . isInfoWindowShown ( ) ) { marker . hideInfoWindow ( ) ; } return false ; } } ) ; } void playSound ( Context context , int resId ) { } @ Override protected void onStop ( ) { } }

Fix:
int songId = ( Integer . parseInt ( marker . getId ( ) . replace ( "m" , "" ) ) ) % ( SOUNDS_LIST . length ) ;
Buggy code:
@ Service @ Transactional public class AgentServiceImpl implements AgentService { @ Autowired private AgentRepository agentRepository ; @ Autowired private CallInfoRepository callInfoRepository ; @ Override public Agent createOrUpdateAgent ( CreateAgentDTO createAgentDTO ) { Agent agent = Agent . from ( createAgentDTO ) ; Agent savedAgent = agentRepository . save ( agent ) ; <START_BUG> savedAgent . setHashedPassword ( null ) ; <END_BUG> return savedAgent ; } @ Override public Agent get ( Long agentId ) { } @ Override public List < CallInfo > getAllAssignedCalls ( Long agentId ) { } }

Fix:
savedAgent . setHashedPassword ( "" ) ;
Buggy code:
public class NestedAggregatesTestCase extends ESBIntegrationTest { private AggregatedRequestClient aggregatedRequestClient ; private final int no_of_requests = 4 ; @ BeforeClass ( alwaysRun = true ) public void setEnvironment ( ) throws Exception { } @ Test ( groups = { "wso2.esb" } , description = "Sending<seq2seq4repair_space>request<seq2seq4repair_space>for<seq2seq4repair_space>aggregation" ) public void test ( ) throws IOException , XMLStreamException { } @ Test ( groups = { "wso2.esb" } , description = "sending<seq2seq4repair_space>nested<seq2seq4repair_space>aggregate<seq2seq4repair_space>request" ) public void testNestedAggregate ( ) throws IOException , XMLStreamException { } @ Test ( groups = { "wso2.esb" } , description = "sending<seq2seq4repair_space>nested<seq2seq4repair_space>aggregate<seq2seq4repair_space>request<seq2seq4repair_space>><seq2seq4repair_space>request<seq2seq4repair_space>iterator<seq2seq4repair_space>count<seq2seq4repair_space>2500" ) public void testNestedAggregateWithLargeMessage ( ) throws IOException , XMLStreamException { <START_BUG> int messageItr = 25 ; <END_BUG> String response = aggregatedRequestClient . getResponse ( createNestedQuoteRequestBody ( "WSO2" , messageItr ) ) ; OMElement response2 = AXIOMUtil . stringToOM ( response ) ; OMElement soapBody = response2 . getFirstElement ( ) ; Iterator iterator = soapBody . getChildrenWithName ( new QName ( "http:////services.samples" , "getQuoteResponse" ) ) ; int responseCount = 0 ; while ( iterator . hasNext ( ) ) { responseCount ++ ; OMElement getQuote = ( ( OMElement ) ( iterator . next ( ) ) ) ; Assert . assertTrue ( getQuote . toString ( ) . contains ( "WSO2<seq2seq4repair_space>Company" ) ) ; } Assert . assertEquals ( responseCount , ( messageItr * messageItr ) , "Response<seq2seq4repair_space>count<seq2seq4repair_space>Mismatched" ) ; } @ AfterClass ( alwaysRun = true ) public void destroy ( ) throws Exception { } private OMElement createNestedQuoteRequestBody ( String symbol , int noOfItr ) { } }

Fix:
int messageItr = 15 ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class MessagingClientTestCase { @ Deployment ( testable = false ) public static Archive < ? > getEmptyDeployment ( ) { } @ Test public void testMessagingClient ( ) throws Exception { } static void applyUpdate ( ModelNode update , final NewModelControllerClient client ) throws IOException { <START_BUG> ModelNode result = client . execute ( Factory . create ( update ) . build ( ) ) ; <END_BUG> if ( ( result . hasDefined ( "outcome" ) ) && ( "success" . equals ( result . get ( "outcome" ) . asString ( ) ) ) ) { if ( result . hasDefined ( "result" ) ) { System . out . println ( result . get ( "result" ) ) ; } } else if ( result . hasDefined ( "failure-description" ) ) { throw new RuntimeException ( result . get ( "failure-description" ) . toString ( ) ) ; } else { throw new RuntimeException ( ( "Operation<seq2seq4repair_space>not<seq2seq4repair_space>successful;<seq2seq4repair_space>outcome<seq2seq4repair_space>=<seq2seq4repair_space>" + ( result . get ( "outcome" ) ) ) ) ; } } static boolean queueExists ( final String queueName , final ClientSessionFactory sf ) throws HornetQException { } static ClientSessionFactory createClientSessionFactory ( String host , int port ) throws Exception { } }

Fix:
ModelNode result = client . execute ( new org . jboss . as . controller . client . NewOperationBuilder ( update ) . build ( ) ) ;