nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Rover { private List < Projectile > projectiles ; private Point location ; private Direction facing ; private Mars mars ; public Rover ( Mars mars ) throws CrashException { } public Rover ( final Mars mars , final Point landingPoint ) throws CrashException { } public Point getLocation ( ) { } public void setLocation ( Point location ) { } public Direction getFacing ( ) { } public void setFacing ( Direction facing ) { } public Mars getMars ( ) { } private static final Map < Direction , Point > positionalAdjustments = new HashMap < Direction , Point > ( ) { } ; private void landOnMars ( Point landingPoint ) throws CrashException { } public boolean fireProjectile ( final Class < ? extends Projectile > type ) { Projectile projectileToFire = Iterables . get ( Collections2 . filter ( projectiles , new Predicate < Projectile > ( ) { @ Override public boolean apply ( Projectile input ) { return input . getClass ( ) . isAssignableFrom ( type ) ; } <START_BUG> } ) , 1 , null ) ; <END_BUG> if ( projectileToFire == null ) { return false ; } projectileToFire . launch ( getFacing ( ) , getLocation ( ) ) ; projectiles . remove ( projectileToFire ) ; return true ; } public boolean moveBackward ( ) { } public boolean moveForward ( ) { } private boolean move ( int adjustmentFactor ) { } private Point createDesiredPosition ( int adjustmentFactor ) { } public boolean turnRight ( ) { } public boolean turnLeft ( ) { } }

Fix:
} ) , 0 , null ) ;
Buggy code:
@ Controller @ SessionAttributes ( "spillet" ) public class MultiChoiceController { @ Autowired private MultiChoiceService s ; @ RequestMapping ( value = "multi" , method = RequestMethod . POST ) public String showMultiChoice ( Model model , @ RequestParam ( "gamename" ) String name ) { } @ RequestMapping ( "nextTask" ) public String nextTask ( Model model , @ ModelAttribute ( "spillet" ) MultiChoice mc , String value , HttpServletRequest request ) { if ( ( request . getParameter ( "button" ) ) != null ) { String button = request . getParameter ( "button" ) ; mc . setResult ( mc . current ( ) , mc . getCurrent ( ) . checkAnswer ( button ) ) ; } mc . getNextExercise ( ) ; if ( ( mc . lastExercise ( ) ) == true ) { <START_BUG> model . addAttribute ( "result" , mc . finnResultat ( ) ) ; <END_BUG> mc . resetCurrent ( ) ; return "result" ; } return "multichoice" ; } }

Fix:
model . addAttribute ( "result" , mc . getResult ( ) ) ;
Buggy code:
public class SupervisorService implements Supervisor { private static final Logger LOG = LoggerFactory . getLogger ( SupervisorService . class ) ; private File location ; private Map < String , Broker > brokers = new ConcurrentHashMap < String , Broker > ( ) ; private Map < String , String > aliases = new ConcurrentHashMap < String , String > ( ) ; public SupervisorService ( ) { } public File getLocation ( ) { } public void setLocation ( File location ) { } public void init ( ) throws RuntimeException { } public Response createBroker ( ) { } public Brokers getBrokers ( String filter ) { } @ Override public Broker getBroker ( String brokerid ) { } public void updateBroker ( String brokerid , Broker brokertype ) { } public void deleteBroker ( String brokerid ) { } public Response getBrokerXbeanConfig ( String brokerid ) { } public Response getBrokerStatus ( String brokerid ) { } private Broker createBroker ( UUID uuid ) { } private void refreshData ( ) { } private File getBrokerMetadataFile ( String brokerid ) { } private File getBrokerXbeanFile ( String brokerid ) { } private void deleteBrokerDataFile ( File data ) { } private Broker loadBrokerMetadata ( File metadata ) { } private void storeBrokerMetadata ( Broker broker ) { } private void storeBrokerXbean ( Broker broker , String xbean ) { } private String generateBrokerXbean ( Broker broker ) { } public static UUID fileToUuid ( String name ) { } public static File getDataLocation ( ) { File dataLocation ; <START_BUG> String envData = System . getenv ( "NOB_DATA" ) ; <END_BUG> if ( envData == null ) { System . getProperty ( "user.home" ) ; dataLocation = new File ( new File ( System . getProperty ( "user.home" ) ) , ".nob" ) ; if ( ! ( dataLocation . exists ( ) ) ) { dataLocation = new File ( new File ( "." ) , ".nob" ) ; } } else { dataLocation = new File ( envData ) ; } if ( ! ( dataLocation . exists ( ) ) ) { dataLocation . mkdirs ( ) ; } if ( ! ( dataLocation . isDirectory ( ) ) ) { SupervisorService . LOG . error ( "Cannot<seq2seq4repair_space>create<seq2seq4repair_space>data<seq2seq4repair_space>directory<seq2seq4repair_space>{}" , dataLocation . getAbsolutePath ( ) ) ; return null ; } return dataLocation ; } public static final String getXbeanConfigurationTemplate ( ) { } }

Fix:
String envData = System . getProperty ( "NOB_DATA" ) ;
Buggy code:
public class EventListAccess implements ListAccess < Row > { private static Log log = ExoLogger . getLogger ( EventListAccess . class ) ; private JCRDataStorage storage ; private EventQuery query ; private Integer size ; public EventListAccess ( JCRDataStorage storage , EventQuery eventQuery ) { } public Row [ ] load ( int offset , int limit ) { } @ Override public int getSize ( ) throws Exception { if ( ( size ) == null ) { <START_BUG> System . out . println ( "Querying<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>Size" ) ; <END_BUG> load ( 0 , 0 ) ; } return size ; } No newline ; at end ; of file ; }

Fix:
EventListAccess . log . debug ( "Querying<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>Size" ) ;
Buggy code:
public final class Scheduler extends Thread implements AutoCloseable { private final LinkedList < Scheduler . Task > tasks ; private final ExecutorService exs ; Scheduler ( ) { } @ Override public final void run ( ) { final LinkedList < Scheduler . Task > completed = new LinkedList < Scheduler . Task > ( ) ; while ( ! ( exs . isShutdown ( ) ) ) { try { Thread . sleep ( 500 ) ; for ( final Scheduler . Task t : tasks ) { if ( t . tick ( ) ) exs . execute ( t ) ; if ( t . isCompleted ( ) ) completed . add ( t ) ; } for ( final Scheduler . Task t : completed ) tasks . remove ( t ) ; completed . clear ( ) ; <START_BUG> } catch ( InterruptedException ex ) { <END_BUG> } } tasks . clear ( ) ; } public final long addTask ( final Scheduler . Task t ) { } public final void cancelTask ( final long id ) { } @ Override public final void close ( ) { } public static abstract class Task implements Runnable { public final long ID ; private boolean started ; private boolean completed ; private int timeleft ; public Task ( final int time ) { } @ Override public void run ( ) { main ( ) ; if ( ( timeleft ) < 1 ) completed = true ; } public abstract void main ( ) { } public final void reschedule ( final int time ) { } private final boolean tick ( ) { } public final boolean isCompleted ( ) { } } }

