nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Settings { private static final String SEPARATOR = ":<seq2seq4repair_space>" ; private static final String COMMENT = "#" ; private static final String PATH = ".//settings.txt" ; private Map < String , Settings . Setting > values ; public Settings ( ) { } public Settings getSubSettings ( String path ) { } public Set < String > getKeys ( ) { } public Set < String > getSections ( ) { } public List < String > getComments ( String key ) { } public boolean addComment ( String key , String comment ) { } public void removeComments ( String key ) { } public boolean hasSetting ( String key ) { } public String get ( String key ) { } public String get ( String key , String defaultValue ) { } public String set ( String key , String value ) { } public int getInt ( String key ) { } public int getInt ( String key , int defaultValue ) { } public int setInt ( String key , int value ) { } public int getIntRadix ( String key , int radix ) { } public int getIntRadix ( String key , String defaultValue , int radix ) { } public int getIntRadix ( String key , int defaultValue , int radix ) { } public int setIntRadix ( String key , int value , int radix ) { } public float getFloat ( String key ) { } public float getFloat ( String key , float defaultValue ) { } public float setFloat ( String key , float value ) { } public < T extends Enum < ? > > T getEnum ( String key , Class < T > eClass ) { String s = get ( key ) ; <START_BUG> T t = Settings . valueOf ( eClass , s ) ; <END_BUG> return t ; } public < T extends Enum < ? > > T getEnum ( String key , T defaultValue , Class < T > eClass ) { } public < T extends Enum < ? > > T setEnum ( String key , T value , Class < T > eClass ) { } public void save ( ) { } public void save ( String f ) throws IOException { } public void save ( File f ) throws IOException { } public void load ( ) { } public void load ( String f ) throws IOException { } public void load ( File f ) throws IOException { } @ SuppressWarnings ( "unchecked" ) private static < T extends Enum < ? > > T valueOf ( Class < T > clazz , String value ) { } private class Setting { private String value ; private List < String > comments = Collections . synchronizedList ( new LinkedList < String > ( ) ) ; } }

Fix:
T t = ( s == null ) ? null : Settings . valueOf ( eClass , s ) ;
Buggy code:
@ Path ( "news" ) public interface NewsApi { @ GET @ Path ( "//{id}" ) @ Consumes ( MediaType . APPLICATION_FORM_URLENCODED ) @ Produces ( MediaType . APPLICATION_JSON ) News findById ( @ PathParam ( "id" ) long id ) { } @ GET @ Consumes ( MediaType . APPLICATION_FORM_URLENCODED ) @ Produces ( MediaType . APPLICATION_JSON ) List < News > find ( @ QueryParam ( "offset" ) int offset , @ QueryParam ( "limit" ) int limit ) { } @ GET @ Path ( "//all" ) @ Consumes ( MediaType . APPLICATION_FORM_URLENCODED ) @ Produces ( MediaType . APPLICATION_JSON ) List < News > findAll ( ) { } @ GET @ Path ( "//timestamp" ) @ Consumes ( MediaType . APPLICATION_FORM_URLENCODED ) @ Produces ( MediaType . APPLICATION_JSON ) <START_BUG> long lastUpdate ( ) ; <END_BUG> }

