nus-yam/ex-repair huggingface dataset:
Buggy code:
public class HornetQServerResource implements Resource { private final Resource delegate ; private ServiceController < HornetQServer > hornetQServerServiceController ; public HornetQServerResource ( ) { } public HornetQServerResource ( final Resource delegate ) { } public ServiceController < HornetQServer > getHornetQServerServiceController ( ) { } public void setHornetQServerServiceController ( ServiceController < HornetQServer > hornetQServerServiceController ) { } @ Override public ModelNode getModel ( ) { } @ Override public void writeModel ( ModelNode newModel ) { } @ Override public boolean isModelDefined ( ) { } @ Override public boolean hasChild ( PathElement element ) { } @ Override public Resource getChild ( PathElement element ) { } @ Override public Resource requireChild ( PathElement element ) { if ( CommonAttributes . CORE_ADDRESS . equals ( element . getKey ( ) ) ) { if ( hasAddressControl ( element ) ) { return CoreAddressResource . INSTANCE ; } throw new NoSuchElementException ( element . toString ( ) ) ; } else { <START_BUG> return delegate . getChild ( element ) ; <END_BUG> } } @ Override public boolean hasChildren ( String childType ) { } @ Override public Resource navigate ( PathAddress address ) { } @ Override public Set < String > getChildTypes ( ) { } @ Override public Set < String > getChildrenNames ( String childType ) { } @ Override public Set < ResourceEntry > getChildren ( String childType ) { } @ Override public void registerChild ( PathElement address , Resource resource ) { } @ Override public Resource removeChild ( PathElement address ) { } @ Override public boolean isRuntime ( ) { } @ Override public boolean isProxy ( ) { } @ Override public Resource clone ( ) { } private boolean hasAddressControl ( PathElement element ) { } private Set < String > getCoreAddressNames ( ) { } private ManagementService getManagementService ( ) { } }

