nus-yam/ex-repair huggingface dataset:
Buggy code:
public class MappingItem extends MappingObject { private static final Logger LOG = LoggerFactory . getLogger ( MappingItem . class ) ; private UUID primordialUUID ; private UUID mappingSetIDConcept ; private UUID qualifierConcept ; private UUID sourceConcept ; private UUID targetConcept ; private int sourceConceptNid ; private int targetConceptNid ; private int qualifierConceptNid ; protected final SimpleStringProperty sourceConceptProperty = new SimpleStringProperty ( ) ; protected final SimpleStringProperty targetConceptProperty = new SimpleStringProperty ( ) ; protected final SimpleStringProperty qualifierConceptProperty = new SimpleStringProperty ( ) ; protected final SimpleStringProperty commentsProperty = new SimpleStringProperty ( ) ; private static UUID commentsHack = UUID . randomUUID ( ) ; protected MappingItem ( RefexDynamicVersionBI < ? > refex ) throws IOException { } private void read ( RefexDynamicVersionBI < ? > refex ) throws IOException { } public int getSourceConceptNid ( ) { } public int getTargetConceptNid ( ) { } public int getQualifierConceptNid ( ) { } public String getSummary ( ) { } public List < MappingItemComment > getComments ( ) throws IOException { <START_BUG> return MappingItemCommentDAO . getComments ( getPrimordialUUID ( ) , false ) ; <END_BUG> } public MappingItemComment addComment ( String commentText ) throws IOException { } public UUID getPrimordialUUID ( ) { } public UUID getMappingSetIDConcept ( ) { } public UUID getSourceConcept ( ) { } public UUID getTargetConcept ( ) { } public UUID getQualifierConcept ( ) { } public SimpleStringProperty getSourceConceptProperty ( ) { } public SimpleStringProperty getTargetConceptProperty ( ) { } public SimpleStringProperty getQualifierConceptProperty ( ) { } public SimpleStringProperty getCommentsProperty ( ) { } private void setSourceConcept ( UUID sourceConcept ) { } private void setTargetConcept ( UUID targetConcept ) { } private void setQualifierConcept ( UUID qualifierConcept ) { } public void refreshCommentsProperty ( ) { } }

Fix:
return MappingItemCommentDAO . getComments ( getPrimordialUUID ( ) , true ) ;
Buggy code:
public class HttpInterceptor extends BaseInterceptor implements TcpConnectionHandler { boolean enabled = true ; PoolTcpEndpoint ep ; private ServerSocketFactory socketFactory ; int port ; InetAddress address ; String keystore ; String keypass ; boolean secure = false ; ContextManager contextM ; public HttpInterceptor ( ) { } public void setPort ( int port ) { } public int getPort ( ) { } public InetAddress getAddress ( ) { } public void engineInit ( ContextManager cm ) throws TomcatException { } public void engineShutdown ( ContextManager cm ) throws TomcatException { } public void setKeystore ( String k ) { } public String getKeystore ( ) { } public void setSecure ( boolean b ) { } public void setServer ( Object o ) { } public void setAttribute ( String s , Object o ) { } public Object [ ] init ( ) { } public void processConnection ( TcpConnection connection , Object [ ] thData ) { Socket socket = null ; HttpRequestAdapter reqA = null ; HttpResponseAdapter resA = null ; try { if ( connection == null ) return ; socket = connection . getSocket ( ) ; if ( socket == null ) return ; InputStream in = socket . getInputStream ( ) ; OutputStream out = socket . getOutputStream ( ) ; if ( thData != null ) { reqA = ( ( HttpRequestAdapter ) ( thData [ 0 ] ) ) ; resA = ( ( HttpResponseAdapter ) ( thData [ 1 ] ) ) ; if ( reqA != null ) reqA . recycle ( ) ; if ( resA != null ) resA . recycle ( ) ; } if ( ( reqA == null ) || ( resA == null ) ) { log ( "No<seq2seq4repair_space>thread<seq2seq4repair_space>data<seq2seq4repair_space>??" ) ; reqA = new HttpRequestAdapter ( ) ; resA = new HttpResponseAdapter ( ) ; contextM . initRequest ( reqA , resA ) ; } reqA . setSocket ( socket ) ; resA . setOutputStream ( out ) ; reqA . readNextRequest ( resA ) ; if ( secure ) { <START_BUG> reqA . setScheme ( "https" ) ; <END_BUG> } contextM . service ( reqA , resA ) ; try { InputStream is = socket . getInputStream ( ) ; int available = is . available ( ) ; if ( available > 1 ) { is . skip ( available ) ; } } catch ( NullPointerException npe ) { } } catch ( SocketException e ) { log ( "SocketException<seq2seq4repair_space>reading<seq2seq4repair_space>request,<seq2seq4repair_space>ignored" , null , INFORMATION ) ; log ( "SocketException<seq2seq4repair_space>reading<seq2seq4repair_space>request:" , e , DEBUG ) ; } catch ( IOException e ) { log ( "IOException<seq2seq4repair_space>reading<seq2seq4repair_space>request,<seq2seq4repair_space>ignored" , null , INFORMATION ) ; log ( "IOException<seq2seq4repair_space>reading<seq2seq4repair_space>request:" , e , DEBUG ) ; } catch ( Throwable e ) { log ( "Error<seq2seq4repair_space>reading<seq2seq4repair_space>request,<seq2seq4repair_space>ignored" , e , ERROR ) ; } finally { try { if ( socket != null ) socket . close ( ) ; } catch ( IOException e ) { } } } }

Fix:
reqA . scheme ( ) . setString ( "https" ) ;
Buggy code:
public class DirectoryFileComparatorTest extends ComparatorAbstractTestCase { public DirectoryFileComparatorTest ( String name ) { } @ Override protected void setUp ( ) throws Exception { super . setUp ( ) ; comparator = ( ( AbstractFileComparator ) ( DirectoryFileComparator . DIRECTORY_COMPARATOR ) ) ; reverse = DirectoryFileComparator . DIRECTORY_REVERSE ; File currentDir = new File ( "." ) ; equalFile1 = new File ( currentDir , "src" ) ; <START_BUG> equalFile2 = new File ( currentDir , "xdocs" ) ; <END_BUG> lessFile = new File ( currentDir , "src" ) ; moreFile = new File ( currentDir , "pom.xml" ) ; } @ Override public void testSortArray ( ) { } @ Override public void testSortList ( ) { } }

