nus-yam/ex-repair huggingface dataset:
Buggy code:
public class MatrixBuilder { public final int rows ; public final int cols ; private int [ ] [ ] array ; private boolean expired = false ; public MatrixBuilder ( int rows , int cols ) throws IllegalArgumentException { } public MatrixBuilder withValue ( int row , int col , int value ) throws MatrixIndexOutOfBoundsException { } public DefaultMatrix create ( ) { } public static MatrixBuilder . VectorBuilder newVectorBuilder ( int size ) throws IllegalArgumentException { } public static class VectorBuilder { private final MatrixBuilder underlyingBuilder ; private VectorBuilder ( MatrixBuilder matrixBuilder ) { } public MatrixBuilder . VectorBuilder withValue ( int index , int value ) throws MatrixIndexOutOfBoundsException { <START_BUG> underlyingBuilder . withValue ( index , 1 , value ) ; <END_BUG> return this ; } public DefaultVector create ( ) { } } }

Fix:
underlyingBuilder . withValue ( index , 0 , value ) ;
Buggy code:
public class Path implements DataType { private ArrayList m_elements = new ArrayList ( ) ; private File m_baseDirectory ; public Path ( final String path ) { } public Path ( ) { } private void addUnlessPresent ( final ArrayList list , final String entry ) { } public void setBaseDirectory ( final File baseDir ) { } public void addLocation ( final File location ) { } public void addExisting ( final Path source ) throws TaskException { } public void addFileset ( final FileSet fileSet ) { } public void append ( final Path other ) throws TaskException { } public void addPath ( final Path path ) { } public String [ ] list ( ) throws TaskException { ArrayList result = new ArrayList ( ( 2 * ( m_elements . size ( ) ) ) ) ; for ( int i = 0 ; i < ( m_elements . size ( ) ) ; i ++ ) { Object o = m_elements . get ( i ) ; if ( o instanceof String ) { addUnlessPresent ( result , ( ( String ) ( o ) ) ) ; } else if ( o instanceof PathElement ) { final PathElement element = ( ( PathElement ) ( o ) ) ; final String [ ] parts = element . getParts ( m_baseDirectory ) ; if ( parts == null ) { throw new NullPointerException ( "You<seq2seq4repair_space>must<seq2seq4repair_space>either<seq2seq4repair_space>set<seq2seq4repair_space>location<seq2seq4repair_space>or<seq2seq4repair_space>path<seq2seq4repair_space>on<seq2seq4repair_space><pathelement>" ) ; } for ( int j = 0 ; j < ( parts . length ) ; j ++ ) { addUnlessPresent ( result , parts [ j ] ) ; } } else if ( o instanceof Path ) { Path p = ( ( Path ) ( o ) ) ; String [ ] parts = p . list ( ) ; for ( int j = 0 ; j < ( parts . length ) ; j ++ ) { addUnlessPresent ( result , parts [ j ] ) ; } } else if ( o instanceof FileSet ) { final FileSet fs = ( ( FileSet ) ( o ) ) ; <START_BUG> final DirectoryScanner ds = fs . getDirectoryScanner ( ) ; <END_BUG> final String [ ] s = ds . getIncludedFiles ( ) ; final File dir = fs . getDir ( ) ; for ( int j = 0 ; j < ( s . length ) ; j ++ ) { File f = new File ( dir , s [ j ] ) ; String absolutePath = f . getAbsolutePath ( ) ; addUnlessPresent ( result , FileUtils . translateFile ( absolutePath ) ) ; } } } return ( ( String [ ] ) ( result . toArray ( new String [ result . size ( ) ] ) ) ) ; } public int size ( ) throws TaskException { } public String toString ( ) { } }

Fix:
final DirectoryScanner ds = ScannerUtil . getDirectoryScanner ( fs ) ;
Buggy code:
public class PredictiveModelOptimizerIntegrationTest { private PredictiveModelOptimizer optimizer ; @ Before public void setUp ( ) throws Exception { } @ Test public void testOptimizer ( ) throws Exception { } private Map < String , FieldValueRecommender > createConfig ( ) { Map < String , FieldValueRecommender > config = Maps . newHashMap ( ) ; Set < String > attributesToIgnore = Sets . newHashSet ( ) ; attributesToIgnore . addAll ( Arrays . asList ( "browser" , "eap" , "destinationId" , "seenPixel" , "internalCreativeId" ) ) ; double probabilityOfDiscardingFromAttributesToIgnore = 0.3 ; CompositeAttributeIgnoringStrategy compositeAttributeIgnoringStrategy = new CompositeAttributeIgnoringStrategy ( Arrays . asList ( new IgnoreAttributesWithConstantProbability ( 0.7 ) , new IgnoreAttributesInSet ( attributesToIgnore , probabilityOfDiscardingFromAttributesToIgnore ) ) ) ; config . put ( ATTRIBUTE_IGNORING_STRATEGY , new FixedOrderRecommender ( new IgnoreAttributesWithConstantProbability ( 0.7 ) , compositeAttributeIgnoringStrategy ) ) ; <START_BUG> config . put ( NUM_TREES , new MonotonicConvergenceRecommender ( Arrays . asList ( 20 ) ) ) ; <END_BUG> config . put ( MAX_DEPTH , new FixedOrderRecommender ( 4 , 8 , 16 ) ) ; config . put ( MIN_SCORE , new FixedOrderRecommender ( 1.0E-14 ) ) ; config . put ( MIN_OCCURRENCES_OF_ATTRIBUTE_VALUE , new FixedOrderRecommender ( 2 , 11 , 16 , 30 ) ) ; config . put ( MIN_LEAF_INSTANCES , new FixedOrderRecommender ( 0 , 20 , 40 ) ) ; config . put ( SCORER , new FixedOrderRecommender ( new InformationGainScorer ( ) , new GiniImpurityScorer ( ) ) ) ; config . put ( DEGREE_OF_GAIN_RATIO_PENALTY , new FixedOrderRecommender ( 1.0 , 0.75 , 0.5 ) ) ; return config ; } }

Fix:
config . put ( NUM_TREES , new MonotonicConvergenceRecommender ( Arrays . asList ( 2 , 4 , 8 ) , 0.02 ) ) ;
Buggy code:
public class StatelessComponentTest extends WicketTestCase { public StatelessComponentTest ( String name ) { } public void testStatelessComponentPage ( ) throws Exception { executeTest ( StatelessComponentPage . class , "StatelessComponentPage_result.html" ) ; tester . setupRequestAndResponse ( ) ; <START_BUG> tester . getServletRequest ( ) . setURL ( "//WicketTester$DummyWebApplication//WicketTester$DummyWebApplication?wicket:bookmarkablePage=:org.apache.wicket.stateless.StatelessComponentPage&wicket:interface=:0:link::ILinkListener:" ) ; <END_BUG> try { tester . processRequestCycle ( ) ; assertTrue ( false ) ; } catch ( Exception e ) { assertEquals ( "wanted<seq2seq4repair_space>exception" , e . getMessage ( ) ) ; } } public void testStatelessComponentPageWithMount ( ) throws Exception { } }