Fix:
return delegate . requireChild ( element ) ;
Buggy code:
public class Actor extends MizActivity implements OnNavigationListener { private ViewPager awesomePager ; private String actorId ; private String actorName ; private String json ; private String baseUrl ; private String mActorThumb ; private ArrayList < SpinnerItem > spinnerItems = new ArrayList < SpinnerItem > ( ) ; private ActionBarSpinner spinnerAdapter ; private ActionBar actionBar ; private ProgressBar pbar ; @ Override public void onCreate ( Bundle savedInstanceState ) { } private void setupSpinnerItems ( ) { } @ Override protected void onSaveInstanceState ( Bundle outState ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onStart ( ) { } private class ActorDetailsAdapter extends FragmentPagerAdapter { public ActorDetailsAdapter ( FragmentManager fm ) { } @ Override public Fragment getItem ( int index ) { switch ( index ) { case 0 : <START_BUG> return ActorBiographyFragment . newInstance ( json , baseUrl , mActorThumb ) ; <END_BUG> case 1 : return ActorMoviesFragment . newInstance ( json , baseUrl ) ; case 2 : return ActorPhotosFragment . newInstance ( json , actorName , baseUrl ) ; default : return null ; } } @ Override public int getCount ( ) { } } @ Override public boolean onNavigationItemSelected ( int itemPosition , long itemId ) { } private class ActorLoader extends AsyncTask < Object , Object , String > { @ Override protected String doInBackground ( Object ... params ) { } @ Override protected void onPostExecute ( String result ) { } } private void setupActionBarStuff ( ) { } No newline ; at end ; of file ; }

Fix:
return ActorBiographyFragment . newInstance ( json , mActorThumb ) ;
Buggy code:
public class CompositeIterator < E > implements Iterator < E > { private List < Iterator < E > > iterators = new LinkedList < Iterator < E > > ( ) ; private boolean inUse = false ; public CompositeIterator ( ) { } public void add ( Iterator < E > iterator ) { } @ Override public boolean hasNext ( ) { } @ Override public E next ( ) { inUse = true ; for ( Iterator < Iterator < E > > it = iterators . iterator ( ) ; it . hasNext ( ) ; ) { Iterator < E > iterator = it . next ( ) ; if ( iterator . hasNext ( ) ) { return iterator . next ( ) ; } } <START_BUG> throw new NoSuchElementException ( "Exhaused<seq2seq4repair_space>all<seq2seq4repair_space>iterators" ) ; <END_BUG> } @ Override public void remove ( ) { } }

Fix:
throw new NoSuchElementException ( "Exhausted<seq2seq4repair_space>all<seq2seq4repair_space>iterators" ) ;
Buggy code:
public class PagingNavigation extends Loop { private static final long serialVersionUID = 1L ; private final class StartIndexChange extends Change { private static final long serialVersionUID = 1L ; private final int startIndex ; private StartIndexChange ( int startIndex ) { } public final void undo ( ) { } public String toString ( ) { } } protected IPageable pageable ; protected IPagingLabelProvider labelProvider ; private int startIndex ; private int margin = - 1 ; private String separator = null ; private int viewSize = 10 ; public PagingNavigation ( final String id , final IPageable pageable ) { } public PagingNavigation ( final String id , final IPageable pageable , final IPagingLabelProvider labelProvider ) { } public int getMargin ( ) { } public String getSeparator ( ) { } public int getViewSize ( ) { } public void setViewSize ( final int size ) { } public void setMargin ( final int margin ) { } public void setSeparator ( final String separator ) { } protected void onBeforeRender ( ) { <START_BUG> setModel ( new org . apache . wicket . model . Model ( Integer . valueOf ( pageable . getPageCount ( ) ) ) ) ; <END_BUG> setStartIndex ( ) ; super . onBeforeRender ( ) ; } protected final int getStartIndex ( ) { } protected void populateItem ( final Loop . LoopItem loopItem ) { } protected Link newPagingNavigationLink ( String id , IPageable pageable , int pageIndex ) { } protected void renderItem ( final Loop . LoopItem loopItem ) { } private void setStartIndex ( ) { } private void setIterations ( int i ) { } }

Fix:
setModel ( new Model ( new Integer ( pageable . getPageCount ( ) ) ) ) ;
Buggy code:
public class AirportService extends IntentService { public AirportService ( ) { } @ Override protected void onHandleIntent ( Intent intent ) { getAirportsWithImages ( ( ( AirportPrefs . instance ( ) . getLastUpdate ( ) ) == 0 ) ) . flatMap ( new rx . functions . Func1 < List < Airport > , Observable < List < Airport > > > ( ) { @ Override public Observable < List < Airport > > call ( List < Airport > airports ) { if ( airports == null ) return Observable . error ( new Throwable ( "no<seq2seq4repair_space>update<seq2seq4repair_space>needed" ) ) ; else return INSTANCE . saveAirports ( airports ) ; } } ) . doOnCompleted ( new Action0 ( ) { @ Override public void call ( ) { AirportPrefs . instance ( ) . putLastUpdate ( ) ; if ( BuildConfig . DEBUG ) { try { FileUtils . copyFileToSD ( getApplicationContext ( ) , AirportPersister . getAiportFile ( getApplicationContext ( ) ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } } } ) . subscribe ( new rx . Subscriber < List < Airport > > ( ) { @ Override public void onCompleted ( ) { Timber . d ( "Sync<seq2seq4repair_space>complete!" ) ; RxBus . INSTANCE . send ( new SyncCompleteEvent ( ) ) ; } @ Override public void onError ( Throwable e ) { <START_BUG> Timber . d ( e , "Error<seq2seq4repair_space>during<seq2seq4repair_space>sync" ) ; <END_BUG> } @ Override public void onNext ( List < Airport > airports ) { } } ) ; } private Observable < List < Airport > > getAirportsWithImages ( boolean firstTime ) { } private String getImageUrl ( String type , String name ) { } public static void start ( Context context ) { } }

Fix:
Timber . i ( e , "Error<seq2seq4repair_space>during<seq2seq4repair_space>sync" ) ;
Buggy code:
public class HistoryHandler extends CommandHandlerWithHelp { private final ArgumentWithoutValue clear ; private final ArgumentWithoutValue disable ; private final ArgumentWithoutValue enable ; public HistoryHandler ( ) { } public HistoryHandler ( String command ) { } @ Override protected void doHandle ( CommandContext ctx ) throws CommandFormatException { ParsedCommandLine args = ctx . getParsedCommandLine ( ) ; if ( ! ( args . hasProperties ( ) ) ) { HistoryHandler . printHistory ( ctx ) ; return ; } if ( clear . isPresent ( args ) ) { ctx . getHistory ( ) . clear ( ) ; } else if ( disable . isPresent ( args ) ) { ctx . getHistory ( ) . setUseHistory ( false ) ; } else if ( enable . isPresent ( args ) ) { ctx . getHistory ( ) . setUseHistory ( true ) ; } else { <START_BUG> ctx . printLine ( ( ( "Unexpected<seq2seq4repair_space>argument<seq2seq4repair_space>'" + ( ctx . getArgumentsString ( ) ) ) + '\'' ) ) ; <END_BUG> } } private static void printHistory ( CommandContext ctx ) { } }

Fix:
ctx . error ( ( ( "Unexpected<seq2seq4repair_space>argument<seq2seq4repair_space>'" + ( ctx . getArgumentsString ( ) ) ) + '\'' ) ) ;
Buggy code:
public final class DomainParser implements XMLStreamConstants , XMLElementReader < ParseResult < Domain > > { public void readElement ( final XMLExtendedStreamReader reader , final ParseResult < Domain > value ) throws XMLStreamException { final int count = reader . getAttributeCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { if ( ( reader . getAttributeNamespace ( i ) ) != null ) { reader . handleAttribute ( value , i ) ; } else { switch ( Attribute . forName ( reader . getAttributeLocalName ( i ) ) ) { default : throw DomainParser . unexpectedAttribute ( reader , i ) ; } } } <START_BUG> final Domain domain = new Domain ( ) ; <END_BUG> while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case XMLStreamConstants . END_ELEMENT : { break ; } case XMLStreamConstants . START_ELEMENT : { if ( NAMESPACES . contains ( reader . getNamespaceURI ( ) ) ) { switch ( Element . forName ( reader . getLocalName ( ) ) ) { case SERVER_GROUPS : { readServerGroupsElement ( reader , domain ) ; break ; } default : throw DomainParser . unexpectedElement ( reader ) ; } } else { reader . handleAny ( domain ) ; } break ; } default : throw new IllegalStateException ( ) ; } } value . setResult ( domain ) ; } private void readServerGroupsElement ( final XMLExtendedStreamReader reader , final Domain domain ) throws XMLStreamException { } private static XMLStreamException unexpectedElement ( final XMLExtendedStreamReader reader ) { } private static XMLStreamException unexpectedAttribute ( final XMLExtendedStreamReader reader , final int i ) { } }

Fix:
final Domain domain = new Domain ( null ) ;
Buggy code:
public class SingletonComponentDescription extends SessionBeanComponentDescription { private boolean initOnStartup ; public SingletonComponentDescription ( final String componentName , final String componentClassName , final EjbJarDescription ejbJarDescription , final ServiceName deploymentUnitServiceName ) { } @ Override public ComponentConfiguration createConfiguration ( EEModuleConfiguration moduleConfiguration ) { } public boolean isInitOnStartup ( ) { } public void initOnStartup ( ) { } @ Override public boolean allowsConcurrentAccess ( ) { } @ Override public SessionBeanType getSessionBeanType ( ) { } @ Override protected void setupViewInterceptors ( ViewDescription view ) { super . setupViewInterceptors ( view ) ; view . getConfigurators ( ) . addFirst ( new ViewConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , ComponentConfiguration componentConfiguration , ViewDescription description , ViewConfiguration configuration ) throws DeploymentUnitProcessingException { <START_BUG> configuration . addViewInterceptor ( new org . jboss . invocation . ImmediateInterceptorFactory ( new SingletonComponentInstanceAssociationInterceptor ( ) ) , true ) ; <END_BUG> } } ) ; } }