Fix:
} catch ( final InterruptedException ex ) {
Buggy code:
public class Scale extends Control { public Scale ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( int index ) { } void hookEvents ( ) { super . hookEvents ( ) ; <START_BUG> OS . g_signal_connect ( handle , value_changed , windowProc2 , VALUE_CHANGED ) ; <END_BUG> } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } int gtk_value_changed ( int adjustment ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } }

Fix:
OS . g_signal_connect_closure ( handle , value_changed , display . closures [ VALUE_CHANGED ] , false ) ;
Buggy code:
public final class UnmodifiableMapEntry < K , V > extends AbstractMapEntry < K , V > implements Unmodifiable { public UnmodifiableMapEntry ( final K key , final V value ) { } public UnmodifiableMapEntry ( final KeyValue < K , V > pair ) { } public UnmodifiableMapEntry ( final Map . Entry < K , V > entry ) { } @ Override <START_BUG> public V setValue ( V value ) { <END_BUG> throw new UnsupportedOperationException ( "setValue()<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>supported" ) ; } }

Fix:
public V setValue ( final V value ) {
Buggy code:
public class LatLonType extends AbstractSubTypeFieldType implements SpatialQueryable { protected static final int LAT = 0 ; protected static final int LON = 1 ; @ Override protected void init ( IndexSchema schema , Map < String , String > args ) { } @ Override public IndexableField [ ] createFields ( SchemaField field , Object value , float boost ) { } @ Override public Query getRangeQuery ( QParser parser , SchemaField field , String part1 , String part2 , boolean minInclusive , boolean maxInclusive ) { } @ Override public Query getFieldQuery ( QParser parser , SchemaField field , String externalVal ) { } @ Override public Query createSpatialQuery ( QParser parser , SpatialOptions options ) { } @ Override public ValueSource getValueSource ( SchemaField field , QParser parser ) { } @ Override public boolean isPolyField ( ) { } @ Override public void write ( TextResponseWriter writer , String name , IndexableField f ) throws IOException { <START_BUG> writer . writeStr ( name , f . stringValue ( ) , false ) ; <END_BUG> } @ Override public SortField getSortField ( SchemaField field , boolean top ) { } @ Override public IndexableField createField ( SchemaField field , Object value , float boost ) { } }

Fix:
writer . writeStr ( name , f . stringValue ( ) , true ) ;
Buggy code:
public class InMemoryRelationship implements Relationship { private final Map < String , Object > properties = new HashMap < String , Object > ( ) ; private final Node sNode ; private final Node eNode ; private final RelationshipType type ; public InMemoryRelationship ( final Node sNode , final Node eNode , final RelationshipType type ) { } @ Override public GraphDatabaseService getGraphDatabase ( ) { } @ Override public boolean hasProperty ( String key ) { } @ Override public Object getProperty ( String key ) { } @ Override public Object getProperty ( String key , Object defaultValue ) { } @ Override public void setProperty ( String key , Object value ) { } @ Override public Object removeProperty ( String key ) { } @ Override public Iterable < String > getPropertyKeys ( ) { } @ Override public Iterable < Object > getPropertyValues ( ) { } @ Override public long getId ( ) { } @ Override public void delete ( ) { } @ Override public Node getStartNode ( ) { } @ Override public Node getEndNode ( ) { } @ Override public Node getOtherNode ( Node node ) { } @ Override public Node [ ] getNodes ( ) { } @ Override public RelationshipType getType ( ) { } @ Override public boolean isType ( RelationshipType type ) { <START_BUG> return type . equals ( type ) ; <END_BUG> } public String toString ( ) { } No newline ; at end ; of file ; }

Fix:
return this . type . equals ( type ) ;
Buggy code:
public class ActionUtils { public static String getInfo ( Action action ) { } public static Param [ ] getParams ( Action action ) { } public static String [ ] getFieldNames ( Action a ) { } private static Type getType ( Field field ) { } @ SuppressWarnings ( "unchecked" ) public static void setParam ( Action action , String param , String value ) throws IllegalAccessException , IllegalArgumentException , NoSuchFieldException { } public static String getStringValue ( Action a , String param ) throws IllegalAccessException , IllegalArgumentException , NoSuchFieldException { } public static Field getField ( Class < ? > clazz , String fieldName ) { } public static void writeJson ( Action a , Json json ) { } public static Action readJson ( Json json , JsonValue jsonData ) { String className = jsonData . getString ( "class" , null ) ; Action action = null ; if ( className != null ) { jsonData . remove ( "class" ) ; Class < ? > clazz = null ; try { clazz = ClassReflection . forName ( className ) ; action = ( ( Action ) ( clazz . newInstance ( ) ) ) ; } catch ( ReflectionException | InstantiationException | IllegalAccessException ex ) { throw new SerializationException ( ex ) ; } for ( int j = 0 ; j < ( jsonData . size ) ; j ++ ) { JsonValue v = jsonData . get ( j ) ; try { if ( v . isNull ( ) ) ActionUtils . setParam ( action , v . name , null ) ; else ActionUtils . setParam ( action , v . name , v . asString ( ) ) ; } catch ( NoSuchFieldException | IllegalArgumentException | IllegalAccessException e ) { <START_BUG> throw new SerializationException ( e ) ; <END_BUG> } } } return action ; } }

Fix:
throw new SerializationException ( ( ( ( "Action:<seq2seq4repair_space>" + ( action . getClass ( ) . getCanonicalName ( ) ) ) + "Param:<seq2seq4repair_space>" ) + ( v . name ) ) , e ) ;
Buggy code:
public class AuthenticatedHtmlPage extends HtmlPage { protected boolean checkAccess ( RequestCycle cycle ) { <START_BUG> boolean signedIn = ( cycle . getSession ( ) . getProperty ( "user" ) ) != null ; <END_BUG> if ( ! signedIn ) { cycle . redirectToInterceptPage ( SignIn . class ) ; } return signedIn ; } }

Fix:
boolean signedIn = ( cycle . getSession ( ) . getProperty ( "signin.user" ) ) != null ;
Buggy code:
@ SuppressWarnings ( "InstanceVariableMayNotBeInitialized" ) public class TreeDepthTabPresenterTest { private final GuiTaskRunner taskRunner = new GuiTaskRunner ( MoreExecutors . newDirectExecutorService ( ) , Runnable :: run ) ; private TreeDepthTabView view ; private ParseInfo info ; private CsvTraceModel model ; private MainWindowView mainView ; private TreeDepthTabPresenter presenter ; @ BeforeMethod public void init ( ) { } @ SuppressWarnings ( "AutoBoxing" ) @ Test public void initTest ( ) { } @ Test public void loadTest ( ) { } @ Test public void initialArgumentsTest ( ) { } @ Test public void handleChangeVisibleLinesTest ( ) { final int theAnswer = 42 ; presenter . handleChangeVisibleLines ( theAnswer ) ; assertThat ( presenter . visibleLines ) . isEqualTo ( theAnswer ) ; <START_BUG> verify ( presenter ) . refreshChart ( ) ; <END_BUG> } @ SuppressWarnings ( "AutoBoxing" ) @ DataProvider public Iterator < Object [ ] > startLineValues ( ) { } @ SuppressWarnings ( "AutoBoxing" ) @ Test ( dataProvider = "startLineValues" ) public void handleChangeStartLineTest ( final int nrLines , final int visibleLines , final int requested , final int expected ) { } @ SuppressWarnings ( "AutoBoxing" ) @ DataProvider public Iterator < Object [ ] > prevLineValues ( ) { } @ Test ( dataProvider = "prevLineValues" ) public void handlePreviousLinesTest ( final int visibleLines , final int currentStartLine , final int expected ) { } @ SuppressWarnings ( "AutoBoxing" ) @ DataProvider public Iterator < Object [ ] > nextLineValues ( ) { } @ Test ( dataProvider = "nextLineValues" ) public void handleNextLineTest ( final int visibleLines , final int currentStartLine , final int expected ) { } @ Test public void handleChartRefreshTest ( ) { } @ SuppressWarnings ( "AutoBoxing" ) @ DataProvider public Iterator < Object [ ] > chartValues ( ) { } @ SuppressWarnings ( "AutoBoxing" ) @ Test ( dataProvider = "chartValues" ) public void refreshChartTest ( final int nrLines , final int visibleLines , final int expected ) { } @ Test public void doRefreshChartFailureTest ( ) throws GrappaDebuggerException { } @ Test public void doRefreshChartSuccessTest ( ) throws GrappaDebuggerException { } @ SuppressWarnings ( "AutoBoxing" ) @ DataProvider public Iterator < Object [ ] > updateToolbarData ( ) { } @ SuppressWarnings ( "AutoBoxing" ) @ Test ( dataProvider = "updateToolbarData" ) public void updateToolbarTest ( final int nrLines , final int startLine , final int visibleLines , final boolean loaded , final boolean disablePrev , final boolean disableNext , final boolean disableRefresh ) { } }

Fix:
verify ( presenter ) . handleChangeStartLine ( presenter . startLine ) ;
Buggy code:
public class SenseiStarter { private static final Logger logger = Logger . getLogger ( SenseiStarter . class ) ; public static File ConfDir1 = null ; public static File ConfDir2 = null ; public static File IndexDir = new File ( "index//test" ) ; public static URL SenseiUrl = null ; static SenseiBroker broker = null ; static SenseiService httpRestSenseiService = null ; static SenseiServer node1 ; static SenseiServer node2 ; static Server httpServer1 ; static Server httpServer2 ; protected static SenseiNetworkClient networkClient ; protected static ClusterClient clusterClient ; protected static SenseiRequestScatterRewriter requestRewriter ; protected static SenseiLoadBalancerFactory loadBalancerFactory ; protected static NetworkServer networkServer1 ; protected static NetworkServer networkServer2 ; protected static final String SENSEI_TEST_CONF_FILE = "sensei-test.spring" ; protected static SenseiZoieFactory < ? > _zoieFactory ; private static boolean started = false ; public static synchronized void start ( ) { } private static void waitTillServerStarts ( ) throws Exception { SenseiRequest req = new SenseiRequest ( ) ; SenseiResult res = null ; int count = 0 ; do { <START_BUG> Thread . sleep ( 5000 ) ; <END_BUG> res = SenseiStarter . broker . browse ( req ) ; System . out . println ( ( ( "" + ( res . getNumHits ( ) ) ) + "<seq2seq4repair_space>loaded..." ) ) ; ++ count ; } while ( ( count < 20 ) && ( ( res . getNumHits ( ) ) < 15000 ) ) ; } private static void loadFromSpringContext ( ) { } private static boolean rmrf ( File f ) { } private static void shutdownSensei ( ) { } }

Fix:
Thread . sleep ( 500 ) ;
Buggy code:
public class TreeColumn extends Item { Tree parent ; int width ; boolean resizable = true ; public TreeColumn ( Tree parent , int style ) { } public TreeColumn ( Tree parent , int style , int index ) { } public void addControlListener ( ControlListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } static Tree checkNull ( Tree tree ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public void dispose ( ) { } void dispose ( boolean notifyParent ) { } public int getAlignment ( ) { } int getIndex ( ) { } public Tree getParent ( ) { } int getPreferredWidth ( ) { } public boolean getResizable ( ) { } public int getWidth ( ) { } int getX ( ) { } void paint ( GC gc ) { } public void pack ( ) { checkWidget ( ) ; TreeItem [ ] availableItems = parent . availableItems ; if ( ( availableItems . length ) == 0 ) return ; int index = getIndex ( ) ; int width = getPreferredWidth ( ) ; for ( int i = 0 ; i < ( availableItems . length ) ; i ++ ) { width = Math . max ( width , availableItems [ i ] . getPreferredWidth ( index ) ) ; } <START_BUG> setWidth ( width ) ; <END_BUG> } public void removeControlListener ( ControlListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setAlignment ( int alignment ) { } public void setImage ( Image value ) { } public void setResizable ( boolean value ) { } public void setText ( String value ) { } public void setWidth ( int value ) { } }

Fix:
parent . updateColumnWidth ( this , width ) ;
Buggy code:
public class GameLogic { public DBConnection db = DBConnection . getInstance ( ) ; private static GameLogic instance = null ; public static GameLogic getInstance ( ) { } public Object [ ] [ ] listEquip ( int option ) throws SQLException { int index ; int size ; ArrayList < Equipment > result ; if ( option == 1 ) { result = db . getOPEquip ( 1 ) ; } else { result = db . getOPEquip ( 0 ) ; } size = result . size ( ) ; Object [ ] [ ] equipList = new Object [ size ] [ 6 ] ; index = 0 ; while ( index <= ( size - 1 ) ) { equipList [ index ] [ 0 ] = result . get ( index ) . equipID ; equipList [ index ] [ 1 ] = result . get ( index ) . equipName ; equipList [ index ] [ 2 ] = result . get ( index ) . price ; equipList [ index ] [ 3 ] = result . get ( index ) . types ; <START_BUG> equipList [ index ] [ 4 ] = result . get ( index ) . equiptimes ; <END_BUG> equipList [ index ] [ 5 ] = ( result . get ( index ) . equipWinrate ) + "<seq2seq4repair_space>%" ; index ++ ; } return equipList ; } public Object [ ] [ ] listHero ( int option ) throws SQLException { } public Object [ ] [ ] listMap ( ) throws SQLException { } public Object [ ] [ ] rankDistri ( ) throws SQLException { } public void simulate ( ) throws SQLException { } }

Fix:
equipList [ index ] [ 4 ] = result . get ( index ) . equipTimes ;
Buggy code:
public class RepeatedTestTest extends TestCase { private TestSuite fSuite ; public static class SuccessTest extends TestCase { public void runTest ( ) { } } public RepeatedTestTest ( String name ) { } public void testRepeatedOnce ( ) { } public void testRepeatedMoreThanOnce ( ) { } public void testRepeatedZero ( ) { } public void testRepeatedNegative ( ) { try { <START_BUG> Test test = new junit . extensions . RepeatedTest ( fSuite , ( - 1 ) ) ; <END_BUG> } catch ( IllegalArgumentException e ) { return ; } fail ( "Should<seq2seq4repair_space>throw<seq2seq4repair_space>an<seq2seq4repair_space>IllegalArgumentException" ) ; } }

Fix:
new junit . extensions . RepeatedTest ( fSuite , ( - 1 ) ) ;
Buggy code:
public class Javac12 extends DefaultCompilerAdapter { public boolean execute ( ) throws TaskException { getLogger ( ) . debug ( "Using<seq2seq4repair_space>classic<seq2seq4repair_space>compiler" ) ; Commandline cmd = setupJavacCommand ( true ) ; <START_BUG> OutputStream logstr = new org . apache . tools . ant . taskdefs . exec . LogOutputStream ( m_attributes , Project . MSG_WARN ) ; <END_BUG> try { Class c = Class . forName ( "sun.tools.javac.Main" ) ; Constructor cons = c . getConstructor ( new Class [ ] { OutputStream . class , String . class } ) ; Object compiler = cons . newInstance ( new Object [ ] { logstr , "javac" } ) ; Method compile = c . getMethod ( "compile" , new Class [ ] { String [ ] . class } ) ; Boolean ok = ( ( Boolean ) ( compile . invoke ( compiler , new Object [ ] { cmd . getArguments ( ) } ) ) ) ; return ok . booleanValue ( ) ; } catch ( ClassNotFoundException ex ) { throw new TaskException ( ( "Cannot<seq2seq4repair_space>use<seq2seq4repair_space>classic<seq2seq4repair_space>compiler,<seq2seq4repair_space>as<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>available" + ( "<seq2seq4repair_space>A<seq2seq4repair_space>common<seq2seq4repair_space>solution<seq2seq4repair_space>is<seq2seq4repair_space>to<seq2seq4repair_space>set<seq2seq4repair_space>the<seq2seq4repair_space>environment<seq2seq4repair_space>variable" + "<seq2seq4repair_space>JAVA_HOME<seq2seq4repair_space>to<seq2seq4repair_space>your<seq2seq4repair_space>jdk<seq2seq4repair_space>directory." ) ) ) ; } catch ( Exception ex ) { if ( ex instanceof TaskException ) { throw ( ( TaskException ) ( ex ) ) ; } else { throw new TaskException ( "Error<seq2seq4repair_space>starting<seq2seq4repair_space>classic<seq2seq4repair_space>compiler:<seq2seq4repair_space>" , ex ) ; } } finally { try { logstr . close ( ) ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } } } }

Fix:
OutputStream logstr = new org . apache . tools . ant . taskdefs . exec . LogOutputStream ( m_attributes . hackGetLogger ( ) , true ) ;
Buggy code:
public abstract class AbstractMethodDeclaration extends AstNode implements ReferenceContext , ProblemSeverities { public MethodScope scope ; public char [ ] selector ; public int declarationSourceStart ; public int declarationSourceEnd ; public int modifiers ; public int modifiersSourceStart ; public Argument [ ] arguments ; public TypeReference [ ] thrownExceptions ; public Statement [ ] statements ; public int explicitDeclarations ; public MethodBinding binding ; public boolean ignoreFurtherInvestigation = false ; public boolean needFreeReturn = false ; public Annotation annotation ; public int bodyStart ; public int bodyEnd = - 1 ; public CompilationResult compilationResult ; public boolean errorInSignature = false ; AbstractMethodDeclaration ( CompilationResult compilationResult ) { } public void abort ( int abortLevel ) { } public abstract void analyseCode ( ClassScope classScope , InitializationFlowContext initializationContext , FlowInfo info ) { } public void bindArguments ( ) { } public void bindThrownExceptions ( ) { } public CompilationResult compilationResult ( ) { } public void generateCode ( ClassScope classScope , ClassFile classFile ) { } private void generateCode ( ClassFile classFile ) { } private void checkArgumentsSize ( ) { } public boolean hasErrors ( ) { } public boolean isAbstract ( ) { } public boolean isClinit ( ) { } public boolean isConstructor ( ) { } public boolean isDefaultConstructor ( ) { } public boolean isInitializationMethod ( ) { } public boolean isNative ( ) { } public boolean isStatic ( ) { } public abstract void parseStatements ( Parser parser , CompilationUnitDeclaration unit ) { } public StringBuffer print ( int tab , StringBuffer output ) { } public StringBuffer printBody ( int indent , StringBuffer output ) { } public StringBuffer printReturnType ( int indent , StringBuffer output ) { } public void resolve ( ClassScope upperScope ) { } public void resolveAnnotation ( ) { if ( ( this . binding ) == null ) return ; if ( ( this . annotation ) != null ) { this . annotation . resolve ( this . scope ) ; return ; } if ( this . binding . isPublic ( ) ) { <START_BUG> this . scope . problemReporter ( ) . annotationMissingForPublic ( this . sourceStart , ( ( ( this . sourceStart ) + ( this . selector . length ) ) - 1 ) , true ) ; <END_BUG> } } public void resolveStatements ( ) { } public void tagAsHavingErrors ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , ClassScope classScope ) { } }

Fix:
this . scope . problemReporter ( ) . annotationMissingForPublic ( this . sourceStart , this . sourceEnd ) ;
Buggy code:
public class PDFPreviewGridActivity extends Activity { private MuPDFCore mCore ; private int mPosition ; private GridView mGrid ; private PDFPreviewGridAdapter mAdapter ; @ SuppressLint ( "NewApi" ) @ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; if ( ( VERSION . SDK_INT ) >= ( VERSION_CODES . LOLLIPOP ) ) { getWindow ( ) . addFlags ( FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS ) ; getWindow ( ) . setStatusBarColor ( getResources ( ) . getColor ( actionbar_background_dark ) ) ; getWindow ( ) . setNavigationBarColor ( getResources ( ) . getColor ( actionbar_background_dark ) ) ; } LibraryUtils . reloadLocale ( getApplicationContext ( ) ) ; mCore = PDFPreviewGridActivityData . get ( ) . core ; mPosition = PDFPreviewGridActivityData . get ( ) . position ; setContentView ( preview_grid_fragment ) ; mGrid = ( ( GridView ) ( findViewById ( preview_grid ) ) ) ; mAdapter = new PDFPreviewGridAdapter ( this , mCore , mPosition ) ; mGrid . setAdapter ( mAdapter ) ; <START_BUG> mGrid . smoothScrollToPosition ( mPosition ) ; <END_BUG> } public void OnCancelPreviewButtonClick ( View v ) { } }

Fix:
mGrid . setSelection ( mPosition ) ;
Buggy code:
public class CMBuilder { private final QName fQName1 = new QName ( ) ; private final QName fQName2 = new QName ( ) ; private XSDeclarationPool fDeclPool = null ; private int fLeafCount ; public CMBuilder ( XSDeclarationPool pool ) { } public XSCMValidator getContentModel ( XSComplexTypeDecl typeDecl ) { } private XSParticleDecl expandParticleTree ( XSParticleDecl particle ) { } private XSCMValidator createChildModel ( XSParticleDecl particle , boolean isMixed ) { } private XSParticleDecl expandContentModel ( XSParticleDecl particle , int minOccurs , int maxOccurs ) { } private void gatherAllLeaves ( XSParticleDecl particle , XSAllCM allContent ) { } private XSParticleDecl createParticle ( short type , XSParticleDecl left , XSParticleDecl right ) { } private final CMNode buildSyntaxTree ( XSParticleDecl startNode ) { CMNode nodeRet = null ; if ( ( startNode . fType ) == ( XSParticleDecl . PARTICLE_WILDCARD ) ) { nodeRet = new XSCMAny ( startNode . fType , ( ( XSWildcardDecl ) ( startNode . fValue ) ) , ( ( fLeafCount ) ++ ) ) ; } else if ( ( startNode . fType ) == ( XSParticleDecl . PARTICLE_ELEMENT ) ) { <START_BUG> nodeRet = new XSCMLeaf ( ( ( XSElementDecl ) ( startNode . fValue ) ) , ( ( fLeafCount ) ++ ) ) ; <END_BUG> } else { final XSParticleDecl leftNode = ( ( XSParticleDecl ) ( startNode . fValue ) ) ; final XSParticleDecl rightNode = ( ( XSParticleDecl ) ( startNode . fOtherValue ) ) ; if ( ( ( startNode . fType ) == ( XSParticleDecl . PARTICLE_CHOICE ) ) || ( ( startNode . fType ) == ( XSParticleDecl . PARTICLE_SEQUENCE ) ) ) { nodeRet = new XSCMBinOp ( startNode . fType , buildSyntaxTree ( leftNode ) , buildSyntaxTree ( rightNode ) ) ; } else if ( ( ( ( startNode . fType ) == ( XSParticleDecl . PARTICLE_ZERO_OR_MORE ) ) || ( ( startNode . fType ) == ( XSParticleDecl . PARTICLE_ZERO_OR_ONE ) ) ) || ( ( startNode . fType ) == ( XSParticleDecl . PARTICLE_ONE_OR_MORE ) ) ) { nodeRet = new XSCMUniOp ( startNode . fType , buildSyntaxTree ( leftNode ) ) ; } else { throw new RuntimeException ( "ImplementationMessages.VAL_CST" ) ; } } return nodeRet ; } }

Fix:
nodeRet = new XSCMLeaf ( XSParticleDecl . PARTICLE_ELEMENT , ( ( XSElementDecl ) ( startNode . fValue ) ) , ( ( fLeafCount ) ++ ) ) ;
Buggy code:
final class ServiceNameFactory { private static final ServiceName MBEAN_SERVICE_NAME_BASE = JBOSS . append ( "mbean" , "service" ) ; private static final String CREATE_SUFFIX = "create" ; private static final String START_SUFFIX = "start" ; private ServiceNameFactory ( ) { } static ServiceName newCreateDestroy ( final String mBeanName ) { } static ServiceName newStartStop ( final String mBeanName ) { } private static ServiceName newServiceName ( final String name ) { if ( name == null ) { <START_BUG> throw new IllegalArgumentException ( "Name<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; <END_BUG> } return ServiceNameFactory . MBEAN_SERVICE_NAME_BASE . append ( name ) ; } }

Fix:
throw MESSAGES . nullVar ( "name" ) ;
Buggy code:
public class BinaryReader2D { public static short [ ] [ ] readRowRange ( String fname , Range rows , int globalColCount , ByteOrder endianness , boolean divideByShortMax , TransformationFunction function ) { try ( FileChannel fc = ( ( FileChannel ) ( Files . newByteChannel ( Paths . get ( fname ) , StandardOpenOption . READ ) ) ) ) { int dataTypeSize = Short . BYTES ; long pos = ( ( ( long ) ( rows . getStartIndex ( ) ) ) * globalColCount ) * dataTypeSize ; final long extent = ( ( ( long ) ( rows . getLength ( ) ) ) * globalColCount ) * dataTypeSize ; int maps = ( ( int ) ( extent // ( ( long ) ( Integer . MAX_VALUE ) ) ) ) ; <START_BUG> if ( ( extent % ( ( long ) ( Integer . MAX_VALUE ) ) ) >= 0 ) <END_BUG> ++ maps ; MappedByteBuffer [ ] mappedByteBuffers = new MappedByteBuffer [ maps ] ; for ( int i = 0 ; i < ( maps - 1 ) ; ++ i ) { mappedByteBuffers [ i ] = fc . map ( FileChannel . MapMode . READ_ONLY , ( pos + ( ( ( long ) ( i ) ) * ( Integer . MAX_VALUE ) ) ) , Integer . MAX_VALUE ) ; mappedByteBuffers [ i ] . order ( endianness ) ; } mappedByteBuffers [ ( maps - 1 ) ] = fc . map ( FileChannel . MapMode . READ_ONLY , ( pos + ( ( ( long ) ( maps - 1 ) ) * ( Integer . MAX_VALUE ) ) ) , ( extent - ( ( maps - 1 ) * ( ( long ) ( Integer . MAX_VALUE ) ) ) ) ) ; mappedByteBuffers [ ( maps - 1 ) ] . order ( endianness ) ; int rowCount = rows . getLength ( ) ; short [ ] [ ] rowBlock = new short [ rowCount ] [ ] ; double tmp ; for ( int i = 0 ; i < rowCount ; ++ i ) { short [ ] rowBlockRow = rowBlock [ i ] = new short [ globalColCount ] ; for ( int j = 0 ; j < globalColCount ; ++ j ) { long procLocalPnum = ( ( ( long ) ( i ) ) * globalColCount ) + j ; long procLocalBytePosition = procLocalPnum * dataTypeSize ; int bufferIdx = ( ( int ) ( procLocalBytePosition // ( Integer . MAX_VALUE ) ) ) ; int bufferLocalBytePosition = ( ( int ) ( procLocalBytePosition % ( Integer . MAX_VALUE ) ) ) ; tmp = ( mappedByteBuffers [ bufferIdx ] . getShort ( bufferLocalBytePosition ) ) * ( divideByShortMax ? 1.0 // ( Short . MAX_VALUE ) : 1.0 ) ; assert ( tmp == ( - 1.0 ) ) || ( ( tmp >= 0.0 ) && ( tmp <= 1.0 ) ) ; if ( function != null ) { tmp = function . transform ( tmp ) ; } rowBlockRow [ j ] = ( ( short ) ( tmp * ( Short . MAX_VALUE ) ) ) ; } } return rowBlock ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return null ; } public static short [ ] [ ] readConstant ( Range rows , int globalColCount , double w ) { } }

Fix:
if ( ( extent % ( ( long ) ( Integer . MAX_VALUE ) ) ) > 0 )
Buggy code:
public class FilesystemServiceImpl implements FilesystemService { private Neo4JEmbeddedConnection neo4jEmbeddedConnection ; private GraphDatabaseService graphDatabaseService ; public FilesystemServiceImpl ( ) { } @ Override public void createNewFilesystem ( String filesystemId , String userId , Map < String , Object > filesystemProperties ) throws DuplicateFilesystem , UserNotFound { } @ Override public void createNewVersion ( String userId , String filesystemId , Map < String , Object > changeMetadata , Map < String , Object > changedProperties ) throws FilesystemNotFound , UserNotFound { } @ Override public void deleteFilesystemTemporarily ( String userId , String filesystemId ) throws FilesystemNotFound , UserNotFound { } @ Override public Map < String , Object > getFilesystem ( String userId , String filesystemId , int version ) throws FilesystemNotFound , UserNotFound , VersionNotFound { try ( Transaction transaction = this . graphDatabaseService . beginTx ( ) ) { Node filesystem = null ; try { <START_BUG> filesystem = new CommonCode ( ) . getVersion ( "filesystem" , userId , filesystemId , null , null , ( - 1 ) ) ; <END_BUG> } catch ( FileNotFound | DirectoryNotFound e ) { } Map < String , Object > filesystemProperties = new HashMap < String , Object > ( ) ; Iterable < String > keys = filesystem . getPropertyKeys ( ) ; for ( String key : keys ) { filesystemProperties . put ( key , filesystem . getProperty ( key ) ) ; } transaction . success ( ) ; return filesystemProperties ; } } }

Fix:
filesystem = new CommonCode ( ) . getVersion ( "filesystem" , userId , filesystemId , null , null , version ) ;
Buggy code:
public class WikipediaDatasetCreatorDriver { private WikipediaDatasetCreatorDriver ( ) { } public static void main ( String [ ] args ) throws IOException { } public static void runJob ( String input , String output , String countriesFile ) throws IOException { JobClient client = new JobClient ( ) ; JobConf conf = new JobConf ( WikipediaDatasetCreatorDriver . class ) ; conf . set ( "key.value.separator.in.input.line" , "<seq2seq4repair_space>" ) ; conf . set ( "xmlinput.start" , "<text<seq2seq4repair_space>xml:space=\"preserve\">" ) ; conf . set ( "xmlinput.end" , "<//text>" ) ; conf . setOutputKeyClass ( Text . class ) ; conf . setOutputValueClass ( Text . class ) ; FileInputFormat . setInputPaths ( conf , new Path ( input ) ) ; Path outPath = new Path ( output ) ; FileOutputFormat . setOutputPath ( conf , outPath ) ; conf . setMapperClass ( WikipediaDatasetCreatorMapper . class ) ; conf . setNumMapTasks ( 100 ) ; conf . setInputFormat ( XmlInputFormat . class ) ; conf . setReducerClass ( WikipediaDatasetCreatorReducer . class ) ; conf . setOutputFormat ( WikipediaDatasetCreatorOutputFormat . class ) ; conf . set ( "io.serializations" , "org.apache.hadoop.io.serializer.JavaSerialization,org.apache.hadoop.io.serializer.WritableSerialization" ) ; <START_BUG> FileSystem dfs = FileSystem . get ( conf ) ; <END_BUG> if ( dfs . exists ( outPath ) ) dfs . delete ( outPath , true ) ; Set < String > countries = new HashSet < String > ( ) ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( new FileInputStream ( countriesFile ) , "UTF-8" ) ) ; String line ; while ( ( line = reader . readLine ( ) ) != null ) { countries . add ( line ) ; } reader . close ( ) ; DefaultStringifier < Set < String > > setStringifier = new DefaultStringifier < Set < String > > ( conf , GenericsUtil . getClass ( countries ) ) ; String countriesString = setStringifier . toString ( countries ) ; conf . set ( "wikipedia.countries" , countriesString ) ; client . setConf ( conf ) ; JobClient . runJob ( conf ) ; } }

Fix:
FileSystem dfs = FileSystem . get ( outPath . toUri ( ) , conf ) ;
Buggy code:
public class JavaTest extends BuildFileTest { private static final int TIME_TO_WAIT = 1 ; private static final int SECURITY_MARGIN = 2000 ; private static final FileUtils FILE_UTILS = FileUtils . getFileUtils ( ) ; private boolean runFatalTests = false ; public JavaTest ( String name ) { } public void setUp ( ) { } public void tearDown ( ) { } public void testNoJarNoClassname ( ) { } public void testJarNoFork ( ) { } public void testJarAndClassName ( ) { } public void testClassnameAndJar ( ) { } public void testRun ( ) { } public void testRunFail ( ) { } public void testRunFailFoe ( ) { } public void testRunFailFoeFork ( ) { } public void testExcepting ( ) { } public void testExceptingFork ( ) { } public void testExceptingFoe ( ) { } public void testExceptingFoeFork ( ) { } public void testResultPropertyZero ( ) { } public void testResultPropertyNonZero ( ) { } public void testResultPropertyZeroNoFork ( ) { } public void testResultPropertyNonZeroNoFork ( ) { } public void testRunFailWithFailOnError ( ) { } public void testRunSuccessWithFailOnError ( ) { } public void testSpawn ( ) { <START_BUG> File logFile = JavaTest . FILE_UTILS . createTempFileName ( "spawn" , "log" , project . getBaseDir ( ) , false ) ; <END_BUG> assertTrue ( "log<seq2seq4repair_space>file<seq2seq4repair_space>not<seq2seq4repair_space>existing" , ( ! ( logFile . exists ( ) ) ) ) ; project . setProperty ( "logFile" , logFile . getAbsolutePath ( ) ) ; project . setProperty ( "timeToWait" , Long . toString ( JavaTest . TIME_TO_WAIT ) ) ; project . executeTarget ( "testSpawn" ) ; try { Thread . sleep ( ( ( ( JavaTest . TIME_TO_WAIT ) * 1000 ) + ( JavaTest . SECURITY_MARGIN ) ) ) ; } catch ( Exception ex ) { System . out . println ( "my<seq2seq4repair_space>sleep<seq2seq4repair_space>was<seq2seq4repair_space>interrupted" ) ; } if ( ! ( logFile . exists ( ) ) ) { System . out . println ( ( "suggestion:<seq2seq4repair_space>increase<seq2seq4repair_space>the<seq2seq4repair_space>constant" + "<seq2seq4repair_space>SECURITY_MARGIN<seq2seq4repair_space>to<seq2seq4repair_space>give<seq2seq4repair_space>more<seq2seq4repair_space>time<seq2seq4repair_space>for<seq2seq4repair_space>java<seq2seq4repair_space>to<seq2seq4repair_space>start." ) ) ; } assertTrue ( "log<seq2seq4repair_space>file<seq2seq4repair_space>exists" , logFile . exists ( ) ) ; } public void testRedirect1 ( ) { } public void testRedirect2 ( ) { } public void testRedirect3 ( ) { } public void testRedirector1 ( ) { } public void testRedirector2 ( ) { } public static class EntryPoint { public static void main ( String [ ] argv ) { } } public static class ExceptingEntryPoint { public static void main ( String [ ] argv ) { } } public static class SpawnEntryPoint { public static void main ( String [ ] argv ) { } } public static class PipeEntryPoint { public static void main ( String [ ] args ) { } } }

Fix:
File logFile = JavaTest . FILE_UTILS . createTempFile ( "spawn" , "log" , project . getBaseDir ( ) , false , false ) ;
Buggy code:
public class JBossAsManagedConfiguration extends JBossAsCommonConfiguration { private String jbossHome = System . getenv ( "JBOSS_HOME" ) ; private String javaHome = System . getenv ( "JAVA_HOME" ) ; private String javaVmArguments = "-Xmx512m<seq2seq4repair_space>-XX:MaxPermSize=128m" ; private int startupTimeoutInSeconds = 30 ; private boolean outputToConsole = true ; @ Override public void validate ( ) throws ConfigurationException { super . validate ( ) ; <START_BUG> Validate . configurationDirectoryExists ( jbossHome , "jbossHome<seq2seq4repair_space>must<seq2seq4repair_space>exist" ) ; <END_BUG> if ( ( javaHome ) != null ) { Validate . configurationDirectoryExists ( javaHome , "javaHome<seq2seq4repair_space>must<seq2seq4repair_space>exist" ) ; } } public String getJbossHome ( ) { } public void setJbossHome ( String jbossHome ) { } public String getJavaHome ( ) { } public void setJavaHome ( String javaHome ) { } public String getJavaVmArguments ( ) { } public void setJavaVmArguments ( String javaVmArguments ) { } public void setStartupTimeoutInSeconds ( int startupTimeoutInSeconds ) { } public int getStartupTimeoutInSeconds ( ) { } public void setOutputToConsole ( boolean outputToConsole ) { } public boolean isOutputToConsole ( ) { } }

Fix:
Validate . configurationDirectoryExists ( jbossHome , ( ( "jbossHome<seq2seq4repair_space>'" + ( jbossHome ) ) + "'<seq2seq4repair_space>must<seq2seq4repair_space>exist" ) ) ;
Buggy code:
public abstract class AbstractPropertyModel extends AbstractDetachableModel { private Object nestedModel ; public AbstractPropertyModel ( final Object modelObject ) { } public final IModel getNestedModel ( ) { } protected Object modelObject ( final Component component ) { } protected abstract String propertyExpression ( Component component ) { } protected void onAttach ( ) { } protected void onDetach ( ) { } protected Object onGetObject ( final Component component ) { } protected void onSetObject ( final Component component , Object object ) { final String expression = propertyExpression ( component ) ; if ( Strings . isEmpty ( expression ) ) { if ( ( nestedModel ) instanceof IModel ) { ( ( IModel ) ( nestedModel ) ) . setObject ( null , object ) ; } else { nestedModel = object ; } } else { Object modelObject = modelObject ( component ) ; if ( object instanceof String ) { final String string = ( ( String ) ( object ) ) ; if ( ! ( Strings . isEmpty ( string ) ) ) { final Class propertyType = propertyType ( component ) ; if ( propertyType != null ) { object = component . getConverter ( ) . convert ( string , propertyType ) ; } } } <START_BUG> PropertyResolver . setValue ( expression , modelObject , object , component . getConverter ( ) ) ; <END_BUG> } } protected abstract Class propertyType ( Component component ) { } public String toString ( ) { } }

Fix:
PropertyResolver . setValue ( expression , modelObject , object , ( component == null ? null : component . getConverter ( ) ) ) ;
Buggy code:
public class TextField extends AbstractTextComponent { private static final long serialVersionUID = - 2913294206388017417L ; private Class type ; public TextField ( String name , Serializable object ) { } public TextField ( String name , Serializable object , String expression ) { } public TextField ( String name , Serializable object , Class type ) { } public TextField ( String name , Serializable object , String expression , Class type ) { } protected void updateModel ( ) { if ( ( type ) != null ) { <START_BUG> setModelObject ( getConverter ( ) . convert ( getRequestString ( ) , type ) ) ; <END_BUG> } else { super . updateModel ( ) ; } } protected void onComponentTag ( final ComponentTag tag ) { } }

Fix:
setModelObject ( getConverter ( ) . convert ( getInput ( ) , type ) ) ;
Buggy code:
public class BlockBench extends BlockContainer { public final String blockName = "betterBench" ; @ SideOnly ( Side . CLIENT ) protected IIcon top ; @ SideOnly ( Side . CLIENT ) protected IIcon front ; protected BlockBench ( ) { } @ Override public TileEntity createNewTileEntity ( World world , int p_149915_2_ ) { } public boolean onBlockActivated ( World world , int x , int y , int z , EntityPlayer player , int side , float hitX , float hitY , float hitZ ) { } @ Override public void breakBlock ( World world , int x , int y , int z , Block block , int p_149749_6_ ) { } public void dumpItems ( World world , int x , int y , int z , ItemStack items ) { } protected ArrayList < ItemStack > getInsides ( World world , int x , int y , int z ) { ArrayList < ItemStack > items = new ArrayList < ItemStack > ( ) ; TileBench tileEntity = ( ( TileBench ) ( world . getTileEntity ( x , y , z ) ) ) ; if ( tileEntity != null ) { <START_BUG> for ( int i = 0 ; i < ( tileEntity . getSizeInventory ( ) ) ; ++ i ) { <END_BUG> ItemStack itemstack = tileEntity . getStackInSlot ( i ) ; if ( itemstack != null ) { items . add ( itemstack ) ; } } } return items ; } @ SideOnly ( Side . CLIENT ) public IIcon getIcon ( int side , int meta ) { } @ SideOnly ( Side . CLIENT ) public void registerBlockIcons ( IIconRegister register ) { } }

Fix:
for ( int i = 0 ; i < ( ( tileEntity . getSizeInventory ( ) ) - 1 ) ; ++ i ) {
Buggy code:
public class TSTreeTest { TSTree tsTree ; @ Before public void setUp ( ) throws Exception { } @ After public void tearDown ( ) throws Exception { } @ Test public void testSizeAddRemove ( ) throws Exception { } @ Test public void testFind ( ) throws Exception { } @ Test public void testContains ( ) throws Exception { } @ Test public void testToTupleArray ( ) throws Exception { DynamicArray < Tuple > tuples = tsTree . toTupleArray ( ) ; assertEquals ( 9 , tuples . size ( ) ) ; for ( Tuple tuple : tuples ) { <START_BUG> assertEquals ( tuple . weight , tuple . term . length ( ) ) ; <END_BUG> } } No newline ; at end ; of file ; }

Fix:
assertEquals ( tuple . getWeight ( ) , tuple . getTerm ( ) . length ( ) ) ;
Buggy code:
public class ExpiringCache < T extends Identifiable > implements Cache < T > { private final long SLEEP_TIME = 500 ; private final long millisecondTimeout ; private final String beanName ; private final Map < Object , ExpiringCache < T > . Entry > cache ; private volatile StatefulObjectFactory < T > factory ; private volatile ExpiringCache < T > . ExpirationTask expiryThread ; private static final Logger logger = Logger . getLogger ( ExpiringCache . class ) ; private class ExpirationTask extends Thread { private volatile boolean running = true ; @ Override public void run ( ) { } public void stopTask ( ) { } } private enum State { IN_USE , INACTIVE ; } private final class Entry { private long lastUsed ; private ExpiringCache . State state = ExpiringCache . State . INACTIVE ; private final T value ; public Entry ( final T value ) { } public void setLastUsed ( final long lastUsed ) { } public Serializable getKey ( ) { } public long getLastUsed ( ) { } public boolean isExpired ( long currentTimeInMillis ) { } public T getValue ( ) { } } public ExpiringCache ( long value , TimeUnit timeUnit , final String beanName ) { } @ Override public T create ( ) { } @ Override public void discard ( final Serializable key ) { } @ Override public T get ( final Serializable key ) throws NoSuchEJBException { } @ Override public void release ( final T obj ) { } @ Override public void remove ( final Serializable key ) { } @ Override public void setStatefulObjectFactory ( final StatefulObjectFactory < T > tStatefulObjectFactory ) { } @ Override public synchronized void start ( ) { <START_BUG> if ( ( millisecondTimeout ) != ( - 1 ) ) { <END_BUG> expiryThread = new ExpirationTask ( ) ; expiryThread . setDaemon ( true ) ; expiryThread . start ( ) ; expiryThread . setName ( ( "Expiry<seq2seq4repair_space>Thread<seq2seq4repair_space>for<seq2seq4repair_space>SFSB<seq2seq4repair_space>" + ( beanName ) ) ) ; } } @ Override public synchronized void stop ( ) { } }

Fix:
if ( ( millisecondTimeout ) >= 0 ) {