nus-yam/ex-repair huggingface dataset:
Buggy code:
public class OptionConverter { static String DELIM_START = "${" ; static char DELIM_STOP = '}' ; static int DELIM_START_LEN = 2 ; static int DELIM_STOP_LEN = 1 ; private OptionConverter ( ) { } private static Logger getLogger ( ) { } public static String [ ] concatanateArrays ( String [ ] l , String [ ] r ) { } public static String convertSpecialChars ( String s ) { } public static String getSystemProperty ( String key , String def ) { } public static Object instantiateByKey ( Properties props , String key , Class superClass , Object defaultValue ) { } public static boolean toBoolean ( String value , boolean dEfault ) { } public static int toInt ( String value , int dEfault ) { } public static Level toLevel ( String value , Level defaultValue ) { } public static long toFileSize ( String value , long dEfault ) { } public static String findAndSubst ( String key , Properties props ) { } public static Object instantiateByClassName ( String className , Class superClass , Object defaultValue ) { } public static String substVars ( String val , Properties props ) { } public static String [ ] extractDefaultReplacement ( String key ) { } public static void selectAndConfigure ( URL url , String clazz , LoggerRepository hierarchy ) { Configurator configurator = null ; String filename = url . getFile ( ) ; if ( ( ( clazz == null ) && ( filename != null ) ) && ( filename . endsWith ( ".xml" ) ) ) { <START_BUG> clazz = "org.apache.log4j.xml.DOMConfigurator" ; <END_BUG> } if ( clazz != null ) { OptionConverter . getLogger ( ) . info ( ( "Preferred<seq2seq4repair_space>configurator<seq2seq4repair_space>class:<seq2seq4repair_space>" + clazz ) ) ; configurator = ( ( Configurator ) ( OptionConverter . instantiateByClassName ( clazz , Configurator . class , null ) ) ) ; if ( configurator == null ) { OptionConverter . getLogger ( ) . error ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>instantiate<seq2seq4repair_space>configurator<seq2seq4repair_space>[" + clazz ) + "]." ) ) ; return ; } } else { configurator = new PropertyConfigurator ( ) ; } configurator . doConfigure ( url , hierarchy ) ; } }

Fix:
clazz = "org.apache.log4j.joran.JoranConfigurator" ;
Buggy code:
public class Shop_Cursor extends Interface_Ai { String baseString = "" ; String s1 ; String s2 ; String s3 ; String s4 ; String s5 ; String s6 ; String s7 ; String s8 ; String s9 ; String s10 ; String s11 ; String s12 ; String s13 ; String s14 ; String s15 ; String s16 ; String s17 ; boolean General_Synopsis = true ; boolean Shop_Main_Menu = true ; boolean timerCounter = true ; boolean moveDF = false ; boolean oS = false ; int y = 250 ; int x = 310 ; int sprite_counter = 0 ; int timerCount = 0 ; int Shop_Option = 1 ; int oSC ; public void act ( ) { } public static int getOptionSelection ( int optNum , int roomNum ) { <START_BUG> if ( ( optNum == 3 ) && ( roomNum == 3 ) ) { <END_BUG> } return optNum & roomNum ; } }

Fix:
if ( ( optNum == 14 ) && ( roomNum == 3 ) ) {
Buggy code:
public class XMLNSDocumentScannerImpl extends XMLDocumentScannerImpl { protected boolean fBindNamespaces ; protected boolean fPerformValidation ; protected NamespaceSupport fNamespaceSupport = new NamespaceSupport ( ) ; protected String [ ] fUri = new String [ 4 ] ; protected String [ ] fLocalpart = new String [ 4 ] ; protected int fLength = 0 ; private XMLDocumentFilter fPreviousComponent ; private XMLDTDValidatorFilter fDTDValidator ; private XMLDocumentHandler fNextComponent ; public void setComponents ( XMLDocumentFilter previous , XMLDTDValidatorFilter dtd , XMLDocumentHandler next ) { } protected boolean scanStartElement ( ) throws IOException , XNIException { } private final void checkDuplicates ( QName qname , XMLAttributesImpl attributes ) { } protected void scanAttribute ( XMLAttributesImpl attributes ) throws IOException , XNIException { } protected int scanEndElement ( ) throws IOException , XNIException { } public void reset ( XMLComponentManager componentManager ) throws XMLConfigurationException { } protected Dispatcher createContentDispatcher ( ) { } protected final class NSContentDispatcher extends ContentDispatcher { protected boolean scanRootElementHook ( ) throws IOException , XNIException { <START_BUG> if ( ! ( fDTDValidator . hasGrammar ( ) ) ) { <END_BUG> fBindNamespaces = true ; fPerformValidation = fDTDValidator . validate ( ) ; if ( ( fPreviousComponent ) != null ) { fPreviousComponent . setDocumentHandler ( fNextComponent ) ; fNextComponent . setDocumentSource ( fPreviousComponent ) ; } else { fDocumentHandler = fNextComponent ; fNextComponent . setDocumentSource ( XMLNSDocumentScannerImpl . this ) ; } } if ( scanStartElement ( ) ) { setScannerState ( SCANNER_STATE_TRAILING_MISC ) ; setDispatcher ( fTrailingMiscDispatcher ) ; return true ; } return false ; } } }

Fix:
if ( ( ( fDTDValidator ) != null ) && ( ! ( fDTDValidator . hasGrammar ( ) ) ) ) {
Buggy code:
public class StructureViewPanel extends JPanel implements StructureViewRenderer { protected StructureTreeManager treeManager = new StructureTreeManager ( ) ; protected StructureView currentView = null ; private List structureViews = null ; protected Border border1 ; protected Border border2 ; JScrollPane tree_ScrollPane = new JScrollPane ( ) ; JPanel structureToolBar_panel = null ; BorderLayout borderLayout1 = new BorderLayout ( ) ; public StructureViewPanel ( FileStructureView structureView ) { } public StructureViewPanel ( List structureViews ) { } private void init ( ) { } public void setCurrentView ( StructureView view ) { } public void updateView ( StructureView structureView ) { } private void initView ( StructureView view ) { } public void setActiveNode ( StructureViewNode node ) { } public void setActiveNode ( StructureViewNode node , int lineOffset ) { if ( node == null ) return ; if ( ! ( ( node . getStructureNode ( ) ) instanceof ProgramElementNode ) ) return ; ProgramElementNode pNode = ( ( ProgramElementNode ) ( node . getStructureNode ( ) ) ) ; treeManager . highlightNode ( pNode ) ; if ( ( pNode . getSourceLocation ( ) ) != null ) { <START_BUG> Ajde . getDefault ( ) . getEditorManager ( ) . showSourceLine ( pNode . getSourceLocation ( ) . getSourceFile ( ) . getAbsolutePath ( ) , ( ( pNode . getSourceLocation ( ) . getLine ( ) ) + lineOffset ) , true ) ; <END_BUG> } } public void highlightActiveNode ( ) { } protected void jbInit ( ) { } }

Fix:
Ajde . getDefault ( ) . getEditorAdapter ( ) . showSourceLine ( pNode . getSourceLocation ( ) . getSourceFile ( ) . getAbsolutePath ( ) , ( ( pNode . getSourceLocation ( ) . getLine ( ) ) + lineOffset ) , true ) ;
Buggy code:
public class SockJsWebSocketHandler extends TextWebSocketHandlerAdapter { private final SockJsServiceConfig sockJsServiceConfig ; private final WebSocketServerSockJsSession sockJsSession ; private final AtomicInteger sessionCount = new AtomicInteger ( 0 ) ; public SockJsWebSocketHandler ( SockJsServiceConfig serviceConfig , WebSocketHandler webSocketHandler , WebSocketServerSockJsSession sockJsSession ) { } protected SockJsServiceConfig getSockJsConfig ( ) { } @ Override public void afterConnectionEstablished ( WebSocketSession wsSession ) throws Exception { Assert . isTrue ( this . sessionCount . compareAndSet ( 0 , 1 ) , "Unexpected<seq2seq4repair_space>connection" ) ; <START_BUG> this . sockJsSession . initWebSocketSession ( wsSession ) ; <END_BUG> } @ Override public void handleTextMessage ( WebSocketSession wsSession , TextMessage message ) throws Exception { } @ Override public void afterConnectionClosed ( WebSocketSession wsSession , CloseStatus status ) throws Exception { } @ Override public void handleTransportError ( WebSocketSession webSocketSession , Throwable exception ) throws Exception { } }

Fix:
this . sockJsSession . afterSessionInitialized ( wsSession ) ;
Buggy code:
public class IssueUtil { @ Inject ( optional = true ) private MarkerTypeProvider markerTypeProvider ; public Issue createIssue ( IMarker marker ) { Issue . IssueImpl issue = new Issue . IssueImpl ( ) ; try { Map < String , Object > attributes = marker . getAttributes ( ) ; String markerType = marker . getType ( ) ; Object message = attributes . get ( IMarker . MESSAGE ) ; issue . setMessage ( ( message instanceof String ? ( ( String ) ( message ) ) : null ) ) ; Object lineNumber = attributes . get ( IMarker . LINE_NUMBER ) ; issue . setLineNumber ( ( lineNumber instanceof Integer ? ( ( Integer ) ( lineNumber ) ) - 1 : null ) ) ; Object offset = attributes . get ( IMarker . CHAR_START ) ; Object endOffset = attributes . get ( IMarker . CHAR_END ) ; if ( ( offset instanceof Integer ) && ( endOffset instanceof Integer ) ) { issue . setOffset ( ( ( Integer ) ( offset ) ) ) ; issue . setLength ( ( ( ( Integer ) ( endOffset ) ) - ( ( Integer ) ( offset ) ) ) ) ; } else { issue . setOffset ( ( - 1 ) ) ; <START_BUG> issue . setLength ( ( - 1 ) ) ; <END_BUG> } Object code = attributes . get ( CODE_KEY ) ; issue . setCode ( ( code instanceof String ? ( ( String ) ( code ) ) : null ) ) ; Object data = attributes . get ( DATA_KEY ) ; issue . setData ( ( data instanceof String ? Strings . unpack ( ( ( String ) ( data ) ) ) : null ) ) ; Object uri = attributes . get ( URI_KEY ) ; issue . setUriToProblem ( ( uri instanceof String ? URI . createURI ( ( ( String ) ( uri ) ) ) : null ) ) ; Object severity = attributes . get ( IMarker . SEVERITY ) ; Severity translatedSeverity = translateSeverity ( ( severity instanceof Integer ? ( ( Integer ) ( severity ) ) : 0 ) ) ; if ( translatedSeverity == null ) new IllegalArgumentException ( marker . toString ( ) ) ; issue . setSeverity ( translatedSeverity ) ; if ( ( markerTypeProvider ) != null ) issue . setType ( markerTypeProvider . getCheckType ( markerType ) ) ; else issue . setType ( MarkerTypes . toCheckType ( markerType ) ) ; } catch ( CoreException e ) { return null ; } return issue ; } @ Deprecated protected CheckType getCheckType ( IMarker marker ) { } public Issue getIssueFromAnnotation ( Annotation annotation ) { } public String getCode ( Annotation annotation ) { } public String getCode ( IMarker marker ) { } public String [ ] getIssueData ( Annotation annotation ) { } public String [ ] getIssueData ( IMarker marker ) { } public URI getUriToProblem ( IMarker marker ) { } public URI getUriToProblem ( Annotation annotation ) { } @ Deprecated public Severity getSeverity ( IMarker marker ) { } protected Severity translateSeverity ( int severity ) { } public boolean refersToSameIssue ( IMarker marker , Annotation annotation ) { } }

Fix:
issue . setLength ( 0 ) ;
Buggy code:
public abstract class BaseMergePolicyTestCase extends LuceneTestCase { protected abstract MergePolicy mergePolicy ( ) { } public void testForceMergeNotNeeded ( ) throws IOException { Directory dir = newDirectory ( ) ; final AtomicBoolean mayMerge = new AtomicBoolean ( true ) ; final MergeScheduler mergeScheduler = new SerialMergeScheduler ( ) { @ Override public synchronized void merge ( IndexWriter writer , MergeTrigger trigger , boolean newMergesFound ) throws IOException { if ( ( ! ( mayMerge . get ( ) ) ) && ( ( writer . getNextMerge ( ) ) != null ) ) { throw new AssertionError ( ) ; } super . merge ( writer , trigger , newMergesFound ) ; } } ; IndexWriter writer = new IndexWriter ( dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setMergeScheduler ( mergeScheduler ) . setMergePolicy ( mergePolicy ( ) ) ) ; writer . getConfig ( ) . getMergePolicy ( ) . setNoCFSRatio ( ( random ( ) . nextBoolean ( ) ? 0 : 1 ) ) ; final int numSegments = TestUtil . nextInt ( random ( ) , 2 , 20 ) ; for ( int i = 0 ; i < numSegments ; ++ i ) { final int numDocs = TestUtil . nextInt ( random ( ) , 1 , 5 ) ; for ( int j = 0 ; j < numDocs ; ++ j ) { writer . addDocument ( new Document ( ) ) ; } writer . getReader ( ) . close ( ) ; } for ( int i = 5 ; i >= 0 ; -- i ) { final int segmentCount = writer . getSegmentCount ( ) ; final int maxNumSegments = ( i == 0 ) ? 1 : TestUtil . nextInt ( random ( ) , 1 , 10 ) ; mayMerge . set ( ( segmentCount > maxNumSegments ) ) ; writer . forceMerge ( maxNumSegments ) ; } <START_BUG> writer . close ( ) ; <END_BUG> dir . close ( ) ; } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class TransactionalSpoutBatchExecutor implements IRichBolt { TransactionalOutputCollectorImpl _collector ; ITransactionalSpout _spout ; Emitter _emitter ; public TransactionalSpoutBatchExecutor ( ITransactionalSpout spout ) { } @ Override public void prepare ( Map conf , TopologyContext context , OutputCollector collector ) { } @ Override public void execute ( Tuple input ) { TransactionAttempt attempt = ( ( TransactionAttempt ) ( input . getValue ( 0 ) ) ) ; if ( input . getSourceStreamId ( ) . equals ( TRANSACTION_COMMIT_STREAM_ID ) ) { _collector . ack ( input ) ; _emitter . cleanupBefore ( attempt . getTransactionId ( ) ) ; } else { _collector . setAnchor ( input ) ; <START_BUG> _emitter . emitBatch ( ( ( TransactionAttempt ) ( input . getValue ( 0 ) ) ) , _collector ) ; <END_BUG> _collector . ack ( input ) ; } } @ Override public void cleanup ( ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } @ Override public Map < String , Object > getComponentConfiguration ( ) { } }

Fix:
_emitter . emitBatch ( attempt , input . getValue ( 1 ) , _collector ) ;
Buggy code:
public class InvoiceExpenseService { private InvoiceExpenseMeta e = new InvoiceExpenseMeta ( ) ; public List < InvoiceExpense > getAll ( ) { } public InvoiceExpense get ( Key key ) { } public void delete ( Key key ) { } public void save ( InvoiceExpense e ) { Invoice invoice = e . getInvoiceRef ( ) . getModel ( ) ; InvoiceReport ir = invoice . getInvoiceReportRef ( ) . getModel ( ) ; if ( ( e . getKey ( ) ) == null ) { <START_BUG> if ( ! ( e . getCanceled ( ) . equals ( "on" ) ) ) { <END_BUG> ir . addOtherExpense ( e . getExpense ( ) ) ; } } else { if ( e . getCanceled ( ) . equals ( "on" ) ) { ir . addOtherExpense ( ( ( e . getExpense ( ) ) * ( - 1 ) ) ) ; } else { InvoiceExpense olde = get ( e . getKey ( ) ) ; if ( ( olde . getExpense ( ) ) != ( e . getExpense ( ) ) ) { ir . addOtherExpense ( ( ( e . getExpense ( ) ) - ( olde . getExpense ( ) ) ) ) ; } } } Datastore . put ( e ) ; Datastore . put ( ir ) ; } }

Fix:
if ( ( ( e . getCanceled ( ) ) == null ) || ( ! ( e . getCanceled ( ) . equals ( "on" ) ) ) ) {
Buggy code:
@ RunWith ( Parameterized . class ) public class CSVFileParserTest { private static final File BASE = new File ( "src//test//resources//CSVFileParser" ) ; private final BufferedReader testData ; private final String testName ; public CSVFileParserTest ( final File file ) throws FileNotFoundException { } private String readTestData ( ) throws IOException { } @ Parameters public static Collection < Object [ ] > generateData ( ) { } @ Test public void testCSVFile ( ) throws Exception { String line = readTestData ( ) ; assertNotNull ( "file<seq2seq4repair_space>must<seq2seq4repair_space>contain<seq2seq4repair_space>config<seq2seq4repair_space>line" , line ) ; final String [ ] split = line . split ( "<seq2seq4repair_space>" ) ; assertTrue ( ( ( testName ) + "<seq2seq4repair_space>require<seq2seq4repair_space>1<seq2seq4repair_space>param" ) , ( ( split . length ) >= 1 ) ) ; CSVFormat format = CSVFormat . newFormat ( ',' ) . withQuoteChar ( '"' ) ; boolean checkComments = false ; for ( int i = 1 ; i < ( split . length ) ; i ++ ) { final String option = split [ i ] ; final String [ ] option_parts = option . split ( "=" , 2 ) ; if ( "IgnoreEmpty" . equalsIgnoreCase ( option_parts [ 0 ] ) ) { format = format . withIgnoreEmptyLines ( Boolean . parseBoolean ( option_parts [ 1 ] ) ) ; } else if ( "IgnoreSpaces" . equalsIgnoreCase ( option_parts [ 0 ] ) ) { format = format . withIgnoreSurroundingSpaces ( Boolean . parseBoolean ( option_parts [ 1 ] ) ) ; } else if ( "CommentStart" . equalsIgnoreCase ( option_parts [ 0 ] ) ) { format = format . withCommentStart ( option_parts [ 1 ] . charAt ( 0 ) ) ; } else if ( "CheckComments" . equalsIgnoreCase ( option_parts [ 0 ] ) ) { checkComments = true ; } else { fail ( ( ( ( testName ) + "<seq2seq4repair_space>unexpected<seq2seq4repair_space>option:<seq2seq4repair_space>" ) + option ) ) ; } } line = readTestData ( ) ; assertEquals ( ( ( testName ) + "<seq2seq4repair_space>Expected<seq2seq4repair_space>format<seq2seq4repair_space>" ) , line , format . toString ( ) ) ; <START_BUG> final CSVParser parser = CSVParser . parse ( new File ( CSVFileParserTest . BASE , split [ 0 ] ) , format ) ; <END_BUG> for ( final CSVRecord record : parser ) { String parsed = record . toString ( ) ; if ( checkComments ) { final String comment = record . getComment ( ) . replace ( "\n" , "\\n" ) ; if ( comment != null ) { parsed += "#" + comment ; } } final int count = record . size ( ) ; assertEquals ( testName , readTestData ( ) , ( ( count + ":" ) + parsed ) ) ; } parser . close ( ) ; } @ Test public void testCSVUrl ( ) throws Exception { } }

Fix:
final CSVParser parser = CSVParser . parse ( new File ( CSVFileParserTest . BASE , split [ 0 ] ) , Charset . defaultCharset ( ) , format ) ;
Buggy code:
public class TestLogicExecute { Logic logicObject ; File saveFile ; @ Before public void setup ( ) { } @ Test public void logicExecuteAdd ( ) { } @ Test public void logicExecuteDelete ( ) { } @ Test public void logicExecuteDisplay ( ) { Command commandObject ; commandObject = new Command ( Type . DISPLAY ) ; <START_BUG> assertEquals ( "1.<seq2seq4repair_space>Item<seq2seq4repair_space>1\r\n2.<seq2seq4repair_space>Item<seq2seq4repair_space>2\r\n3.<seq2seq4repair_space>Item<seq2seq4repair_space>3\r\n" , logicObject . executeCommand ( commandObject , true , true ) ) ; <END_BUG> } @ Test public void logicExecuteSavePath ( ) { } @ Test public void logicExecute ( ) { } @ After public void cleanup ( ) { } }

Fix:
assertEquals ( "Displaying<seq2seq4repair_space>items." , logicObject . executeCommand ( commandObject , true , true ) ) ;
Buggy code:
public abstract class BlockWoolChest extends BlockContainer implements ITileEntityProvider { protected boolean isLockable ; protected static final String [ ] textureNames = new String [ ] { "Black" , "Red" , "Green" , "Brown" , "Blue" , "Purple" , "Cyan" , "Silver" , "Gray" , "Pink" , "Lime" , "Yellow" , "LightBlue" , "Magenta" , "Orange" , "White" } ; protected BlockWoolChest ( Material material , boolean isLockable ) { } @ Override public boolean renderAsNormalBlock ( ) { } @ Override public boolean isOpaqueCube ( ) { } @ Override public boolean onBlockActivated ( World world , int x , int y , int z , EntityPlayer player , int par6 , float par7 , float par8 , float par9 ) { if ( ( ( world . isRemote ) || ( world . isSideSolid ( x , ( y + 1 ) , z , DOWN ) ) ) || ( ( player . isSneaking ( ) ) && ( ( player . getHeldItem ( ) ) != null ) ) ) { return true ; } else { if ( ( ! ( world . isRemote ) ) && ( ( world . getTileEntity ( x , y , z ) ) instanceof TileEntityWoolChest ) ) { TileEntityWoolChest tileEntity = ( ( TileEntityWoolChest ) ( world . getTileEntity ( x , y , z ) ) ) ; if ( tileEntity . hasUniqueOwner ( ) ) { if ( tileEntity . getUniqueOwner ( ) . equals ( ( ( player . getUniqueID ( ) . toString ( ) ) + ( player . getDisplayName ( ) ) ) ) ) { TinyStorageLog . info ( tileEntity . getUniqueOwner ( ) ) ; player . openGui ( instance , WOOL_CHEST . ordinal ( ) , world , x , y , z ) ; } else { PlayerHelper . sendChatMessage ( player , "This<seq2seq4repair_space>chest<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>belong<seq2seq4repair_space>to<seq2seq4repair_space>you!<seq2seq4repair_space>Back<seq2seq4repair_space>off!" ) ; } } else { player . openGui ( instance , WOOL_CHEST . ordinal ( ) , world , x , y , z ) ; } } <START_BUG> return false ; <END_BUG> } } @ Override public boolean onBlockEventReceived ( World world , int x , int y , int z , int eventId , int eventData ) { } @ Override public float getPlayerRelativeBlockHardness ( EntityPlayer player , World world , int x , int y , int z ) { } @ Override public void breakBlock ( World world , int x , int y , int z , Block block , int meta ) { } @ Override public void onBlockPlacedBy ( World world , int x , int y , int z , EntityLivingBase entityLiving , ItemStack itemStack ) { } protected void dropInventory ( World world , int x , int y , int z ) { } @ Override public void getSubBlocks ( Item item , CreativeTabs creativeTabs , List list ) { } @ Override public int damageDropped ( int metaData ) { } @ Override public void registerBlockIcons ( IIconRegister iconRegister ) { } @ Override public String getTextureName ( ) { } public boolean getIsLockable ( ) { } }

Fix:
return true ;
Buggy code:
public abstract class AbstractDatatypeValidator implements Cloneable , DatatypeValidator { protected DatatypeValidator fBaseValidator = null ; protected String fPattern = null ; protected RegularExpression fRegex = null ; protected short fFacetsDefined = 0 ; protected DatatypeMessageProvider fMessageProvider = new DatatypeMessageProvider ( ) ; protected Locale fLocale = null ; protected short fFlags = 0 ; public abstract Object validate ( String content , Object state ) throws InvalidDatatypeValueException { } public abstract Object clone ( ) throws CloneNotSupportedException { } public short getWSFacet ( ) { } public DatatypeValidator getBaseValidator ( ) { } protected String getErrorString ( String key , Object [ ] args ) { } public void setLocale ( Locale locale ) { } public short getXSType ( ) { <START_BUG> return XSType . DATATYPE_TYPE ; <END_BUG> } protected int fFinalSet = 0 ; public int getFinalSet ( ) { } public void setFinalSet ( int finalSet ) { } }

Fix:
return XSType . SIMPLE_TYPE ;
Buggy code:
public class OLocalPaginatedStorage extends OAbstractPaginatedStorage implements OFreezableStorage , OBackupable { private static String [ ] ALL_FILE_EXTENSIONS = new String [ ] { ".ocf" , ".pls" , ".pcl" , ".oda" , ".odh" , ".otx" , ".ocs" , ".oef" , ".oem" , ".oet" , ODiskWriteAheadLog . WAL_SEGMENT_EXTENSION , ODiskWriteAheadLog . MASTER_RECORD_EXTENSION , OHashTableIndexEngine . BUCKET_FILE_EXTENSION , OHashTableIndexEngine . METADATA_FILE_EXTENSION , OHashTableIndexEngine . TREE_FILE_EXTENSION , OHashTableIndexEngine . NULL_BUCKET_FILE_EXTENSION , OClusterPositionMap . DEF_EXTENSION , OSBTreeIndexEngine . DATA_FILE_EXTENSION , OWOWCache . NAME_ID_MAP_EXTENSION , OIndexRIDContainer . INDEX_FILE_EXTENSION , OSBTreeCollectionManagerShared . DEFAULT_EXTENSION , OSBTreeIndexEngine . NULL_BUCKET_FILE_EXTENSION } ; private static final int ONE_KB = 1024 ; private final int DELETE_MAX_RETRIES ; private final int DELETE_WAIT_TIME ; private final OStorageVariableParser variableParser ; private final OPaginatedStorageDirtyFlag dirtyFlag ; private String storagePath ; private ExecutorService checkpointExecutor ; public OLocalPaginatedStorage ( final String name , final String filePath , final String mode ) throws IOException { } @ Override public void create ( final Map < String , Object > iProperties ) { } public boolean exists ( ) { } @ Override public String getURL ( ) { } public String getStoragePath ( ) { } public OStorageVariableParser getVariableParser ( ) { } @ Override public String getType ( ) { } @ Override public void backup ( OutputStream out , Map < String , Object > options , final Callable < Object > callable , final OCommandOutputListener iOutput , final int compressionLevel , final int bufferSize ) throws IOException { } @ Override public void restore ( InputStream in , Map < String , Object > options , final Callable < Object > callable , final OCommandOutputListener iListener ) throws IOException { if ( ! ( isClosed ( ) ) ) <START_BUG> close ( ) ; <END_BUG> OZIPCompressionUtil . uncompressDirectory ( in , getStoragePath ( ) , iListener ) ; } @ Override protected void preOpenSteps ( ) throws IOException { } @ Override protected void preCreateSteps ( ) throws IOException { } @ Override protected void postCloseSteps ( boolean onDelete ) throws IOException { } @ Override protected void preCloseSteps ( ) throws IOException { } @ Override protected void postDeleteSteps ( ) { } protected void makeStorageDirty ( ) throws IOException { } protected void clearStorageDirty ( ) throws IOException { } @ Override protected boolean isDirty ( ) throws IOException { } protected void initWalAndDiskCache ( ) throws IOException { } private boolean exists ( String path ) { } private static class FullCheckpointThreadFactory implements ThreadFactory { @ Override public Thread newThread ( Runnable r ) { } } }

Fix:
close ( true , false ) ;
Buggy code:
public class Request { private static final String METHOD_QUERY_PARAMETER = "_method" ; private static final String FORMAT_HEADER_NAME = "format" ; private static final String JSONP_CALLBACK_HEADER_NAME = "jsonp" ; private static final String DEFAULT_PROTOCOL = "http" ; private static long nextCorrelationId = 0 ; private HttpRequest httpRequest ; private SerializationProcessor serializationProcessor ; private RouteResolver urlRouter ; private HttpMethod effectiveHttpMethod ; private Route resolvedRoute ; private String correlationId ; private Map < String , Object > attachments ; public Request ( HttpRequest request , RouteResolver routes ) { } public String getCorrelationId ( ) { } public HttpMethod getHttpMethod ( ) { } public HttpMethod getEffectiveHttpMethod ( ) { } public boolean isMethodGet ( ) { } public boolean isMethodDelete ( ) { } public boolean isMethodPost ( ) { } public boolean isMethodPut ( ) { } public ChannelBuffer getBody ( ) { } public < T > T getBodyAs ( Class < T > type ) { } public < T > T getBodyAs ( Class < T > type , String message ) { } public SerializationProcessor getSerializationProcessor ( ) { } public void setSerializationProcessor ( SerializationProcessor serializationProcessor ) { } public void setBody ( ChannelBuffer body ) { } public void clearHeaders ( ) { } public String getRawHeader ( String name ) { } public String getRawHeader ( String name , String message ) { } public String getUrlDecodedHeader ( String name ) { } public String getUrlDecodedHeader ( String name , String message ) { <START_BUG> String value = getRawHeader ( name ) ; <END_BUG> if ( value == null ) { throw new BadRequestException ( message ) ; } return value ; } public void addHeader ( String name , String value ) { } public void addAllHeaders ( Collection < Map . Entry < String , String > > headers ) { } public Route getResolvedRoute ( ) { } public void setResolvedRoute ( Route route ) { } public String getPath ( ) { } public String getUrl ( ) { } public String getNamedUrl ( String resourceName ) { } public String getNamedUrl ( HttpMethod method , String resourceName ) { } public boolean isKeepAlive ( ) { } public boolean isChunked ( ) { } public String getFormat ( ) { } public String getHost ( ) { } public String getJsonpHeader ( ) { } public boolean hasJsonpHeader ( ) { } public String getProtocol ( ) { } public boolean isFormatEqual ( String format ) { } public boolean isHeaderEqual ( String name , String value ) { } public boolean isFlagged ( String flag ) { } public Object getParameter ( String name ) { } public Object getAttachment ( String name ) { } public boolean hasAttachment ( String name ) { } public void putAttachment ( String name , Object attachment ) { } private void parseRequestedFormatToHeader ( HttpRequest request ) { } private void addQueryStringParametersAsHeaders ( HttpRequest request ) { } private void determineEffectiveHttpMethod ( HttpRequest request ) { } private void createCorrelationId ( ) { } private String urlDecode ( String value ) { } }

Fix:
String value = getUrlDecodedHeader ( name ) ;
Buggy code:
public final class ArquillianSubsystemAdd extends AbstractSubsystemAdd < ArquillianSubsystemElement > { private static final long serialVersionUID = - 7876823389815006153L ; private static final Logger log = Logger . getLogger ( "org.jboss.as.arquillian" ) ; protected ArquillianSubsystemAdd ( ) { } @ Override protected ArquillianSubsystemElement createSubsystemElement ( ) { } @ Override protected < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > resultHandler , final P param ) { } @ Override protected void applyUpdateBootAction ( final BootUpdateContext updateContext ) { ArquillianSubsystemAdd . log . infof ( "Activating<seq2seq4repair_space>Arquillian<seq2seq4repair_space>Subsystem" ) ; <START_BUG> ArquillianService . addService ( updateContext . getBatchBuilder ( ) ) ; <END_BUG> updateContext . addDeploymentProcessor ( new ArquillianRunWithAnnotationProcessor ( ) , ARQUILLIAN_RUNWITH_ANNOTATION_PROCESSOR ) ; updateContext . addDeploymentProcessor ( new ArquillianDeploymentProcessor ( ) , ARQUILLIAN_DEPLOYMENT_PROCESSOR ) ; } }

Fix:
ArquillianService . addService ( updateContext . getServiceTarget ( ) ) ;
Buggy code:
public class Player extends Mobile { public Input _i ; private int _maxHealth ; public int shotsFired = 0 ; private Gun _gun ; public int score = 0 ; private static final int nextLifeStep = 2500 ; private static final int superCounterStart = 300 ; private int _nextLife = Player . nextLifeStep ; public int lives ; private int deadcounter = 0 ; private int invulncounter = 0 ; private int maxAmmo = 10 ; private int fireRate = 10 ; private int ammoRegenRate = 30 ; private int bulletSpeed = 6 ; private boolean isSuper = false ; private int superCounter = 0 ; public Player ( Input i , Game g ) { } public void setLevel ( Level l ) { } private Gun preSuperGun ; public void superStart ( ) { } public void superStop ( ) { } private void updateStats ( long ticks ) { } public void tick ( long ticks ) { } public void didShoot ( ) { } public void heal ( int n ) { } public void die ( ) { } public void hurt ( Entity cause , int damage , double dir ) { <START_BUG> if ( ( ( invulncounter ) == 0 ) && ( ! ( isSuper ) ) ) { <END_BUG> _level . play ( hurt ) ; super . hurt ( cause , damage , dir ) ; } } public void render ( Renderer r ) { } public void setGun ( Gun g ) { } public boolean appearsOnMinimap ( ) { } public int getFireCount ( ) { } private boolean firing ( ) { } public boolean canUpgradeS ( ) { } public boolean canUpgradeH ( ) { } public boolean canUpgradeMA ( ) { } public boolean canUpgradeFR ( ) { } public boolean canUpgradeARR ( ) { } public boolean canUpgradeBS ( ) { } public void upgradeS ( ) { } public void upgradeH ( ) { } public void upgradeMA ( ) { } public void upgradeFR ( ) { } public void upgradeARR ( ) { } public void upgradeBS ( ) { } public void setMaxAmmo ( int a ) { } public void setAmmoRegenRate ( int arr ) { } public void setFireRate ( int fr ) { } public void setBulletSpeed ( int bs ) { } public int getColor ( ) { } public Gun getGun ( ) { } protected void touched ( Entity e ) { } public void replenish ( ) { } }

Fix:
if ( ( ( ( deadcounter ) == 0 ) && ( ( invulncounter ) == 0 ) ) && ( ! ( isSuper ) ) ) {
Buggy code:
public class ICLanguageBMPBean extends GenericEntity implements com . idega . core . localisation . data . ICLanguage { private static final long serialVersionUID = 2193937076444096929L ; public static final String _COLUMN_LanguageName = "name" ; public static final String _COLUMN_LanguageDescription = "description" ; public static final String _COLUMN_ISOabbreviation = "iso_abbreviation" ; public ICLanguageBMPBean ( ) { } public ICLanguageBMPBean ( int id ) throws SQLException { } @ Override public void initializeAttributes ( ) { addAttribute ( getIDColumnName ( ) ) ; addAttribute ( ICLanguageBMPBean . _COLUMN_LanguageName , "Name" , true , true , "java.lang.String" ) ; addAttribute ( ICLanguageBMPBean . _COLUMN_LanguageDescription , "Description" , true , true , "java.lang.String" , 510 ) ; <START_BUG> addAttribute ( ICLanguageBMPBean . _COLUMN_ISOabbreviation , "ISO<seq2seq4repair_space>abbreviation" , true , true , String . class , 10 ) ; <END_BUG> this . getEntityDefinition ( ) . setBeanCachingActiveByDefault ( true ) ; } @ Override public String getEntityName ( ) { } @ Override public void insertStartData ( ) throws Exception { } @ Override public String getName ( ) { } @ Override public String getDescription ( ) { } @ Override public String getIsoAbbreviation ( ) { } @ Override public void setName ( String Name ) { } @ Override public void setDescription ( String description ) { } @ Override public void setIsoAbbreviation ( String IsoAbbreviation ) { } public Collection < ? > ejbFindAll ( ) throws FinderException { } public Integer ejbFindByDescription ( String description ) throws FinderException { } public Integer ejbFindByISOAbbreviation ( String ISOAbbreviation ) throws FinderException { } No newline ; at end ; of file ; }

Fix:
addAttribute ( ICLanguageBMPBean . _COLUMN_ISOabbreviation , "ISO<seq2seq4repair_space>abbreviation" , true , true , String . class , 50 ) ;
Buggy code:
public abstract class AbstractRequestCycleProcessor implements IRequestCycleProcessor { private IRequestCodingStrategy requestCodingStrategy ; public AbstractRequestCycleProcessor ( ) { } public IRequestCodingStrategy getRequestCodingStrategy ( ) { } public void processEvents ( RequestCycle requestCycle ) { } public void respond ( RequestCycle requestCycle ) { } public void respond ( RuntimeException e , RequestCycle requestCycle ) { } private boolean isPageMounted ( Class < ? extends Page > pageClass ) { <START_BUG> RequestCycle cycle = RequestCycle . get ( ) ; <END_BUG> CharSequence path = getRequestCodingStrategy ( ) . pathForTarget ( new BookmarkablePageRequestTarget ( pageClass ) ) ; return path != null ; } protected abstract IRequestCodingStrategy newRequestCodingStrategy ( ) { } protected Page onRuntimeException ( final Page page , final RuntimeException e ) { } @ SuppressWarnings ( "unchecked" ) protected IRequestTarget resolveBookmarkablePage ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } protected IRequestTarget resolveExternalResource ( RequestCycle requestCycle ) { } protected IRequestTarget resolveHomePageTarget ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } protected IRequestTarget resolveListenerInterfaceTarget ( final RequestCycle requestCycle , final Page page , final String componentPath , final String interfaceName , final RequestParameters requestParameters ) { } protected IRequestTarget resolveRenderedPage ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } protected IRequestTarget resolveSharedResource ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } }

Fix:
RequestCycle . get ( ) ;
Buggy code:
public class ArgumentWithoutValue implements CommandArgument { protected final int index ; protected final String fullName ; protected final String shortName ; protected List < CommandArgument > requiredPreceding ; protected List < CommandArgument > cantAppearAfter = Collections . emptyList ( ) ; protected boolean exclusive ; public ArgumentWithoutValue ( CommandHandlerWithArguments handler , String fullName ) { } public ArgumentWithoutValue ( CommandHandlerWithArguments handler , String fullName , String shortName ) { } public ArgumentWithoutValue ( CommandHandlerWithArguments handler , int index , String fullName ) { } public void setExclusive ( boolean exclusive ) { <START_BUG> this . exclusive = true ; <END_BUG> } public void addRequiredPreceding ( CommandArgument arg ) { } public void addCantAppearAfter ( CommandArgument arg ) { } @ Override public int getIndex ( ) { } @ Override public CommandLineCompleter getValueCompleter ( ) { } @ Override public String getValue ( ParsedArguments args ) { } @ Override public String getValue ( ParsedArguments args , boolean required ) throws CommandFormatException { } @ Override public boolean isPresent ( ParsedArguments args ) throws CommandFormatException { } @ Override public String getFullName ( ) { } @ Override public boolean canAppearNext ( CommandContext ctx ) throws CommandFormatException { } @ Override public boolean isValueRequired ( ) { } @ Override public String getShortName ( ) { } }

Fix:
this . exclusive = exclusive ;
Buggy code:
public abstract class SSTable { static final Logger logger = LoggerFactory . getLogger ( SSTable . class ) ; public static final String COMPONENT_DATA = DATA . repr ; public static final String COMPONENT_INDEX = PRIMARY_INDEX . repr ; public static final String COMPONENT_FILTER = FILTER . repr ; public static final String COMPONENT_STATS = STATS . repr ; public static final String TEMPFILE_MARKER = "tmp" ; public final Descriptor descriptor ; protected final Set < Component > components ; public final CFMetaData metadata ; public final IPartitioner partitioner ; public final ReplayPosition replayPosition ; protected final EstimatedHistogram estimatedRowSize ; protected final EstimatedHistogram estimatedColumnCount ; protected SSTable ( Descriptor descriptor , CFMetaData metadata , ReplayPosition replayPosition , IPartitioner partitioner ) { } protected SSTable ( Descriptor descriptor , Set < Component > components , CFMetaData metadata , ReplayPosition replayPosition , IPartitioner partitioner ) { } protected SSTable ( Descriptor descriptor , Set < Component > components , CFMetaData metadata , ReplayPosition replayPosition , IPartitioner partitioner , EstimatedHistogram rowSizes , EstimatedHistogram columnCounts ) { } static EstimatedHistogram defaultColumnHistogram ( ) { } static EstimatedHistogram defaultRowHistogram ( ) { } public EstimatedHistogram getEstimatedRowSize ( ) { } public EstimatedHistogram getEstimatedColumnCount ( ) { } public static boolean delete ( Descriptor desc , Set < Component > components ) { try { if ( components . contains ( Component . DATA ) ) FileUtils . deleteWithConfirm ( desc . filenameFor ( Component . DATA ) ) ; for ( Component component : components ) { if ( ( component . equals ( Component . DATA ) ) || ( component . equals ( COMPACTED_MARKER ) ) ) continue ; FileUtils . deleteWithConfirm ( desc . filenameFor ( component ) ) ; } FileUtils . delete ( desc . filenameFor ( COMPACTED_MARKER ) ) ; } catch ( IOException e ) { throw new IOError ( e ) ; } <START_BUG> SSTable . logger . info ( ( "Deleted<seq2seq4repair_space>" + desc ) ) ; <END_BUG> return true ; } public String getFilename ( ) { } public String getColumnFamilyName ( ) { } public String getTableName ( ) { } public static Pair < Descriptor , Component > tryComponentFromFilename ( File dir , String name ) { } static Set < Component > componentsFor ( final Descriptor desc , final boolean liveOnly ) { } static long estimateRowsFromData ( Descriptor desc , BufferedRandomAccessFile dfile ) throws IOException { } static long estimateRowsFromIndex ( BufferedRandomAccessFile ifile ) throws IOException { } public static long getTotalBytes ( Iterable < SSTableReader > sstables ) { } public long bytesOnDisk ( ) { } @ Override public String toString ( ) { } }

Fix:
SSTable . logger . debug ( "Deleted<seq2seq4repair_space>{}" , desc ) ;
Buggy code:
public abstract class Config { public ConfigurationLoader loader ; public ConfigurationNode config ; public File file ; public Config ( String name ) { } public abstract void loadDefaults ( ) { } public void set ( Object [ ] node , Object value ) { <START_BUG> config . getChild ( node ) . setValue ( value ) ; <END_BUG> } public void save ( ) { } public ConfigurationNode getConfig ( ) { } public void checkNode ( Object [ ] node , Object defValue ) { } public void editNode ( Object [ ] oldNode , String [ ] newNode ) { } public void removeOption ( Object [ ] node ) { } No newline ; at end ; of file ; }

Fix:
config . getNode ( node ) . setValue ( value ) ;
Buggy code:
class RealmParser { void readRealms ( ModelNode parentAddress , XMLExtendedStreamReader reader , List < ModelNode > operations ) throws XMLStreamException { } private void readKeyStoreRealm ( ModelNode parentAddress , XMLExtendedStreamReader reader , List < ModelNode > operations ) throws XMLStreamException { } private void startRealms ( XMLExtendedStreamWriter writer ) throws XMLStreamException { } private boolean writeKeyStoreRealms ( boolean started , ModelNode subsystem , XMLExtendedStreamWriter writer ) throws XMLStreamException { } void writeRealms ( ModelNode subsystem , XMLExtendedStreamWriter writer ) throws XMLStreamException { boolean realmsStarted = false ; <START_BUG> realmsStarted = realmsStarted & ( writeKeyStoreRealms ( realmsStarted , subsystem , writer ) ) ; <END_BUG> if ( realmsStarted ) { writer . writeEndElement ( ) ; } } }

Fix:
realmsStarted = realmsStarted | ( writeKeyStoreRealms ( realmsStarted , subsystem , writer ) ) ;
Buggy code:
public class WriteReplaceInterceptor implements Interceptor { private final String serviceName ; public WriteReplaceInterceptor ( final String serviceName ) { } @ Override public Object processInvocation ( final InterceptorContext context ) throws Exception { <START_BUG> SessionID sessionId = ( ( SessionID ) ( context . getPrivateData ( INSTANCE ) ) ) ; <END_BUG> return new StatefulSerializedProxy ( serviceName , sessionId ) ; } public static class Factory implements InterceptorFactory { private final String serviceName ; public Factory ( final String serviceName ) { } @ Override public Interceptor create ( final InterceptorFactoryContext context ) { } } }

Fix:
SessionID sessionId = ( ( SessionID ) ( context . getPrivateData ( SESSION_ID_KEY ) ) ) ;
Buggy code:
public class SIGRecord extends Record { private short covered ; private byte alg ; private byte labels ; private int origttl ; private Date expire ; private Date timeSigned ; private short footprint ; private Name signer ; private byte [ ] signature ; private SIGRecord ( ) { } public SIGRecord ( Name _name , short _dclass , int _ttl , int _covered , int _alg , int _origttl , Date _expire , Date _timeSigned , int _footprint , Name _signer , byte [ ] _signature ) { } public SIGRecord ( Name _name , short _dclass , int _ttl , int length , DataByteInputStream in , Compression c ) throws IOException { } public SIGRecord ( Name _name , short _dclass , int _ttl , MyStringTokenizer st , Name origin ) throws IOException { } public String toString ( ) { } public short getTypeCovered ( ) { } public byte getAlgorithm ( ) { } public byte getLabels ( ) { } public int getOrigTTL ( ) { } public Date getExpire ( ) { } public Date getTimeSigned ( ) { } public short getFootprint ( ) { } public Name getSigner ( ) { } public byte [ ] getSignature ( ) { } void rrToWire ( DataByteOutputStream out , Compression c ) throws IOException { } void rrToWireCanonical ( DataByteOutputStream out ) throws IOException { if ( ( signature ) == null ) return ; out . writeShort ( covered ) ; out . writeByte ( alg ) ; out . writeByte ( labels ) ; out . writeInt ( origttl ) ; out . writeInt ( ( ( int ) ( ( expire . getTime ( ) ) // 1000 ) ) ) ; out . writeInt ( ( ( int ) ( ( timeSigned . getTime ( ) ) // 1000 ) ) ) ; out . writeShort ( footprint ) ; <START_BUG> signer . toWireCanonical ( out , null ) ; <END_BUG> out . write ( signature ) ; } private String formatDate ( Date d ) { } private Date parseDate ( String s ) { } }

Fix:
signer . toWireCanonical ( out ) ;
Buggy code:
public class Master { private Name origin ; private File file ; private Record last = null ; private long defaultTTL = - 1 ; private Master included = null ; private Tokenizer st ; Master ( File file , Name defaultOrigin ) throws IOException { } public Master ( String filename , Name origin ) throws IOException { } public Master ( String filename ) throws IOException { } public Master ( InputStream in , Name defaultOrigin ) { } public Master ( InputStream in ) { } private Name parseName ( String s , Name origin ) throws TextParseException { } public Record nextRecord ( ) throws IOException { Tokenizer . Token token ; String s ; if ( ( included ) != null ) { Record rec = included . nextRecord ( ) ; if ( rec != null ) return rec ; included = null ; } while ( true ) { Name name ; <START_BUG> int ttl ; <END_BUG> int type ; int dclass ; token = st . get ( true , false ) ; if ( ( token . type ) == ( Tokenizer . WHITESPACE ) ) { if ( ( last ) == null ) throw st . exception ( "no<seq2seq4repair_space>owner" ) ; name = last . getName ( ) ; } else if ( ( token . type ) == ( Tokenizer . EOL ) ) continue ; else if ( ( token . type ) == ( Tokenizer . EOF ) ) return null ; else { s = token . value ; if ( s . equals ( "$ORIGIN" ) ) { origin = st . getName ( root ) ; st . getEOL ( ) ; continue ; } else if ( s . equals ( "$TTL" ) ) { defaultTTL = st . getTTL ( ) ; st . getEOL ( ) ; continue ; } else if ( s . equals ( "$INCLUDE" ) ) { String filename = st . getString ( ) ; String parent = file . getParent ( ) ; File newfile = new File ( file . getParent ( ) , filename ) ; Name incorigin = origin ; token = st . get ( ) ; if ( token . isString ( ) ) { incorigin = parseName ( token . value , root ) ; st . getEOL ( ) ; } included = new Master ( newfile , incorigin ) ; return nextRecord ( ) ; } else if ( ( s . charAt ( 0 ) ) == '$' ) { throw st . exception ( ( "Invalid<seq2seq4repair_space>directive:<seq2seq4repair_space>" + s ) ) ; } else { name = parseName ( s , origin ) ; } } s = st . getString ( ) ; try { ttl = TTL . parseTTL ( s ) ; s = st . getString ( ) ; } catch ( NumberFormatException e ) { if ( ( ( last ) == null ) && ( ( defaultTTL ) < 0 ) ) throw st . exception ( "missing<seq2seq4repair_space>TTL" ) ; else if ( ( defaultTTL ) >= 0 ) ttl = ( ( int ) ( defaultTTL ) ) ; else ttl = last . getTTL ( ) ; } if ( ( dclass = DClass . value ( s ) ) > 0 ) s = st . getString ( ) ; else dclass = DClass . IN ; if ( ( type = Type . value ( s ) ) < 0 ) throw st . exception ( ( ( "Invalid<seq2seq4repair_space>type<seq2seq4repair_space>'" + s ) + "'" ) ) ; last = Record . fromString ( name , type , dclass , ttl , st , origin ) ; return last ; } } }

Fix:
long ttl ;
Buggy code:
public class IndexBasedHierarchyBuilder extends HierarchyBuilder implements SuffixConstants { public static final int MAXTICKS = 800 ; protected Map cuToHandle ; protected Map handleToWorkingCopy ; protected IJavaSearchScope scope ; protected Map binariesFromIndexMatches ; private static class Queue { public char [ ] [ ] names = new char [ 10 ] [ ] ; public int start = 0 ; public int end = - 1 ; public void add ( char [ ] name ) { } public char [ ] retrieve ( ) { } public String toString ( ) { } } public IndexBasedHierarchyBuilder ( TypeHierarchy hierarchy , IJavaSearchScope scope ) throws JavaModelException { } public void build ( boolean computeSubtypes ) { } private void buildForProject ( JavaProject project , ArrayList potentialSubtypes , ICompilationUnit [ ] workingCopies , HashSet localTypes , IProgressMonitor monitor ) throws JavaModelException { } private void buildFromPotentialSubtypes ( String [ ] allPotentialSubTypes , HashSet localTypes , IProgressMonitor monitor ) { } protected org . eclipse . jdt . internal . compiler . env . ICompilationUnit createCompilationUnitFromPath ( Openable handle , String osPath ) { } protected IBinaryType createInfoFromClassFile ( Openable classFile , String osPath ) { } protected IBinaryType createInfoFromClassFileInJar ( Openable classFile ) { String filePath = ( ( ( ClassFile ) ( classFile ) ) . getType ( ) . getFullyQualifiedName ( '$' ) . replace ( '.' , '//' ) ) + ( SuffixConstants . SUFFIX_STRING_class ) ; IPackageFragmentRoot root = classFile . getPackageFragmentRoot ( ) ; <START_BUG> String rootPath = ( root . isExternal ( ) ) ? root . getPath ( ) . toOSString ( ) : root . getPath ( ) . toString ( ) ; <END_BUG> String documentPath = ( rootPath + ( IJavaSearchScope . JAR_FILE_ENTRY_SEPARATOR ) ) + filePath ; IBinaryType binaryType = ( ( IBinaryType ) ( this . binariesFromIndexMatches . get ( documentPath ) ) ) ; if ( binaryType != null ) { this . infoToHandle . put ( binaryType , classFile ) ; return binaryType ; } else { return super . createInfoFromClassFileInJar ( classFile ) ; } } private String [ ] determinePossibleSubTypes ( final HashSet localTypes , IProgressMonitor monitor ) { } public static void searchAllPossibleSubTypes ( IType type , IJavaSearchScope scope , final Map binariesFromIndexMatches , final IPathRequestor pathRequestor , int waitingPolicy , IProgressMonitor progressMonitor ) { } }

Fix:
String rootPath = root . getPath ( ) . toString ( ) ;