Fix:
configuration . addViewInterceptorToFront ( new org . jboss . invocation . ImmediateInterceptorFactory ( new SingletonComponentInstanceAssociationInterceptor ( ) ) ) ;
Buggy code:
public abstract class Record implements Cloneable { protected Name name ; protected short type ; protected short dclass ; protected int ttl ; protected int wireLength = - 1 ; private static Class [ ] knownTypes = new Class [ 256 ] ; private static Class [ ] fromWireList = new Class [ ] { Name . class , Short . TYPE , Integer . TYPE , Integer . TYPE , DataByteInputStream . class , Compression . class } ; private static Class [ ] fromTextList = new Class [ ] { Name . class , Short . TYPE , Integer . TYPE , MyStringTokenizer . class , Name . class } ; protected Record ( ) { } Record ( Name _name , short _type , short _dclass , int _ttl ) { } private static final Class toClass ( short type ) throws ClassNotFoundException { } private static Record newRecord ( Name name , short type , short dclass , int ttl , int length , DataByteInputStream in , Compression c ) throws IOException { } public static Record newRecord ( Name name , short type , short dclass , int ttl , int length , byte [ ] data ) { } public static Record newRecord ( Name name , short type , short dclass , int ttl ) { } public static Record newRecord ( Name name , short type , short dclass ) { } static Record fromWire ( DataByteInputStream in , int section , Compression c ) throws IOException { } public static Record fromWire ( byte [ ] b , int section ) throws IOException { } void toWire ( DataByteOutputStream out , int section , Compression c ) throws IOException { } public byte [ ] toWire ( int section ) throws IOException { } void toWireCanonical ( DataByteOutputStream out ) throws IOException { } public byte [ ] toWireCanonical ( ) throws IOException { } StringBuffer toStringNoData ( ) { StringBuffer sb = new StringBuffer ( ) ; sb . append ( name ) ; sb . append ( "\t" ) ; if ( Options . check ( "BINDTTL" ) ) sb . append ( TTL . format ( ttl ) ) ; else <START_BUG> sb . append ( ttl ) ; <END_BUG> sb . append ( "<seq2seq4repair_space>" ) ; if ( ( ( dclass ) != ( DClass . IN ) ) || ( ! ( Options . check ( "noPrintIN" ) ) ) ) { sb . append ( DClass . string ( dclass ) ) ; sb . append ( "<seq2seq4repair_space>" ) ; } sb . append ( java . lang . reflect . Type . string ( type ) ) ; sb . append ( "\t\t" ) ; return sb ; } public String toString ( ) { } public static Record fromString ( Name name , short type , short dclass , int ttl , MyStringTokenizer st , Name origin ) throws IOException { } public Name getName ( ) { } public short getType ( ) { } public short getRRsetType ( ) { } public short getDClass ( ) { } public int getTTL ( ) { } public short getWireLength ( ) { } abstract void rrToWire ( DataByteOutputStream out , Compression c ) throws IOException { } void rrToWireCanonical ( DataByteOutputStream out ) throws IOException { } public boolean equals ( Object arg ) { } public int hashCode ( ) { } public Record withName ( Name name ) { } }

Fix:
sb . append ( ( ( ( long ) ( ttl ) ) & 4294967295L ) ) ;
Buggy code:
public class RSSService { private static final Logger log = LoggerFactory . getLogger ( RSSService . class ) ; public static final String wsUrl = ConfigReader . getInstance ( ) . getProperty ( "ws.url" ) ; public static final String wsNamespace = ConfigReader . getInstance ( ) . getProperty ( "ws.ns" ) ; public static final String wsName = ConfigReader . getInstance ( ) . getProperty ( "ws.name" ) ; private static CloudStorage cloud ; private static RSSService rssService ; private RSSService ( ) { } public static RSSService getInstance ( ) { } public void addChannel ( String address ) { } public void removeChannel ( String address ) { } public List < String > getRssChannelList ( ) { } public List < RSSItem > refreshAndGetRssItems ( ) { <START_BUG> return RSSService . cloud . refreshAndGetRssItems ( ) ; <END_BUG> } public void updateRSSItem ( RSSItem rssItem ) { } public List < RSSItem > getAllRSSItems ( ) { } }

Fix:
return RSSService . cloud . getRSSItems ( ) ;
Buggy code:
public void setContext ( Context ctx ) { } public void doService ( Request req , Response res ) throws Exception { <START_BUG> Locale locale = RequestUtil . getLocale ( req ) ; <END_BUG>

Fix:
Locale locale = RequestUtil . getLocale ( req . getMimeHeaders ( ) ) ;
Buggy code:
public final class Program { String name ; String command ; String iconName ; Program ( ) { } static int createDotNetString ( String string ) { } static String createJavaString ( int ptr ) { int charArray = OS . String_ToCharArray ( ptr ) ; char [ ] chars = new char [ OS . String_Length ( ptr ) ] ; <START_BUG> OS . memmove ( chars , charArray , ( ( chars . length ) * 2 ) ) ; <END_BUG> OS . GCHandle_Free ( charArray ) ; return new String ( chars ) ; } public static Program findProgram ( String extension ) { } public static String [ ] getExtensions ( ) { } static String getKeyValue ( String string , boolean expand ) { } static Program getProgram ( String key ) { } public static Program [ ] getPrograms ( ) { } public static boolean launch ( String fileName ) { } public boolean execute ( String fileName ) { } public ImageData getImageData ( ) { } public String getName ( ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public String toString ( ) { } }

Fix:
OS . memcpy ( chars , charArray , ( ( chars . length ) * 2 ) ) ;
Buggy code:
public class ResourceUrlProvider implements ApplicationListener < ContextRefreshedEvent > { protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; private UrlPathHelper pathHelper = new UrlPathHelper ( ) ; private PathMatcher pathMatcher = new AntPathMatcher ( ) ; private final Map < String , ResourceHttpRequestHandler > handlerMap = new HashMap < String , ResourceHttpRequestHandler > ( ) ; private boolean autodetect = true ; public void setUrlPathHelper ( UrlPathHelper pathHelper ) { } public UrlPathHelper getPathHelper ( ) { } public void setPathMatcher ( PathMatcher pathMatcher ) { } public PathMatcher getPathMatcher ( ) { } public void setHandlerMap ( Map < String , ResourceHttpRequestHandler > handlerMap ) { } public Map < String , ResourceHttpRequestHandler > getHandlerMap ( ) { } public boolean isAutodetect ( ) { } @ Override public void onApplicationEvent ( ContextRefreshedEvent event ) { } protected void detectResourceHandlers ( ApplicationContext appContext ) { } public final String getForRequestUrl ( HttpServletRequest request , String requestUrl ) { } public final String getForLookupPath ( String lookupPath ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( ( "Getting<seq2seq4repair_space>resource<seq2seq4repair_space>URL<seq2seq4repair_space>for<seq2seq4repair_space>lookupPath=" + lookupPath ) ) ; } for ( String pattern : this . handlerMap . keySet ( ) ) { if ( ! ( getPathMatcher ( ) . match ( pattern , lookupPath ) ) ) { continue ; } String pathWithinMapping = getPathMatcher ( ) . extractPathWithinPattern ( pattern , lookupPath ) ; String pathMapping = lookupPath . substring ( 0 , lookupPath . indexOf ( pathWithinMapping ) ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( ( ( "Invoking<seq2seq4repair_space>ResourceResolverChain<seq2seq4repair_space>for<seq2seq4repair_space>URL<seq2seq4repair_space>pattern=\"" + pattern ) + "\"" ) ) ; } ResourceHttpRequestHandler handler = this . handlerMap . get ( pattern ) ; <START_BUG> ResourceResolverChain chain = handler . createResourceResolverChain ( ) ; <END_BUG> String resolved = chain . resolveUrlPath ( pathWithinMapping , handler . getLocations ( ) ) ; if ( resolved == null ) { throw new IllegalStateException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>public<seq2seq4repair_space>resource<seq2seq4repair_space>URL<seq2seq4repair_space>path<seq2seq4repair_space>for<seq2seq4repair_space>" + pathWithinMapping ) ) ; } if ( logger . isTraceEnabled ( ) ) { logger . trace ( ( ( "Resolved<seq2seq4repair_space>public<seq2seq4repair_space>resource<seq2seq4repair_space>URL<seq2seq4repair_space>path=\"" + resolved ) + "\"" ) ) ; } return pathMapping + resolved ; } logger . debug ( "No<seq2seq4repair_space>matching<seq2seq4repair_space>resource<seq2seq4repair_space>mapping" ) ; return null ; } }