Fix:
tester . getServletRequest ( ) . setURL ( "//WicketTester$DummyWebApplication//WicketTester$DummyWebApplication?wicket:bookmarkablePage=:org.apache.wicket.stateless.StatelessComponentPage&wicket:interface=:0:link::ILinkListener::" ) ;
Buggy code:
public class LdapServiceImpl implements LdapService { public List < UserDetails > fetchEskEmployees ( ) { } Connection createConnection ( Credentials credentials ) { } @ Override public UserDetails findByDomainUserName ( String domainUserName ) throws UserNotFoundException { } @ Override public UserDetails findByEmail ( String email ) throws UserNotFoundException { } @ Override public UserDetails findByName ( String firstName , String lastName ) throws UserNotFoundException { } @ Override public AuthenticationResult authenticate ( String domainUserName , String password ) throws UserNotFoundException { UserDetails userDetails = findByDomainUserName ( domainUserName ) ; <START_BUG> Connection connection = createConnection ( new Credentials ( domainUserName , password ) ) ; <END_BUG> try { boolean result = connection . getLdapConnection ( ) . isConnected ( ) ; return new AuthenticationResult ( userDetails , result ) ; } finally { connection . close ( ) ; } } private List < UserDetails > extractUserDetails ( SearchResult searchResult ) { } }

Fix:
Connection connection = createConnection ( new Credentials ( userDetails . getDN ( ) , password ) ) ;
Buggy code:
class RuleFactory { static final Collection rules = new LinkedList ( ) ; private static final String AND_RULE = "&&" ; private static final String OR_RULE = "||" ; private static final String NOT_RULE = "!" ; private static final String NOT_EQUALS_RULE = "!=" ; private static final String EQUALS_RULE = "==" ; private static final String PARTIAL_TEXT_MATCH_RULE = "~=" ; private static final String LIKE_RULE = "like" ; private static final String LESS_THAN_RULE = "<" ; private static final String GREATER_THAN_RULE = ">" ; private static final String LESS_THAN_EQUALS_RULE = "<=" ; private static final String GREATER_THAN_EQUALS_RULE = ">=" ; static boolean isRule ( String symbol ) { <START_BUG> return RuleFactory . rules . contains ( symbol . toLowerCase ( ) ) ; <END_BUG> } static Rule getRule ( String symbol , Stack stack ) { } }