Fix:
equalFile2 = new File ( currentDir , "src//site//xdoc" ) ;
Buggy code:
public class MultiColumnVersionStrategy extends NumberVersionStrategy { public static final String ALIAS = "version-numbers" ; private Number [ ] _initials = null ; private Integer [ ] _javaTypes ; @ Override public void initialize ( ) { if ( ( _initials ) == null ) { Column [ ] cols = vers . getColumns ( ) ; _initials = new Number [ cols . length ] ; for ( int i = 0 ; i < ( cols . length ) ; i ++ ) { <START_BUG> _initials [ i ] = nextValue ( Numbers . valueOf ( 0 ) , getJavaType ( i ) ) ; <END_BUG> } } super . initialize ( ) ; } public void setInitialValues ( Number [ ] initial ) { } public Number [ ] getInitialValues ( ) { } public String getAlias ( ) { } protected int getJavaType ( ) { } protected int getJavaType ( int i ) { } protected Object nextVersion ( Object version ) { } Number nextValue ( Object number , int javaTypeCode ) { } }

Fix:
_initials [ i ] = nextValue ( 0 , getJavaType ( i ) ) ;
Buggy code:
public class RedstoneSignalHandler extends WorldSavedData { public static final String ID = "RTRedstoneSignalHandler" ; List < RedstoneSignal > redstoneSignals ; public RedstoneSignalHandler ( String name ) { } public RedstoneSignalHandler ( ) { } @ Override public boolean isDirty ( ) { } public static RedstoneSignalHandler getHandler ( ) { } private void updatePosition ( World worldObj , BlockPos pos ) { IBlockState targetState = worldObj . getBlockState ( pos ) ; targetState . getBlock ( ) . onNeighborBlockChange ( worldObj , pos , targetState , redstone_block ) ; <START_BUG> worldObj . notifyNeighborsOfStateChange ( pos , targetState . getBlock ( ) ) ; <END_BUG> } public synchronized boolean addSignal ( World worldObj , BlockPos pos , int duration , int strength ) { } public synchronized void tick ( ) { } public synchronized int getStrongPower ( World worldObj , BlockPos pos , EnumFacing facing ) { } @ Override public synchronized void readFromNBT ( NBTTagCompound nbt ) { } @ Override public synchronized void writeToNBT ( NBTTagCompound nbt ) { } }