Fix:
ResourceResolverChain chain = new DefaultResourceResolverChain ( handler . getResourceResolvers ( ) ) ;
Buggy code:
public class AnnotationAwareOrderComparator extends OrderComparator { public static final AnnotationAwareOrderComparator INSTANCE = new AnnotationAwareOrderComparator ( ) ; @ Override protected int getOrder ( Object obj ) { if ( obj instanceof Ordered ) { return ( ( Ordered ) ( obj ) ) . getOrder ( ) ; } if ( obj != null ) { Class < ? > clazz = ( obj instanceof Class ) ? ( ( Class ) ( obj ) ) : obj . getClass ( ) ; <START_BUG> Order order = clazz . getAnnotation ( Order . class ) ; <END_BUG> if ( order != null ) { return order . value ( ) ; } } return Ordered . LOWEST_PRECEDENCE ; } public static void sort ( List < ? > list ) { } public static void sort ( Object [ ] array ) { } }

Fix:
Order order = AnnotationUtils . findAnnotation ( clazz , Order . class ) ;
Buggy code:
public class CommandManager { private final Map < String , Plugin > plugin_commands ; private final Map < String , Command > command_strings ; private final List < Command > full_command_list ; private final Map < String , List < Command > > commands_by_plugin_name ; public CommandManager ( ) { } public boolean addPluginCommand ( Plugin plugin ) { } public Plugin getPluginByCommand ( String command ) { } public boolean addCommand ( Command command ) { } private String getPluginNameByCommand ( Command command ) { } public List < Command > getCommands ( Plugin plugin ) { } public List < Command > getCommands ( String plugin ) { } public Command getCommand ( String command ) { } public String getAdditional ( Command command , String message ) { for ( String string : command . getCommand ( ) ) { if ( message . endsWith ( "<seq2seq4repair_space>" ) ) message = message . trim ( ) ; if ( message . equalsIgnoreCase ( string ) ) return "" ; <START_BUG> message . replaceFirst ( ( "(?i)" + string ) , "" ) ; <END_BUG> } return message ; } public void removeCommand ( Command command ) { } public void removeCommand ( String command ) { } public void removeCommands ( Plugin plugin ) { } public void dropPluginCommands ( Plugin plugin ) { } public Map < String , List < Command > > getAllCommandsByPlugin ( ) { } public Map < String , Plugin > getPluginCommands ( ) { } public List < Command > getAllCommands ( ) { } }

Fix:
message = message . replaceFirst ( ( "(?i)" + string ) , "" ) . trim ( ) ;
Buggy code:
public class ModuleSpecProcessor implements DeploymentUnitProcessor { private static final AttachmentKey < Boolean > MARKER = AttachmentKey . create ( Boolean . class ) ; private static final Logger logger = Logger . getLogger ( "org.jboss.as.server.deployment.module" ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void processTransitiveDependencies ( final ModuleSpecification moduleSpecification , final DeploymentPhaseContext phaseContext ) { } private void processManualTransitiveDependencies ( final ModuleSpecification moduleSpecification , final DeploymentPhaseContext phaseContext , final Set < ModuleIdentifier > deps , final ModuleIdentifier identifier ) { final ServiceController < ModuleSpecification > controller = ( ( ServiceController < ModuleSpecification > ) ( phaseContext . getServiceRegistry ( ) . getService ( ServiceModuleLoader . moduleInformationServiceName ( identifier ) ) ) ) ; if ( controller == null ) { ModuleSpecProcessor . logger . warnf ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>resolve<seq2seq4repair_space>transitive<seq2seq4repair_space>dependencies<seq2seq4repair_space>for<seq2seq4repair_space>module<seq2seq4repair_space>%s<seq2seq4repair_space>" , identifier ) ; return ; } try { ModuleSpecification specification = controller . getValue ( ) ; final List < ModuleDependency > allDeps = specification . getAllDependencies ( ) ; for ( ModuleDependency dependency : allDeps ) { <START_BUG> if ( deps . contains ( dependency ) ) { <END_BUG> continue ; } deps . add ( dependency . getIdentifier ( ) ) ; moduleSpecification . addSystemDependency ( dependency ) ; if ( dependency . getIdentifier ( ) . getName ( ) . startsWith ( MODULE_PREFIX ) ) { processManualTransitiveDependencies ( moduleSpecification , phaseContext , deps , dependency . getIdentifier ( ) ) ; } } } catch ( IllegalStateException e ) { ModuleSpecProcessor . logger . warnf ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>resolve<seq2seq4repair_space>transitive<seq2seq4repair_space>dependencies<seq2seq4repair_space>for<seq2seq4repair_space>module<seq2seq4repair_space>%s<seq2seq4repair_space>" , identifier ) ; } } private ServiceName createModuleService ( DeploymentPhaseContext phaseContext , final DeploymentUnit deploymentUnit , final List < ResourceRoot > resourceRoots , final ModuleSpecification moduleSpecification , final ModuleIdentifier moduleIdentifier ) throws DeploymentUnitProcessingException { } private void createDependencies ( final DeploymentPhaseContext phaseContext , final ModuleSpec . Builder specBuilder , final List < ModuleDependency > apiDependencies ) { } private static void addResourceRoot ( final ModuleSpec . Builder specBuilder , final ResourceRoot resource ) throws DeploymentUnitProcessingException { } public void undeploy ( DeploymentUnit context ) { } }