Fix:
return ( symbol != null ) && ( RuleFactory . rules . contains ( symbol . toLowerCase ( ) ) ) ;
Buggy code:
@ Mojo ( name = "create-ipa" , defaultPhase = LifecyclePhase . PACKAGE , requiresDependencyResolution = ResolutionScope . COMPILE_PLUS_RUNTIME ) public class CreateIPAMojo extends AbstractRoboVMMojo { @ Override protected Config configure ( Builder configBuilder ) throws IOException { } @ Override public void execute ( ) throws MojoExecutionException , MojoFailureException { try { <START_BUG> Config config = buildArchive ( ios , thumbv7 , TargetType . ios ) ; <END_BUG> IOSTarget target = ( ( IOSTarget ) ( config . getTarget ( ) ) ) ; target . createIpa ( ) ; } catch ( IOException e ) { throw new MojoExecutionException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>IPA" , e ) ; } } }

Fix:
Config config = buildArchive ( ios , thumbv7 , TargetType . ios ) . getConfig ( ) ;
Buggy code:
public final class TestMeanShift extends MahoutTestCase { private Vector [ ] raw = null ; private final DistanceMeasure euclideanDistanceMeasure = new EuclideanDistanceMeasure ( ) ; private final IKernelProfile kernelProfile = new TriangularKernelProfile ( ) ; private static void printCanopies ( Iterable < MeanShiftCanopy > canopies ) { } private void printImage ( Iterable < MeanShiftCanopy > canopies ) { } private List < MeanShiftCanopy > getInitialCanopies ( ) { } @ Override @ Before public void setUp ( ) throws Exception { } @ Test public void testReferenceImplementation ( ) { } @ Test public void testClustererReferenceImplementation ( ) { } @ Test public void testCanopyMapperEuclidean ( ) throws Exception { } @ Test public void testCanopyReducerEuclidean ( ) throws Exception { } @ Test public void testCanopyEuclideanMRJob ( ) throws Exception { } @ Test public void testCanopyEuclideanSeqJob ( ) throws Exception { } @ Test public void testCanopyEuclideanMRJobNoClustering ( ) throws Exception { Path input = getTestTempDirPath ( "testdata" ) ; Configuration conf = new Configuration ( ) ; FileSystem fs = FileSystem . get ( input . toUri ( ) , conf ) ; Collection < VectorWritable > points = Lists . newArrayList ( ) ; for ( Vector v : raw ) { points . add ( new VectorWritable ( v ) ) ; } ClusteringTestUtils . writePointsToFile ( points , getTestTempFilePath ( "testdata//file1" ) , fs , conf ) ; ClusteringTestUtils . writePointsToFile ( points , getTestTempFilePath ( "testdata//file2" ) , fs , conf ) ; Path output = getTestTempDirPath ( "output" ) ; String [ ] args = new String [ ] { optKey ( INPUT_OPTION ) , getTestTempDirPath ( "testdata" ) . toString ( ) , optKey ( OUTPUT_OPTION ) , output . toString ( ) , optKey ( DISTANCE_MEASURE_OPTION ) , EuclideanDistanceMeasure . class . getName ( ) , optKey ( KERNEL_PROFILE_OPTION ) , TriangularKernelProfile . class . getName ( ) , optKey ( T1_OPTION ) , "4" , optKey ( T2_OPTION ) , "1" , optKey ( MAX_ITERATIONS_OPTION ) , "7" , optKey ( CONVERGENCE_DELTA_OPTION ) , "0.2" , optKey ( OVERWRITE_OPTION ) } ; ToolRunner . run ( conf , new MeanShiftCanopyDriver ( ) , args ) ; Path outPart = new Path ( output , "clusters-3-final//part-r-00000" ) ; long count = HadoopUtil . countRecords ( outPart , conf ) ; <START_BUG> assertEquals ( "count" , 4 , count ) ; <END_BUG> Iterator < ? > iterator = new org . apache . mahout . common . iterator . sequencefile . SequenceFileValueIterator < org . apache . hadoop . io . Writable > ( outPart , true , conf ) ; while ( iterator . hasNext ( ) ) { ClusterWritable next = ( ( ClusterWritable ) ( iterator . next ( ) ) ) ; MeanShiftCanopy canopy = ( ( MeanShiftCanopy ) ( next . getValue ( ) ) ) ; assertTrue ( ( ( canopy . getCenter ( ) ) instanceof DenseVector ) ) ; assertEquals ( 1 , canopy . getBoundPoints ( ) . size ( ) ) ; } } @ Test public void testCanopyEuclideanSeqJobNoClustering ( ) throws Exception { } }

Fix:
assertEquals ( "count" , 3 , count ) ;
Buggy code:
public class RHAILabelEnum { private static HashSet < RHAILabelEnum . RHAILabel > labels = new HashSet < RHAILabelEnum . RHAILabel > ( ) ; private RHAILabelEnum ( ) { } public static final class RHAILabel implements Copiable < RHAILabelEnum . RHAILabel > , Distanciable < RHAILabelEnum . RHAILabel > { private int ordinal ; private String name ; private RHAILabel ( String name , int ordinal ) { } @ Override public RHAILabelEnum . RHAILabel getCopy ( ) { } @ Override public int distanceFrom ( RHAILabelEnum . RHAILabel another ) { if ( another == null ) { <START_BUG> return 0 ; <END_BUG> } return Math . abs ( ( ( ordinal ) - ( another . ordinal ) ) ) ; } @ Override public int getAbsoluteDistance ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public String toString ( ) { } } public static RHAILabelEnum . RHAILabel valueOf ( String label ) { } public static RHAILabelEnum . RHAILabel smooth ( Collection < RHAILabelEnum . RHAILabel > labels ) { } public static RHAILabelEnum . RHAILabel [ ] values ( ) { } private static void init ( ) { } private static void checkProperties ( Properties prop ) throws FileNotFoundException , IOException { } private static String getFilePath ( ) { } private static int getAverageValue ( Collection < RHAILabelEnum . RHAILabel > labels ) { } private static RHAILabelEnum . RHAILabel labelOf ( int ordinal ) { } }

Fix:
return this . getAbsoluteDistance ( ) ;
Buggy code:
public class SimpleXJoinResultsFactory implements XJoinResultsFactory < String > { private String string ; private String [ ] values ; private String missingId ; @ Override @ SuppressWarnings ( "rawtypes" ) public void init ( NamedList args ) { } public String getMissingId ( ) { } public String getString ( ) { } @ Override public XJoinResults < String > getResults ( SolrParams params ) throws IOException { } public class Results implements XJoinResults < String > { @ Override public Object getResult ( String joinId ) { <START_BUG> if ( missingId . equals ( joinId ) ) { <END_BUG> return null ; } return new SimpleXJoinResultsFactory . Result ( joinId , 0.5 ) ; } @ Override public Iterable < String > getJoinIds ( ) { } public String getString ( ) { } } public static class Result { private String value ; private double score ; private Result ( String value , double score ) { } public String getValue ( ) { } public double getScore ( ) { } } }

Fix:
if ( joinId . equals ( missingId ) ) {
Buggy code:
public abstract class Rule { private final String failuremessage ; public Rule ( String failuremessage ) { } public final void addFailureMessage ( StringBuilder sb ) { if ( ! ( ruleCheck ( ) ) ) { sb . append ( failuremessage ) ; <START_BUG> sb . append ( '\n' ) ; <END_BUG> } } public final boolean check ( ) { } protected abstract boolean ruleCheck ( ) { } }

Fix:
sb . append ( ";<seq2seq4repair_space>" ) ;
Buggy code:
public class ClutchThreedEngine < O extends IEntity , D extends DescriptorExtractor > extends ClutchAbstractEngine < O , D > { public ClutchThreedEngine ( String descriptor ) throws IllegalAccessException , InstantiationException , NoSuchMethodException , InvocationTargetException { } public ClutchThreedEngine ( ) throws IllegalAccessException , InstantiationException , NoSuchMethodException , InvocationTargetException { } public void setEngine ( ) throws IllegalAccessException , InstantiationException , NoSuchMethodException , InvocationTargetException { } @ Override protected Result < O > getResultObject ( Result < IEntry > entryResult ) { } public ThreedModelLoader getLoader ( ) { } public void setLoader ( ThreedModelLoader loader ) { } public Class getModelClass ( ) { } public void setModelClass ( Class model ) { } @ Override public String getType ( ) { } @ Override public void setType ( String type ) { } public void closeIndex ( ) throws IOException { <START_BUG> index . close ( ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
this . index . close ( ) ;
Buggy code:
public class ListMultipleChoicePage extends WicketExamplePage { private static final List < String > SITES = Arrays . asList ( new String [ ] { "The<seq2seq4repair_space>Server<seq2seq4repair_space>Side" , "Java<seq2seq4repair_space>Lobby" , "Java.Net" } ) ; private static final List < String > MANY_CHOICES = Arrays . asList ( new String [ ] { "Choice1" , "Choice2" , "Choice3" , "Choice4" , "Choice5" , "Choice6" , "Choice7" , "Choice8" , "Choice9" } ) ; public ListMultipleChoicePage ( ) { } private static class Input implements IClusterable { public List < String > sites = new ArrayList < String > ( ) ; public List < String > choices = new ArrayList < String > ( ) ; public Input ( ) { } @ Override public String toString ( ) { } private String listAsString ( List < String > list ) { <START_BUG> StringBuffer b = new StringBuffer ( ) ; <END_BUG> for ( Iterator < String > i = list . iterator ( ) ; i . hasNext ( ) ; ) { b . append ( i . next ( ) ) ; if ( i . hasNext ( ) ) { b . append ( ",<seq2seq4repair_space>" ) ; } } return b . toString ( ) ; } } @ Override protected void explain ( ) { } }

Fix:
StringBuilder b = new StringBuilder ( ) ;
Buggy code:
public interface CompatibilitySpace { <START_BUG> Object getOwner ( ) ; <END_BUG> }

Fix:
LockOwner getOwner ( ) ;
Buggy code:
public class Main { public static Timer timer ; private static Preserve preserve ; private static MapHandlerAdvanced mapHandler ; private static MapView mapView ; private static MainView mainView ; private static StartScreen startScreen ; public static void main ( String [ ] args ) { } public static void createPreserve ( ) { } public static void stopMovement ( ) { } public static void stopThemThreads ( ) { } public static void resume ( ) { } public static void moveTester ( ) { Main . timer = new Timer ( ) ; Main . timer . schedule ( new TimerTask ( ) { @ Override public void run ( ) { try { <START_BUG> Preserve . executeTurn ( ) ; <END_BUG> Main . mainView . gui . tabbedPane . mapView . refresh ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } } , 0 , ( 1000 // ( Config . getSpeedOfSimulation ( ) ) ) ) ; } }

Fix:
Preserve . executeTurn2 ( ) ;
Buggy code:
public class CloudgeneYamlGenerator { private static Properties prop = new Properties ( ) ; private static String cloudgeneYamls = "" ; private static StringBuilder pigScriptParameters ; private static final String RmdfileExtension = ".Rmd" ; public static void generateAndStoreFile ( final Workflow workflow ) throws IOException { } private static List < WdlParameter > retrieveWorkflowInputParameters ( final WorkflowParameter workflowParameter ) { } private static List < WdlParameter > retrieveWorkflowOutputParameters ( final WorkflowParameter workflowParameter ) { } private static StringBuilder appendParameter ( final StringBuilder parameters , final String parameterName ) { <START_BUG> return parameters . append ( "-param<seq2seq4repair_space>" ) . append ( parameterName ) . append ( "=" ) . append ( parameterName ) . append ( "<seq2seq4repair_space>" ) ; <END_BUG> } private static WdlParameter createInputParameter ( final String parameterName ) { } private static WdlParameter createOutputParameter ( final String parameterName ) { } private static List < WdlStep > retrieveRmdSteps ( final Workflow surroundingWorkflow , Workflow workflow ) throws IOException { } No newline ; at end ; of file ; }

Fix:
return parameters . append ( "-param<seq2seq4repair_space>" ) . append ( parameterName ) . append ( "=$" ) . append ( parameterName ) . append ( "<seq2seq4repair_space>" ) ;
Buggy code:
public class MarkupParser { private static final Pattern CONDITIONAL_COMMENT = Pattern . compile ( "\\[if<seq2seq4repair_space>.+\\]>(.|\n|\r)*<!\\[endif\\]" ) ; private final IXmlPullParser xmlParser ; private IMarkupFilter markupFilterChain ; private final Markup markup ; private final IMarkupSettings markupSettings ; public MarkupParser ( final MarkupResourceStream resource ) { } public MarkupParser ( final String markup ) { } public MarkupParser ( final IXmlPullParser xmlParser , final MarkupResourceStream resource ) { } public final void setWicketNamespace ( final String namespace ) { } protected MarkupResourceStream getMarkupResourceStream ( ) { } private final void initializeMarkupFilters ( ) { } protected void initFilterChain ( ) { } public final void appendMarkupFilter ( final IMarkupFilter filter ) { } public final void appendMarkupFilter ( final IMarkupFilter filter , final Class beforeFilter ) { } public final Markup parse ( ) throws IOException , ResourceStreamNotFoundException { } public ComponentTag getNextTag ( ) throws ParseException { } private void parseMarkup ( ) { } protected String compressWhitespace ( String rawMarkup ) { } private String removeComment ( String rawMarkup ) { int pos1 = rawMarkup . indexOf ( "<!--" ) ; while ( pos1 >= 0 ) { final int pos2 = rawMarkup . indexOf ( "-->" , ( pos1 + 4 ) ) ; final AppendingStringBuffer buf = new AppendingStringBuffer ( rawMarkup . length ( ) ) ; if ( ( pos2 >= 0 ) && ( pos1 > 0 ) ) { final String comment = rawMarkup . substring ( ( pos1 + 4 ) , pos2 ) ; if ( ( MarkupParser . CONDITIONAL_COMMENT . matcher ( comment ) . matches ( ) ) == false ) { <START_BUG> buf . append ( rawMarkup . substring ( 0 , ( pos1 - 1 ) ) ) ; <END_BUG> if ( ( rawMarkup . length ( ) ) >= ( pos2 + 4 ) ) { buf . append ( rawMarkup . substring ( ( pos2 + 4 ) ) ) ; } rawMarkup = buf . toString ( ) ; } } pos1 = ( ( rawMarkup . length ( ) ) <= ( pos1 + 2 ) ) ? - 1 : rawMarkup . indexOf ( "<!--" , ( pos1 + 4 ) ) ; } return rawMarkup ; } }

Fix:
buf . append ( rawMarkup . substring ( 0 , pos1 ) ) ;
Buggy code:
public class ColumnFamilyTest extends SchemaLoader { @ Test public void testSingleColumn ( ) throws IOException { ColumnFamily cf ; cf = ColumnFamily . create ( "Keyspace1" , "Standard1" ) ; cf . addColumn ( Util . column ( "C" , "v" , 1 ) ) ; DataOutputBuffer bufOut = new DataOutputBuffer ( ) ; ColumnFamily . serializer ( ) . serialize ( cf , bufOut ) ; ByteArrayInputStream bufIn = new ByteArrayInputStream ( bufOut . getData ( ) , 0 , bufOut . getLength ( ) ) ; cf = ColumnFamily . serializer ( ) . deserialize ( new DataInputStream ( bufIn ) ) ; assert cf != null ; <START_BUG> assert cf . name ( ) . equals ( "Standard1" ) ; <END_BUG> assert ( cf . getSortedColumns ( ) . size ( ) ) == 1 ; } @ Test public void testManyColumns ( ) throws IOException { } @ Test public void testGetColumnCount ( ) { } @ Test public void testTimestamp ( ) { } @ Test public void testMergeAndAdd ( ) { } }

Fix:
assert cf . metadata ( ) . cfName . equals ( "Standard1" ) ;
Buggy code:
public class SaveIndex extends IndexRequest { public SaveIndex ( IPath indexPath , IndexManager manager ) { } public boolean execute ( IProgressMonitor progressMonitor ) { <START_BUG> if ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) <END_BUG> return true ; IIndex index = this . manager . getIndex ( this . indexPath , true , false ) ; if ( index == null ) return true ; ReadWriteMonitor monitor = this . manager . getMonitorFor ( index ) ; if ( monitor == null ) return true ; try { monitor . enterWrite ( ) ; this . manager . saveIndex ( index ) ; } catch ( IOException e ) { if ( JobManager . VERBOSE ) { JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>save<seq2seq4repair_space>index<seq2seq4repair_space>" + ( this . indexPath ) ) + "<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; e . printStackTrace ( ) ; } return false ; } finally { monitor . exitWrite ( ) ; } return true ; } public String toString ( ) { } }

Fix:
if ( ( this . isCancelled ) || ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) )
Buggy code:
public class Savings extends Account { private static final long serialVersionUID = 111L ; private int numWithdraws = 0 ; public Savings ( String name ) { } public Savings ( String name , float balance ) throws IllegalArgumentException { } public boolean deposit ( float amount ) { } public boolean withdraw ( float amount ) { if ( ( ( getState ( ) ) == ( State . OPEN ) ) && ( amount > 0.0F ) ) { balance = ( balance ) - amount ; ( numWithdraws ) ++ ; if ( ( numWithdraws ) > 3 ) balance = ( balance ) - 1.0F ; <START_BUG> if ( ( balance ) <= 0.0F ) { <END_BUG> setState ( OVERDRAWN ) ; } return true ; } return false ; } public String getType ( ) { } public String toString ( ) { } }

Fix:
if ( ( balance ) < 0.0F ) {
Buggy code:
public class Instructions extends BasicGameState { public String mouse = "" ; public Image background ; public Instructions ( int state ) { } @ Override public void init ( GameContainer gc , StateBasedGame sbg ) throws SlickException { } @ Override public void update ( GameContainer gc , StateBasedGame sbg , int i ) throws SlickException { int xPosition = Mouse . getX ( ) ; int yPosition = Mouse . getY ( ) ; Input input = gc . getInput ( ) ; mouse = ( ( "Mouse<seq2seq4repair_space>position<seq2seq4repair_space>x:<seq2seq4repair_space>" + xPosition ) + "<seq2seq4repair_space>y:<seq2seq4repair_space>" ) + yPosition ; <START_BUG> if ( ( ( ( ( input . isMousePressed ( 0 ) ) && ( xPosition > 20 ) ) && ( xPosition < 170 ) ) && ( yPosition < 60 ) ) && ( yPosition > 20 ) ) { <END_BUG> sbg . enterState ( 0 ) ; } } @ Override public void render ( GameContainer gc , StateBasedGame sbg , Graphics g ) throws SlickException { } public int getID ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( ( ( input . isMouseButtonDown ( 0 ) ) && ( xPosition > 20 ) ) && ( xPosition < 170 ) ) && ( yPosition < 60 ) ) && ( yPosition > 20 ) ) {
Buggy code:
public class RegistryPageContributor implements IAdaptable , IPropertyPageContributor { private String pageId ; private Collection subPages = new ArrayList ( ) ; private boolean adaptable = false ; private IConfigurationElement pageElement ; private SoftReference filterProperties ; public RegistryPageContributor ( String pageId , IConfigurationElement element ) { } public boolean contributePropertyPages ( PropertyPageManager mng , IAdaptable element ) { PropertyPageNode node = new PropertyPageNode ( this , element ) ; if ( ( getCategory ( ) ) == null ) { mng . addToRoot ( node ) ; return true ; } <START_BUG> mng . addTo ( getCategory ( ) , node ) ; <END_BUG> return true ; } public IWorkbenchPropertyPage createPage ( IAdaptable element ) throws CoreException { } public ImageDescriptor getPageIcon ( ) { } public String getPageId ( ) { } public String getPluginId ( ) { } public String getPageName ( ) { } public boolean isApplicableTo ( Object object ) { } private boolean testCustom ( Object object , IActionFilter filter ) { } public boolean canAdapt ( ) { } public String getObjectClass ( ) { } public String getCategory ( ) { } public Collection getSubPages ( ) { } public void addSubPage ( RegistryPageContributor child ) { } private Map getFilterProperties ( ) { } public Object getChild ( String id ) { } private void processChildElement ( Map map , IConfigurationElement element ) { } public Object getAdapter ( Class adapter ) { } private IConfigurationElement getConfigurationElement ( ) { } }

Fix:
mng . addToDeep ( getCategory ( ) , node ) ;
Buggy code:
public class LoginActivity extends BaseActivity { private static final String TAG = "LoginActivity" ; public static final int REQUEST_CODE_SETNICK = 1 ; private EditText usernameEditText ; private EditText passwordEditText ; private boolean progressShow ; private boolean autoLogin = false ; private String currentUsername ; private String currentPassword ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void login ( View view ) { } private void processContactsAndGroups ( ) throws EaseMobException { List < String > usernames = EMContactManager . getInstance ( ) . getContactUserNames ( ) ; EMLog . d ( "roster" , ( "contacts<seq2seq4repair_space>size:<seq2seq4repair_space>" + ( usernames . size ( ) ) ) ) ; Map < String , User > userlist = new HashMap < String , User > ( ) ; for ( String username : usernames ) { User user = new User ( ) ; user . setUsername ( username ) ; setUserHearder ( username , user ) ; userlist . put ( username , user ) ; } User newFriends = new User ( ) ; newFriends . setUsername ( NEW_FRIENDS_USERNAME ) ; String strChat = getString ( Application_and_notify ) ; newFriends . setNick ( strChat ) ; userlist . put ( NEW_FRIENDS_USERNAME , newFriends ) ; User groupUser = new User ( ) ; String strGroup = getString ( group_chat ) ; groupUser . setUsername ( GROUP_USERNAME ) ; groupUser . setNick ( strGroup ) ; groupUser . setHeader ( "" ) ; userlist . put ( GROUP_USERNAME , groupUser ) ; User chatRoomItem = new User ( ) ; String strChatRoom = getString ( chat_room ) ; chatRoomItem . setUsername ( CHAT_ROOM ) ; chatRoomItem . setNick ( strChatRoom ) ; <START_BUG> groupUser . setHeader ( "" ) ; <END_BUG> userlist . put ( CHAT_ROOM , chatRoomItem ) ; DemoApplication . getInstance ( ) . setContactList ( userlist ) ; System . out . println ( ( "----------------" + ( userlist . values ( ) . toString ( ) ) ) ) ; UserDao dao = new UserDao ( this ) ; List < User > users = new ArrayList < User > ( userlist . values ( ) ) ; dao . saveContactList ( users ) ; List < String > blackList = EMContactManager . getInstance ( ) . getBlackListUsernamesFromServer ( ) ; EMContactManager . getInstance ( ) . saveBlackList ( blackList ) ; EMChatManager . getInstance ( ) . fetchJoinedGroupsFromServer ( ) ; } public void register ( View view ) { } @ Override protected void onResume ( ) { } protected void setUserHearder ( String username , User user ) { } }

Fix:
chatRoomItem . setHeader ( "" ) ;
Buggy code:
public class NestedTypeBinding extends SourceTypeBinding { public SourceTypeBinding enclosingType ; public SyntheticArgumentBinding [ ] enclosingInstances ; public SyntheticArgumentBinding [ ] outerLocalVariables ; public int enclosingInstancesSlotSize ; public int outerLocalVariablesSlotSize ; public NestedTypeBinding ( char [ ] [ ] typeName , ClassScope scope , SourceTypeBinding enclosingType ) { } public SyntheticArgumentBinding addSyntheticArgument ( LocalVariableBinding actualOuterLocalVariable ) { } public SyntheticArgumentBinding addSyntheticArgument ( ReferenceBinding targetEnclosingType ) { } public SyntheticArgumentBinding addSyntheticArgumentAndField ( LocalVariableBinding actualOuterLocalVariable ) { } public SyntheticArgumentBinding addSyntheticArgumentAndField ( ReferenceBinding targetEnclosingType ) { } public final void computeSyntheticArgumentSlotSizes ( ) { } public ReferenceBinding enclosingType ( ) { } public SyntheticArgumentBinding getSyntheticArgument ( LocalVariableBinding actualOuterLocalVariable ) { } public SyntheticArgumentBinding [ ] syntheticEnclosingInstances ( ) { } public ReferenceBinding [ ] syntheticEnclosingInstanceTypes ( ) { } public SyntheticArgumentBinding [ ] syntheticOuterLocalVariables ( ) { } public void updateInnerEmulationDependents ( ) { } public SyntheticArgumentBinding getSyntheticArgument ( ReferenceBinding targetEnclosingType , boolean onlyExactMatch ) { if ( ( enclosingInstances ) == null ) return null ; for ( int i = enclosingInstances . length ; ( -- i ) >= 0 ; ) if ( ( enclosingInstances [ i ] . type ) == targetEnclosingType ) if ( ( enclosingInstances [ i ] . actualOuterLocalVariable ) == null ) return enclosingInstances [ i ] ; if ( ! onlyExactMatch ) { for ( int i = enclosingInstances . length ; ( -- i ) >= 0 ; ) if ( ( enclosingInstances [ i ] . actualOuterLocalVariable ) == null ) <START_BUG> if ( ( ( ( ReferenceBinding ) ( enclosingInstances [ i ] . type ) ) . findSuperTypeErasingTo ( targetEnclosingType ) ) != null ) <END_BUG> return enclosingInstances [ i ] ; } return null ; } }

Fix:
if ( ( ( ( ReferenceBinding ) ( enclosingInstances [ i ] . type ) ) . findSuperTypeWithSameErasure ( targetEnclosingType ) ) != null )
Buggy code:
public class RecoveredType extends RecoveredStatement implements CompilerModifiers , TerminalTokens { public TypeDeclaration typeDeclaration ; public RecoveredType [ ] memberTypes ; public int memberTypeCount ; public RecoveredField [ ] fields ; public int fieldCount ; public RecoveredMethod [ ] methods ; public int methodCount ; public boolean preserveContent = false ; public int bodyEnd ; public RecoveredType ( TypeDeclaration typeDeclaration , RecoveredElement parent , int bracketBalance ) { } public RecoveredElement add ( AbstractMethodDeclaration methodDeclaration , int bracketBalanceValue ) { } public RecoveredElement add ( Block nestedBlockDeclaration , int bracketBalanceValue ) { } public RecoveredElement add ( FieldDeclaration fieldDeclaration , int bracketBalanceValue ) { } public RecoveredElement add ( TypeDeclaration memberTypeDeclaration , int bracketBalanceValue ) { } public int bodyEnd ( ) { } public boolean bodyStartsAtHeaderEnd ( ) { } public RecoveredType enclosingType ( ) { } public char [ ] name ( ) { } public ASTNode parseTree ( ) { } public int sourceEnd ( ) { } public String toString ( int tab ) { StringBuffer result = new StringBuffer ( tabString ( tab ) ) ; result . append ( "Recovered<seq2seq4repair_space>type:\n" ) ; if ( ( ( typeDeclaration . bits ) & ( IsAnonymousTypeMASK ) ) != 0 ) { result . append ( tabString ( tab ) ) ; result . append ( "<seq2seq4repair_space>" ) ; } <START_BUG> result . append ( typeDeclaration . print ( ( tab + 1 ) , result ) ) ; <END_BUG> if ( ( this . memberTypes ) != null ) { for ( int i = 0 ; i < ( this . memberTypeCount ) ; i ++ ) { result . append ( "\n" ) ; result . append ( this . memberTypes [ i ] . toString ( ( tab + 1 ) ) ) ; } } if ( ( this . fields ) != null ) { for ( int i = 0 ; i < ( this . fieldCount ) ; i ++ ) { result . append ( "\n" ) ; result . append ( this . fields [ i ] . toString ( ( tab + 1 ) ) ) ; } } if ( ( this . methods ) != null ) { for ( int i = 0 ; i < ( this . methodCount ) ; i ++ ) { result . append ( "\n" ) ; result . append ( this . methods [ i ] . toString ( ( tab + 1 ) ) ) ; } } return result . toString ( ) ; } public void updateBodyStart ( int bodyStart ) { } public Statement updatedStatement ( ) { } public TypeDeclaration updatedTypeDeclaration ( ) { } public void updateFromParserState ( ) { } public RecoveredElement updateOnClosingBrace ( int braceStart , int braceEnd ) { } public RecoveredElement updateOnOpeningBrace ( int braceStart , int braceEnd ) { } public void updateParseTree ( ) { } public void updateSourceEndIfNecessary ( int start , int end ) { } }

Fix:
typeDeclaration . print ( ( tab + 1 ) , result ) ;
Buggy code:
public class DebugCompare extends AbstractCmdlineTool { public static void main ( String [ ] argv ) throws IOException , SAXException { } public void run ( String [ ] argv ) throws IOException , SAXException { <START_BUG> argv = init ( argv , 3 , 3 ) ; <END_BUG> Record r1 = database . findRecordById ( argv [ 1 ] ) ; if ( r1 == null ) { System . err . println ( ( ( "Couldn't<seq2seq4repair_space>find<seq2seq4repair_space>record<seq2seq4repair_space>for<seq2seq4repair_space>'" + ( argv [ 1 ] ) ) + "'" ) ) ; System . err . println ( "Consider<seq2seq4repair_space>using<seq2seq4repair_space>--reindex" ) ; return ; } Record r2 = database . findRecordById ( argv [ 2 ] ) ; if ( r2 == null ) { System . err . println ( ( ( "Couldn't<seq2seq4repair_space>find<seq2seq4repair_space>record<seq2seq4repair_space>for<seq2seq4repair_space>'" + ( argv [ 2 ] ) ) + "'" ) ) ; System . err . println ( "Consider<seq2seq4repair_space>using<seq2seq4repair_space>--reindex" ) ; return ; } double prob = 0.5 ; for ( Property prop : config . getProperties ( ) ) { if ( prop . isIdProperty ( ) ) continue ; String propname = prop . getName ( ) ; System . out . println ( ( "---" + propname ) ) ; Collection < String > vs1 = r1 . getValues ( propname ) ; Collection < String > vs2 = r2 . getValues ( propname ) ; if ( ( ( vs1 . isEmpty ( ) ) || ( vs2 . isEmpty ( ) ) ) || ( prop . isIgnoreProperty ( ) ) ) continue ; double high = 0.0 ; for ( String v1 : vs1 ) { if ( v1 . equals ( "" ) ) continue ; for ( String v2 : vs2 ) { if ( v2 . equals ( "" ) ) continue ; try { Comparator comp = prop . getComparator ( ) ; if ( comp == null ) { high = 0.5 ; break ; } double d = comp . compare ( v1 , v2 ) ; double p = prop . compare ( v1 , v2 ) ; System . out . println ( ( ( ( ( ( ( ( ( "'" + v1 ) + "'<seq2seq4repair_space>~<seq2seq4repair_space>'" ) + v2 ) + "':<seq2seq4repair_space>" ) + d ) + "<seq2seq4repair_space>(prob<seq2seq4repair_space>" ) + p ) + ")" ) ) ; high = Math . max ( high , p ) ; } catch ( Exception e ) { throw new DukeException ( ( ( ( ( ( "Comparison<seq2seq4repair_space>of<seq2seq4repair_space>values<seq2seq4repair_space>'" + v1 ) + "'<seq2seq4repair_space>and<seq2seq4repair_space>" ) + "'" ) + v2 ) + "'<seq2seq4repair_space>failed" ) , e ) ; } } } double newprob = Utils . computeBayes ( prob , high ) ; System . out . println ( ( ( ( ( "Result:<seq2seq4repair_space>" + prob ) + "<seq2seq4repair_space>-><seq2seq4repair_space>" ) + newprob ) + "\n" ) ) ; prob = newprob ; } System . out . println ( ( "Overall:<seq2seq4repair_space>" + prob ) ) ; } protected void usage ( ) { } }

Fix:
argv = init ( argv , 3 , 3 , null ) ;
Buggy code:
class JobInfo extends JobTreeElement { private ArrayList children = new ArrayList ( ) ; private Job job ; private TaskInfo taskInfo ; private IStatus blockedStatus ; private boolean canceled = false ; private GroupInfo parent ; private int ticks = - 1 ; Job getJob ( ) { } boolean hasTaskInfo ( ) { } void setTaskName ( String name ) { } JobInfo ( Job enclosingJob ) { } String getDisplayString ( ) { } private String getDisplayStringWithStatus ( ) { } Object [ ] getChildren ( ) { } boolean hasChildren ( ) { } void beginTask ( String taskName , int work ) { } void addSubTask ( String subTaskName ) { } void addWork ( double workIncrement ) { } void clearChildren ( ) { } Object getParent ( ) { } boolean isJobInfo ( ) { } void clearTaskInfo ( ) { } public int compareTo ( Object arg0 ) { } int getPercentDone ( ) { } public IStatus getBlockedStatus ( ) { } public void setBlockedStatus ( IStatus blockedStatus ) { } public boolean isBlocked ( ) { } public boolean isCanceled ( ) { } public void cancel ( ) { } TaskInfo getTaskInfo ( ) { } void setGroupInfo ( GroupInfo group ) { } void dispose ( ) { } GroupInfo getGroupInfo ( ) { } public void setTicks ( int ticks ) { } boolean isActive ( ) { <START_BUG> return ( getJob ( ) . getState ( ) ) == ( Job . NONE ) ; <END_BUG> } String getCondensedDisplayString ( ) { } }

Fix:
return ( getJob ( ) . getState ( ) ) != ( Job . NONE ) ;
Buggy code:
public class RecyclerViewAdapter extends RecyclerView . Adapter < RecyclerViewAdapter . ViewHolder > { public static final String ITEM_KEY = "LocationItemKey" ; public static final String ITEM_EDIT_MODE = "LocationEditMode" ; private List < CursorLocation > items ; private LocationDataSource dataSource ; private Activity activity ; private FloatingActionButton mAddButton ; private PreferencesUtils utils ; public RecyclerViewAdapter ( Activity activity , List < CursorLocation > items , FloatingActionButton mAddButton ) { } @ Override public RecyclerViewAdapter . ViewHolder onCreateViewHolder ( ViewGroup viewGroup , int i ) { } @ Override public void onBindViewHolder ( RecyclerViewAdapter . ViewHolder viewHolder , int i ) { } @ Override public int getItemCount ( ) { } private void delete ( CursorLocation item ) { <START_BUG> dataSource . deleteLocation ( item . getId ( ) , item . getItem ( ) . getImagePath ( ) ) ; <END_BUG> int position = items . indexOf ( item ) ; items . remove ( position ) ; notifyItemRemoved ( position ) ; if ( mAddButton . hasShadow ( ) ) mAddButton . show ( ) ; } class ViewHolder extends RecyclerView . ViewHolder { private LinearLayout itemLayout ; private TextView title ; private ListView listView ; private ImageView photo ; private ImageButton deleteButton ; private ImageButton editButton ; private RecyclerViewAdapter . DeleteButtonListener deleteButtonListener ; private RecyclerViewAdapter . EditButtonListener editButtonListener ; public ViewHolder ( View itemView ) { } } private class EditButtonListener implements View . OnClickListener { private CursorLocation item ; @ Override public void onClick ( View v ) { } public void setLocation ( CursorLocation locationItem ) { } } private class DeleteButtonListener implements View . OnClickListener { private CursorLocation item ; @ Override public void onClick ( View v ) { } public void setLocation ( CursorLocation locationItem ) { } } public String trimText ( String text ) { } public static void setListViewHeightBasedOnChildren ( ListView listView ) { } }

Fix:
dataSource . deleteLocation ( item . getId ( ) , item . getItem ( ) . getImagePath ( ) , item . getItem ( ) ) ;
Buggy code:
@ Service public class DonkeyServiceImpl implements DonkeyService { @ Autowired private DonkeyRepository donkeyRepository ; public DonkeyRepository getDonkeyRepository ( ) { } public void setDonkeyRepository ( DonkeyRepository donkeyRepository ) { } @ Override public Page < Donkey > getOneGroupDonkeys ( int fisrtIndex , int Count , String sidx , String sord ) { } @ Override public long getTotalCount ( ) { } @ Override public Page < Donkey > getOneGroupDonkeysByCondition ( Filters filters , int fisrtIndex , int Count , String sidx , String sord ) { } private Direction getDirection ( String sord ) { } @ Override public void delDonkey ( Integer id ) { } @ Override public Donkey getDonkey ( Integer id ) { } @ Override public Donkey saveDonkey ( Donkey donkey ) { } @ Override public boolean isSnExist ( Integer id , Integer sn ) { Donkey donkey = donkeyRepository . findOneBySn ( sn ) ; if ( donkey == null ) return false ; if ( id == 0 ) return true ; <START_BUG> return ( donkey . getId ( ) ) != id ; <END_BUG> } @ Override public Donkey getDonkeyBySn ( Integer sn ) { } @ Override public Iterable < Donkey > findAll ( ) { } }

Fix:
return ! ( id . equals ( donkey . getId ( ) ) ) ;
Buggy code:
public class RegistrationStarter { private static final String DEFAULT_REGISTRATION_DIRECTORY = "RegistrationData" ; private static final String DEFAULT_REGISTRATION_PROPERTIES = ( RegistrationStarter . DEFAULT_REGISTRATION_DIRECTORY ) + "//registration.properties" ; private Properties defaultProperties ; private File workingDirectory ; public static void main ( String [ ] args ) { } public RegistrationStarter ( ) { } private void loadProperties ( ) { defaultProperties = new Properties ( ) ; File path = new File ( workingDirectory , RegistrationStarter . DEFAULT_REGISTRATION_DIRECTORY ) ; File props = new File ( workingDirectory , RegistrationStarter . DEFAULT_REGISTRATION_PROPERTIES ) ; if ( ! ( path . exists ( ) ) ) { path . mkdir ( ) ; } if ( ! ( props . exists ( ) ) ) { try { props . createNewFile ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; JOptionPane . showMessageDialog ( null , ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>properties<seq2seq4repair_space>file:<seq2seq4repair_space>" + ( RegistrationStarter . DEFAULT_REGISTRATION_PROPERTIES ) ) + "\nClosing<seq2seq4repair_space>registration<seq2seq4repair_space>system" ) , "Error" , JOptionPane . ERROR_MESSAGE ) ; System . exit ( 1 ) ; } } try { FileInputStream in = new FileInputStream ( new File ( workingDirectory , RegistrationStarter . DEFAULT_REGISTRATION_PROPERTIES ) ) ; defaultProperties . load ( in ) ; if ( ( defaultProperties . getProperty ( KEY_NAME_FILE_PATH ) ) == null ) { defaultProperties . setProperty ( KEY_NAME_FILE_PATH , "RegistrationData//namn.txt" ) ; } if ( ( defaultProperties . getProperty ( KEY_TIME_FILE_PATH ) ) == null ) { <START_BUG> defaultProperties . setProperty ( KEY_TIME_FILE_PATH , "RegistrationData//times.txt" ) ; <END_BUG> } defaultProperties . store ( new FileOutputStream ( props ) , null ) ; in . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; JOptionPane . showMessageDialog ( null , ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>properties<seq2seq4repair_space>file:<seq2seq4repair_space>" + ( RegistrationStarter . DEFAULT_REGISTRATION_PROPERTIES ) ) + "\nClosing<seq2seq4repair_space>registration<seq2seq4repair_space>system" ) , "Error" , JOptionPane . ERROR_MESSAGE ) ; System . exit ( 1 ) ; } } private void startRegistration ( ) { } }

Fix:
defaultProperties . setProperty ( KEY_TIME_FILE_PATH , "RegistrationData//atimes.txt" ) ;
Buggy code:
public final class CommandLegacyActionWrapper extends AbstractAction { private final class CommandListener implements ICommandListener { public final void commandChanged ( final CommandEvent commandEvent ) { } } private ParameterizedCommand command ; private final ICommandListener commandListener = new CommandLegacyActionWrapper . CommandListener ( ) ; private boolean enabled = true ; private String id ; private final IServiceLocator serviceLocator ; private final String style ; public CommandLegacyActionWrapper ( final String id , final ParameterizedCommand command , final String style , final IServiceLocator serviceLocator ) { } public final int getAccelerator ( ) { } public final String getActionDefinitionId ( ) { } public final String getDescription ( ) { } public final ImageDescriptor getDisabledImageDescriptor ( ) { } public final HelpListener getHelpListener ( ) { } public final ImageDescriptor getHoverImageDescriptor ( ) { } public final String getId ( ) { } public final ImageDescriptor getImageDescriptor ( ) { } public final IMenuCreator getMenuCreator ( ) { } public final int getStyle ( ) { } public final String getText ( ) { } public final String getToolTipText ( ) { } public final boolean isChecked ( ) { } public final boolean isEnabled ( ) { } public final boolean isEnabledDisregardingCommand ( ) { } public final boolean isHandled ( ) { } public final void run ( ) { } public final void runWithEvent ( final Event event ) { final Command baseCommand = command . getCommand ( ) ; <START_BUG> final ExecutionEvent executionEvent = new ExecutionEvent ( command . getParameterMap ( ) , event , null ) ; <END_BUG> try { baseCommand . execute ( executionEvent ) ; firePropertyChange ( RESULT , null , Boolean . TRUE ) ; } catch ( final NotHandledException e ) { firePropertyChange ( RESULT , null , Boolean . FALSE ) ; } catch ( final ExecutionException e ) { firePropertyChange ( RESULT , null , Boolean . FALSE ) ; } } public final void setAccelerator ( final int keycode ) { } public final void setActionDefinitionId ( final String id ) { } public final void setChecked ( final boolean checked ) { } public final void setDescription ( final String text ) { } public final void setDisabledImageDescriptor ( final ImageDescriptor newImage ) { } public final void setEnabled ( final boolean enabled ) { } public final void setHelpListener ( final HelpListener listener ) { } public final void setHoverImageDescriptor ( final ImageDescriptor newImage ) { } public final void setId ( final String id ) { } public final void setImageDescriptor ( final ImageDescriptor newImage ) { } public final void setMenuCreator ( final IMenuCreator creator ) { } public final void setText ( final String text ) { } public final void setToolTipText ( final String text ) { } }

Fix:
final ExecutionEvent executionEvent = new ExecutionEvent ( command . getCommand ( ) , command . getParameterMap ( ) , event , null ) ;
Buggy code:
public class SetClasspathOperation extends ChangeClasspathOperation { IClasspathEntry [ ] newRawClasspath ; IPath newOutputLocation ; JavaProject project ; public SetClasspathOperation ( JavaProject project , IClasspathEntry [ ] newRawClasspath , IPath newOutputLocation , boolean canChangeResource ) { } protected void executeOperation ( ) throws JavaModelException { checkCanceled ( ) ; try { <START_BUG> this . project . getPerProjectInfo ( ) . setClasspath ( this . newRawClasspath , this . newOutputLocation , JavaModelStatus . VERIFIED_OK , null , null , null ) ; <END_BUG> classpathChanged ( this . project ) ; if ( ( this . canChangeResources ) && ( this . project . saveClasspath ( this . newRawClasspath , this . newOutputLocation ) ) ) JavaModelOperation . setAttribute ( JavaModelOperation . HAS_MODIFIED_RESOURCE_ATTR , JavaModelOperation . TRUE ) ; } finally { done ( ) ; } } public String toString ( ) { } public IJavaModelStatus verify ( ) { } }

Fix:
this . project . getPerProjectInfo ( ) . setClasspath ( this . newRawClasspath , this . newOutputLocation , JavaModelStatus . VERIFIED_OK , null , null , null , null ) ;