Fix:
worldObj . notifyNeighborsOfStateChange ( pos , redstone_block ) ;
Buggy code:
final class JasperLiaison { Log log ; final int debug ; JasperLiaison ( Log log , int debug ) { } int processJspFile ( Request req , String jspFile , ServletHandler handler , Properties args ) { if ( ( debug ) > 10 ) log . log ( ( "Before<seq2seq4repair_space>compile<seq2seq4repair_space>sync<seq2seq4repair_space>" + jspFile ) ) ; synchronized ( handler ) { Dependency dep = handler . getServletInfo ( ) . getDependency ( ) ; if ( ( dep != null ) && ( ! ( dep . isExpired ( ) ) ) ) { return 0 ; } Context ctx = req . getContext ( ) ; JasperMangler mangler = new JasperMangler ( ctx . getWorkDir ( ) . getAbsolutePath ( ) , ctx . getAbsolutePath ( ) , jspFile ) ; if ( dep == null ) { dep = setDependency ( ctx , mangler , handler ) ; handler . setServletClassName ( mangler . getServletClassName ( ) ) ; if ( ! ( dep . isExpired ( ) ) ) return 0 ; } ctx . log ( ( ( ( "Compiling:<seq2seq4repair_space>" + jspFile ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( mangler . getServletClassName ( ) ) ) ) ; handler . setErrorException ( null ) ; handler . setState ( STATE_ADDED ) ; mangler . nextVersion ( ) ; dep . setLastModified ( System . currentTimeMillis ( ) ) ; if ( ( debug ) > 1 ) log . log ( ( "Update<seq2seq4repair_space>class<seq2seq4repair_space>Name<seq2seq4repair_space>" + ( mangler . getServletClassName ( ) ) ) ) ; handler . setServletClassName ( mangler . getServletClassName ( ) ) ; try { Options options = new JasperOptionsImpl ( args ) ; JspCompilationContext ctxt = createCompilationContext ( req , options , mangler ) ; JavaCompiler javaC = createJavaCompiler ( options ) ; jsp2java ( mangler , ctxt ) ; javac ( javaC , ctxt , mangler ) ; if ( ( debug ) > 0 ) log . log ( ( "Generated<seq2seq4repair_space>" + ( mangler . getClassFileName ( ) ) ) ) ; } catch ( Exception ex ) { if ( ctx != null ) ctx . log ( ( "compile<seq2seq4repair_space>error:<seq2seq4repair_space>req=" + req ) , ex ) ; else log . log ( ( "compile<seq2seq4repair_space>error:<seq2seq4repair_space>req=" + req ) , ex ) ; handler . setErrorException ( ex ) ; handler . setState ( STATE_DISABLED ) ; <START_BUG> return 0 ; <END_BUG> } dep . setExpired ( false ) ; } return 0 ; } void jsp2java ( JasperMangler mangler , JspCompilationContext ctxt ) throws Exception { } String javaEncoding = "UTF8" ; static String sep = System . getProperty ( "path.separator" ) ; void javac ( JavaCompiler javac , JspCompilationContext ctxt , Mangler mangler ) throws JasperException { } public JavaCompiler createJavaCompiler ( Options options ) throws JasperException { } private String computeClassPath ( Context ctx ) { } private JspCompilationContext createCompilationContext ( Request req , Options opt , Mangler mangler ) { } private Dependency setDependency ( Context ctx , JasperMangler mangler , ServletHandler handler ) { } }

Fix:
return 500 ;
Buggy code:
public abstract class ListView extends WebMarkupContainer { private static Log log = LogFactory . getLog ( ListView . class ) ; private int firstIndex = 0 ; private boolean optimizeItemRemoval = false ; private int viewSize = Integer . MAX_VALUE ; public ListView ( final String id , final IModel model ) { } public ListView ( final String id , final List list ) { } public final List getList ( ) { } public boolean getOptimizeItemRemoval ( ) { } public final int getStartIndex ( ) { } public int getViewSize ( ) { } public final Link moveDownLink ( final String id , final ListItem item ) { } public final Link moveUpLink ( final String id , final ListItem item ) { } public final Link removeLink ( final String id , final ListItem item ) { } public void setOptimizeItemRemoval ( boolean optimizeItemRemoval ) { } public ListView setStartIndex ( final int startIndex ) { } public ListView setViewSize ( final int size ) { } protected IModel getListItemModel ( final IModel listViewModel , final int index ) { } protected IModel initModel ( ) { } protected void internalOnBeginRequest ( ) { final int size = getViewSize ( ) ; if ( size > 0 ) { <START_BUG> if ( optimizeItemRemoval ) { <END_BUG> final int maxIndex = ( firstIndex ) + size ; for ( final Iterator iterator = iterator ( ) ; iterator . hasNext ( ) ; ) { final ListItem child = ( ( ListItem ) ( iterator . next ( ) ) ) ; if ( child != null ) { final int index = child . getIndex ( ) ; if ( ( index < ( firstIndex ) ) || ( index >= maxIndex ) ) { iterator . remove ( ) ; } } } } else { removeAll ( ) ; } for ( int i = 0 ; i < size ; i ++ ) { final int index = ( firstIndex ) + i ; ListItem item = ( ( ListItem ) ( get ( Integer . toString ( index ) ) ) ) ; if ( item == null ) { item = newItem ( index ) ; add ( item ) ; onBeginPopulateItem ( item ) ; populateItem ( item ) ; } } } else { removeAll ( ) ; } } protected ListItem newItem ( final int index ) { } protected void onBeginPopulateItem ( final ListItem item ) { } protected void onRender ( ) { } protected abstract void populateItem ( final ListItem item ) { } protected void renderItem ( final ListItem item ) { } }

Fix:
if ( getOptimizeItemRemoval ( ) ) {
Buggy code:
public class EventListener implements Listener { @ EventHandler ( priority = EventPriority . NORMAL ) public void onPlayerLogin ( PlayerLoginEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL ) public void onPlayerQuit ( PlayerQuitEvent event ) { UUID uuid = UUIDProvider . get ( event . getPlayer ( ) ) ; PlayerStats stats = playersStats . remove ( uuid ) ; if ( ( stats != null ) && ( ( stats . lastEpochTime ) != 0 ) ) { <START_BUG> int timeToAdd = ( ( int ) ( ( System . currentTimeMillis ( ) ) // 1000 ) ) - ( stats . lastEpochTime ) ; <END_BUG> ds . addTime ( uuid , timeToAdd ) ; } } }

Fix:
int timeToAdd = ( DataStore . epoch ( ) ) - ( stats . lastEpochTime ) ;
Buggy code:
public class TestPrefixQuery extends LuceneTestCase { public void testPrefixQuery ( ) throws Exception { Directory directory = newDirectory ( ) ; String [ ] categories = new String [ ] { "//Computers" , "//Computers//Mac" , "//Computers//Windows" } ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , directory ) ; for ( int i = 0 ; i < ( categories . length ) ; i ++ ) { Document doc = new Document ( ) ; doc . add ( newStringField ( "category" , categories [ i ] , YES ) ) ; writer . addDocument ( doc ) ; } IndexReader reader = writer . getReader ( ) ; PrefixQuery query = new PrefixQuery ( new Term ( "category" , "//Computers" ) ) ; IndexSearcher searcher = newSearcher ( reader ) ; ScoreDoc [ ] hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( "All<seq2seq4repair_space>documents<seq2seq4repair_space>in<seq2seq4repair_space>//Computers<seq2seq4repair_space>category<seq2seq4repair_space>and<seq2seq4repair_space>below" , 3 , hits . length ) ; query = new PrefixQuery ( new Term ( "category" , "//Computers//Mac" ) ) ; hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( "One<seq2seq4repair_space>in<seq2seq4repair_space>//Computers//Mac" , 1 , hits . length ) ; query = new PrefixQuery ( new Term ( "category" , "" ) ) ; Terms terms = MultiFields . getTerms ( searcher . getIndexReader ( ) , "category" ) ; assertFalse ( ( ( query . getTermsEnum ( terms ) ) instanceof PrefixTermsEnum ) ) ; hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( "everything" , 3 , hits . length ) ; <START_BUG> writer . close ( ) ; <END_BUG> reader . close ( ) ; directory . close ( ) ; } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class TestNRTCachingDirectory extends LuceneTestCase { public void testNRTAndCommit ( ) throws Exception { Directory dir = newDirectory ( ) ; NRTCachingDirectory cachedDir = new NRTCachingDirectory ( dir , 2.0 , 25.0 ) ; MockAnalyzer analyzer = new MockAnalyzer ( random ( ) ) ; analyzer . setMaxTokenLength ( TestUtil . nextInt ( random ( ) , 1 , MAX_TERM_LENGTH ) ) ; IndexWriterConfig conf = newIndexWriterConfig ( TEST_VERSION_CURRENT , analyzer ) ; RandomIndexWriter w = new RandomIndexWriter ( random ( ) , cachedDir , conf ) ; final LineFileDocs docs = new LineFileDocs ( random ( ) , true ) ; final int numDocs = TestUtil . nextInt ( random ( ) , 100 , 400 ) ; if ( VERBOSE ) { System . out . println ( ( "TEST:<seq2seq4repair_space>numDocs=" + numDocs ) ) ; } final List < BytesRef > ids = new ArrayList < > ( ) ; DirectoryReader r = null ; for ( int docCount = 0 ; docCount < numDocs ; docCount ++ ) { final Document doc = docs . nextDoc ( ) ; ids . add ( new BytesRef ( doc . get ( "docid" ) ) ) ; w . addDocument ( doc ) ; if ( ( random ( ) . nextInt ( 20 ) ) == 17 ) { if ( r == null ) { r = DirectoryReader . open ( w . w , false ) ; } else { final DirectoryReader r2 = DirectoryReader . openIfChanged ( r ) ; if ( r2 != null ) { r . close ( ) ; r = r2 ; } } assertEquals ( ( 1 + docCount ) , r . numDocs ( ) ) ; final IndexSearcher s = newSearcher ( r ) ; TopDocs hits = s . search ( new org . apache . lucene . search . TermQuery ( new Term ( "body" , "the" ) ) , 10 ) ; } } if ( r != null ) { r . close ( ) ; } <START_BUG> w . close ( ) ; <END_BUG> final String [ ] cachedFiles = cachedDir . listCachedFiles ( ) ; for ( String file : cachedFiles ) { System . out . println ( ( ( "FAIL:<seq2seq4repair_space>cached<seq2seq4repair_space>file<seq2seq4repair_space>" + file ) + "<seq2seq4repair_space>remains<seq2seq4repair_space>after<seq2seq4repair_space>sync" ) ) ; } assertEquals ( 0 , cachedFiles . length ) ; r = DirectoryReader . open ( dir ) ; for ( BytesRef id : ids ) { assertEquals ( 1 , r . docFreq ( new Term ( "docid" , id ) ) ) ; } r . close ( ) ; cachedDir . close ( ) ; docs . close ( ) ; } public void verifyCompiles ( ) throws Exception { } public void testDeleteFile ( ) throws Exception { } public void testNoDir ( ) throws Throwable { } public void testDirectoryFilter ( ) throws IOException { } public void testCompoundFileAppendTwice ( ) throws IOException { } private void createSequenceFile ( Directory dir , String name , byte start , int size ) throws IOException { } }

Fix:
w . shutdown ( ) ;
Buggy code:
public class ManageAllModulesRule extends AbstractRule { public void execute ( EnforcerRuleHelper helper ) throws EnforcerRuleException { Log log = helper . getLog ( ) ; try { MavenProject project = RuleHelper . getProject ( helper ) ; if ( project . isExecutionRoot ( ) ) { MavenSession session = RuleHelper . getSession ( helper ) ; List < MavenProject > projects = session . getProjects ( ) ; ImmutableListMultimap managedDependencies = RuleHelper . getManagedDependenciesAsMap ( project ) ; for ( MavenProject mavenProject : projects ) { if ( mavenProject . isExecutionRoot ( ) ) { continue ; } String projectIdentifier = RuleHelper . getProjectIdentifier ( mavenProject ) ; if ( ! ( managedDependencies . containsKey ( projectIdentifier ) ) ) { logHeader ( log , "manage<seq2seq4repair_space>all<seq2seq4repair_space>modules" ) ; log . warn ( ( "unmanaged<seq2seq4repair_space>project<seq2seq4repair_space>found:<seq2seq4repair_space>" + projectIdentifier ) ) ; failureDetected = true ; } } <START_BUG> if ( ( isShouldBuildFail ( ) ) && ( failureDetected ) ) { <END_BUG> throw new EnforcerRuleException ( "Failing<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>overridden<seq2seq4repair_space>managed<seq2seq4repair_space>plugins" ) ; } } } catch ( ExpressionEvaluationException e ) { throw new EnforcerRuleException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>lookup<seq2seq4repair_space>an<seq2seq4repair_space>expression<seq2seq4repair_space>" + ( e . getLocalizedMessage ( ) ) ) , e ) ; } } }

Fix:
if ( ( shouldBuildFail ( ) ) && ( failureDetected ) ) {
Buggy code:
public class DefaultTopologyValidator implements ITopologyValidator { @ Override <START_BUG> public void validate ( String topologyName , Map topologyConf , StormTopology topology , Map NimbusConf ) throws InvalidTopologyException { <END_BUG> } }

Fix:
public void validate ( String topologyName , Map topologyConf , StormTopology topology ) throws InvalidTopologyException {
Buggy code:
public class SynchronizerSession implements RepositorySessionCreationDelegate , RepositorySessionFinishDelegate , RecordsChannelDelegate { protected static final String LOG_TAG = "SynchronizerSession" ; private Synchronizer synchronizer ; private SynchronizerSessionDelegate delegate ; private Context context ; private RepositorySession sessionA ; private RepositorySession sessionB ; private RepositorySessionBundle bundleA ; private RepositorySessionBundle bundleB ; private long pendingATimestamp = - 1 ; private long pendingBTimestamp = - 1 ; public SynchronizerSession ( Synchronizer synchronizer , SynchronizerSessionDelegate delegate ) { } public Synchronizer getSynchronizer ( ) { } public void setSynchronizer ( Synchronizer synchronizer ) { } public void init ( Context context , RepositorySessionBundle bundleA , RepositorySessionBundle bundleB ) { } public void abort ( ) { } public void synchronize ( ) { } @ Override public void onFlowCompleted ( RecordsChannel channel , long end ) { } @ Override public void onFlowBeginFailed ( RecordsChannel recordsChannel , Exception ex ) { } @ Override public void onFlowStoreFailed ( RecordsChannel recordsChannel , Exception ex ) { } @ Override public void onFlowFinishFailed ( RecordsChannel recordsChannel , Exception ex ) { } @ Override public void onSessionCreateFailed ( Exception ex ) { } @ Override public void onSessionCreated ( RepositorySession session ) { } @ Override public void onFinishFailed ( Exception ex ) { if ( ( this . sessionB ) == null ) { <START_BUG> Log . w ( "rnewman" , "Got<seq2seq4repair_space>exception<seq2seq4repair_space>cleaning<seq2seq4repair_space>up<seq2seq4repair_space>first<seq2seq4repair_space>after<seq2seq4repair_space>second<seq2seq4repair_space>session<seq2seq4repair_space>creation<seq2seq4repair_space>failed." , ex ) ; <END_BUG> return ; } } @ Override public void onFinishSucceeded ( RepositorySession session , RepositorySessionBundle bundle ) { } }

Fix:
Log . w ( SynchronizerSession . LOG_TAG , "Got<seq2seq4repair_space>exception<seq2seq4repair_space>cleaning<seq2seq4repair_space>up<seq2seq4repair_space>first<seq2seq4repair_space>after<seq2seq4repair_space>second<seq2seq4repair_space>session<seq2seq4repair_space>creation<seq2seq4repair_space>failed." , ex ) ;
Buggy code:
public class PointType extends CoordinateFieldType implements SpatialQueryable { @ Override protected void init ( IndexSchema schema , Map < String , String > args ) { } @ Override public boolean isPolyField ( ) { } @ Override public IndexableField [ ] createFields ( SchemaField field , Object value , float boost ) { } @ Override public ValueSource getValueSource ( SchemaField field , QParser parser ) { } @ Override public IndexableField createField ( SchemaField field , Object value , float boost ) { } @ 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 Query getRangeQuery ( QParser parser , SchemaField field , String part1 , String part2 , boolean minInclusive , boolean maxInclusive ) { } @ Override public Query getFieldQuery ( QParser parser , SchemaField field , String externalVal ) { } public Query createSpatialQuery ( QParser parser , SpatialOptions options ) { } }

Fix:
writer . writeStr ( name , f . stringValue ( ) , true ) ;
Buggy code:
public class QCAVector { private final Relationship question ; private Relationship answer = null ; private List < QCAVector > answers = null ; private List < QCAVector > context = null ; private QCAVector preceding_sibling = null ; private static boolean debug = false ; public QCAVector ( Relationship question ) { } public QCAVector ( Relationship question , Relationship answer ) { } public QCAVector ( Relationship question , QCAVector context , Relationship answer ) { } public QCAVector ( Relationship question , QCAVector context ) { } public QCAVector ( Relationship question , List < QCAVector > context ) { } public QCAVector ( Relationship question , Relationship answer , QCAVector context ) { } public QCAVector ( Relationship question , Relationship answer , List < QCAVector > context ) { } public QCAVector ( Relationship question , Relationship answer , List < QCAVector > context , QCAVector preceding_sibling ) { } public QCAVector ( Relationship question , Relationship context , Relationship answer ) { } public QCAVector ( Relationship question , QCAVector context , QCAVector precedingSibling ) throws AnimoException { } protected void cyclingDetection ( Relationship op ) throws AnimoException { } public Relationship getClosest ( ) { } public Relationship getUnrelaxedClosest ( ) { } public Relationship getQuestion ( ) { } public void setAnswer ( Relationship r ) { } public Relationship getAnswer ( ) { } public Relationship getUnrelaxedAnswer ( ) { } public void addContext ( List < QCAVector > cs ) { } public List < QCAVector > getContext ( ) { } public void setPrecedingSibling ( QCAVector prev ) { } public QCAVector getPrecedingSibling ( ) { } public boolean questionEquals ( QCAVector vector ) { } protected void collectHash ( DataOutputStream dos ) throws IOException { } public byte [ ] mashup ( ) { } public void debug ( StringBuilder b , FastSet < Relationship > visited ) { } public String toString ( ) { } public boolean haveRelationship ( Relationship r ) { } public boolean canBeMerged ( QCAVector vector ) { } public boolean merged ( QCAVector vector ) { } public int hashCode ( ) { } public boolean equals ( Object o ) { } public QCAVector answered ( Relationship createdAnswer ) { } public QCAVector answered ( Relationship createdAnswer , QCAVector context ) { } public QCAVector answered ( Relationship createdAnswer , List < QCAVector > contexts ) { } public QCAVector question ( Relationship q ) { } public QCAVector question2 ( Relationship q ) { } public QCAVector question ( Relationship q , QCAVector prev ) throws AnimoException { } public void addAnswer ( QCAVector i ) { } public List < QCAVector > getAnswers ( ) { } public void recycle ( ) { } public boolean haveAnswer ( ) { <START_BUG> return ( ( answers ) != null ) || ( ( ( getUnrelaxedAnswer ( ) ) != null ) && ( getUnrelaxedAnswer ( ) . equals ( getQuestion ( ) ) ) ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return ( ( answers ) != null ) || ( ( ( getUnrelaxedAnswer ( ) ) != null ) && ( ! ( getUnrelaxedAnswer ( ) . equals ( getQuestion ( ) ) ) ) ) ;
Buggy code:
class BinaryField extends BinaryMember implements IField { protected BinaryField ( JavaElement parent , String name ) { } public boolean equals ( Object o ) { } public Object getConstant ( ) throws JavaModelException { } public int getFlags ( ) throws JavaModelException { } public int getElementType ( ) { } protected char getHandleMementoDelimiter ( ) { } public String getKey ( boolean forceOpen ) throws JavaModelException { <START_BUG> return getKey ( this , Binding . USE_ACCESS_FLAGS_IN_BINDING_KEY , forceOpen ) ; <END_BUG> } public String getTypeSignature ( ) throws JavaModelException { } public boolean isEnumConstant ( ) throws JavaModelException { } public boolean isResolved ( ) { } public JavaElement resolved ( Binding binding ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { } }

Fix:
return getKey ( this , true , forceOpen ) ;
Buggy code:
public class AddColumnFamily extends Migration { private static final AddColumnFamily . Serializer serializer = new AddColumnFamily . Serializer ( ) ; private CFMetaData cfm ; private AddColumnFamily ( DataInputStream din ) throws IOException { } public AddColumnFamily ( CFMetaData cfm ) throws IOException , ConfigurationException { } private KSMetaData makeNewKeyspaceDefinition ( KSMetaData ksm ) { } public void applyModels ( ) { KSMetaData ksm = DatabaseDescriptor . getTableDefinition ( cfm . tableName ) ; ksm = makeNewKeyspaceDefinition ( ksm ) ; <START_BUG> Table . open ( ksm . name ) . addCf ( cfm . cfName ) ; <END_BUG> DatabaseDescriptor . setTableDefinition ( ksm , newVersion ) ; CommitLog . instance ( ) . forceNewSegment ( ) ; } @ Override public ICompactSerializer getSerializer ( ) { } private static final class Serializer implements ICompactSerializer < AddColumnFamily > { public void serialize ( AddColumnFamily addColumnFamily , DataOutputStream dos ) throws IOException { } public AddColumnFamily deserialize ( DataInputStream dis ) throws IOException { } } }

Fix:
Table . open ( ksm . name ) . initCf ( cfm . cfId , cfm . cfName ) ;
Buggy code:
public class CassandraBulkLoader { public static class Map extends MapReduceBase implements Mapper < Text , Text , Text , Text > { private Text word = new Text ( ) ; public void map ( Text key , Text value , OutputCollector < Text , Text > output , Reporter reporter ) throws IOException { } } public static class Reduce extends MapReduceBase implements Reducer < Text , Text , Text , Text > { private Path [ ] localFiles ; private ArrayList < String > tokens = new ArrayList < String > ( ) ; private JobConf jobconf ; public void configure ( JobConf job ) { } public void close ( ) { } public void reduce ( Text key , Iterator < Text > values , OutputCollector < Text , Text > output , Reporter reporter ) throws IOException { ColumnFamily columnFamily ; String Keyspace = "Keyspace1" ; String CFName = "Super1" ; Message message ; List < ColumnFamily > columnFamilies ; columnFamilies = new LinkedList < ColumnFamily > ( ) ; String line ; columnFamily = ColumnFamily . create ( Keyspace , CFName ) ; while ( values . hasNext ( ) ) { line = values . next ( ) . toString ( ) ; String [ ] fields = line . split ( "" ) ; String SuperColumnName = fields [ 1 ] ; String ColumnName = fields [ 2 ] ; String ColumnValue = fields [ 3 ] ; int timestamp = 0 ; columnFamily . addColumn ( new QueryPath ( CFName , SuperColumnName . getBytes ( "UTF-8" ) , ColumnName . getBytes ( "UTF-8" ) ) , ColumnValue . getBytes ( ) , timestamp ) ; } columnFamilies . add ( columnFamily ) ; message = CassandraBulkLoader . createMessage ( Keyspace , key . toString ( ) , CFName , columnFamilies ) ; <START_BUG> for ( EndPoint endpoint : StorageService . instance ( ) . getNStorageEndPoint ( key . toString ( ) ) ) { <END_BUG> MessagingService . getMessagingInstance ( ) . sendOneWay ( message , endpoint ) ; } output . collect ( key , new Text ( "<seq2seq4repair_space>inserted<seq2seq4repair_space>into<seq2seq4repair_space>Cassandra<seq2seq4repair_space>node(s)" ) ) ; } } public static void runJob ( String [ ] args ) { } public static Message createMessage ( String Keyspace , String Key , String CFName , List < ColumnFamily > ColumnFamiles ) { } public static void startMessagingService ( ) { } public static void shutdownMessagingService ( ) { } public static void main ( String [ ] args ) throws Exception { } }

Fix:
for ( EndPoint endpoint : StorageService . instance ( ) . getReadStorageEndPoints ( key . toString ( ) ) ) {
Buggy code:
public class ArArchiveOutputStream extends ArchiveOutputStream { private final OutputStream out ; private long archiveOffset = 0 ; private long entryOffset = 0 ; private ArArchiveEntry prevEntry ; private boolean haveUnclosedEntry = false ; private boolean finished = false ; public ArArchiveOutputStream ( final OutputStream pOut ) { } private long writeArchiveHeader ( ) throws IOException { } public void closeArchiveEntry ( ) throws IOException { } public void putArchiveEntry ( final ArchiveEntry pEntry ) throws IOException { } private long fill ( final long pOffset , final long pNewOffset , final char pFill ) throws IOException { } private long write ( final String data ) throws IOException { } private long writeEntryHeader ( final ArArchiveEntry pEntry ) throws IOException { long offset = 0 ; final String n = pEntry . getName ( ) ; if ( ( n . length ( ) ) > 16 ) { throw new IOException ( ( "filename<seq2seq4repair_space>too<seq2seq4repair_space>long,<seq2seq4repair_space>><seq2seq4repair_space>16<seq2seq4repair_space>chars:<seq2seq4repair_space>" + n ) ) ; } offset += write ( n ) ; offset = fill ( offset , 16 , '<seq2seq4repair_space>' ) ; <START_BUG> final String m = "" + ( ( pEntry . getLastModified ( ) ) // 1000 ) ; <END_BUG> if ( ( m . length ( ) ) > 12 ) { throw new IOException ( "modified<seq2seq4repair_space>too<seq2seq4repair_space>long" ) ; } offset += write ( m ) ; offset = fill ( offset , 28 , '<seq2seq4repair_space>' ) ; final String u = "" + ( pEntry . getUserId ( ) ) ; if ( ( u . length ( ) ) > 6 ) { throw new IOException ( "userid<seq2seq4repair_space>too<seq2seq4repair_space>long" ) ; } offset += write ( u ) ; offset = fill ( offset , 34 , '<seq2seq4repair_space>' ) ; final String g = "" + ( pEntry . getGroupId ( ) ) ; if ( ( g . length ( ) ) > 6 ) { throw new IOException ( "groupid<seq2seq4repair_space>too<seq2seq4repair_space>long" ) ; } offset += write ( g ) ; offset = fill ( offset , 40 , '<seq2seq4repair_space>' ) ; final String fm = "" + ( Integer . toString ( pEntry . getMode ( ) , 8 ) ) ; if ( ( fm . length ( ) ) > 8 ) { throw new IOException ( "filemode<seq2seq4repair_space>too<seq2seq4repair_space>long" ) ; } offset += write ( fm ) ; offset = fill ( offset , 48 , '<seq2seq4repair_space>' ) ; final String s = "" + ( pEntry . getLength ( ) ) ; if ( ( s . length ( ) ) > 10 ) { throw new IOException ( "size<seq2seq4repair_space>too<seq2seq4repair_space>long" ) ; } offset += write ( s ) ; offset = fill ( offset , 58 , '<seq2seq4repair_space>' ) ; offset += write ( TRAILER ) ; return offset ; } public void write ( byte [ ] b , int off , int len ) throws IOException { } public void close ( ) throws IOException { } public ArchiveEntry createArchiveEntry ( File inputFile , String entryName ) throws IOException { } public void finish ( ) throws IOException { } }

Fix:
final String m = "" + ( pEntry . getLastModified ( ) ) ;
Buggy code:
public class EmbedderServiceImpl implements EmbedderService { private static final Logger LOGGER = LoggerFactory . getLogger ( EmbedderServiceImpl . class ) ; private Embedder embedder ; private Boolean status = false ; public Embedder getEmbedder ( ) { } @ Override public boolean isStarted ( ) { } @ Override public void runStoriesWithAnnotatedEmbedderRunner ( List < String > classNames ) { EmbedderServiceImpl . LOGGER . info ( ( ( "Running<seq2seq4repair_space>stories<seq2seq4repair_space>with<seq2seq4repair_space>annotated<seq2seq4repair_space>embedder<seq2seq4repair_space>runner<seq2seq4repair_space>using<seq2seq4repair_space>classes:<seq2seq4repair_space>'" + classNames ) + "'" ) ) ; <START_BUG> embedder . runStoriesWithAnnotatedEmbedderRunner ( classNames ) ; <END_BUG> } public void setEmbedder ( Embedder embedder ) { } @ Override public void showStatus ( ) { } public void start ( ) { } public void stop ( ) { } @ Override public String toString ( ) { } }

Fix:
getEmbedder ( ) . runStoriesWithAnnotatedEmbedderRunner ( classNames ) ;
Buggy code:
public class Spinner extends Composite { int textHandle ; int buttonHandle ; int textVisibleRgn ; int buttonVisibleRgn ; int increment = 1 ; int pageIncrement = 10 ; int digits = 0 ; public Spinner ( Composite parent , int style ) { } int actionProc ( int theControl , int partCode ) { } public void addModifyListener ( ModifyListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } void addVerifyListener ( VerifyListener listener ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } public void copy ( ) { } void copy ( char [ ] buffer ) { } void createHandle ( ) { } public void cut ( ) { } void deregister ( ) { } void drawBackground ( int control ) { } int focusHandle ( ) { } public int getDigits ( ) { } String getDecimalSeparator ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } int getSelectionText ( ) { } int getVisibleRegion ( int control , boolean clipChildren ) { } void hookEvents ( ) { } Rect inset ( ) { } int kEventControlSetFocusPart ( int nextHandler , int theEvent , int userData ) { } int kEventTextInputUnicodeForKeyEvent ( int nextHandler , int theEvent , int userData ) { } public void paste ( ) { } public void redraw ( ) { } void register ( ) { } public void removeModifyListener ( ModifyListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } void removeVerifyListener ( VerifyListener listener ) { } void resetVisibleRegion ( int control ) { } void resizeClientArea ( ) { } boolean sendKeyEvent ( int type , Event event ) { } void setBackground ( float [ ] color ) { } public void setDigits ( int value ) { checkWidget ( ) ; if ( value < 0 ) <START_BUG> return ; <END_BUG> if ( value == ( this . digits ) ) return ; this . digits = value ; int pos = OS . GetControl32BitValue ( buttonHandle ) ; setSelection ( pos , false ) ; } void setFontStyle ( Font font ) { } void setForeground ( float [ ] color ) { } 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 ) { } void setSelection ( int value , boolean notify ) { } char [ ] setText ( String string , int start , int end , boolean notify ) { } void setZOrder ( ) { } String verifyText ( String string , int start , int end , Event keyEvent ) { } }

Fix:
error ( ERROR_INVALID_ARGUMENT ) ;
Buggy code:
public class ClientThread { private int myPort ; private int remotePort ; protected static BufferedReader in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; private String serverAddress = "127.0.0.1" ; private DatagramSocket udpSocket = null ; private DatagramPacket packet = null ; public boolean isUp ; private InetAddress servAddress = null ; private MessageHandler handler ; public ClientThread ( int myPort , int servPort , MessageHandler handler ) { } private class ReceiveThread extends Thread { public void run ( ) { } } private ClientThread . ReceiveThread receiveThread ; public GameID JoinGame ( ) { } public synchronized GameID JoinGame ( String address ) { isUp = false ; serverAddress = address ; try { servAddress = InetAddress . getByName ( serverAddress ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } if ( ( receiveThread ) != null ) { receiveThread . interrupt ( ) ; while ( receiveThread . isAlive ( ) ) ; } ConnectToServer ( ) ; <START_BUG> byte [ ] buff = new byte [ 64 ] ; <END_BUG> DatagramPacket gamePacket = new DatagramPacket ( buff , buff . length , servAddress , remotePort ) ; int fails = 0 ; while ( ( ( gamePacket . getLength ( ) ) >= 100 ) && ( fails < 25 ) ) { fails ++ ; try { System . out . println ( "Listening<seq2seq4repair_space>for<seq2seq4repair_space>player<seq2seq4repair_space>assignment<seq2seq4repair_space>message<seq2seq4repair_space>from<seq2seq4repair_space>server" ) ; udpSocket . setSoTimeout ( 500 ) ; udpSocket . receive ( gamePacket ) ; } catch ( Exception e ) { } } int nullPos = 0 ; byte [ ] gData = gamePacket . getData ( ) ; for ( int i = 0 ; i < ( gData . length ) ; i ++ ) { if ( ( gData [ i ] ) == '' ) { nullPos = i ; break ; } } String temp = new String ( gData , 0 , nullPos ) ; GameID playerID = new GameID ( temp ) ; receiveThread = new ClientThread . ReceiveThread ( ) ; receiveThread . start ( ) ; return playerID ; } public void ConnectToServer ( ) { } public void SendString ( String dataToSend ) { } public void SendPacket ( DatagramPacket toSendPacket ) throws InterruptedException { } public void RecieveGameState ( ) throws InterruptedException { } public void CloseConnection ( ) { } }

Fix:
byte [ ] buff = new byte [ 128 ] ;
Buggy code:
public class PhdSchoolRegistrationDeclarationDocument extends FenixReport { private static final long serialVersionUID = 1L ; private final PhdIndividualProgramProcess process ; public PhdSchoolRegistrationDeclarationDocument ( final PhdIndividualProgramProcess process ) { } @ Override protected void fillReport ( ) { final AdministrativeOffice administrativeOffice = process . getPhdProgram ( ) . getAdministrativeOffice ( ) ; <START_BUG> addParameter ( "administrativeOfficeName" , administrativeOffice . getName ( ) ) ; <END_BUG> addParameter ( "administrativeOfficeCoordinator" , administrativeOffice . getCoordinator ( ) . getProfile ( ) . getDisplayName ( ) ) ; addParameter ( "institutionName" , Bennu . getInstance ( ) . getInstitutionUnit ( ) . getPartyName ( ) . getContent ( ) ) ; addParameter ( "universityName" , UniversityUnit . getInstitutionsUniversityUnit ( ) . getPartyName ( ) . getContent ( ) ) ; addParameter ( "studentNumber" , getStudentNumber ( ) ) ; addParameter ( "studentName" , getPerson ( ) . getName ( ) ) ; addParameter ( "documentId" , getPerson ( ) . getDocumentIdNumber ( ) ) ; addParameter ( "parishOfBirth" , getPerson ( ) . getParishOfBirth ( ) ) ; addParameter ( "nationality" , getPerson ( ) . getCountry ( ) . getCountryNationality ( ) . getContent ( ) ) ; addParameter ( "registrationState" , getRegistrationStateLabel ( ) ) ; addParameter ( "executionYear" , process . getExecutionYear ( ) . getName ( ) ) ; addParameter ( "phdProgramName" , process . getPhdProgram ( ) . getName ( ) . getContent ( ) ) ; addParameter ( "documentDate" , new LocalDate ( ) . toString ( DD_MMMM_YYYY , I18N . getLocale ( ) ) ) ; } private String getStudentNumber ( ) { } private String getRegistrationStateLabel ( ) { } private Person getPerson ( ) { } private Student getStudent ( ) { } private Registration getRegistration ( ) { } private boolean hasRegistration ( ) { } @ Override public String getReportFileName ( ) { } @ Override public String getReportTemplateKey ( ) { } }

Fix:
addParameter ( "administrativeOfficeName" , administrativeOffice . getName ( ) . getContent ( ) ) ;
Buggy code:
public class B64Test { @ Test public void testB64T ( ) { } @ Test public void testB64from24bit ( ) { <START_BUG> StringBuilder buffer = new StringBuilder ( "" ) ; <END_BUG> B64 . b64from24bit ( ( ( byte ) ( 8 ) ) , ( ( byte ) ( 16 ) ) , ( ( byte ) ( 64 ) ) , 2 , buffer ) ; B64 . b64from24bit ( ( ( byte ) ( 7 ) ) , ( ( byte ) ( 77 ) ) , ( ( byte ) ( 120 ) ) , 4 , buffer ) ; assertEquals ( ".//spo//" , buffer . toString ( ) ) ; } }

Fix:
final StringBuilder buffer = new StringBuilder ( "" ) ;
Buggy code:
public final class EnabledSubmission implements Comparable { private static final int HASH_FACTOR = 89 ; private static final int HASH_INITIAL = EnabledSubmission . class . getName ( ) . hashCode ( ) ; private final String activePartId ; private final Shell activeShell ; private final IWorkbenchPartSite activeWorkbenchPartSite ; private final String contextId ; private transient int hashCode ; private transient boolean hashCodeComputed = false ; private transient String string = null ; public EnabledSubmission ( String activePartId , Shell activeShell , IWorkbenchPartSite activeWorkbenchPartSite , String contextId ) { } public int compareTo ( Object object ) { } public String getActivePartId ( ) { } public Shell getActiveShell ( ) { } public IWorkbenchPartSite getActiveWorkbenchPartSite ( ) { } public String getContextId ( ) { } public int hashCode ( ) { } public String toString ( ) { if ( ( string ) == null ) { final StringBuffer stringBuffer = new StringBuffer ( ) ; stringBuffer . append ( "[activePartId=" ) ; stringBuffer . append ( activePartId ) ; <START_BUG> stringBuffer . append ( "activeShell=" ) ; <END_BUG> stringBuffer . append ( activeShell ) ; stringBuffer . append ( ",activeWorkbenchSite=" ) ; stringBuffer . append ( activeWorkbenchPartSite ) ; stringBuffer . append ( ",contextId=" ) ; stringBuffer . append ( contextId ) ; stringBuffer . append ( ']' ) ; string = stringBuffer . toString ( ) ; } return string ; } }

Fix:
stringBuffer . append ( ",activeShell=" ) ;
Buggy code:
public class PropPanelCompositeState extends PropPanelState { protected JList subverticesList = null ; public PropPanelCompositeState ( String name , ImageIcon icon , Orientation orientation ) { } public PropPanelCompositeState ( ) { } protected void initialize ( ) { <START_BUG> subverticesList = new UMLCompositeStateSubvertexList ( this , new UMLCompositeStateSubvertexListModel ( this ) ) ; <END_BUG> } }

Fix:
subverticesList = new UMLCompositeStateSubvertexList ( this , new UMLCompositeStateSubvertexListModel ( ) ) ;
Buggy code:
public class Chunk extends Token { public static float paintChunkList ( Chunk chunks , Graphics2D gfx , float x , float y , boolean glyphVector ) { } public static float paintChunkBackgrounds ( Chunk chunks , Graphics2D gfx , float x , float y ) { } public static float offsetToX ( Chunk chunks , int offset ) { } public static int xToOffset ( Chunk chunks , float x , boolean round ) { } public boolean accessable ; public boolean visible ; public boolean initialized ; public boolean monospaced ; public int charWidth ; public SyntaxStyle style ; public Color background ; public float width ; public GlyphVector gv ; public String str ; public Chunk ( float width , int offset , ParserRuleSet rules ) { } public Chunk ( byte id , int offset , int length , ParserRuleSet rules , SyntaxStyle [ ] styles , byte defaultID ) { } public final float [ ] getPositions ( ) { } public final float offsetToX ( int offset ) { } public final int xToOffset ( float x , boolean round ) { } public void init ( Segment seg , TabExpander expander , float x , FontRenderContext fontRenderContext ) { initialized = true ; if ( ( style ) != null ) charWidth = style . getCharWidth ( ) ; if ( ! ( accessable ) ) { } else if ( ( ( length ) == 1 ) && ( ( seg . array [ ( ( seg . offset ) + ( offset ) ) ] ) == '\t' ) ) { visible = false ; float newX = expander . nextTabStop ( x , ( ( offset ) + ( length ) ) ) ; width = newX - x ; } else <START_BUG> if ( ( charWidth ) != 0 ) { <END_BUG> visible = monospaced = true ; str = new String ( seg . array , ( ( seg . offset ) + ( offset ) ) , length ) ; width = ( charWidth ) * ( length ) ; } else { visible = true ; str = new String ( seg . array , ( ( seg . offset ) + ( offset ) ) , length ) ; gv = style . getFont ( ) . createGlyphVector ( fontRenderContext , str ) ; width = ( ( float ) ( gv . getLogicalBounds ( ) . getWidth ( ) ) ) ; } } private float [ ] positions ; }

Fix:
if ( ( ( charWidth ) != 0 ) && ( ! ( Debug . DISABLE_MONOSPACE_HACK ) ) ) {
Buggy code:
public class ConstructorReference extends SpelNodeImpl { private volatile ConstructorExecutor cachedExecutor ; public ConstructorReference ( int pos , SpelNodeImpl ... arguments ) { } @ Override public TypedValue getValueInternal ( ExpressionState state ) throws EvaluationException { } private TypedValue createNewInstance ( ExpressionState state ) throws EvaluationException { Object [ ] arguments = new Object [ ( getChildCount ( ) ) - 1 ] ; Class < ? > [ ] argumentTypes = new Class [ ( getChildCount ( ) ) - 1 ] ; for ( int i = 0 ; i < ( arguments . length ) ; i ++ ) { TypedValue childValue = children [ ( i + 1 ) ] . getValueInternal ( state ) ; Object value = childValue . getValue ( ) ; arguments [ i ] = value ; <START_BUG> argumentTypes [ i ] = ( value == null ) ? Object . class : value . getClass ( ) ; <END_BUG> } ConstructorExecutor executorToUse = this . cachedExecutor ; if ( executorToUse != null ) { try { return executorToUse . execute ( state . getEvaluationContext ( ) , arguments ) ; } catch ( AccessException ae ) { this . cachedExecutor = null ; } } String typename = ( ( String ) ( children [ 0 ] . getValueInternal ( state ) . getValue ( ) ) ) ; executorToUse = findExecutorForConstructor ( typename , argumentTypes , state ) ; try { this . cachedExecutor = executorToUse ; TypedValue result = executorToUse . execute ( state . getEvaluationContext ( ) , arguments ) ; return result ; } catch ( AccessException ae ) { throw new SpelEvaluationException ( getStartPosition ( ) , ae , SpelMessage . CONSTRUCTOR_INVOCATION_PROBLEM , typename , FormatHelper . formatMethodForMessage ( "" , argumentTypes ) ) ; } } private ConstructorExecutor findExecutorForConstructor ( String typename , Class < ? > [ ] argumentTypes , ExpressionState state ) throws SpelEvaluationException { } @ Override public String toStringAST ( ) { } }

Fix:
argumentTypes [ i ] = ( value == null ) ? null : value . getClass ( ) ;