nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CpioArchiveOutputStream extends ArchiveOutputStream implements CpioConstants { private CpioArchiveEntry cpioEntry ; private boolean closed = false ; private boolean finished ; private final short entryFormat ; private final HashMap names = new HashMap ( ) ; private long crc = 0 ; private long written ; private final OutputStream out ; public CpioArchiveOutputStream ( final OutputStream out , final short format ) { } public CpioArchiveOutputStream ( final OutputStream out ) { } private void ensureOpen ( ) throws IOException { } public void putNextEntry ( final CpioArchiveEntry e ) throws IOException { } private void writeHeader ( final CpioArchiveEntry e ) throws IOException { } private void writeNewEntry ( final CpioArchiveEntry entry ) throws IOException { } private void writeOldAsciiEntry ( final CpioArchiveEntry entry ) throws IOException { } private void writeOldBinaryEntry ( final CpioArchiveEntry entry , final boolean swapHalfWord ) throws IOException { } public void closeArchiveEntry ( ) throws IOException { } public void write ( final byte [ ] b , final int off , final int len ) throws IOException { } public void finish ( ) throws IOException { ensureOpen ( ) ; if ( this . finished ) { return ; } if ( ( this . cpioEntry ) != null ) { closeArchiveEntry ( ) ; } this . cpioEntry = new CpioArchiveEntry ( this . entryFormat ) ; this . cpioEntry . setMode ( 0 ) ; <START_BUG> this . cpioEntry . setName ( "TRAILER!!!" ) ; <END_BUG> this . cpioEntry . setNumberOfLinks ( 1 ) ; writeHeader ( this . cpioEntry ) ; closeArchiveEntry ( ) ; } public void close ( ) throws IOException { } private void pad ( final long count , final int border ) throws IOException { } private void writeBinaryLong ( final long number , final int length , final boolean swapHalfWord ) throws IOException { } private void writeAsciiLong ( final long number , final int length , final int radix ) throws IOException { } private void writeCString ( final String str ) throws IOException { } public void putArchiveEntry ( ArchiveEntry entry ) throws IOException { } public void write ( int b ) throws IOException { } }

Fix:
this . cpioEntry . setName ( CPIO_TRAILER ) ;
Buggy code:
@ Log4j public class VueHall extends Canvas implements Viewable { private Image buffer ; @ Getter @ Setter private Hall hall ; @ Getter @ Setter private Simulation simulation ; @ Getter @ Setter private GC gcBuffer ; @ Getter private TreeMap < Integer , LinkedList < VueElem > > calques ; @ Getter private ArrayList < VueBagage > bagagesVues ; public VueHall ( Composite parent , int style ) { } public void ajouterVue ( VueElem vue , int layer ) { } public void retirerVue ( VueElem vue ) { } public void updateView ( ) { ArrayList < Bagage > bagages = this . getHall ( ) . getBagagesList ( ) ; for ( int i = 0 ; i < ( bagages . size ( ) ) ; i ++ ) { boolean found = false ; for ( int j = 0 ; ( j < ( bagagesVues . size ( ) ) ) && ( ! found ) ; j ++ ) { if ( bagages . get ( i ) . equals ( bagagesVues . get ( j ) . getBagage ( ) ) ) { found = true ; } } if ( ! found ) { addBagage ( bagages . get ( i ) ) ; log . debug ( "Ajout<seq2seq4repair_space>d'une<seq2seq4repair_space>vue<seq2seq4repair_space>bagage" ) ; } } for ( int i = 0 ; i < ( bagagesVues . size ( ) ) ; i ++ ) { boolean found = false ; for ( int j = 0 ; ( j < ( bagages . size ( ) ) ) && ( ! found ) ; j ++ ) { <START_BUG> if ( bagagesVues . get ( i ) . getBagage ( ) . equals ( bagages . get ( i ) ) ) { <END_BUG> found = true ; } } if ( ! found ) { bagagesVues . get ( i ) . destroy ( ) ; bagagesVues . remove ( i ) ; log . debug ( "Suppression<seq2seq4repair_space>d'une<seq2seq4repair_space>vue<seq2seq4repair_space>bagage" ) ; } } for ( Iterator < Integer > iterator = calques . keySet ( ) . iterator ( ) ; iterator . hasNext ( ) ; ) { LinkedList < VueElem > vues = calques . get ( iterator . next ( ) ) ; for ( int j = 0 ; j < ( vues . size ( ) ) ; j ++ ) { vues . get ( j ) . updateView ( ) ; } } } public void addBagage ( Bagage bagage ) { } public void draw ( ) { } public boolean isClicked ( Point p ) { } public Viewable getClickedView ( int x , int y ) { } }