Fix:
Long lastUpdate ( ) ;
Buggy code:
public class BooleanFilterTest extends LuceneTestCase { private Directory directory ; private AtomicReader reader ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; directory = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , directory , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) , MockTokenizer . WHITESPACE , false ) ) ; addDoc ( writer , "admin<seq2seq4repair_space>guest" , "010" , "20040101" , "Y" ) ; addDoc ( writer , "guest" , "020" , "20040101" , "Y" ) ; addDoc ( writer , "guest" , "020" , "20050101" , "Y" ) ; addDoc ( writer , "admin" , "020" , "20050101" , "Maybe" ) ; addDoc ( writer , "admin<seq2seq4repair_space>guest" , "030" , "20050101" , "N" ) ; reader = SlowCompositeReaderWrapper . wrap ( writer . getReader ( ) ) ; <START_BUG> writer . close ( ) ; <END_BUG> } @ Override public void tearDown ( ) throws Exception { } private void addDoc ( RandomIndexWriter writer , String accessRights , String price , String date , String inStock ) throws IOException { } private Filter getRangeFilter ( String field , String lowerPrice , String upperPrice ) { } private Filter getTermsFilter ( String field , String text ) { } private Filter getWrappedTermQuery ( String field , String text ) { } private Filter getEmptyFilter ( ) { } private Filter getNullDISFilter ( ) { } private Filter getNullDISIFilter ( ) { } private void tstFilterCard ( String mes , int expected , Filter filt ) throws Exception { } public void testShould ( ) throws Exception { } public void testShoulds ( ) throws Exception { } public void testShouldsAndMustNot ( ) throws Exception { } public void testShouldsAndMust ( ) throws Exception { } public void testShouldsAndMusts ( ) throws Exception { } public void testShouldsAndMustsAndMustNot ( ) throws Exception { } public void testJustMust ( ) throws Exception { } public void testJustMustNot ( ) throws Exception { } public void testMustAndMustNot ( ) throws Exception { } public void testEmpty ( ) throws Exception { } public void testCombinedNullDocIdSets ( ) throws Exception { } public void testJustNullDocIdSets ( ) throws Exception { } public void testNonMatchingShouldsAndMusts ( ) throws Exception { } public void testToStringOfBooleanFilterContainingTermsFilter ( ) { } public void testToStringOfWrappedBooleanFilters ( ) { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class JTypeInstruction implements IInstruction { private int jumpdest ; public JTypeInstruction ( ) { } public JTypeInstruction ( int jdst ) { } public int getFUNCT ( ) { } public void setFUNCT ( int aFUNCT ) { } public int getImmediate ( ) { } public void setImmediate ( int aImmediate ) { } public String getOpcode ( ) { } public void setOpcode ( String aOpcode ) { } public int getRD ( ) { } public void setRD ( int aRD ) { } public int getRS ( ) { } public void setRS ( int aRS ) { } public int getRT ( ) { } public void setRT ( int aRT ) { } public int getSHAMT ( ) { } public void setSHAMT ( int aSHAMT ) { } public InstructionType getType ( ) { } public int getJumpdest ( ) { } public void setJumpdest ( int aJumpdest ) { } public String toString ( ) { <START_BUG> String message = ( "jump<seq2seq4repair_space>" + ( jumpdest ) ) + "\n" ; <END_BUG> return message ; } No newline ; at end ; of file ; }

Fix:
String message = ( "J<seq2seq4repair_space>" + ( jumpdest ) ) + "\n" ;
Buggy code:
public class ArrayReference extends Reference { public Expression receiver ; public Expression position ; public ArrayReference ( Expression rec , Expression pos ) { } public FlowInfo analyseAssignment ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , Assignment assignment , boolean compoundAssignment ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { constant = Constant . NotAConstant ; if ( ( ( receiver ) instanceof CastExpression ) && ( ( ( ( CastExpression ) ( receiver ) ) . innermostCastedExpression ( ) ) instanceof NullLiteral ) ) { this . receiver . bits |= IgnoreNeedForCastCheckMASK ; } TypeBinding arrayType = receiver . resolveType ( scope ) ; if ( arrayType != null ) { receiver . computeConversion ( scope , arrayType , arrayType ) ; if ( arrayType . isArrayType ( ) ) { TypeBinding elementType = ( ( ArrayBinding ) ( arrayType ) ) . elementsType ( ) ; <START_BUG> this . resolvedType = ( ( ( this . bits ) & ( IsStrictlyAssignedMASK ) ) == 0 ) ? elementType . capture ( ) : elementType ; <END_BUG> } else { scope . problemReporter ( ) . referenceMustBeArrayTypeAt ( arrayType , this ) ; } } TypeBinding positionType = position . resolveTypeExpecting ( scope , IntBinding ) ; if ( positionType != null ) { position . computeConversion ( scope , IntBinding , positionType ) ; } return this . resolvedType ; } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
this . resolvedType = ( ( ( this . bits ) & ( IsStrictlyAssignedMASK ) ) == 0 ) ? elementType . capture ( scope , this . sourceEnd ) : elementType ;
Buggy code:
public class ReadResponseResolver implements IResponseResolver < Row > { private static Logger logger_ = LoggerFactory . getLogger ( ReadResponseResolver . class ) ; private final String table ; private final Map < Message , ReadResponse > results = new org . cliffc . high_scale_lib . NonBlockingHashMap < Message , ReadResponse > ( ) ; public ReadResponseResolver ( String table ) { } public Row resolve ( Collection < Message > responses ) throws IOException , DigestMismatchException { } public static void maybeScheduleRepairs ( ColumnFamily resolved , String table , DecoratedKey key , List < ColumnFamily > versions , List < InetAddress > endpoints ) { } static ColumnFamily resolveSuperset ( List < ColumnFamily > versions ) { } public void preprocess ( Message message ) { } public boolean isDataPresent ( Collection < Message > responses ) { for ( Message message : responses ) { ReadResponse result = results . get ( message ) ; if ( result == null ) continue ; <START_BUG> if ( result . isDigestQuery ( ) ) <END_BUG> return true ; } return false ; } }

Fix:
if ( ! ( result . isDigestQuery ( ) ) )
Buggy code:
public final class MapDataSourceLookupTests extends TestCase { private static final String DATA_SOURCE_NAME = "dataSource" ; public void testGetDataSourcesReturnsUnmodifiableMap ( ) throws Exception { } public void testLookupSunnyDay ( ) throws Exception { } public void testSettingDataSourceMapToNullIsAnIdempotentOperation ( ) throws Exception { } public void testAddingDataSourcePermitsOverride ( ) throws Exception { } public void testGetDataSourceWhereSuppliedMapHasNonDataSourceTypeUnderSpecifiedKey ( ) throws Exception { <START_BUG> new org . springframework . test . AssertThrows ( DataSourceLookupFailureException . class ) { <END_BUG> public void test ( ) throws Exception { java . util . Map dataSources = new java . util . HashMap ( ) ; dataSources . put ( MapDataSourceLookupTests . DATA_SOURCE_NAME , new Object ( ) ) ; MapDataSourceLookup lookup = new MapDataSourceLookup ( ) ; lookup . setDataSources ( dataSources ) ; lookup . getDataSource ( MapDataSourceLookupTests . DATA_SOURCE_NAME ) ; } } . runTest ( ) ; } public void testGetDataSourceWhereSuppliedMapHasNoEntryForSpecifiedKey ( ) throws Exception { } }

Fix:
new org . springframework . test . AssertThrows ( ClassCastException . class ) {
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class NativeApiPatchingTestCase extends AbstractPatchingTestCase { private static final Logger logger = Logger . getLogger ( CliUtilsForPatching . class ) ; @ Test public void testApplyOneoff ( ) throws Exception { } private ModelControllerClient getControllerClient ( ) throws UnknownHostException { <START_BUG> return Factory . create ( "http-remoting" , System . getProperty ( "node0" , "127.0.0.1" ) , 9990 ) ; <END_BUG> } }

Fix:
return Factory . create ( System . getProperty ( "node0" , "127.0.0.1" ) , 9999 ) ;
Buggy code:
public final class TestDenseVector extends AbstractVectorTest < DenseVector > { @ Override Vector generateTestVector ( int cardinality ) { } @ Override public void testSize ( ) { <START_BUG> assertEquals ( "size" , 3 , getTestVector ( ) . getNumNondefaultElements ( ) ) ; <END_BUG> } @ Override public DenseVector vectorToTest ( int size ) { } }

Fix:
assertEquals ( "size" , 3 , getTestVector ( ) . getNumNonZeroElements ( ) ) ;
Buggy code:
public class SpamControl extends ListenerAdapter { private ArrayList < String > bannablePhrases = new ArrayList < > ( ) ; private HashMap < String , Date > permittedUsers = new HashMap < > ( ) ; public SpamControl ( ) { } @ Override public void onMessage ( MessageEvent message ) { String currentMessage = message . getMessage ( ) ; String [ ] messageArray = message . getMessage ( ) . split ( "<seq2seq4repair_space>" ) ; if ( messageArray [ 0 ] . equals ( "!permit" ) ) { if ( ( messageArray . length ) == 2 ) { if ( message . getChannel ( ) . getOps ( ) . contains ( message . getUser ( ) ) ) { <START_BUG> message . respond ( permitUser ( messageArray [ 1 ] ) ) ; <END_BUG> } } } if ( ! ( message . getChannel ( ) . getOps ( ) . contains ( message . getUser ( ) ) ) ) { for ( String test : bannablePhrases ) { if ( currentMessage . contains ( test ) ) { System . out . println ( message . getUser ( ) . getNick ( ) ) ; if ( ( ! ( permittedUsers . containsKey ( message . getUser ( ) . getNick ( ) ) ) ) || ( permittedUsers . get ( message . getUser ( ) . getNick ( ) ) . before ( new Date ( System . currentTimeMillis ( ) ) ) ) ) { purge ( message ) ; break ; } } } } } private void purge ( MessageEvent spamMessage ) { } private ArrayList < String > populatePhrases ( ) { } private String permitUser ( String user ) { } No newline ; at end ; of file ; }

Fix:
message . respond ( permitUser ( messageArray [ 1 ] ) . toLowerCase ( ) ) ;
Buggy code:
public class BatchOperation extends JavaModelOperation { protected IWorkspaceRunnable runnable ; public BatchOperation ( IWorkspaceRunnable runnable ) { } protected void executeOperation ( ) throws JavaModelException { try { <START_BUG> this . runnable . run ( progressMonitor ) ; <END_BUG> } catch ( CoreException ce ) { if ( ce instanceof JavaModelException ) { throw ( ( JavaModelException ) ( ce ) ) ; } else { if ( ( ce . getStatus ( ) . getCode ( ) ) == ( IResourceStatus . OPERATION_FAILED ) ) { Throwable e = ce . getStatus ( ) . getException ( ) ; if ( e instanceof JavaModelException ) { throw ( ( JavaModelException ) ( e ) ) ; } } throw new JavaModelException ( ce ) ; } } } protected IJavaModelStatus verify ( ) { } }

Fix:
this . runnable . run ( this . progressMonitor ) ;
Buggy code:
public class SwtScoutCellLabelProvider extends CellLabelProvider { private final ISwtEnvironment m_environment ; private final Color m_disabledForeground ; private final Color m_disabledBackground ; private final boolean m_useNativeToolTips ; private Table m_swtTable ; private TableColumn m_swtColumn ; private IColumn < ? > m_scoutColumn ; public SwtScoutCellLabelProvider ( IColumn < ? > scoutColumn , ISwtEnvironment environment ) { } @ Override protected void initialize ( ColumnViewer viewer , ViewerColumn column ) { } @ Override public void update ( ViewerCell cell ) { <START_BUG> final int currentColumnIndex = ( cell . getColumnIndex ( ) ) - 1 ; <END_BUG> final int firstColumnIndex = m_swtTable . getColumnOrder ( ) [ 1 ] ; final boolean firstColumn = currentColumnIndex == firstColumnIndex ; final ITableRow scoutRow = ( ( ITableRow ) ( cell . getElement ( ) ) ) ; final ICell scoutCell = scoutRow . getCell ( m_scoutColumn ) ; cell . setText ( getColumnText ( scoutCell ) ) ; cell . setImage ( getColumnImage ( scoutCell , scoutRow , m_scoutColumn , firstColumn ) ) ; cell . setBackground ( getBackground ( scoutCell ) ) ; cell . setForeground ( getForeground ( scoutCell , scoutRow ) ) ; cell . setFont ( getFont ( scoutCell ) ) ; } @ Override public String getToolTipText ( Object element ) { } @ Override public boolean useNativeToolTip ( Object object ) { } protected Color getBackground ( ICell scoutCell ) { } protected Color getForeground ( ICell scoutCell , ITableRow scoutRow ) { } protected Image getColumnImage ( ICell scoutCell , ITableRow scoutRow , IColumn < ? > scoutColumn , boolean firstColumn ) { } protected String getColumnText ( ICell scoutCell ) { } protected Font getFont ( ICell scoutCell ) { } }

Fix:
final int currentColumnIndex = cell . getColumnIndex ( ) ;
Buggy code:
public class InterfaceElement extends AbstractModelElement < InterfaceElement > implements ServiceActivator { private static final long serialVersionUID = - 5256526713311518506L ; private final String name ; private boolean anyLocalV4 ; private boolean anyLocalV6 ; private boolean anyLocal ; private final NavigableMap < Element , AbstractInterfaceCriteriaElement < ? > > interfaceCriteria = new TreeMap < Element , AbstractInterfaceCriteriaElement < ? > > ( ) ; public InterfaceElement ( final String name ) { } public InterfaceElement ( InterfaceElement fullySpecified ) { } protected InterfaceElement ( String name , List < AbstractInterfaceCriteriaElement < ? > > criteriaList ) { } @ Override protected Class < InterfaceElement > getElementClass ( ) { } public String getName ( ) { } public InterfaceCriteria getInterfaceCriteria ( ) { } public boolean isAnyLocalAddress ( ) { } void setAnyLocal ( boolean anyLocal ) { } public boolean isAnyLocalV4Address ( ) { } void setAnyLocalV4 ( boolean anyLocalV4 ) { } public boolean isAnyLocalV6Address ( ) { } void setAnyLocalV6 ( boolean anyLocalV6 ) { } protected void addCriteria ( AbstractInterfaceCriteriaElement < ? > criteria ) { } public boolean isFullySpecified ( ) { } @ Override public void writeContent ( XMLExtendedStreamWriter streamWriter ) throws XMLStreamException { } public void activate ( ServiceActivatorContext context ) { <START_BUG> context . getBatchBuilder ( ) . addService ( JBOSS_NETWORK_INTERFACE . append ( name ) , new org . jboss . as . services . net . NetworkInterfaceService ( name , anyLocalV4 , anyLocalV6 , anyLocal , getInterfaceCriteria ( ) ) ) ; <END_BUG> } List < AbstractInterfaceCriteriaElement < ? > > getCriteriaElements ( ) { } protected void validateAnyLocalAllowed ( Element element ) throws IllegalStateException { } private void validateNotAnyLocal ( Element element ) throws IllegalStateException { } private class OverallInterfaceCriteria implements InterfaceCriteria { private static final long serialVersionUID = 2784447904647077246L ; @ Override public boolean isAcceptable ( NetworkInterface networkInterface , InetAddress address ) throws SocketException { } } }

Fix:
context . getServiceTarget ( ) . addService ( JBOSS_NETWORK_INTERFACE . append ( name ) , new org . jboss . as . services . net . NetworkInterfaceService ( name , anyLocalV4 , anyLocalV6 , anyLocal , getInterfaceCriteria ( ) ) ) ;
Buggy code:
public class AdvanceSearch { private String appointStartDate ; private String appointEndDate ; private String birthdayType ; private String birthDayValue ; private String phase ; private String selectedMovingMonth ; private String selectedMovingYear ; public String getSelectedMovingMonth ( ) { } public void setSelectedMovingMonth ( String selectedMovingMonth ) { } public String getSelectedMovingYear ( ) { } public void setSelectedMovingYear ( String selectedMovingYear ) { } public String getAppointStartDate ( ) { } public void setAppointStartDate ( String appointStartDate ) { } public String getAppointEndDate ( ) { } public void setAppointEndDate ( String appointEndDate ) { } public String getBirthdayType ( ) { } public void setBirthdayType ( String birthdayType ) { } public String getBirthDayValue ( ) { } public void setBirthDayValue ( String birthDayValue ) { } public String getPhase ( ) { } public void setPhase ( String phase ) { } public boolean isEverythingBlank ( ) { <START_BUG> if ( ( ( ( StringUtils . isEmpty ( appointStartDate ) ) && ( StringUtils . isEmpty ( appointEndDate ) ) ) && ( StringUtils . isEmpty ( birthDayValue ) ) ) && ( StringUtils . isEmpty ( phase ) ) ) { <END_BUG> return true ; } return false ; } }

Fix:
if ( ( ( ( ( ( StringUtils . isEmpty ( appointStartDate ) ) && ( StringUtils . isEmpty ( appointEndDate ) ) ) && ( StringUtils . isEmpty ( birthDayValue ) ) ) && ( StringUtils . isEmpty ( phase ) ) ) && ( StringUtils . isEmpty ( selectedMovingMonth ) ) ) && ( StringUtils . isEmpty ( selectedMovingYear ) ) ) {
Buggy code:
public class LongCompactionSpeedTest extends CleanupHelper { public static final String TABLE1 = "Keyspace1" ; public static final InetAddress LOCAL = FBUtilities . getLocalAddress ( ) ; @ Test public void testCompactionWide ( ) throws Exception { } @ Test public void testCompactionSlim ( ) throws Exception { } @ Test public void testCompactionMany ( ) throws Exception { } protected void testCompaction ( int sstableCount , int rowsPerSSTable , int colsPerRow ) throws Exception { instance . disableAutoCompaction ( ) ; Table table = Table . open ( LongCompactionSpeedTest . TABLE1 ) ; ColumnFamilyStore store = table . getColumnFamilyStore ( "Standard1" ) ; ArrayList < SSTableReader > sstables = new ArrayList < SSTableReader > ( ) ; for ( int k = 0 ; k < sstableCount ; k ++ ) { SortedMap < String , ColumnFamily > rows = new TreeMap < String , ColumnFamily > ( ) ; for ( int j = 0 ; j < rowsPerSSTable ; j ++ ) { String key = String . valueOf ( j ) ; IColumn [ ] cols = new IColumn [ colsPerRow ] ; for ( int i = 0 ; i < colsPerRow ; i ++ ) { cols [ i ] = Util . column ( String . valueOf ( i ) , String . valueOf ( i ) , k ) ; } rows . put ( key , SSTableUtils . createCF ( Long . MIN_VALUE , Integer . MIN_VALUE , cols ) ) ; } SSTableReader sstable = SSTableUtils . writeSSTable ( rows ) ; sstables . add ( sstable ) ; store . addSSTable ( sstable ) ; } Thread . sleep ( 1000 ) ; long start = System . currentTimeMillis ( ) ; <START_BUG> instance . doCompaction ( store , sstables , ( ( ( int ) ( ( System . currentTimeMillis ( ) ) // 1000 ) ) - ( DatabaseDescriptor . getCFMetaData ( LongCompactionSpeedTest . TABLE1 , "Standard1" ) . gcGraceSeconds ) ) ) ; <END_BUG> System . out . println ( String . format ( "%s:<seq2seq4repair_space>sstables=%d<seq2seq4repair_space>rowsper=%d<seq2seq4repair_space>colsper=%d:<seq2seq4repair_space>%d<seq2seq4repair_space>ms" , this . getClass ( ) . getName ( ) , sstableCount , rowsPerSSTable , colsPerRow , ( ( System . currentTimeMillis ( ) ) - start ) ) ) ; } }

Fix:
instance . doCompaction ( store , sstables , ( ( ( int ) ( ( System . currentTimeMillis ( ) ) // 1000 ) ) - ( DatabaseDescriptor . getCFMetaData ( LongCompactionSpeedTest . TABLE1 , "Standard1" ) . getGcGraceSeconds ( ) ) ) ) ;
Buggy code:
public class IntegrationComponentV2Generator implements Generator { GeneratorUtil gu ; MuleVersionEnum muleVersion ; public IntegrationComponentV2Generator ( PrintStream ps , String groupId , String artifactId , String version , MuleVersionEnum muleVersion , DeploymentModelEnum deploymentModel , List < TransportEnum > transports , String outputFolder ) { } public void startGenerator ( ) { gu . generateContentAndCreateFile ( "pom.xml.gt" ) ; gu . generateContentAndCreateFile ( "mule-project.xml.gt" ) ; gu . generateFolder ( "src//main//api" ) ; gu . generateFolder ( "src//main//java//__javaPackageFilepath__" ) ; gu . generateFolder ( "src//environment" ) ; gu . generateFolder ( "mappings" ) ; gu . generateContentAndCreateFile ( "src//main//app//__artifactId__-common.xml.gt" ) ; gu . generateContentAndCreateFile ( "src//main//app//mule-deploy.properties.gt" ) ; gu . generateContentAndCreateFile ( "src//test//java//__javaPackageFilepath__//__capitalizedJavaArtifactId__MuleServer.java.gt" ) ; gu . generateFolder ( "src//test//resources//testfiles" ) ; gu . generateFolder ( "src//test//resources//teststub-services" ) ; gu . generateContentAndCreateFile ( "src//test//resources//mule-standalone-with-teststubs-config.xml.gt" ) ; <START_BUG> if ( ( ( muleVersion . getMajor ( ) ) >= 3 ) && ( ( muleVersion . getMinor ( ) ) >= 6 ) ) { <END_BUG> gu . generateContentAndCreateFile ( "src//main//resources//log4j2.xml.gt" ) ; gu . generateContentAndCreateFile ( "src//environment//log4j2.xml.gt" ) ; } else { gu . generateContentAndCreateFile ( "src//main//resources//log4j.dtd.gt" ) ; gu . generateContentAndCreateFile ( "src//main//resources//log4j.xml.gt" ) ; gu . generateContentAndCreateFile ( "src//environment//log4j.dtd.gt" ) ; gu . generateContentAndCreateFile ( "src//environment//log4j.xml.gt" ) ; } gu . generateContentAndCreateFile ( "src//main//resources//__configPropertyFile__.properties.gt" ) ; } }

Fix:
if ( muleVersion . isVersionEqualOrGreater ( MULE_3_6_1 ) ) {
Buggy code:
public abstract class AuthenticatedWebApplication extends WebApplication implements IRoleCheckingStrategy { private final Class < ? extends AuthenticatedWebSession > webSessionClass ; public AuthenticatedWebApplication ( ) { } protected abstract Class < ? extends AuthenticatedWebSession > getWebSessionClass ( ) { } @ Override protected final ISessionFactory getSessionFactory ( ) { } public boolean hasAnyRole ( final Roles roles ) { <START_BUG> return AuthenticatedWebSession . get ( ) . getUser ( ) . getRoles ( ) . hasAnyRole ( roles ) ; <END_BUG> } }

Fix:
return AuthenticatedWebSession . get ( ) . getRoles ( ) . hasAnyRole ( roles ) ;
Buggy code:
public class ModClassLoader extends URLClassLoader { private static final List < String > STANDARD_LIBRARIES = ImmutableList . of ( "jinput.jar" , "lwjgl.jar" , "lwjgl_util.jar" , "rt.jar" ) ; private LaunchClassLoader mainClassLoader ; public ModClassLoader ( ClassLoader parent ) { } public void addFile ( File modFile ) throws MalformedURLException { } @ Override public Class < ? > loadClass ( String name ) throws ClassNotFoundException { } public File [ ] getParentSources ( ) { try { List < File > files = new ArrayList < File > ( ) ; for ( URL url : mainClassLoader . getSources ( ) ) { URI uri = url . toURI ( ) ; <START_BUG> if ( ( uri . getScheme ( ) ) == "file" ) { <END_BUG> files . add ( new File ( uri ) ) ; } } return files . toArray ( new File [ ] { } ) ; } catch ( URISyntaxException e ) { FMLLog . log ( ERROR , e , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>process<seq2seq4repair_space>our<seq2seq4repair_space>input<seq2seq4repair_space>to<seq2seq4repair_space>locate<seq2seq4repair_space>the<seq2seq4repair_space>minecraft<seq2seq4repair_space>code" ) ; throw new LoaderException ( e ) ; } } public List < String > getDefaultLibraries ( ) { } public void clearNegativeCacheFor ( Set < String > classList ) { } public ModAPITransformer addModAPITransformer ( ASMDataTable dataTable ) { } }

Fix:
if ( uri . getScheme ( ) . equals ( "file" ) ) {
Buggy code:
public class GameManager { private static final int TICK_TIME = 1000 ; private Timer timer ; private Level level ; private Deque < Move > moves ; private int movesMade ; private int timePassed ; private LevelStars levelStars ; private ArrayList < GameTickListener > tickListeners = new ArrayList < GameTickListener > ( ) ; private ArrayList < GameEndListener > endListeners = new ArrayList < GameEndListener > ( ) ; private boolean isRunning ; public Level getLevel ( ) { } public int getMovesMade ( ) { } public LevelStars getLevelStars ( ) { } public GameManager ( Level levelParam ) { } public int getTimePassed ( ) { } public void addGameEndListener ( GameEndListener listener ) { } public void addGameTickListener ( GameTickListener listener ) { } public void performNewMove ( Move move ) { if ( ! ( isRunning ) ) { throw new IllegalStateException ( "game<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>running" ) ; } moves . add ( move ) ; boolean successfulMove = move . doMove ( this . level ) ; if ( ! successfulMove ) { return ; } if ( move . shouldAlterMoveCount ( ) ) { ( movesMade ) ++ ; } levelStars = StarsUtil . getStars ( this ) ; <START_BUG> if ( ( ( levelStars . getStarsCount ( ) ) == 3 ) && ( level . getBoard ( ) . isFull ( ) ) ) { <END_BUG> stopGame ( ) ; notifyEndListeners ( WON ) ; return ; } if ( ( ( level . getMoveLimit ( ) ) > 0 ) && ( ( movesMade ) >= ( level . getMoveLimit ( ) ) ) ) { stopGame ( ) ; notifyEndListeners ( NO_MOVES ) ; } } public void startGame ( ) { } public void userEndsGame ( ) { } public void userRestartsGame ( ) { } private void notifyTickListeners ( ) { } private void notifyEndListeners ( GameEndReason reason ) { } private void stopGame ( ) { } }

Fix:
if ( ( ( levelStars . getStarsCount ( ) ) == 3 ) || ( level . getBoard ( ) . isFull ( ) ) ) {
Buggy code:
public class TestCloudManagedSchema extends AbstractFullDistribZkTestBase { public TestCloudManagedSchema ( ) { } @ BeforeClass public static void initSysProperties ( ) { } @ Override protected String getCloudSolrConfig ( ) { } @ Override public void doTest ( ) throws Exception { } private String getFileContentFromZooKeeper ( String fileName ) throws IOException , SolrServerException { } private class RawResponseParser extends ResponseParser { private String rawFileContent = null ; String getRawFileContent ( ) { } @ Override public String getWriterType ( ) { } @ Override public NamedList < Object > processResponse ( InputStream body , String encoding ) { } @ Override public NamedList < Object > processResponse ( Reader reader ) { } } protected final void assertFileNotInZooKeeper ( String fileName ) throws Exception { <START_BUG> String errString = "returned<seq2seq4repair_space>non<seq2seq4repair_space>ok<seq2seq4repair_space>status:404,<seq2seq4repair_space>message:Not<seq2seq4repair_space>Found" ; <END_BUG> ignoreException ( Pattern . quote ( errString ) ) ; String rawContent = null ; try { rawContent = getFileContentFromZooKeeper ( fileName ) ; } catch ( Exception e ) { if ( ( - 1 ) != ( e . getMessage ( ) . indexOf ( errString ) ) ) return ; throw new org . apache . solr . common . SolrException ( ErrorCode . SERVER_ERROR , ( "Unexpected<seq2seq4repair_space>error,<seq2seq4repair_space>expected<seq2seq4repair_space>error<seq2seq4repair_space>matching:<seq2seq4repair_space>" + errString ) , e ) ; } finally { resetExceptionIgnores ( ) ; } fail ( ( ( ( ( "File<seq2seq4repair_space>'" + fileName ) + "'<seq2seq4repair_space>was<seq2seq4repair_space>unexpectedly<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>ZooKeeper.<seq2seq4repair_space>Content<seq2seq4repair_space>starts<seq2seq4repair_space>with<seq2seq4repair_space>'" ) + ( rawContent . substring ( 0 , 100 ) ) ) + "<seq2seq4repair_space>[...]'" ) ) ; } }

Fix:
String errString = "Not<seq2seq4repair_space>Found" ;
Buggy code:
public abstract class AbstractSubsystemAdd < E extends AbstractSubsystemElement < E > > extends AbstractModelElementUpdate < ProfileElement > { private static final long serialVersionUID = - 1641174620577793267L ; private final String namespaceUri ; protected AbstractSubsystemAdd ( final String namespaceUri ) { } public final SubsystemRemove getCompensatingUpdate ( final ProfileElement original ) { } protected final void applyUpdate ( final ProfileElement element ) throws UpdateFailedException { } protected abstract < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { } <START_BUG> protected void applyUpdateBootAction ( UpdateContext updateContext ) { <END_BUG> applyUpdate ( updateContext , NULL , null ) ; } protected abstract E createSubsystemElement ( ) { } public final Class < ProfileElement > getModelElementType ( ) { } public String getNamespaceUri ( ) { } }

Fix:
protected void applyUpdateBootAction ( BootUpdateContext updateContext ) {
Buggy code:
public class DataPointDwr extends AbstractDwr < DataPointVO , DataPointDao > { public DataPointDwr ( ) { } @ DwrPermission ( user = true ) public ProcessResult getPoints ( ) { } @ DwrPermission ( user = true ) public ProcessResult toggle ( int dataPointId ) { } @ DwrPermission ( user = true ) @ Override public ProcessResult get ( int id ) { } @ DwrPermission ( user = true ) @ Override public ProcessResult getFull ( int id ) { } @ Override @ DwrPermission ( user = true ) public ProcessResult remove ( int id ) { } @ Override @ DwrPermission ( user = true ) public ProcessResult saveFull ( DataPointVO vo ) { } @ Override @ DwrPermission ( user = true ) public ProcessResult getCopy ( int id ) { } @ DwrPermission ( user = true ) public ProcessResult getChartRendererOptions ( int dataTypeId ) { } @ DwrPermission ( user = true ) public ProcessResult getTextRendererOptions ( int dataTypeId ) { } @ DwrPermission ( user = true ) public ProcessResult getEventDetectorOptions ( int dataTypeId ) { } @ DwrPermission ( user = true ) public void storeEditLoggingProperties ( int type , int period , int periodType , int intervalType , double tolerance , boolean discardExtremeValues , double discardHighLimit , double discardLowLimit , boolean purgeOverride , int purgeType , int purgePeriod , int defaultCacheSize , boolean overrideIntervalLoggingSamples , int intervalLoggingSampleWindowSize ) { } @ SuppressWarnings ( "deprecation" ) @ DwrPermission ( user = true ) public void storeEditProperties ( DataPointVO newDp ) { } @ DwrPermission ( user = true ) public ProcessResult validateUnit ( String unit ) { } @ DwrPermission ( user = true ) public ProcessResult getUnitsList ( ) { } @ DwrPermission ( user = true ) public ProcessResult getMostRecentValue ( int id ) { } @ Override @ DwrPermission ( user = true ) public ProcessResult dojoQuery ( Map < String , String > query , List < SortOption > sort , Integer start , Integer count , boolean or ) { ProcessResult response = new ProcessResult ( ) ; ResultsWithTotal results = dao . dojoQuery ( query , sort , start , count , or ) ; List < DataPointVO > vos = new ArrayList < > ( ) ; @ SuppressWarnings ( "unchecked" ) List < DataPointVO > filteredPoints = ( ( List < DataPointVO > ) ( results . getResults ( ) ) ) ; User user = Common . getUser ( ) ; for ( DataPointVO vo : filteredPoints ) { <START_BUG> if ( Permissions . hasDataPointReadPermission ( user , vo ) ) { <END_BUG> vos . add ( vo ) ; } } int total = ( results . getTotal ( ) ) - ( ( filteredPoints . size ( ) ) - ( vos . size ( ) ) ) ; response . addData ( "list" , vos ) ; response . addData ( "total" , total ) ; return response ; } @ SuppressWarnings ( "unchecked" ) @ DwrPermission ( user = true ) public String jsonExportUsingFilter ( Map < String , String > query , List < SortOption > sort , Integer start , Integer count , boolean or ) { } }

Fix:
if ( Permissions . hasDataSourcePermission ( user , vo . getDataSourceId ( ) ) ) {
Buggy code:
public class Soldier extends AbstractRobotType { private boolean inactive = false ; private SoldierRole role ; private PathFinder pathFinder ; private Random randall ; MapLocation bestPastrLocation = new MapLocation ( 0 , 0 ) ; HashMap < MapLocation , Integer > visited = new HashMap < MapLocation , Integer > ( ) ; public Soldier ( RobotController rc ) { } @ Override protected void act ( ) throws GameActionException { } @ Override protected void init ( ) throws GameActionException { } private void visit ( MapLocation loc ) { } private void actAttacker ( ) throws GameActionException { Team we = rc . getTeam ( ) ; Team opponent = we . opponent ( ) ; MapLocation currentLoc = rc . getLocation ( ) ; visit ( currentLoc ) ; MapLocation [ ] nextToAttack = null ; MapLocation [ ] pastrOpponentAll = rc . sensePastrLocations ( opponent ) ; if ( pastrOpponentAll != null ) { nextToAttack = pastrOpponentAll . clone ( ) ; } else { MapLocation [ ] robotsOpponentAll = rc . senseBroadcastingRobotLocations ( opponent ) ; if ( robotsOpponentAll != null ) { nextToAttack = robotsOpponentAll . clone ( ) ; } } <START_BUG> if ( nextToAttack != null ) { <END_BUG> MapLocation target = nextToAttack [ 0 ] ; Direction nextDir = pathFinder . getNextDirection ( visited , target , currentLoc ) ; while ( ( target == null ) || ( ! ( rc . canMove ( nextDir ) ) ) ) { target = nextToAttack [ ( ( int ) ( ( nextToAttack . length ) * ( Math . random ( ) ) ) ) ] ; nextDir = pathFinder . getNextDirection ( visited , target , currentLoc ) ; } if ( ! ( rc . canAttackSquare ( target ) ) ) { rc . sneak ( nextDir ) ; } else { rc . attackSquare ( target ) ; } } else { actProtector ( ) ; } } private void actPastrBuilder ( ) throws GameActionException { } private void actProtector ( ) throws GameActionException { } }

Fix:
if ( ( nextToAttack . length ) != 0 ) {
Buggy code:
public class Locus extends Base implements LocationListener , Constants { private static final String [ ] providers = new String [ ] { LocationManager . PASSIVE_PROVIDER , LocationManager . NETWORK_PROVIDER , LocationManager . GPS_PROVIDER } ; private LocationManager locationManager ; private Location last = null ; public static Location toLocation ( Bundle location ) { } public static Bundle toBundle ( Location location ) { } @ Override public void onCreate ( Bundle bundle ) { } @ Override public void onDestroyView ( ) { } private Location betterLocation ( Location l1 , Location l2 ) { } public void inform ( int event , Bundle extra ) { } @ Override public void onLocationChanged ( Location location ) { } @ Override public void onProviderDisabled ( String provider ) { } @ Override public void onProviderEnabled ( String provider ) { } @ Override public void onStatusChanged ( String provider , int status , Bundle extras ) { if ( DEBUG ) <START_BUG> Log . d ( TAG , ( "Locus.onStatusChanged:<seq2seq4repair_space>provider=" + provider ) ) ; <END_BUG> } }

Fix:
Log . d ( TAG , ( ( ( "Locus.onStatusChanged:<seq2seq4repair_space>provider=" + provider ) + ",<seq2seq4repair_space>extra=" ) + extras ) ) ;
Buggy code:
public class DefaultBitstreamHandler extends BaseBitstreamHandler { public DefaultBitstreamHandler ( BufferedReader bufferedReader , ContentHandler contentHandler , LexicalHandler lexicalHandler , String format ) throws SAXException { } public void generate ( ) { <START_BUG> log . debug ( ( ( ( "In<seq2seq4repair_space>default<seq2seq4repair_space>handler<seq2seq4repair_space>'" + ( this . getClass ( ) . getName ( ) ) ) + "'<seq2seq4repair_space>for<seq2seq4repair_space>mime-type:<seq2seq4repair_space>" ) + ( format ) ) ) ; <END_BUG> } }

Fix:
log . trace ( ( ( ( "In<seq2seq4repair_space>default<seq2seq4repair_space>handler<seq2seq4repair_space>'" + ( this . getClass ( ) . getName ( ) ) ) + "'<seq2seq4repair_space>for<seq2seq4repair_space>mime-type:<seq2seq4repair_space>" ) + ( format ) ) ) ;
Buggy code:
public class AbstractPage { private static final String MAX_WAIT_FOR_PAGE_TO_LOAD_IN_MILLISECONDS = "30000" ; protected Selenium selenium ; public AbstractPage ( ) { } public AbstractPage ( Selenium selenium ) { } protected void waitForPageToLoad ( ) { } public final void setSelenium ( Selenium selenium ) { } public Selenium getSelenium ( ) { } public void openUri ( String uri ) { } public void verifyPage ( String pageName ) { String pageId = selenium . getAttribute ( "page.id@title" ) ; <START_BUG> if ( pageId . equals ( "Exception" ) ) { <END_BUG> String stackTrace = selenium . getText ( "css=div.stackTrace<seq2seq4repair_space>pre" ) ; Assert . fail ( ( ( ( ( ( "Expected<seq2seq4repair_space>page<seq2seq4repair_space><" + pageName ) + ">,<seq2seq4repair_space>actual<seq2seq4repair_space>page<seq2seq4repair_space><" ) + pageId ) + ">!!!<seq2seq4repair_space>with<seq2seq4repair_space>error<seq2seq4repair_space>message<seq2seq4repair_space>><seq2seq4repair_space>" ) + stackTrace ) ) ; } else if ( ! ( pageId . equals ( pageName ) ) ) { String errors = getErrors ( ) ; Assert . fail ( ( ( ( ( ( "Expected<seq2seq4repair_space>page<seq2seq4repair_space><" + pageName ) + ">,<seq2seq4repair_space>actual<seq2seq4repair_space>page<seq2seq4repair_space><" ) + pageId ) + ">!!!<seq2seq4repair_space>with<seq2seq4repair_space>error<seq2seq4repair_space>message<seq2seq4repair_space>><seq2seq4repair_space>" ) + errors ) ) ; } } public String getErrors ( ) { } public String getTextIfExists ( String locator ) { } public void verifyPage ( String pageName , String secondName ) { } public void typeText ( String locator , String text ) { } public void waitForElementToPresent ( String locator ) { } public void navigateBack ( ) { } }

Fix:
if ( "Exception" . equals ( pageId ) ) {
Buggy code:
@ EnableScheduling @ Configuration public class DynamicPropertyTask { <START_BUG> @ Scheduled ( fixedRate = 5000 ) <END_BUG> public void reportCurrentTime ( ) { String resourceName = "application.properties" ; Properties props = new Properties ( ) ; try { props = PropertiesLoaderUtils . loadAllProperties ( resourceName ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } DynamicProperties . setProperties ( props ) ; } }

Fix:
@ Scheduled ( fixedRate = 3000 )
Buggy code:
public class Move extends Copy { public Move ( ) { } protected void doFileOperations ( ) { } protected boolean okToDelete ( File d ) { } protected void deleteDir ( File d ) { } protected boolean renameFile ( File sourceFile , File destFile , boolean filtering , boolean overwrite ) throws IOException , BuildException { boolean renamed = true ; if ( ( ( ( getFilterSets ( ) ) != null ) && ( ( getFilterSets ( ) . size ( ) ) > 0 ) ) || ( ( ( getFilterChains ( ) ) != null ) && ( ( getFilterChains ( ) . size ( ) ) > 0 ) ) ) { renamed = false ; } else { if ( ! filtering ) { String parentPath = destFile . getParent ( ) ; if ( parentPath != null ) { File parent = new File ( parentPath ) ; if ( ! ( parent . exists ( ) ) ) { parent . mkdirs ( ) ; } } <START_BUG> if ( destFile . exists ( ) ) { <END_BUG> if ( ! ( destFile . delete ( ) ) ) { throw new BuildException ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>existing<seq2seq4repair_space>" + "file<seq2seq4repair_space>" ) + destFile ) ) ; } } renamed = sourceFile . renameTo ( destFile ) ; } else { renamed = false ; } } return renamed ; } }

Fix:
if ( ( destFile . exists ( ) ) && ( destFile . isFile ( ) ) ) {
Buggy code:
public class ProxyOutputStream extends FilterOutputStream { public ProxyOutputStream ( OutputStream proxy ) { } @ Override public void write ( int idx ) throws IOException { } @ Override public void write ( byte [ ] bts ) throws IOException { try { <START_BUG> beforeWrite ( bts . length ) ; <END_BUG> out . write ( bts ) ; afterWrite ( bts . length ) ; } catch ( IOException e ) { handleIOException ( e ) ; } } @ Override public void write ( byte [ ] bts , int st , int end ) throws IOException { } @ Override public void flush ( ) throws IOException { } @ Override public void close ( ) throws IOException { } protected void beforeWrite ( int n ) throws IOException { } protected void afterWrite ( int n ) throws IOException { } protected void handleIOException ( IOException e ) throws IOException { } }

Fix:
beforeWrite ( ( bts != null ? bts . length : 0 ) ) ;
Buggy code:
public class JoinGroupWizard extends Wizard { protected static final String PAGE_TITLE = "ECF<seq2seq4repair_space>Connect" ; private static final String DIALOG_SETTINGS = JoinGroupWizard . class . getName ( ) ; JoinGroupWizardPage mainPage ; private IResource project ; public JoinGroupWizard ( IResource project , IWorkbench workbench ) { } protected ISchedulingRule getSchedulingRule ( ) { } public void addPages ( ) { } public boolean performFinish ( ) { } protected void finishPage ( final IProgressMonitor monitor ) throws InterruptedException , CoreException { mainPage . saveDialogSettings ( ) ; URIClientConnectAction client = null ; String groupName = mainPage . getJoinGroupText ( ) ; String nickName = mainPage . getNicknameText ( ) ; String containerType = mainPage . getContainerType ( ) ; String password = mainPage . getPasswordText ( ) ; try { <START_BUG> client = new URIClientConnectAction ( containerType , groupName , nickName , password , project ) ; <END_BUG> client . run ( null ) ; } catch ( Exception e ) { String id = ClientPlugin . getDefault ( ) . getBundle ( ) . getSymbolicName ( ) ; throw new CoreException ( new Status ( Status . ERROR , id , 100 , ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>connect<seq2seq4repair_space>to<seq2seq4repair_space>" + groupName ) , e ) ) ; } } }

Fix:
client = new URIClientConnectAction ( containerType , groupName , nickName , password , project , false ) ;
Buggy code:
public class JavaBuilder extends IncrementalProjectBuilder { IProject currentProject ; IJavaProject javaProject ; IWorkspaceRoot workspaceRoot ; ClasspathLocation [ ] classpath ; IContainer outputFolder ; IContainer [ ] sourceFolders ; SimpleLookupTable prereqOutputFolders ; State lastState ; BuildNotifier notifier ; char [ ] [ ] resourceFilters ; public static final String JAVA_EXTENSION = "java" ; public static final String CLASS_EXTENSION = "class" ; public static final String JAR_EXTENSION = "jar" ; public static final String ZIP_EXTENSION = "zip" ; public static final String OPTION_ResourceCopyFilter = "org.eclipse.jdt.core.builder.resourceCopyExclusionFilters" ; public static boolean DEBUG = false ; static final String ProblemMarkerTag = IJavaModelMarker . JAVA_MODEL_PROBLEM_MARKER ; public static IMarker [ ] getProblemsFor ( IResource resource ) { } public static void removeProblemsFor ( IResource resource ) { } public static State readState ( DataInputStream in ) throws IOException { } public static void writeState ( Object state , DataOutputStream out ) throws IOException { } public JavaBuilder ( ) { } protected IProject [ ] build ( int kind , Map ignored , IProgressMonitor monitor ) throws CoreException { } private void buildAll ( ) { } private void buildDeltas ( SimpleLookupTable deltas ) { } private void cleanup ( ) { } private void clearLastState ( ) { } private void createFolder ( IContainer folder ) throws CoreException { } boolean filterResource ( IResource resource ) { if ( ( resourceFilters ) != null ) { char [ ] name = resource . getName ( ) . toCharArray ( ) ; for ( int i = 0 , length = resourceFilters . length ; i < length ; i ++ ) <START_BUG> if ( CharOperation . match ( resourceFilters [ i ] , resource . getName ( ) . toCharArray ( ) , true ) ) <END_BUG> return true ; } return false ; } private SimpleLookupTable findDeltas ( ) { } private State getLastState ( IProject project ) { } private IProject [ ] getRequiredProjects ( ) { } private boolean hasClasspathChanged ( ) { } private boolean hasOutputLocationChanged ( ) { } private void initializeBuilder ( ) throws CoreException { } private void recordNewState ( State state ) { } public String toString ( ) { } }

Fix:
if ( CharOperation . match ( resourceFilters [ i ] , name , true ) )
Buggy code:
public class PathUtils { public static String getBasePath ( ) { } public static Node parse ( String fullPath ) { Node node = new Node ( ) ; node . setPath ( fullPath ) ; String nodeType = PathUtils . getMatcher ( ( ( PathUtils . getBasePath ( ) ) + "//(.*)//" ) , fullPath ) ; node . setNodeType ( NodeType . valueOf ( nodeType ) ) ; String url = PathUtils . getMatcher ( ( ( ( ( ( ( PathUtils . getBasePath ( ) ) + "//" ) + nodeType ) + "//" ) + nodeType ) + ":\\\\\\\\(.*)" ) , fullPath ) ; String address = url . split ( "\\?" ) [ 0 ] ; String ip = address . split ( ":" ) [ 0 ] ; node . setIp ( ip ) ; if ( address . contains ( ":" ) ) { String port = address . split ( ":" ) [ 1 ] ; <START_BUG> if ( ( port != null ) && ( "" . equals ( port . trim ( ) ) ) ) { <END_BUG> node . setPort ( Integer . valueOf ( port ) ) ; } } String params = url . split ( "\\?" ) [ 1 ] ; String [ ] paramArr = params . split ( "&" ) ; for ( String paramEntry : paramArr ) { String key = paramEntry . split ( "=" ) [ 0 ] ; String value = paramEntry . split ( "=" ) [ 1 ] ; if ( "group" . equals ( key ) ) { node . setGroup ( value ) ; } else if ( "threads" . equals ( key ) ) { node . setThreads ( Integer . valueOf ( value ) ) ; } else if ( "identity" . equals ( key ) ) { node . setIdentity ( value ) ; } else if ( "createTime" . equals ( key ) ) { node . setCreateTime ( Long . valueOf ( value ) ) ; } else if ( "isAvailable" . equals ( key ) ) { node . setAvailable ( Boolean . valueOf ( value ) ) ; } else if ( "listenNodeTypes" . equals ( key ) ) { String [ ] nodeTypes = value . split ( "," ) ; for ( String type : nodeTypes ) { node . addListenNodeType ( NodeType . valueOf ( type ) ) ; } } } return node ; } public static NodeType parseNodeType ( String path ) { } public static String getPath ( Node node ) { } public static String getPath ( NodeType nodeType ) { } private static String getMatcher ( String regex , String source ) { } }

Fix:
if ( ( port != null ) && ( ! ( "" . equals ( port . trim ( ) ) ) ) ) {