Fix:
if ( deps . contains ( dependency . getIdentifier ( ) ) ) {
Buggy code:
public final class Image extends Resource implements Drawable { public int type ; public NSImage handle ; NSBitmapImageRep imageRep ; int transparentPixel = - 1 ; GC memGC ; byte [ ] alphaData ; int alpha = - 1 ; int width = - 1 ; int height = - 1 ; static final int DEFAULT_SCANLINE_PAD = 4 ; Image ( Device device ) { } public Image ( Device device , int width , int height ) { } public Image ( Device device , Image srcImage , int flag ) { } public Image ( Device device , Rectangle bounds ) { } public Image ( Device device , ImageData data ) { } public Image ( Device device , ImageData source , ImageData mask ) { } public Image ( Device device , InputStream stream ) { } public Image ( Device device , String filename ) { } void createAlpha ( ) { } void destroy ( ) { } public boolean equals ( Object object ) { } public Color getBackground ( ) { } public Rectangle getBounds ( ) { } public ImageData getImageData ( ) { } public static Image cocoa_new ( Device device , int type , NSImage nsImage ) { } public int hashCode ( ) { } void init ( int width , int height ) { } void init ( ImageData image ) { } public int internal_new_GC ( GCData data ) { if ( ( handle ) == null ) SWT . error ( ERROR_GRAPHIC_DISPOSED ) ; if ( ( ( type ) != ( SWT . BITMAP ) ) || ( ( memGC ) != null ) ) { SWT . error ( ERROR_INVALID_ARGUMENT ) ; } NSBitmapImageRep rep = imageRep ; if ( imageRep . hasAlpha ( ) ) { int bpr = ( width ) * 4 ; rep = ( ( NSBitmapImageRep ) ( new NSBitmapImageRep ( ) . alloc ( ) ) ) ; int bitmapData = imageRep . bitmapData ( ) ; if ( ( data . bitmapDataAddress ) != 0 ) OS . free ( data . bitmapDataAddress ) ; data . bitmapDataAddress = OS . malloc ( PTR_SIZEOF ) ; <START_BUG> OS . memmove ( data . bitmapDataAddress , new int [ ] { bitmapData } , 4 ) ; <END_BUG> rep = rep . initWithBitmapDataPlanes ( data . bitmapDataAddress , width , height , 8 , 3 , false , false , NSDeviceRGBColorSpace , NSAlphaFirstBitmapFormat , bpr , 32 ) ; rep . autorelease ( ) ; } handle . setCacheMode ( NSImageCacheNever ) ; NSGraphicsContext context = NSGraphicsContext . graphicsContextWithBitmapImageRep ( rep ) ; NSGraphicsContext . setCurrentContext ( context ) ; NSAffineTransform transform = NSAffineTransform . transform ( ) ; NSSize size = handle . size ( ) ; transform . translateXBy ( 0 , size . height ) ; transform . scaleXBy ( 1 , ( - 1 ) ) ; transform . set ( ) ; if ( data != null ) { int mask = ( SWT . LEFT_TO_RIGHT ) | ( SWT . RIGHT_TO_LEFT ) ; if ( ( ( data . style ) & mask ) == 0 ) { data . style |= SWT . LEFT_TO_RIGHT ; } data . device = device ; data . background = COLOR_WHITE . handle ; data . foreground = COLOR_BLACK . handle ; data . font = device . systemFont ; data . image = this ; } return context . id ; } public void internal_dispose_GC ( int context , GCData data ) { } public boolean isDisposed ( ) { } public void setBackground ( Color color ) { } public String toString ( ) { } }

Fix:
OS . memmove ( data . bitmapDataAddress , new int [ ] { bitmapData } , PTR_SIZEOF ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class DataSourceCfgMetricUnitTestCase extends DsMgmtTestBase { @ BeforeClass public static void before ( ) { } @ Test public void testDefaultDsAttributes ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testDsWithNoDriver ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testDsWithWrongTransactionIsolationType ( ) throws Exception { } @ Test public void testValidationDefaultProperties ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testWrongValidationProperties ( ) throws Exception { } @ Test public void testTimeoutDefaultProperties ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testWrongBlckgTimeoutProperty ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testWrongIdleMinsProperty ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testWrongUseTryLockProperty ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testWrongAllocRetryProperty ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testWrongAllocRetryWaitProperty ( ) throws Exception { } @ Test public void testStatementDefaultProperties ( ) throws Exception { setModel ( "statement-properties.xml" ) ; <START_BUG> Assert . assertEquals ( "\"NOWARN\"" , readAttribute ( baseAddress , "track-statements" ) . asString ( ) ) ; <END_BUG> Assert . assertFalse ( readAttribute ( baseAddress , "share-prepared-statements" ) . asBoolean ( ) ) ; removeDs ( ) ; } @ Test ( expected = Exception . class ) public void testWrongTrckStmtProperty ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testWrongStmtCacheSizeProperty ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testWrongFlushStrategyProperty ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testWrongMinPoolSizeProperty ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testWrongMaxPoolSizeProperty ( ) throws Exception { } @ Test ( expected = Exception . class ) public void testWrongMaxLessMinPoolSizeProperty ( ) throws Exception { } }

Fix:
Assert . assertEquals ( "NOWARN" , readAttribute ( baseAddress , "track-statements" ) . asString ( ) ) ;
Buggy code:
public class UserServiceImpl implements UserService { private static HashMap < String , UserSession > userSessionMap = new HashMap < String , UserSession > ( ) ; private static Random rnd = new Random ( System . currentTimeMillis ( ) ) ; private static final HashMap < String , Integer > roleNameIdMap = new HashMap < String , Integer > ( 3 ) ; public User getUserById ( int userId ) { } public List < User > getUsers ( ) throws Exception { } public Boolean authenicateUser ( String sessionId , String roleName ) throws Exception { if ( ( UserServiceImpl . userSessionMap . containsKey ( sessionId ) ) && ( roleName != null ) ) { UserSession userSession = UserServiceImpl . userSessionMap . get ( sessionId ) ; <START_BUG> roleName = roleName . trim ( ) . toLowerCase ( ) ; <END_BUG> if ( UserServiceImpl . roleNameIdMap . containsKey ( roleName ) ) { int roleId = UserServiceImpl . roleNameIdMap . get ( roleName ) ; if ( roleId == ( userSession . getRole ( ) ) ) { return true ; } } } return false ; } public User createUser ( User user ) throws UserExistException , Exception { } public User updateUser ( Integer userId , String loginId , String firstName , String lastName , String emailId , String gender , Date dateOfBirth , Long contactNo , Integer extensionNo , Integer employeeId ) throws Exception { } private void setUserDetails ( User user , UserDetails userDetails , Integer userId , String loginId , String firstName , String lastName , String emailId , String gender , Date dateOfBirth , Long contactNo , Integer extensionNo , Integer employeeId ) { } public User updateUser ( User user ) throws Exception { } public Boolean deleteUser ( User user ) throws Exception { } public User changePassword ( String loginId , String oldPassword , String newPassword ) throws IncorrectPasswordException , Exception { } public void logoutUser ( UserSession userSession ) { } public User updateUserRole ( User user , List < Role > roleList ) throws Exception { } public UserSession loginUser ( User user ) throws Exception { } private String getRandomSession ( ) { } No newline ; at end ; of file ; }

Fix:
roleName = roleName . trim ( ) ;
Buggy code:
@ SuppressWarnings ( "restriction" ) public class Java2WSInterfaceConfigWidget extends SimpleWidgetDataContributor { private IStatus IMPL_SELECTION_STATUS = Status . OK_STATUS ; private Java2WSDataModel model ; private IType startingPointType ; private Combo selectImplementationCombo ; public Java2WSInterfaceConfigWidget ( ) { } public void setJava2WSDataModel ( Java2WSDataModel model ) { } public void setJavaStartingPointType ( IType startingPointType ) { } @ Override public WidgetDataEvents addControls ( Composite parent , final Listener statusListener ) { } @ Override public IStatus getStatus ( ) { } private void validateImplementationSelection ( ) { <START_BUG> IType implType = JDTUtils . getType ( model . getProjectName ( ) , selectImplementationCombo . getText ( ) ) ; <END_BUG> if ( implType != null ) { try { IMethod [ ] seiMethods = startingPointType . getMethods ( ) ; for ( IMethod seiMethod : seiMethods ) { IMethod [ ] implMethod = implType . findMethods ( seiMethod ) ; if ( implMethod == null ) { IMPL_SELECTION_STATUS = new Status ( IStatus . ERROR , CXFCreationUIPlugin . PLUGIN_ID , CXFCreationUIMessages . bind ( WEBSERVICE_ENPOINTINTERFACE_MUST_IMPLEMENT , getImplementsMessage ( startingPointType , seiMethod ) ) ) ; break ; } IMPL_SELECTION_STATUS = Status . OK_STATUS ; } model . setServiceEndpointInterfaceName ( startingPointType . getFullyQualifiedName ( ) ) ; model . setFullyQualifiedJavaClassName ( selectImplementationCombo . getText ( ) ) ; } catch ( JavaModelException jme ) { CXFCreationUIPlugin . log ( jme . getStatus ( ) ) ; } } else { IMPL_SELECTION_STATUS = new Status ( IStatus . ERROR , CXFCreationUIPlugin . PLUGIN_ID , CXFCreationUIMessages . bind ( WEBSERVICE_IMPLEMENTATION_NOT_FOUND , selectImplementationCombo . getText ( ) ) ) ; } } private String getImplementsMessage ( IType seiType , IMethod seiMethod ) { } }

Fix:
IType implType = JDTUtils . findType ( model . getProjectName ( ) , selectImplementationCombo . getText ( ) ) ;
Buggy code:
public class HttpSSLProtocolSocketFactory extends SSLSocketFactory implements SecureProtocolSocketFactory { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private final JsseSSLManager sslManager ; private final int CPS ; public HttpSSLProtocolSocketFactory ( JsseSSLManager sslManager ) { } public HttpSSLProtocolSocketFactory ( JsseSSLManager sslManager , int cps ) { } private static final String protocolList = JMeterUtils . getPropDefault ( "https.socket.protocols" , "" ) ; private static final String [ ] protocols = HttpSSLProtocolSocketFactory . protocolList . split ( "<seq2seq4repair_space>" ) ; private void setSocket ( Socket socket ) { } private String join ( String [ ] strings ) { <START_BUG> StringBuffer sb = new StringBuffer ( ) ; <END_BUG> for ( int i = 0 ; i < ( strings . length ) ; i ++ ) { if ( i > 0 ) { sb . append ( "<seq2seq4repair_space>" ) ; } sb . append ( strings [ i ] ) ; } return sb . toString ( ) ; } private SSLSocketFactory getSSLSocketFactory ( ) throws IOException { } private Socket wrapSocket ( Socket sock ) { } public Socket createSocket ( final String host , final int port , final InetAddress localAddress , final int localPort , final HttpConnectionParams params ) throws IOException , UnknownHostException , ConnectTimeoutException { } @ Override public Socket createSocket ( String host , int port ) throws IOException , UnknownHostException { } @ Override public Socket createSocket ( ) throws IOException , UnknownHostException { } @ Override public Socket createSocket ( Socket socket , String host , int port , boolean autoClose ) throws IOException , UnknownHostException { } @ Override public Socket createSocket ( String host , int port , InetAddress clientHost , int clientPort ) throws IOException , UnknownHostException { } @ Override public Socket createSocket ( InetAddress host , int port ) throws IOException { } @ Override public Socket createSocket ( InetAddress address , int port , InetAddress localAddress , int localPort ) throws IOException { } @ Override public String [ ] getDefaultCipherSuites ( ) { } @ Override public String [ ] getSupportedCipherSuites ( ) { } }

Fix:
StringBuilder sb = new StringBuilder ( ) ;
Buggy code:
class WebContextInjector implements Injector < Host > { private Host host ; private final Value < Context > context ; public WebContextInjector ( Value < Context > context ) { } public WebContextInjector ( Context context ) { } public void inject ( final Host host ) throws InjectionException { final Context context = this . context . getValue ( ) ; <START_BUG> if ( ( "//" + "ROOT" ) . equals ( context . getPath ( ) ) ) { <END_BUG> context . setPath ( "" ) ; } context . getLoader ( ) . setContainer ( host ) ; host . addChild ( context ) ; } public void uninject ( ) { } }

Fix:
if ( ( "//" + ( host . getDefaultWebapp ( ) ) ) . equals ( context . getPath ( ) ) ) {
Buggy code:
public class CrateTestServer extends ExternalResource { public final int httpPort ; public final int transportPort ; public final String crateHost ; private final String workingDir ; private final String clusterName ; private final String [ ] unicastHosts ; private Process crateProcess ; private ThreadPoolExecutor executor ; public static CrateTestServer [ ] cluster ( String clusterName , int numberOfNodes ) { } private static String [ ] getUnicastHosts ( String hostAddress , int [ ] transportPorts ) { } public CrateTestServer ( @ Nullable String clusterName ) { } public CrateTestServer ( @ Nullable String clusterName , String host , int httpPort , int transportPort , String ... unicastHosts ) { } public CrateTestServer ( @ Nullable String clusterName , int httpPort , int transportPort , String workingDir , String host , String ... unicastHosts ) { } public static int randomAvailablePort ( ) { } @ Override protected void before ( ) throws Throwable { } @ Override protected void after ( ) { } private void startCrateAsDaemon ( ) throws IOException , InterruptedException { <START_BUG> String [ ] command = new String [ ] { "bin//crate" , "-Des.index.storage.type=memory" , "-Des.network.host=" + ( crateHost ) , "-Des.cluster.name=" + ( clusterName ) , "-Des.http.port=" + ( httpPort ) , "-Des.transport.tcp.port=" + ( transportPort ) , "-Des.discovery.zen.ping.multicast.enabled=false" , "-Des.discovery.zen.ping.unicast.hosts=" + ( Joiner . on ( "," ) . join ( unicastHosts ) ) } ; <END_BUG> ProcessBuilder processBuilder = new ProcessBuilder ( command ) ; assert new File ( workingDir ) . exists ( ) ; processBuilder . directory ( new File ( workingDir , "//parts//crate" ) ) ; processBuilder . redirectErrorStream ( true ) ; crateProcess = processBuilder . start ( ) ; executor . submit ( new Runnable ( ) { @ Override public void run ( ) { InputStream is = crateProcess . getInputStream ( ) ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( is ) ) ; try { while ( true ) { if ( reader . ready ( ) ) { System . out . println ( reader . readLine ( ) ) ; } else { Thread . sleep ( 100 ) ; } try { crateProcess . exitValue ( ) ; break ; } catch ( IllegalThreadStateException e ) { } } } catch ( IOException | InterruptedException e ) { e . printStackTrace ( ) ; } } } ) ; } private boolean waitUntilServerIsReady ( final int timeoutMillis ) throws IOException { } private void deletePath ( Path path ) throws Exception { } private void wipeDataDirectory ( ) throws Exception { } private void wipeLogs ( ) throws Exception { } }

Fix:
String [ ] command = new String [ ] { "bin//crate" , "-Des.index.store.type=memory" , "-Des.network.host=" + ( crateHost ) , "-Des.cluster.name=" + ( clusterName ) , "-Des.http.port=" + ( httpPort ) , "-Des.transport.tcp.port=" + ( transportPort ) , "-Des.discovery.zen.ping.multicast.enabled=false" , "-Des.discovery.zen.ping.unicast.hosts=" + ( Joiner . on ( "," ) . join ( unicastHosts ) ) } ;
Buggy code:
public interface IOptionRenderer < T > extends IClusterable { public String getDisplayValue ( T object ) { } <START_BUG> public IModel < T > getModel ( Object value ) ; <END_BUG> }

Fix:
public IModel < T > getModel ( T value ) ;
Buggy code:
public class PreferencesHelper { private Context context ; private Boolean isHapticFeedback ; private Integer currentUIType ; private SharedPreferences sharedPreferences ; private Boolean isListViewMode ; private Integer numberTimesAppWasOpened ; private Boolean canRateApp ; private boolean hasVibrator ; private PrefsCallbacksManager callbacksManager ; public PreferencesHelper ( Context context ) { } public boolean canRateApp ( ) { } public void setCanRateApp ( boolean canRateApp ) { } public int getNumberTimesAppWasOpened ( ) { } public void increaseNumberTimesAppWasOpened ( ) { this . numberTimesAppWasOpened = ( getNumberTimesAppWasOpened ( ) ) + 1 ; <START_BUG> sharedPreferences . edit ( ) . putInt ( context . getString ( pref_current_ui_type ) , numberTimesAppWasOpened ) . apply ( ) ; <END_BUG> } public PlaylistData getLastPlaylist ( ) { } public void setLastPlaylist ( PlaylistData playlistData ) { } public void setListViewMode ( boolean isListMode ) { } public boolean getListViewMode ( ) { } public Integer getUIType ( ) { } public void setUIType ( int UIType ) { } public boolean isHapticFeedback ( ) { } public void toggleHapticFeedback ( ) { } public void setCallbacksManager ( PrefsCallbacksManager callbacksManager ) { } public void registerPrefsChangedListener ( ) { } public void unRegisterPrefsChangedListener ( ) { } }

Fix:
sharedPreferences . edit ( ) . putInt ( context . getString ( pref_number_times_app_opened ) , numberTimesAppWasOpened ) . apply ( ) ;
Buggy code:
public class DNDExample { private int dragOperation = 0 ; private Transfer [ ] dragTypes = new Transfer [ 0 ] ; private Control dragControl ; private int dragControlType = 0 ; private DragSource dragSource ; private String dragDataText ; private String dragDataRTF ; private String dragDataHTML ; private String dragDataURL ; private String [ ] dragDataFiles ; private List fileList ; private boolean dragEnabled = false ; private int dropOperation = 0 ; private int dropFeedback = 0 ; private int dropDefaultOperation = 0 ; private Transfer [ ] dropTypes = new Transfer [ 0 ] ; private DropTarget dropTarget ; private Control dropControl ; private int dropControlType = 0 ; private Composite defaultParent ; private boolean dropEnabled = false ; private Text dragConsole ; private boolean dragEventDetail = false ; private Text dropConsole ; private boolean dropEventDetail = false ; private Image itemImage ; private static final int BUTTON_TOGGLE = 0 ; private static final int BUTTON_RADIO = 1 ; private static final int BUTTON_CHECK = 2 ; private static final int CANVAS = 3 ; private static final int LABEL = 4 ; private static final int LIST = 5 ; private static final int TABLE = 6 ; private static final int TREE = 7 ; private static final int TEXT = 8 ; private static final int STYLED_TEXT = 9 ; private static final int COMBO = 10 ; public static void main ( String [ ] args ) { } private void addDragTransfer ( Transfer transfer ) { } private void addDropTransfer ( Transfer transfer ) { } private void createDragOperations ( Composite parent ) { } private void createDragSource ( ) { } private void createDragTypes ( Composite parent ) { } private void createDragWidget ( Composite parent ) { } private void createDropOperations ( Composite parent ) { } private void createDropTarget ( ) { } private void createFeedbackTypes ( Group parent ) { } private void createDropTypes ( Composite parent ) { } private void createDropWidget ( Composite parent ) { } private Control createWidget ( int type , Composite parent , String prefix ) { } public void open ( Display display ) { } private void printEvent ( DragSourceEvent e ) { if ( ! ( dragEventDetail ) ) return ; StringBuffer sb = new StringBuffer ( ) ; sb . append ( "widget:<seq2seq4repair_space>" ) ; sb . append ( e . widget ) ; sb . append ( ",<seq2seq4repair_space>time:<seq2seq4repair_space>" ) ; sb . append ( e . time ) ; sb . append ( ",<seq2seq4repair_space>operation:<seq2seq4repair_space>" ) ; sb . append ( e . detail ) ; sb . append ( ",<seq2seq4repair_space>type:<seq2seq4repair_space>" ) ; <START_BUG> sb . append ( ( ( e . dataType ) != null ? e . dataType . type : 0 ) ) ; <END_BUG> sb . append ( ",<seq2seq4repair_space>doit:<seq2seq4repair_space>" ) ; sb . append ( e . doit ) ; sb . append ( ",<seq2seq4repair_space>data:<seq2seq4repair_space>" ) ; sb . append ( e . data ) ; sb . append ( "\n" ) ; dragConsole . append ( sb . toString ( ) ) ; } private void printEvent ( DropTargetEvent e ) { } private void removeDragTransfer ( Transfer transfer ) { } private void removeDropTransfer ( Transfer transfer ) { } }

Fix:
sb . append ( ( ( e . dataType ) != null ? e . dataType . type : "0" ) ) ;
Buggy code:
public class Form { private URL action ; private final Method method ; private final ArrayList < Input > inputs = new ArrayList < > ( ) ; public Form ( Element formElement , URL location ) { } private RadioInput processRadioInputs ( String name , Elements radioInputs ) { } private void setAction ( URL location , String action ) { } public ArrayList < Input > getInputs ( ) { } public void fill ( HashMap < String , String > inputsValues ) { } public Document send ( ) throws IOException { HashMap < String , String > inputsMap = new HashMap < > ( ) ; <START_BUG> inputs . forEach ( ( input ) -> inputsMap . put ( input . getName ( ) , input . getValue ( ) ) ) ; <END_BUG> Connection . Response response = org . jsoup . Jsoup . connect ( action . getPath ( ) ) . data ( inputsMap ) . method ( method ) . execute ( ) ; if ( ( response . statusCode ( ) ) == 200 ) return response . parse ( ) ; else throw new IOException ( response . statusMessage ( ) ) ; } public URL getAction ( ) { } public Method getMethod ( ) { } }

Fix:
inputs . stream ( ) . filter ( Input :: isFilled ) . forEach ( ( input ) -> inputsMap . put ( input . getName ( ) , input . getValue ( ) ) ) ;
Buggy code:
public class ModClusterEnable implements OperationStepHandler , DescriptionProvider { static final ModClusterEnable INSTANCE = new ModClusterEnable ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; modcluster . enable ( ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . getProcessType ( ) . isServer ( ) ) {
Buggy code:
public class Gips extends SimProcess { private Process myModel ; public Gips ( Model owner , String name , boolean showInTrace ) { } public void lifeCycle ( ) { while ( true ) { if ( myModel . gipsQueue . isEmpty ( ) ) { myModel . untaetigeGipsQueue . insert ( this ) ; passivate ( ) ; } else { Patient naechsterPatient = myModel . gipsQueue . first ( ) ; myModel . gipsQueue . remove ( naechsterPatient ) ; <START_BUG> hold ( new TimeSpan ( myModel . getBehandlungszeitK ( ) , TimeUnit . MINUTES ) ) ; <END_BUG> naechsterPatient . activate ( new TimeSpan ( 0.0 ) ) ; } } } }

Fix:
hold ( new TimeSpan ( myModel . getGipsZeit ( ) , TimeUnit . MINUTES ) ) ;