Fix:
if ( bagagesVues . get ( i ) . getBagage ( ) . equals ( bagages . get ( j ) ) ) {
Buggy code:
public class WeekRepository extends GenericRepository { private static final Logger log = LogManager . getLogger ( WeekRepository . class ) ; public WeekRepository ( ) { } public List < Map < String , Object > > findByWeekNumberAndYearAndUserUUIDAndTaskUUIDOrderBySortingAsc ( int weekNumber , int year , String userUUID , String taskUUID ) { } public List < Map < String , Object > > findByWeekNumberAndYearAndUserUUIDOrderBySortingAsc ( int weekNumber , int year , String userUUID ) { } @ Override public void create ( JsonNode jsonNode ) throws SQLException { WeekRepository . log . debug ( "WeekRepository.create" ) ; WeekRepository . log . debug ( ( ( "jsonNode<seq2seq4repair_space>=<seq2seq4repair_space>[" + jsonNode ) + "]" ) ) ; try ( Connection con = database . open ( ) ) { <START_BUG> con . createQuery ( ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>week<seq2seq4repair_space>(uuid,<seq2seq4repair_space>taskuuid,<seq2seq4repair_space>useruuid,<seq2seq4repair_space>weeknumber,<seq2seq4repair_space>year)" + "<seq2seq4repair_space>VALUES<seq2seq4repair_space>(:uuid,<seq2seq4repair_space>:taskuuid,<seq2seq4repair_space>:useruuid,<seq2seq4repair_space>:weeknumber,<seq2seq4repair_space>:year)" ) ) . addParameter ( "uuid" , jsonNode . get ( "uuid" ) . asText ( UUID . randomUUID ( ) . toString ( ) ) ) . addParameter ( "taskuuid" , jsonNode . get ( "taskuuid" ) . asText ( ) ) . addParameter ( "useruuid" , jsonNode . get ( "useruuid" ) . asText ( ) ) . addParameter ( "weeknumber" , jsonNode . get ( "weeknumber" ) . asInt ( ) ) . addParameter ( "year" , jsonNode . get ( "year" ) . asInt ( ) ) . executeUpdate ( ) ; <END_BUG> } catch ( Exception e ) { WeekRepository . log . error ( "LOG00600:" , e ) ; } } @ Override public void update ( JsonNode jsonNode , String uuid ) throws SQLException { } }

Fix:
con . createQuery ( ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>week<seq2seq4repair_space>(uuid,<seq2seq4repair_space>taskuuid,<seq2seq4repair_space>useruuid,<seq2seq4repair_space>weeknumber,<seq2seq4repair_space>year)" + "<seq2seq4repair_space>VALUES<seq2seq4repair_space>(:uuid,<seq2seq4repair_space>:taskuuid,<seq2seq4repair_space>:useruuid,<seq2seq4repair_space>:weeknumber,<seq2seq4repair_space>:year)" ) ) . addParameter ( "uuid" , UUID . randomUUID ( ) . toString ( ) ) . addParameter ( "taskuuid" , jsonNode . get ( "taskuuid" ) . asText ( ) ) . addParameter ( "useruuid" , jsonNode . get ( "useruuid" ) . asText ( ) ) . addParameter ( "weeknumber" , jsonNode . get ( "weeknumber" ) . asInt ( ) ) . addParameter ( "year" , jsonNode . get ( "year" ) . asInt ( ) ) . executeUpdate ( ) ;
Buggy code:
public class XMPPCompletedMessage implements XMPPMessage { public static final Logger LOGGER = Logging . getLogger ( XMPPMessage . class . getPackage ( ) . getName ( ) ) ; @ Override public boolean canHandle ( Map < String , String > signalArgs ) { } @ Override public void handleSignal ( XMPPClient xmppClient , Packet packet , Message message , Map < String , String > signalArgs ) { final String pID = signalArgs . get ( "id" ) ; final String type = signalArgs . get ( "message" ) ; if ( "textual" . equals ( type ) ) { Object outputs ; try { String serviceResultString = URLDecoder . decode ( signalArgs . get ( "result" ) , "UTF-8" ) ; JSONObject serviceResultJSON = ( ( JSONObject ) ( JSONSerializer . toJSON ( serviceResultString ) ) ) ; <START_BUG> outputs = xmppClient . U ( xmppClient . P ( serviceResultJSON ) ) ; <END_BUG> for ( RemoteProcessClientListener listener : xmppClient . getRemoteClientListeners ( ) ) { listener . complete ( pID , outputs ) ; } } catch ( PickleException e ) { XMPPCompletedMessage . LOGGER . log ( Level . FINER , e . getMessage ( ) , e ) ; } catch ( IOException e ) { XMPPCompletedMessage . LOGGER . log ( Level . FINER , e . getMessage ( ) , e ) ; } } else { for ( RemoteProcessClientListener listener : xmppClient . getRemoteClientListeners ( ) ) { listener . complete ( pID , null ) ; } } final String serviceJID = message . getFrom ( ) ; xmppClient . sendMessage ( serviceJID , "topic=finish" ) ; } }

Fix:
outputs = xmppClient . unPickle ( xmppClient . pickle ( serviceResultJSON ) ) ;
Buggy code:
public abstract class AbstractAutoCompleteBehavior extends AbstractDefaultAjaxBehavior { private static final ResourceReference AUTOCOMPLETE_JS = new JavascriptResourceReference ( AutoCompleteBehavior . class , "wicket-autocomplete.js" ) ; private static final long serialVersionUID = 1L ; protected boolean preselect = false ; protected AutoCompleteSettings settings = new AutoCompleteSettings ( ) ; @ Override public void renderHead ( IHeaderResponse response ) { } private void renderAutocompleteHead ( IHeaderResponse response ) { response . renderJavascriptReference ( AbstractAutoCompleteBehavior . AUTOCOMPLETE_JS ) ; final String id = getComponent ( ) . getMarkupId ( ) ; String indicatorId = findIndicatorId ( ) ; if ( Strings . isEmpty ( indicatorId ) ) { indicatorId = "null" ; } else { indicatorId = ( "'" + indicatorId ) + "'" ; } <START_BUG> String initJS = String . format ( "new<seq2seq4repair_space>Wicket.AutoComplete('%s','%s',%s,%s);" , id , getCallbackUrl ( ) , constructSettingsJS ( ) , indicatorId ) ; <END_BUG> response . renderOnDomReadyJavascript ( initJS ) ; } protected final String constructSettingsJS ( ) { } @ Override protected void onBind ( ) { } protected abstract void onRequest ( String input , RequestCycle requestCycle ) { } @ Override protected void respond ( AjaxRequestTarget target ) { } }

Fix:
String initJS = String . format ( "new<seq2seq4repair_space>Wicket.AutoComplete('%s','%s',%s,%s);" , id , getCallbackUrl ( true ) , constructSettingsJS ( ) , indicatorId ) ;
Buggy code:
public interface RoleManager extends Component { String ROLE = "org.apache.myrmidon.components.deployer.RoleManager" ; <START_BUG> String getRoleForName ( String shorthandName ) ; <END_BUG> String getNameForRole ( String role ) { } }

Fix:
String getRoleForName ( String name ) ;
Buggy code:
public class SingleSignOnManagerService implements Service < SingleSignOnManager > { public static ServiceBuilder < SingleSignOnManager > build ( ServiceTarget target , ServiceName name , ServiceName hostName ) { ServiceName factoryName = name . append ( "factory" ) ; DistributableSingleSignOnManagerFactoryBuilder builder = new DistributableSingleSignOnManagerFactoryBuilderValue ( ) . getValue ( ) ; if ( builder != null ) { builder . build ( target , factoryName , hostName ) . setInitialMode ( ON_DEMAND ) . install ( ) ; } else { SingleSignOnManagerFactory factory = new InMemorySingleSignOnManagerFactory ( ) ; <START_BUG> target . addService ( factoryName , new org . jboss . msc . service . ValueService ( new org . jboss . msc . value . ImmediateValue ( factory ) ) ) ; <END_BUG> } SingleSignOnManagerService service = new SingleSignOnManagerService ( ) ; return target . addService ( name , service ) . addDependency ( factoryName , SingleSignOnManagerFactory . class , service . factory ) . addDependency ( hostName , Host . class , service . host ) ; } private final InjectedValue < SingleSignOnManagerFactory > factory = new InjectedValue ( ) ; private final InjectedValue < Host > host = new InjectedValue ( ) ; private volatile SingleSignOnManager manager ; private SingleSignOnManagerService ( ) { } @ Override public SingleSignOnManager getValue ( ) { } @ Override public void start ( StartContext context ) { } @ Override public void stop ( StopContext context ) { } }

Fix:
target . addService ( factoryName , new org . jboss . msc . service . ValueService ( new org . jboss . msc . value . ImmediateValue ( factory ) ) ) . install ( ) ;
Buggy code:
public abstract class AbstractRankerBolt extends BaseBasicBolt { private static final long serialVersionUID = 4931640198501530202L ; private static final int DEFAULT_EMIT_FREQUENCY_IN_SECONDS = 2 ; private static final int DEFAULT_COUNT = 10 ; private final int emitFrequencyInSeconds ; private final int count ; private final Rankings rankings ; public AbstractRankerBolt ( ) { } public AbstractRankerBolt ( int topN ) { } public AbstractRankerBolt ( int topN , int emitFrequencyInSeconds ) { } protected Rankings getRankings ( ) { } @ Override public final void execute ( Tuple tuple , BasicOutputCollector collector ) { } abstract void updateRankingsWithTuple ( Tuple tuple ) { } private void emitRankings ( BasicOutputCollector collector ) { <START_BUG> collector . emit ( new backtype . storm . tuple . Values ( rankings ) ) ; <END_BUG> getLogger ( ) . debug ( ( "Rankings:<seq2seq4repair_space>" + ( rankings ) ) ) ; } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } @ Override public Map < String , Object > getComponentConfiguration ( ) { } abstract Logger getLogger ( ) { } }

Fix:
collector . emit ( new backtype . storm . tuple . Values ( rankings . copy ( ) ) ) ;
Buggy code:
public class EulerIntegratorTest extends TestCase { public EulerIntegratorTest ( String name ) { } public void testDimensionCheck ( ) { } public void testDecreasingSteps ( ) throws DerivativeException , IntegratorException { TestProblemAbstract [ ] problems = TestProblemFactory . getProblems ( ) ; for ( int k = 0 ; k < ( problems . length ) ; ++ k ) { double previousError = Double . NaN ; for ( int i = 4 ; i < 10 ; ++ i ) { TestProblemAbstract pb = ( ( TestProblemAbstract ) ( problems [ k ] . clone ( ) ) ) ; double step = ( ( pb . getFinalTime ( ) ) - ( pb . getInitialTime ( ) ) ) * ( Math . pow ( 2.0 , ( - i ) ) ) ; FirstOrderIntegrator integ = new EulerIntegrator ( step ) ; TestProblemHandler handler = new TestProblemHandler ( pb , integ ) ; integ . setStepHandler ( handler ) ; SwitchingFunction [ ] functions = pb . getSwitchingFunctions ( ) ; for ( int l = 0 ; l < ( functions . length ) ; ++ l ) { <START_BUG> integ . addSwitchingFunction ( functions [ l ] , Double . POSITIVE_INFINITY , ( 1.0E-6 * step ) ) ; <END_BUG> } integ . integrate ( pb , pb . getInitialTime ( ) , pb . getInitialState ( ) , pb . getFinalTime ( ) , new double [ pb . getDimension ( ) ] ) ; double error = handler . getMaximalValueError ( ) ; if ( i > 4 ) { assertTrue ( ( error < ( Math . abs ( previousError ) ) ) ) ; } previousError = error ; assertEquals ( 0 , handler . getMaximalTimeError ( ) , 1.0E-12 ) ; } } } public void testSmallStep ( ) throws DerivativeException , IntegratorException { } public void testBigStep ( ) throws DerivativeException , IntegratorException { } public static Test suite ( ) { } }

Fix:
integ . addSwitchingFunction ( functions [ l ] , Double . POSITIVE_INFINITY , ( 1.0E-6 * step ) , 1000 ) ;
Buggy code:
public class CodeSnippetFieldReference extends FieldReference implements ProblemReasons , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; public CodeSnippetFieldReference ( char [ ] source , long pos , EvaluationContext evaluationContext ) { } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public void manageSyntheticReadAccessIfNecessary ( BlockScope currentScope ) { } public void manageSyntheticWriteAccessIfNecessary ( BlockScope currentScope ) { } public TypeBinding resolveType ( BlockScope scope ) { receiverType = receiver . resolveType ( scope ) ; if ( ( receiverType ) == null ) { constant = NotAConstant ; return null ; } this . codegenBinding = this . binding = scope . getField ( receiverType , token , this ) ; FieldBinding firstAttempt = binding ; boolean isNotVisible = false ; if ( ! ( binding . isValidBinding ( ) ) ) { if ( ( ( binding ) instanceof ProblemFieldBinding ) && ( ( ( ( ProblemFieldBinding ) ( binding ) ) . problemId ( ) ) == ( ProblemReasons . NotVisible ) ) ) { isNotVisible = true ; if ( ( this . evaluationContext . declaringTypeName ) != null ) { delegateThis = scope . getField ( scope . enclosingSourceType ( ) , EvaluationConstants . DELEGATE_THIS , this ) ; if ( ( delegateThis ) == null ) { constant = NotAConstant ; scope . problemReporter ( ) . invalidField ( this , receiverType ) ; return null ; } } else { constant = NotAConstant ; scope . problemReporter ( ) . invalidField ( this , receiverType ) ; return null ; } CodeSnippetScope localScope = new CodeSnippetScope ( scope ) ; this . codegenBinding = this . binding = localScope . getFieldForCodeSnippet ( delegateThis . type , token , this ) ; } } if ( ! ( binding . isValidBinding ( ) ) ) { constant = NotAConstant ; if ( isNotVisible ) { this . codegenBinding = this . binding = firstAttempt ; } scope . problemReporter ( ) . invalidField ( this , receiverType ) ; return null ; } if ( isFieldUseDeprecated ( binding , scope ) ) scope . problemReporter ( ) . deprecatedField ( binding , this ) ; <START_BUG> constant = FieldReference . getConstantFor ( binding , ( ( receiver ) == ( ThisImplicit ) ) , this , 0 ) ; <END_BUG> if ( ! ( receiver . isThis ( ) ) ) constant = NotAConstant ; return binding . type ; } }

Fix:
constant = FieldReference . getConstantFor ( binding , ( ( receiver ) == ( ThisImplicit ) ) , this , scope , 0 ) ;
Buggy code:
public class Entity implements I_Entity , Serializable { private static final long serialVersionUID = - 6933931178070025267L ; private Map < String , List < Entity > > m_entityAttributes ; private String m_id ; private Map < String , List < String > > m_simpleAttributes ; private String m_typeName ; public Entity ( String id , String typeName ) { } protected Entity ( ) { } public static Entity transformToSerializableEntity ( I_Entity entity ) { } public void addAttributeValue ( String attributeName , I_Entity value ) { } public void addAttributeValue ( String attributeName , String value ) { } public I_EntityAttribute getAttribute ( String attributeName ) { } public List < I_EntityAttribute > getAttributes ( ) { List < I_EntityAttribute > result = new ArrayList < I_EntityAttribute > ( ) ; for ( String name : m_simpleAttributes . keySet ( ) ) { result . add ( getAttribute ( name ) ) ; } for ( String name : m_entityAttributes . keySet ( ) ) { result . add ( getAttribute ( name ) ) ; } <START_BUG> return null ; <END_BUG> } public String getId ( ) { } public String getTypeName ( ) { } public boolean hasAttribute ( String attributeName ) { } public void removeAttributeSilent ( String attributeName ) { } public void setAttributeValue ( String attributeName , I_Entity value ) { } public void setAttributeValue ( String attributeName , I_Entity value , int index ) { } public void setAttributeValue ( String attributeName , String value ) { } public void setAttributeValue ( String attributeName , String value , int index ) { } public String toJSON ( ) { } }

Fix:
return result ;
Buggy code:
public class MarkMessageTest extends AbstractFolderTest { private Object uid ; private ByteArrayInputStream inputStream ; public MarkMessageTest ( String arg0 ) { } public MarkMessageTest ( MailboxTstFactory factory , String arg0 ) { } public void testMarkAsReadMessage ( ) throws Exception { } public void testMarkAsFlaggedMessage ( ) throws Exception { } public void testMarkAsExpungedMessage ( ) throws Exception { FolderCommandReference [ ] ref = new FolderCommandReference [ 2 ] ; ref [ 0 ] = new FolderCommandReference ( getSourceFolder ( ) , new Object [ ] { uid } ) ; ref [ 0 ] . setMarkVariant ( MARK_AS_EXPUNGED ) ; MarkMessageCommand command = new MarkMessageCommand ( ref ) ; command . execute ( NullWorkerStatusController . getInstance ( ) ) ; Flags flags = getSourceFolder ( ) . getFlags ( uid ) ; <START_BUG> assertEquals ( "message<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>marked<seq2seq4repair_space>as<seq2seq4repair_space>expunged" , true , flags . getExpunged ( ) ) ; <END_BUG> } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } }

Fix:
assertEquals ( "message<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>marked<seq2seq4repair_space>as<seq2seq4repair_space>expunged" , true , flags . getDeleted ( ) ) ;
Buggy code:
public class UnicodeUnescaper extends CharSequenceTranslator { public static enum OPTION { escapePlus ; } private final EnumSet < UnicodeUnescaper . OPTION > options ; public UnicodeUnescaper ( UnicodeUnescaper . OPTION ... options ) { } public boolean isSet ( UnicodeUnescaper . OPTION option ) { <START_BUG> return ( options ) == null ? false : options . contains ( opt ) ; <END_BUG> } @ Override public int translate ( CharSequence input , int index , Writer out ) throws IOException { } }

Fix:
return ( options ) == null ? false : options . contains ( option ) ;
Buggy code:
public class TestDataCacheOptimisticLockRecovery extends TestCase { private EntityManagerFactory emf ; private int pk ; public void setUp ( ) { <START_BUG> Map options = new HashMap ( ) ; <END_BUG> options . put ( "openjpa.DataCache" , "true" ) ; options . put ( "openjpa.RemoteCommitProvider" , "sjvm" ) ; options . put ( "openjpa.MetaDataFactory" , ( ( "jpa(Types=" + ( OptimisticLockInstance . class . getName ( ) ) ) + ")" ) ) ; emf = Persistence . createEntityManagerFactory ( "test" , options ) ; EntityManager em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; em . createQuery ( "delete<seq2seq4repair_space>from<seq2seq4repair_space>OptimisticLockInstance" ) . executeUpdate ( ) ; OptimisticLockInstance oli = new OptimisticLockInstance ( "foo" ) ; try { em . persist ( oli ) ; em . getTransaction ( ) . commit ( ) ; } finally { if ( em . getTransaction ( ) . isActive ( ) ) em . getTransaction ( ) . rollback ( ) ; } pk = oli . getPK ( ) ; em . close ( ) ; } public void tearDown ( ) { } public void testOptimisticLockRecovery ( ) throws SQLException { } public void testExpectedOptimisticLockException ( ) { } }

Fix:
Map options = new HashMap ( System . getProperties ( ) ) ;
Buggy code:
public class dblook_test_net extends dblook_test { public static void main ( String [ ] args ) { } protected void doTest ( ) { try { <START_BUG> createTestDatabase ( ) ; <END_BUG> System . err . close ( ) ; runTest ( 3 , testDBName , ( ( testDBName ) + "_new" ) ) ; } catch ( Exception e ) { System . out . println ( "-=-<seq2seq4repair_space>FAILED:<seq2seq4repair_space>to<seq2seq4repair_space>complete<seq2seq4repair_space>the<seq2seq4repair_space>test:" ) ; e . printStackTrace ( ) ; } } }

Fix:
createTestDatabase ( dbCreationScript_1 ) ;
Buggy code:
public class ToolBar extends Composite { int parentingHandle ; int itemCount ; ToolItem [ ] items ; ToolItem lastFocus ; public ToolBar ( Composite parent , int style ) { } static int checkStyle ( int style ) { } Control [ ] _getChildren ( ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( int index ) { } void createItem ( ToolItem item , int index ) { } void createWidget ( int index ) { } void deregister ( ) { } void destroyItem ( ToolItem item ) { } public boolean forceFocus ( ) { } public int getItemCount ( ) { } public ToolItem [ ] getItems ( ) { } public ToolItem getItem ( int index ) { } public ToolItem getItem ( Point pt ) { } public int getRowCount ( ) { } boolean hasFocus ( ) { } public int indexOf ( ToolItem item ) { } void moveToBack ( int child ) { } int parentingHandle ( ) { } int Ph_EV_BOUNDARY ( int widget , int info ) { } void register ( ) { } void releaseHandle ( ) { } void releaseChildren ( boolean destroy ) { if ( ( items ) != null ) { for ( int i = 0 ; i < ( itemCount ) ; i ++ ) { ToolItem item = items [ i ] ; if ( ( item != null ) && ( ! ( item . isDisposed ( ) ) ) ) { <START_BUG> item . releaseChildren ( false ) ; <END_BUG> } } items = null ; itemCount = 0 ; } super . releaseChildren ( destroy ) ; } void removeControl ( Control control ) { } void setBackgroundPixel ( int pixel ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } void setFont ( int font ) { } void setForegroundPixel ( int pixel ) { } int topHandle ( ) { } boolean translateTraversal ( int key_sym , PhKeyEvent_t phEvent ) { } int widgetClass ( ) { } }

Fix:
item . release ( false ) ;
Buggy code:
public class KTropicalQueueFactory < K extends Comparable < K > > implements QueueFactory < List < PathWeight < K > > > { public < L > Queue < Object > createQueue ( final Automaton < L , List < PathWeight < K > > > automaton , final Map < Object , List < PathWeight < K > > > weightMap ) { final HashMap < Object , Integer > numExtractions = new HashMap < Object , Integer > ( ) ; final KTropicalSemiring < K > sr = ( ( KTropicalSemiring < K > ) ( automaton . semiring ( ) ) ) ; return new PriorityQueue < Object > ( 32 , new Comparator < Object > ( ) { public int compare ( Object o1 , Object o2 ) { return mu ( o1 ) . compareTo ( mu ( o2 ) ) ; } private K mu ( Object state ) { List < PathWeight < K > > w = weightMap . get ( state ) ; Integer n = numExtractions . get ( state ) ; if ( n == null ) n = 0 ; int k = ( n < ( sr . k ) ) ? n : ( sr . k ) - 1 ; return w . get ( k ) . weight ; } } ) { @ Override public Object poll ( ) { Object s = super . poll ( ) ; if ( s != null ) { Integer n = numExtractions . get ( s ) ; if ( n == null ) n = 0 ; n ++ ; numExtractions . put ( s , n ) ; if ( ( automaton . semiring ( ) ) instanceof KTropicalSemiring ) { KTropicalSemiring sr = ( ( KTropicalSemiring ) ( automaton . semiring ( ) ) ) ; <START_BUG> if ( ( ( sr . k ) == 1 ) && ( Automata . isFinalState ( automaton , s ) ) ) { <END_BUG> clear ( ) ; } } } return s ; } } ; } }

Fix:
if ( ( ( sr . k ) == n ) && ( Automata . isFinalState ( automaton , s ) ) ) {
Buggy code:
public abstract class FormComponent extends WebMarkupContainer { public interface IVisitor { public void formComponent ( FormComponent formComponent ) { } } private final class DisabledAttributeModel extends Model { private static final long serialVersionUID = 1L ; public Object getObject ( Component component ) { <START_BUG> return ( getApplication ( ) . getAuthorizationStrategy ( ) . allowEnabled ( FormComponent . this ) ) && ( FormComponent . this . isEnabled ( ) ) ? null : "disabled" ; <END_BUG> } } private static final class DisabledAttributeModifier extends AttributeModifier { private static final long serialVersionUID = 1L ; public DisabledAttributeModifier ( FormComponent . DisabledAttributeModel model ) { } } protected static final short FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL = FLAG_RESERVED1 ; private static final short FLAG_PERSISTENT = FLAG_RESERVED2 ; private static final String NO_RAW_INPUT = "[-NO-RAW-INPUT-]" ; private String rawInput = FormComponent . NO_RAW_INPUT ; private Object validators = null ; private IModel labelModel = null ; public FormComponent ( final String id ) { } public FormComponent ( final String id , IModel model ) { } public final FormComponent add ( final IValidator validator ) { } public final Form getForm ( ) { } public FormComponent setLabel ( final IModel labelModel ) { } public IModel getLabel ( ) { } public String getInput ( ) { } public String getInputName ( ) { } public final Class getValidationType ( ) { } public final List getValidators ( ) { } public final String getValue ( ) { } public final void invalid ( ) { } public boolean isMultiPart ( ) { } public final boolean isPersistent ( ) { } public final boolean isValid ( ) { } public final boolean isValidated ( ) { } public void setModelValue ( final String value ) { } public final void setPersistent ( final boolean persistent ) { } public abstract void updateModel ( ) { } public final void valid ( ) { } public final void validate ( ) { } protected String getModelValue ( ) { } protected final int inputAsInt ( ) { } protected final int inputAsInt ( final int defaultValue ) { } protected final int [ ] inputAsIntArray ( ) { } protected final String [ ] inputAsStringArray ( ) { } protected void onComponentTag ( final ComponentTag tag ) { } protected void onInvalid ( ) { } protected void onModelChanged ( ) { } protected void onValid ( ) { } protected boolean supportsPersistence ( ) { } private void validators_add ( final IValidator validator ) { } private IValidator validators_get ( int index ) { } private int validators_size ( ) { } final void registerNewUserInput ( ) { } private String getUserInput ( ) { } }

Fix:
return ( getApplication ( ) . getAuthorizationStrategy ( ) . allowEnabledState ( FormComponent . this ) ) && ( FormComponent . this . isEnabled ( ) ) ? null : "disabled" ;
Buggy code:
public class Launcher { public static void main ( String [ ] args ) { try { PaperStack . loadStackFromFile ( ) ; <START_BUG> } catch ( IOException ex ) { <END_BUG> JOptionPane . showMessageDialog ( null , ( ( "Error<seq2seq4repair_space>loading<seq2seq4repair_space>File.\n" + "Using<seq2seq4repair_space>new<seq2seq4repair_space>empty<seq2seq4repair_space>pad.\n\n" ) + ( ex . getLocalizedMessage ( ) ) ) ) ; } try { UIManager . setLookAndFeel ( UIManager . getSystemLookAndFeelClassName ( ) ) ; } catch ( Exception ex ) { } SwingUtilities . invokeLater ( new Runnable ( ) { @ Override public void run ( ) { IconDummy cont = new IconDummy ( ) ; cont . setVisible ( true ) ; Note note = new Note ( IdGenerator . generateRandomId ( ) ) ; note . initRun ( ) ; } } ) ; } }

Fix:
} catch ( Exception ex ) {
Buggy code:
public class XMPPClient { protected static String CONTAINER_TYPE = "ecf.xmpp.smack" ; Namespace namespace = null ; IContainer container = null ; IPresenceContainerAdapter presence = null ; IChatMessageSender sender = null ; ID userID = null ; IMessageReceiver receiver = null ; IPresenceListener presenceListener = null ; public XMPPClient ( ) { } public XMPPClient ( IMessageReceiver receiver ) { } public XMPPClient ( IMessageReceiver receiver , IPresenceListener presenceListener ) { } protected void setMessageReceiver ( IMessageReceiver receiver ) { } protected void setPresenceListener ( IPresenceListener listener ) { } protected IContainer setupContainer ( ) throws ECFException { } protected IContainer getContainer ( ) { } protected Namespace getConnectNamespace ( ) { } protected void setupPresence ( ) throws ECFException { if ( ( presence ) == null ) { presence = ( ( IPresenceContainerAdapter ) ( container . getAdapter ( IPresenceContainerAdapter . class ) ) ) ; sender = presence . getChatManager ( ) . getChatMessageSender ( ) ; presence . getChatManager ( ) . addMessageListener ( new IIMMessageListener ( ) { public void handleMessageEvent ( IIMMessageEvent messageEvent ) { if ( messageEvent instanceof IChatMessageEvent ) { IChatMessage m = ( ( IChatMessageEvent ) ( messageEvent ) ) . getChatMessage ( ) ; if ( ( receiver ) != null ) { receiver . handleMessage ( m . getFromID ( ) . getName ( ) , m . getBody ( ) ) ; } } } } ) ; if ( ( presenceListener ) != null ) { <START_BUG> presence . addPresenceListener ( presenceListener ) ; <END_BUG> } } } public void connect ( String account , String password ) throws ECFException { } protected void doConnect ( String account , String password ) throws ECFException { } public ID getID ( String name ) { } public void sendMessage ( String jid , String msg ) { } public synchronized boolean isConnected ( ) { } public synchronized void close ( ) { } }

Fix:
presence . getRosterManager ( ) . addPresenceListener ( presenceListener ) ;
Buggy code:
@ WebServlet ( name = "Alerts" , urlPatterns = { "//Alerts" } ) public class Alerts extends HttpServlet { private static final Logger logger = LoggerFactory . getLogger ( Alerts . class . getName ( ) ) ; public static final String PAGE_NAME = "Alerts" ; @ Override protected void doGet ( HttpServletRequest request , HttpServletResponse response ) { } @ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) { } @ Override public String getServletInfo ( ) { } protected void processGetRequest ( HttpServletRequest request , HttpServletResponse response ) { } protected void processPostRequest ( HttpServletRequest request , HttpServletResponse response ) { } private void changeAlertEnabled ( String alertName , Boolean isEnabled ) { if ( ( alertName == null ) || ( isEnabled == null ) ) { return ; } AlertsDao alertsDao = new AlertsDao ( ) ; Alert alert = alertsDao . getAlertByName ( alertName ) ; if ( alert != null ) { alert . setIsEnabled ( isEnabled ) ; if ( ! isEnabled ) { alert . setIsCautionAlertActive ( false ) ; alert . setCautionFirstActiveAt ( null ) ; alert . setIsCautionAcknowledged ( null ) ; alert . setCautionAlertLastSentTimestamp ( null ) ; alert . setCautionActiveAlertsSet ( null ) ; alert . setIsDangerAlertActive ( false ) ; alert . setDangerFirstActiveAt ( null ) ; alert . setIsDangerAcknowledged ( null ) ; alert . setDangerAlertLastSentTimestamp ( null ) ; alert . setDangerActiveAlertsSet ( null ) ; } AlertsLogic alertsLogic = new AlertsLogic ( ) ; <START_BUG> alertsLogic . alterRecordInDatabase ( alert , alertName ) ; <END_BUG> if ( ( ( GlobalVariables . alertInvokerThread ) != null ) && ( ( AlertsLogic . STATUS_CODE_SUCCESS ) == ( alertsLogic . getLastAlterRecordStatus ( ) ) ) ) { if ( ( GlobalVariables . alertInvokerThread ) != null ) alertInvokerThread . runAlertThread ( false , true ) ; } } } private void cloneAlert ( String alertName ) { } private void removeAlert ( String alertName ) { } private String buildAlertsHtml ( ) { } private String getIsAcknoledgedTableValue ( Alert alert ) { } }

Fix:
alertsLogic . alterRecordInDatabase ( alert , alertName , false ) ;
Buggy code:
public class PatternSearchJob implements IJob { protected SearchPattern pattern ; protected IJavaSearchScope scope ; protected SearchParticipant participant ; protected IndexQueryRequestor requestor ; protected boolean areIndexesReady ; protected long executionTime = 0 ; public PatternSearchJob ( SearchPattern pattern , SearchParticipant participant , IJavaSearchScope scope , IndexQueryRequestor requestor ) { } public boolean belongsTo ( String jobFamily ) { } public void cancel ( ) { } public void ensureReadyToRun ( ) { } public boolean execute ( IProgressMonitor progressMonitor ) { } public Index [ ] getIndexes ( IProgressMonitor progressMonitor ) { IPath [ ] indexLocations = this . participant . selectIndexes ( this . pattern , this . scope ) ; int length = indexLocations . length ; Index [ ] indexes = new Index [ length ] ; int count = 0 ; <START_BUG> IndexManager indexManager = JavaModelManager . getJavaModelManager ( ) . getIndexManager ( ) ; <END_BUG> for ( int i = 0 ; i < length ; i ++ ) { if ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) throw new OperationCanceledException ( ) ; IPath indexLocation = indexLocations [ i ] ; Index index = indexManager . getIndex ( indexLocation ) ; if ( index == null ) { IPath containerPath = ( ( IPath ) ( indexManager . indexLocations . keyForValue ( indexLocation ) ) ) ; if ( containerPath != null ) index = indexManager . getIndex ( containerPath , indexLocation , true , false ) ; } if ( index != null ) indexes [ ( count ++ ) ] = index ; } if ( count == length ) this . areIndexesReady = true ; else System . arraycopy ( indexes , 0 , ( indexes = new Index [ count ] ) , 0 , count ) ; return indexes ; } public boolean search ( Index index , IProgressMonitor progressMonitor ) { } public String toString ( ) { } }

Fix:
IndexManager indexManager = JavaModelManager . getIndexManager ( ) ;
Buggy code:
public class WebVirtualHostAdd extends AbstractWebSubsystemUpdate < Void > { private static final long serialVersionUID = 727085265030986640L ; private static final String TEMP_DIR = "jboss.server.temp.dir" ; private final String name ; private Set < String > aliases ; private WebHostAccessLogElement accessLog ; private WebHostRewriteElement rewrite ; public WebVirtualHostAdd ( String name ) { } protected void applyUpdate ( WebSubsystemElement element ) throws UpdateFailedException { } protected < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { <START_BUG> final BatchBuilder builder = updateContext . getBatchBuilder ( ) ; <END_BUG> final WebVirtualHostService service = new WebVirtualHostService ( name , aliases ( ) ) ; final ServiceBuilder < ? > serviceBuilder = builder . addService ( JBOSS_WEB_HOST . append ( name ) , service ) . addDependency ( AbstractPathService . pathNameOf ( WebVirtualHostAdd . TEMP_DIR ) , String . class , service . getTempPathInjector ( ) ) . addDependency ( JBOSS_WEB , WebServer . class , service . getWebServer ( ) ) ; if ( ( accessLog ) != null ) { service . setAccessLog ( accessLog ) ; WebVirtualHostAdd . accessLogService ( name , accessLog . getDirectory ( ) , builder ) ; serviceBuilder . addDependency ( JBOSS_WEB_HOST . append ( name , "access-log" ) , String . class , service . getAccessLogPathInjector ( ) ) ; } if ( ( rewrite ) != null ) { service . setRewrite ( rewrite ) ; } serviceBuilder . install ( ) ; } public AbstractSubsystemUpdate < WebSubsystemElement , ? > getCompensatingUpdate ( WebSubsystemElement original ) { } public String getName ( ) { } public Set < String > getAliases ( ) { } public void setAliases ( Set < String > aliases ) { } public WebHostAccessLogElement getAccessLog ( ) { } public void setAccessLog ( WebHostAccessLogElement accessLog ) { } public WebHostRewriteElement getRewrite ( ) { } public void setRewrite ( WebHostRewriteElement rewrite ) { } private String [ ] aliases ( ) { } static WebVirtualHostAdd create ( final WebVirtualHostElement host ) { } static final String DEFAULT_RELATIVE_TO = "jboss.server.log.dir" ; static void accessLogService ( final String hostName , final WebHostAccessLogElement . LogDirectory directory , final BatchBuilder batchBuilder ) { } }

Fix:
final BatchBuilder builder = updateContext . getServiceTarget ( ) ;
Buggy code:
public final class ServerMaker { static final String SERVER_PROCESS_NAME_PREFIX = "Server:" ; private final ProcessManagerSlave processManagerSlave ; private final MessageHandler messageHandler ; private final ServerManagerEnvironment environment ; private final CommunicationVariables communicationVariables ; public ServerMaker ( ServerManagerEnvironment environment , ProcessManagerSlave processManagerSlave , MessageHandler messageHandler , CommunicationVariables communicationVariables ) { } public Server makeServer ( ServerModel serverConfig , JvmElement jvmElement , RespawnPolicy respawnPolicy ) throws IOException { } private List < String > getServerLaunchCommand ( final String serverName , final String serverProcessName , final JvmElement jvm , final PropertiesElement systemProperties ) { List < String > command = new ArrayList < String > ( ) ; command . add ( getJavaCommand ( jvm ) ) ; Map < String , String > sysProps = appendJavaOptions ( jvm , command ) ; command . add ( "-Djava.util.logging.manager=org.jboss.logmanager.LogManager" ) ; <START_BUG> command . add ( ( ( "-Dorg.jboss.boot.log.file=logs//" + serverName ) + "//boot.log" ) ) ; <END_BUG> command . add ( "-jar" ) ; command . add ( "jboss-modules.jar" ) ; command . add ( "-mp" ) ; command . add ( "modules" ) ; command . add ( "-logmodule" ) ; command . add ( "org.jboss.logmanager" ) ; command . add ( "org.jboss.as.server" ) ; appendArgsToMain ( serverName , serverProcessName , sysProps , systemProperties , command ) ; return command ; } private String getJavaCommand ( JvmElement jvm ) { } private Map < String , String > appendJavaOptions ( JvmElement jvm , List < String > command ) { } private void appendArgsToMain ( final String serverName , final String serverProcessName , final Map < String , String > jvmProps , final PropertiesElement propertiesElement , final List < String > command ) { } private static String getPropertyValue ( String property , Map < String , String > jvmProps , Map < String , String > sysProps , String defaultVal ) { } private void addStandardProperties ( Map < String , String > sysProps ) { } private Map < String , String > getServerLaunchEnvironment ( JvmElement jvm ) { } }

Fix:
command . add ( ( ( "-Dorg.jboss.boot.log.file=domain//servers//" + serverName ) + "//logs//boot.log" ) ) ;
Buggy code:
abstract class DMLWriteResultSet extends NoRowsResultSetImpl { protected WriteCursorConstantAction constantAction ; protected int [ ] baseRowReadMap ; protected int [ ] streamStorableHeapColIds ; protected ExecRow deferredSparseRow ; protected DynamicCompiledOpenConglomInfo heapDCOCI ; protected DynamicCompiledOpenConglomInfo [ ] indexDCOCIs ; private boolean needToObjectifyStream ; public long rowCount ; DMLWriteResultSet ( Activation activation ) throws StandardException { } DMLWriteResultSet ( Activation activation , ConstantAction constantAction ) throws StandardException { } public final long modifiedRowCount ( ) { <START_BUG> return ( rowCount ) + ( RowUtil . rowCountBase ) ; <END_BUG> } protected ExecRow getNextRowCore ( NoPutResultSet source ) throws StandardException { } private void objectifyStreams ( ExecRow row ) throws StandardException { } protected ExecRow makeDeferredSparseRow ( ExecRow deferredBaseRow , FormatableBitSet baseRowReadList , LanguageConnectionContext lcc ) throws StandardException { } int decodeLockMode ( int lockMode ) { } String getIndexNameFromCID ( long indexCID ) { } }

Fix:
return ( rowCount ) + ( RowUtil . getRowCountBase ( ) ) ;
Buggy code:
public class RemoteServiceTest extends AbstractRemoteServiceTest { protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } protected String getClientContainerName ( ) { <START_BUG> return Generic . CLIENT_CONTAINER_NAME ; <END_BUG> } }

Fix:
return Generic . CONSUMER_CONTAINER_TYPE ;
Buggy code:
public class ArquillianService implements Service < ArquillianService > { public static final ServiceName SERVICE_NAME = JBOSS . append ( "arquillian" , "testrunner" ) ; private static final Logger log = Logger . getLogger ( "org.jboss.as.arquillian" ) ; private final InjectedValue < MBeanServer > injectedMBeanServer = new InjectedValue < MBeanServer > ( ) ; private ServiceContainer serviceContainer ; private final Map < String , ArquillianConfig > deployedTests = new HashMap < String , ArquillianConfig > ( ) ; private final Map < String , CountDownLatch > waitingTests = new HashMap < String , CountDownLatch > ( ) ; private JMXTestRunner jmxTestRunner ; public static void addService ( final ServiceTarget serviceTarget ) { } public synchronized void start ( StartContext context ) throws StartException { } public synchronized void stop ( StopContext context ) { } @ Override public ArquillianService getValue ( ) throws IllegalStateException { } void registerDeployment ( ArquillianConfig arqConfig ) { } void unregisterDeployment ( ArquillianConfig arqConfig ) { } private ArquillianConfig getConfig ( String className ) { CountDownLatch latch = null ; synchronized ( deployedTests ) { ArquillianConfig config = deployedTests . get ( className ) ; if ( config != null ) { return config ; } latch = new CountDownLatch ( 1 ) ; waitingTests . put ( className , latch ) ; } <START_BUG> long end = ( System . currentTimeMillis ( ) ) + 3000 ; <END_BUG> while ( true ) { try { latch . await ( ( end - ( System . currentTimeMillis ( ) ) ) , TimeUnit . MILLISECONDS ) ; break ; } catch ( InterruptedException e ) { } } synchronized ( deployedTests ) { waitingTests . remove ( className ) ; return deployedTests . get ( className ) ; } } class TestClassLoaderImpl implements JMXTestRunner . TestClassLoader { @ Override public Class < ? > loadTestClass ( String className ) throws ClassNotFoundException { } @ Override public ClassLoader getServiceClassLoader ( ) { } private BundleContext getSystemBundleContext ( ) { } } private class DeploymentListener extends AbstractServiceListener < Object > { private volatile boolean proceed = false ; @ Override public synchronized void serviceFailed ( ServiceController < ? extends Object > controller , StartException reason ) { } @ Override public synchronized void dependencyFailed ( ServiceController < ? extends Object > controller ) { } @ Override public synchronized void listenerAdded ( ServiceController < ? extends Object > controller ) { } @ Override public synchronized void serviceRemoved ( ServiceController < ? extends Object > controller ) { } @ Override public synchronized void serviceStarted ( ServiceController < ? extends Object > controller ) { } @ Override public synchronized void serviceStopped ( ServiceController < ? extends Object > controller ) { } @ Override public synchronized void serviceStopping ( ServiceController < ? extends Object > controller ) { } private synchronized void waitOnDeployment ( ) { } private void proceed ( ) { } } }

Fix:
long end = ( System . currentTimeMillis ( ) ) + 10000 ;
Buggy code:
public class ContactManagerImplTest { private ContactManager testCM ; private ContactManagerPlus testCMP ; private ContactManagerPlus standardCMP ; private Calendar nowCal = new GregorianCalendar ( 2014 , Calendar . MARCH , 13 , 10 , 0 ) ; private Calendar futureCal = new GregorianCalendar ( 2014 , Calendar . MARCH , 15 , 10 , 0 ) ; private Calendar pastCal = new GregorianCalendar ( 2014 , Calendar . MARCH , 11 , 10 , 0 ) ; private String testName = "Test<seq2seq4repair_space>Name" ; String testNotes = "Test<seq2seq4repair_space>Contact<seq2seq4repair_space>Notes" ; private Contact unknown = new ContactImpl ( "Mr<seq2seq4repair_space>X" ) ; @ Before public void init ( ) { } @ Test public void testaddFutureMeeting ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testaddFutureMeetingWithPastDate ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testaddFutureMeetingUnknownContact ( ) { } @ Test public void testGetFutureMeeting_IdWithUnknown ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testGetFutureMeeting_PastID ( ) { int pastID = standardCMP . getAllPastMeetings ( ) . get ( 0 ) . getId ( ) ; <START_BUG> testCM . getFutureMeeting ( pastID ) ; <END_BUG> } @ Test public void testGetFutureMeetingList_Contact ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testGetFutureMeetingList_UnknownContact ( ) { } @ Test public void testGetFutureMeetingList_Calendar ( ) { } @ Test public void addNewPastMeetingNormalBehaviour ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void addNewPastMeetingUnknownContact ( ) { } @ Test ( expected = IllegalStateException . class ) public void addNewPastMeetingFutureDate ( ) { } @ Test public void testaddMeetingNotesOnHeldFutureMeeting ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testAddMeetingNotesWithBadId ( ) { } @ Test ( expected = IllegalStateException . class ) public void testAddMeetingWithMeetingInTheFuture ( ) { } @ Test ( expected = NullPointerException . class ) public void testAddMeetingNotesWithNullNotes ( ) { } @ Test public void testGetAllFutureMeetings ( ) { } @ Test public void testGetContactOnEmpty ( ) { } @ Test public void testAddNewContactGetContactCheckName ( ) { } @ Test public void testGetContactContains ( ) { } @ Test public void testGetContactsById ( ) { } @ Test ( expected = NullPointerException . class ) public void testAddewContactNullName ( ) { } @ Test ( expected = NullPointerException . class ) public void testAddewContactNullNotes ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testGetContactsInvalidID ( ) { } @ Test ( expected = NullPointerException . class ) public void testGetContactsNullName ( ) { } public ContactManagerPlus standardFilledCMP ( ) { } }

Fix:
standardCMP . getFutureMeeting ( pastID ) ;