nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class ListView < T > extends AbstractRepeater < List < T > > { private int firstIndex = 0 ; private boolean reuseItems = false ; private int viewSize = Integer . MAX_VALUE ; public ListView ( final MarkupContainer parent , final String id ) { } public ListView ( final MarkupContainer parent , final String id , final IModel < List < T > > model ) { } public ListView ( final MarkupContainer parent , final String id , final List < T > list ) { } public final List < T > getList ( ) { } public boolean getReuseItems ( ) { } public final int getStartIndex ( ) { } public int getViewSize ( ) { } public final Link moveDownLink ( MarkupContainer parent , final String id , final ListItem < T > item ) { } public final Link moveUpLink ( MarkupContainer parent , final String id , final ListItem < T > item ) { } public final Link removeLink ( MarkupContainer parent , final String id , final ListItem < T > item ) { } public ListView setReuseItems ( boolean reuseItems ) { } public ListView setStartIndex ( final int startIndex ) { } public ListView setViewSize ( final int size ) { } public Component setList ( List < T > list ) { } @ Override public Component setModel ( IModel < List < T > > model ) { } protected IModel < T > getListItemModel ( final IModel < List < T > > listViewModel , final int index ) { } @ Override @ SuppressWarnings ( "unchecked" ) protected void internalOnAttach ( ) { } protected ListItem < T > newItem ( final int index ) { } protected void onBeginPopulateItem ( final ListItem item ) { } @ Override protected void onRender ( final MarkupStream markupStream ) { } protected abstract void populateItem ( final ListItem < T > item ) { } protected void renderItem ( final ListItem item ) { <START_BUG> item . render ( new MarkupStream ( ListView . getMarkupFragment ( ) ) ) ; <END_BUG> } }

Fix:
item . render ( ) ;
Buggy code:
public class NSTextContainer extends NSObject { public NSTextContainer ( ) { } public NSTextContainer ( int id ) { } public NSSize containerSize ( ) { NSSize result = new NSSize ( ) ; <START_BUG> OS . objc_msgSend_struct ( result , this . id , sel_containerSize ) ; <END_BUG> return result ; } public boolean containsPoint ( NSPoint point ) { } public boolean heightTracksTextView ( ) { } public id initWithContainerSize ( NSSize size ) { } public boolean isSimpleRectangularTextContainer ( ) { } public NSLayoutManager layoutManager ( ) { } public float lineFragmentPadding ( ) { } public NSRect lineFragmentRectForProposedRect ( NSRect proposedRect , int sweepDirection , int movementDirection , int remainingRect ) { } public void replaceLayoutManager ( NSLayoutManager newLayoutManager ) { } public void setContainerSize ( NSSize size ) { } public void setHeightTracksTextView ( boolean flag ) { } public void setLayoutManager ( NSLayoutManager layoutManager ) { } public void setLineFragmentPadding ( float pad ) { } public void setTextView ( NSTextView textView ) { } public void setWidthTracksTextView ( boolean flag ) { } public NSTextView textView ( ) { } public boolean widthTracksTextView ( ) { } }

Fix:
OS . objc_msgSend_stret ( result , this . id , sel_containerSize ) ;
Buggy code:
@ RestController @ RequestMapping ( "//rest//cricket" ) public class CricketController { private final Logger log = LoggerFactory . getLogger ( getClass ( ) ) ; @ Inject LeagueService leagueService ; @ Inject LeagueRepository leagueRepository ; @ RequestMapping ( value = "//league" , method = RequestMethod . POST , produces = MediaType . APPLICATION_JSON_VALUE ) public ResponseEntity < ? > registerNewLeague ( @ NotNull @ RequestBody LeagueDTO leagueDTO ) { log . info ( ( "New<seq2seq4repair_space>league<seq2seq4repair_space>request<seq2seq4repair_space>" + leagueDTO ) ) ; <START_BUG> if ( ( leagueRepository . findOne ( leagueDTO . getName ( ) ) ) != null ) { <END_BUG> return new ResponseEntity < String > ( "League<seq2seq4repair_space>name<seq2seq4repair_space>already<seq2seq4repair_space>in<seq2seq4repair_space>use" , HttpStatus . BAD_REQUEST ) ; } leagueService . requestNewLeague ( leagueDTO . getName ( ) , leagueDTO . getFee ( ) ) ; return new ResponseEntity ( HttpStatus . CREATED ) ; } }

Fix:
if ( ( leagueRepository . findOneByName ( leagueDTO . getName ( ) ) ) != null ) {
Buggy code:
public final class OSGiSubsystemAdd extends AbstractSubsystemAdd < OSGiSubsystemElement > { private static final long serialVersionUID = - 4542570180370773590L ; private static final Logger log = Logger . getLogger ( "org.jboss.as.osgi" ) ; private OSGiSubsystemState subsystemState = new OSGiSubsystemState ( ) ; protected OSGiSubsystemAdd ( ) { } @ Override protected OSGiSubsystemElement createSubsystemElement ( ) { } OSGiSubsystemState getSubsystemState ( ) { } @ Override protected < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { OSGiSubsystemAdd . log . infof ( "Activating<seq2seq4repair_space>OSGi<seq2seq4repair_space>Subsystem" ) ; String value = SystemPropertyActions . getProperty ( "jboss.protocol.handler.modules" , "org.jboss.osgi.framework" ) ; if ( ! ( value . equals ( "org.jboss.osgi.framework" ) ) ) value = value + "|org.jboss.osgi.framework" ; System . setProperty ( "jboss.protocol.handler.modules" , value ) ; Activation policy = subsystemState . getActivationPolicy ( ) ; <START_BUG> Mode initialMode = ( policy == ( Activation . LAZY ) ) ? Mode . ON_DEMAND : Mode . AUTOMATIC ; <END_BUG> BatchBuilder batchBuilder = updateContext . getBatchBuilder ( ) ; Configuration . addService ( batchBuilder , subsystemState ) ; BundleManagerService . addService ( batchBuilder , initialMode ) ; FrameworkService . addService ( batchBuilder , initialMode ) ; PackageAdminService . addService ( batchBuilder ) ; new OSGiDeploymentActivator ( ) . activate ( batchBuilder ) ; } }

Fix:
Mode initialMode = ( policy == ( Activation . LAZY ) ) ? Mode . ON_DEMAND : Mode . PASSIVE ;
Buggy code:
public class TestSuiteEnvironment { public static ModelControllerClient getModelControllerClient ( ) { } public static int getServerPort ( ) { <START_BUG> return Integer . getInteger ( "as.managementPort" , 9999 ) ; <END_BUG> } public static String getServerAddress ( ) { } public static String getIpv6Args ( ) { } public static void getIpv6Args ( List < String > command ) { } public static String formatPossibleIpv6Address ( String address ) { } }

Fix:
return Integer . getInteger ( "as.managementPort" , 9990 ) ;
Buggy code:
public class SimpleTestPanelTest extends WicketTestCase { public SimpleTestPanelTest ( String name ) { } public void testRenderHomePage_2 ( ) throws Exception { <START_BUG> tester . setupRequestAndResponse ( ) ; <END_BUG> executeTest ( SimpleTestPage . class , "SimpleTestPageExpectedResult.html" ) ; WebRequestCycle cycle = tester . createRequestCycle ( ) ; Page page = tester . getLastRenderedPage ( ) ; tester . executeBehavior ( ( ( SimpleTestPanel ) ( page . get ( "testPanel" ) ) ) . getTimeBehavior ( ) ) ; String document = tester . getServletResponse ( ) . getDocument ( ) ; DiffUtil . validatePage ( document , SimpleTestPage . class , "SimpleTestPageExpectedResult-1.html" , true ) ; } }

Fix:
tester . setupRequestAndResponse ( true ) ;
Buggy code:
public class Statistics { private static final String FILE_PATH = "D:\\GithubRepositories\\Licenta\\ABC_Cloud\\results_" ; private static final String FILE_EXTENSION = ".csv" ; private static final String ENCODING = "utf-8" ; private static FoodSource solution ; private static Map < Datacenter , List < Double > > datacenterResults ; private static double clock ; private static PrintWriter writer ; public static void init ( FoodSource currentSolution , Double currentClock ) { } public static void printResults ( List < GreenDataCenter > dataCenterList ) { } private static void openFile ( ) { try { Desktop dt = Desktop . getDesktop ( ) ; dt . open ( new File ( Statistics . FILE_PATH ) ) ; <START_BUG> Process p = Runtime . getRuntime ( ) . exec ( ( "rundll32<seq2seq4repair_space>url.dll,FileProtocolHandler<seq2seq4repair_space>" + ( Statistics . FILE_PATH ) ) ) ; <END_BUG> } catch ( IOException e ) { e . printStackTrace ( ) ; } } private static void initWriter ( ) { } public static void analizeSolution ( List < GreenDataCenter > dataCenters , FoodSource solution ) { } }

Fix:
Runtime . getRuntime ( ) . exec ( ( "rundll32<seq2seq4repair_space>url.dll,FileProtocolHandler<seq2seq4repair_space>" + ( Statistics . FILE_PATH ) ) ) ;
Buggy code:
public class FieldBinding extends VariableBinding { public ReferenceBinding declaringClass ; protected FieldBinding ( ) { } public FieldBinding ( char [ ] name , TypeBinding type , int modifiers , ReferenceBinding declaringClass , Constant constant ) { } public FieldBinding ( FieldDeclaration field , TypeBinding type , int modifiers , ReferenceBinding declaringClass ) { } public FieldBinding ( FieldBinding initialFieldBinding , ReferenceBinding declaringClass ) { } public final int kind ( ) { } public final boolean canBeSeenBy ( PackageBinding invocationPackage ) { } public final boolean canBeSeenBy ( TypeBinding receiverType , InvocationSite invocationSite , Scope scope ) { } public char [ ] computeUniqueKey ( boolean isLeaf ) { } public Constant constant ( ) { } public char [ ] genericSignature ( ) { } public final int getAccessFlags ( ) { } public long getAnnotationTagBits ( ) { FieldBinding originalField = this . original ( ) ; if ( ( ( ( originalField . tagBits ) & ( TagBits . AnnotationResolved ) ) == 0 ) && ( ( originalField . declaringClass ) instanceof SourceTypeBinding ) ) { ClassScope scope = ( ( SourceTypeBinding ) ( originalField . declaringClass ) ) . scope ; if ( scope == null ) { <START_BUG> this . tagBits |= TagBits . AnnotationResolved ; <END_BUG> return 0 ; } TypeDeclaration typeDecl = scope . referenceContext ; FieldDeclaration fieldDecl = typeDecl . declarationOf ( originalField ) ; if ( fieldDecl != null ) { MethodScope initializationScope = ( isStatic ( ) ) ? typeDecl . staticInitializerScope : typeDecl . initializerScope ; FieldBinding previousField = initializationScope . initializedField ; int previousFieldID = initializationScope . lastVisibleFieldID ; try { initializationScope . initializedField = originalField ; initializationScope . lastVisibleFieldID = originalField . id ; ASTNode . resolveAnnotations ( initializationScope , fieldDecl . annotations , originalField ) ; } finally { initializationScope . initializedField = previousField ; initializationScope . lastVisibleFieldID = previousFieldID ; } } } return originalField . tagBits ; } public AnnotationBinding [ ] getAnnotations ( ) { } public final boolean isDefault ( ) { } public final boolean isDeprecated ( ) { } public final boolean isPrivate ( ) { } public final boolean isUsed ( ) { } public final boolean isProtected ( ) { } public final boolean isPublic ( ) { } public final boolean isStatic ( ) { } public final boolean isSynthetic ( ) { } public final boolean isTransient ( ) { } public final boolean isViewedAsDeprecated ( ) { } public final boolean isVolatile ( ) { } public FieldBinding original ( ) { } public void setAnnotations ( AnnotationBinding [ ] annotations ) { } public FieldDeclaration sourceField ( ) { } }

Fix:
this . tagBits |= ( TagBits . AnnotationResolved ) | ( TagBits . DeprecatedAnnotationResolved ) ;
Buggy code:
public class Photo { private Integer photoId ; private String url ; private boolean isPrivate ; private int ownerId ; private ArrayList < Integer > viewCircleIDs ; private ArrayList < Integer > viewUserIDs ; private ArrayList < Tag > tags ; private ArrayList < Rating > ratings ; private Date uploadDate ; public Photo ( String url , boolean isPrivate , int ownerId ) { } public Photo ( Integer photoId , String url , boolean isPrivate , int ownerId , Date uploadDate ) { } public int getPhotoId ( ) { <START_BUG> return photoId ; <END_BUG> } public void setPhotoId ( int photoId ) { } public String getUrl ( ) { } public void setUrl ( String url ) { } public boolean isPrivate ( ) { } public void setPrivate ( boolean isPrivate ) { } public ArrayList < Integer > getViewCircleIDs ( ) { } public void setViewCircleIDs ( ArrayList < Integer > viewCircleIDs ) { } public ArrayList < Integer > getViewUserIDs ( ) { } public void setViewUserIDs ( ArrayList < Integer > viewUserIDs ) { } public boolean addViewUserID ( int userID ) { } public boolean addViewCircleID ( int circleID ) { } public boolean removeViewUserID ( Integer userID ) { } public boolean removeViewCircleID ( Integer circleID ) { } public boolean addTag ( Tag tag ) { } public boolean removeTag ( Tag tag ) { } public boolean addRating ( Rating rating ) { } public boolean removeRating ( Rating rating ) { } public ArrayList < Tag > getTags ( ) { } public void setTags ( ArrayList < Tag > tags ) { } public ArrayList < Rating > getRatings ( ) { } public void setRatings ( ArrayList < Rating > ratings ) { } public int getOwnerId ( ) { } public void setOwnerId ( int ownerId ) { } public Date getUploadDate ( ) { } public void setUploadDate ( Date uploadDate ) { } public void setPhotoId ( Integer photoId ) { } @ Override public String toString ( ) { } }

Fix:
return ( photoId ) != null ? photoId : 0 ;
Buggy code:
public interface IViewRegistry { public IViewDescriptor find ( String id ) { } <START_BUG> public ICategory [ ] getCategories ( ) ; <END_BUG> public int getCategoryCount ( ) { } public int getViewCount ( ) { } public IViewDescriptor [ ] getViews ( ) { } }

Fix:
public Category [ ] getCategories ( ) ;
Buggy code:
public class SpringFramework2Test extends WebTestCase { public SpringFramework2Test ( String name ) { } public void setUp ( ) throws Exception { } public void testHomePage ( ) { beginAt ( "//spring2" ) ; <START_BUG> assertTitleEquals ( "2nd<seq2seq4repair_space>Spring<seq2seq4repair_space>example" ) ; <END_BUG> } public static Test suite ( ) { } }

Fix:
assertTitleEquals ( "Wicket<seq2seq4repair_space>Examples<seq2seq4repair_space>-<seq2seq4repair_space>springframework2" ) ;
Buggy code:
public class SettingsTabPreferences extends SettingsTabHelper implements SettingsTabPanel { JCheckBox _splash = null ; JCheckBox _preload = null ; JCheckBox _edem = null ; JCheckBox _profile = null ; JCheckBox _reloadRecent = null ; public SettingsTabPreferences ( ) { } public void handleSettingsTabRefresh ( ) { } public void handleSettingsTabSave ( ) { } public void handleSettingsTabCancel ( ) { } public String getModuleName ( ) { } public String getModuleDescription ( ) { } public String getModuleAuthor ( ) { } public String getModuleVersion ( ) { <START_BUG> return ArgoVersion . VERSION ; <END_BUG> } public String getModuleKey ( ) { } public String getTabKey ( ) { } }

Fix:
return ArgoVersion . getVersion ( ) ;
Buggy code:
public class IntroAction extends Action implements ActionFactory . IWorkbenchAction { private IWorkbenchWindow workbenchWindow ; private IPageListener pageListener = new IPageListener ( ) { public void pageActivated ( IWorkbenchPage page ) { } public void pageClosed ( IWorkbenchPage page ) { } public void pageOpened ( IWorkbenchPage page ) { } } ; public IntroAction ( IWorkbenchWindow window ) { } public void dispose ( ) { } public void runWithEvent ( Event event ) { IntroDescriptor introDescriptor = ( ( Workbench ) ( workbenchWindow . getWorkbench ( ) ) ) . getIntroDescriptor ( ) ; if ( introDescriptor == null ) { <START_BUG> MessageDialog . openWarning ( event . display . getActiveShell ( ) , Intro_missing_product_title , Intro_missing_product_message ) ; <END_BUG> } else { workbenchWindow . getWorkbench ( ) . getIntroManager ( ) . showIntro ( workbenchWindow , false ) ; } } public ImageDescriptor getImageDescriptor ( ) { } }

Fix:
MessageDialog . openWarning ( workbenchWindow . getShell ( ) , Intro_missing_product_title , Intro_missing_product_message ) ;
Buggy code:
public class UtilController { private static final boolean SUCCESS = true ; private static final boolean FAILURE = false ; public static boolean rejectStudentSubmission ( String file , String fName , String lName , String dateOfSubmission , String reasonForRejection ) { } public static void approveStudentSubmission ( String fileName , String firstName , String lastName , String printer , String dateStarted , double volume ) { } public static File getFilePath ( String firstName , String lastName , String fileName , String dateSubmitted ) { } public static boolean checkFileExists ( String filepath ) { } public static int getSelectedRowNum ( DefaultTableModel dm , int selectedRow , int column ) { } private static ArrayList < String > getColumnNames ( ResultSet queryResult ) { } private static ArrayList < ArrayList < String > > readyOutputForViewPage ( ResultSet queryResult ) { } public static void updatePendingTableData ( DefaultTableModel dataHolder ) { } public static String [ ] returnAvailablePrinters ( ) { } public static String [ ] returnAvailableClasses ( ) { } public static void moveFileToSubmitLocation ( JTextField fileLocation , InstanceCall inst , SQLMethods sqlMethods , String printer , String fName , String lName , String Class , String section , String fileName , String email ) { String fileLoc = "" ; try { FileUtils . copyFileToDirectory ( new File ( fileLocation . getText ( ) ) , new File ( inst . getSubmission ( ) ) ) ; fileLoc = ( inst . getSubmission ( ) ) + ( new File ( fileLocation . getText ( ) ) . getName ( ) ) ; sqlMethods . insertIntoPendingJobs ( printer , fName , lName , Class , section , fileName , fileLoc . replace ( "\\" , "\\\\" ) , email ) ; TimeUnit . SECONDS . sleep ( 2 ) ; } catch ( IOException e ) { JOptionPane . showMessageDialog ( new Frame ( ) , "IOException!<seq2seq4repair_space>File<seq2seq4repair_space>couldn't<seq2seq4repair_space>be<seq2seq4repair_space>navigated." ) ; } catch ( InterruptedException ex ) { <START_BUG> Logger . getLogger ( Student_Submission . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; <END_BUG> } } }

Fix:
Logger . getLogger ( StudentSubmission . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ;
Buggy code:
public final class QueuelessThreadPoolExecutorElement extends AbstractExecutorElement < QueuelessThreadPoolExecutorElement > { private static final long serialVersionUID = - 8281883758711778557L ; private String handoffExecutor ; private boolean blocking ; public QueuelessThreadPoolExecutorElement ( final Location location , final String name ) { } public QueuelessThreadPoolExecutorElement ( final XMLExtendedStreamReader reader ) throws XMLStreamException { } public void activate ( final ServiceActivatorContext context ) { final BatchBuilder batchBuilder = context . getBatchBuilder ( ) ; long keepAlive = - 1L ; final TimeSpec keepaliveTime = getKeepaliveTime ( ) ; if ( keepaliveTime != null ) keepAlive = keepaliveTime . getUnit ( ) . toNanos ( keepaliveTime . getDuration ( ) ) ; final ScaledCount maxThreads = getMaxThreads ( ) ; final QueuelessThreadPoolService service = new QueuelessThreadPoolService ( ( maxThreads != null ? maxThreads . getScaledCount ( ) : Integer . MAX_VALUE ) , blocking , keepAlive ) ; final ServiceName serviceName = JBOSS_THREAD_EXECUTOR . append ( getName ( ) ) ; final BatchServiceBuilder < ExecutorService > serviceBuilder = batchBuilder . addService ( serviceName , service ) ; final String threadFactory = getThreadFactory ( ) ; final ServiceName threadFactoryName ; if ( threadFactory == null ) { threadFactoryName = serviceName . append ( "thread-factory" ) ; batchBuilder . addService ( threadFactoryName , new ThreadFactoryService ( ) ) ; } else { threadFactoryName = JBOSS_THREAD_FACTORY . append ( threadFactory ) ; } serviceBuilder . addDependency ( threadFactoryName , ThreadFactory . class , service . getThreadFactoryInjector ( ) ) ; final String handoffExecutor = getHandoffExecutor ( ) ; <START_BUG> if ( handoffExecutor == null ) { <END_BUG> final ServiceName handoffExecutorName = JBOSS_THREAD_EXECUTOR . append ( handoffExecutor ) ; serviceBuilder . addDependency ( handoffExecutorName , Executor . class , service . getHandoffExecutorInjector ( ) ) ; } } public long elementHash ( ) { } protected void appendDifference ( final Collection < AbstractModelUpdate < QueuelessThreadPoolExecutorElement > > target , final QueuelessThreadPoolExecutorElement other ) { } protected Class < QueuelessThreadPoolExecutorElement > getElementClass ( ) { } public String getHandoffExecutor ( ) { } public boolean isBlocking ( ) { } public void writeContent ( final XMLExtendedStreamWriter streamWriter ) throws XMLStreamException { } }

Fix:
if ( handoffExecutor != null ) {
Buggy code:
@ Repeat ( iterations = 5 ) public class TestCompressingTermVectorsFormat extends BaseTermVectorsFormatTestCase { @ Override protected Codec getCodec ( ) { } public void testNoOrds ( ) throws Exception { Directory dir = newDirectory ( ) ; RandomIndexWriter iw = new RandomIndexWriter ( random ( ) , dir ) ; Document doc = new Document ( ) ; FieldType ft = new FieldType ( TextField . TYPE_NOT_STORED ) ; ft . setStoreTermVectors ( true ) ; doc . add ( new org . apache . lucene . document . Field ( "foo" , "this<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>test" , ft ) ) ; iw . addDocument ( doc ) ; AtomicReader ir = getOnlySegmentReader ( iw . getReader ( ) ) ; Terms terms = ir . getTermVector ( 0 , "foo" ) ; assertNotNull ( terms ) ; TermsEnum termsEnum = terms . iterator ( null ) ; assertEquals ( FOUND , termsEnum . seekCeil ( new BytesRef ( "this" ) ) ) ; try { termsEnum . ord ( ) ; fail ( ) ; } catch ( UnsupportedOperationException expected ) { } try { termsEnum . seekExact ( 0 ) ; fail ( ) ; } catch ( UnsupportedOperationException expected ) { } ir . close ( ) ; <START_BUG> iw . close ( ) ; <END_BUG> dir . close ( ) ; } }

Fix:
iw . shutdown ( ) ;
Buggy code:
public abstract class AjaxFallbackButton extends Button { private static final long serialVersionUID = 1L ; private final Form < ? > mForm ; public AjaxFallbackButton ( String id , Form < ? > form ) { } public AjaxFallbackButton ( String id , IModel < String > model , Form < ? > form ) { } protected void onError ( AjaxRequestTarget target , Form < ? > form ) { } @ Override public final void onSubmit ( ) { <START_BUG> if ( ! ( ( getRequestCycle ( ) . getRequestTarget ( ) ) instanceof AjaxRequestTarget ) ) { <END_BUG> onSubmit ( null , getForm ( ) ) ; } } @ Override public Form < ? > getForm ( ) { } protected abstract void onSubmit ( final AjaxRequestTarget target , final Form < ? > form ) { } protected IAjaxCallDecorator getAjaxCallDecorator ( ) { } protected final boolean isButtonEnabled ( ) { } }

Fix:
if ( ( AjaxRequestTarget . get ( ) ) == null ) {
Buggy code:
public class HTTPArgumentsPanel extends ArgumentsPanel { private static final String ENCODE_OR_NOT = JMeterUtils . getResString ( "encode?" ) ; private static final String INCLUDE_EQUALS = JMeterUtils . getResString ( "include_equals" ) ; protected void initializeTableModel ( ) { } protected void sizeColumns ( JTable table ) { } protected Object makeNewArgument ( ) { } private void fixSize ( TableColumn column ) { } public HTTPArgumentsPanel ( ) { } public TestElement createTestElement ( ) { } public void configure ( TestElement el ) { } protected boolean isMetaDataNormal ( HTTPArgument arg ) { <START_BUG> return ( ( ( arg . getMetaData ( ) ) == null ) || ( arg . getMetaData ( ) . equals ( "=" ) ) ) || ( ( ( arg . getValue ( ) ) != null ) && ( ( arg . getValue ( ) . toString ( ) . length ( ) ) > 0 ) ) ; <END_BUG> } }

Fix:
return ( ( ( arg . getMetaData ( ) ) == null ) || ( arg . getMetaData ( ) . equals ( "=" ) ) ) || ( ( ( arg . getValue ( ) ) != null ) && ( ( arg . getValue ( ) . length ( ) ) > 0 ) ) ;
Buggy code:
public class FileEventStore implements KeenAttemptCountingEventStore { public FileEventStore ( File root ) throws IOException { } @ Override public Object store ( String projectId , String eventCollection , String event ) throws IOException { } @ Override public String get ( Object handle ) throws IOException { } @ Override public void remove ( Object handle ) throws IOException { } @ Override public Map < String , List < Object > > getHandles ( String projectId ) throws IOException { } @ Override public String getAttempts ( String projectId , String eventCollection ) throws IOException { } @ Override public void setAttempts ( String projectId , String eventCollection , String attemptsString ) throws IOException { } private static final String ENCODING = "UTF-8" ; private static final int MAX_EVENTS_PER_COLLECTION = 10000 ; private static final int NUMBER_EVENTS_TO_FORGET = 100 ; private static final String ATTEMPTS_JSON_FILE_NAME = "__attempts.json" ; private final File root ; private Map < String , List < Object > > getHandlesFromProjectDirectory ( File projectDir ) throws IOException { } private File getKeenCacheDirectory ( ) throws IOException { } private File [ ] getSubDirectories ( File parent ) throws IOException { } private File [ ] getFilesInDir ( File dir ) { return dir . listFiles ( new FileFilter ( ) { public boolean accept ( File file ) { <START_BUG> return file . isFile ( ) ; <END_BUG> } } ) ; } private File getProjectDir ( String projectId , boolean create ) throws IOException { } private File getCollectionDir ( String projectId , String eventCollection ) throws IOException { } private File getFileForEvent ( File collectionDir , Calendar timestamp ) throws IOException { } private File getNextFileForEvent ( File dir , Calendar timestamp , int counter ) { } private int getMaxEventsPerCollection ( ) { } private int getNumberEventsToForget ( ) { } private File prepareCollectionDir ( String projectId , String eventCollection ) throws IOException { } No newline ; at end ; of file ; }

Fix:
return ( file . isFile ( ) ) && ( ! ( file . getName ( ) . equals ( FileEventStore . ATTEMPTS_JSON_FILE_NAME ) ) ) ;
Buggy code:
public class MemoryPoolMXBeanReadResourceHandler implements OperationStepHandler { public static final MemoryPoolMXBeanReadResourceHandler INSTANCE = new MemoryPoolMXBeanReadResourceHandler ( ) ; private MemoryPoolMXBeanReadResourceHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final String memPoolName = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) . getLastElement ( ) . getValue ( ) ; MemoryPoolMXBean memoryPoolMXBean = MemoryPoolMXBeanAttributeHandler . getMemoryPoolMXBean ( memPoolName ) ; final ModelNode result = context . getResult ( ) ; for ( String attribute : PlatformMBeanConstants . MEMORY_POOL_READ_ATTRIBUTES ) { final ModelNode store = result . get ( attribute ) ; try { MemoryPoolMXBeanAttributeHandler . storeResult ( attribute , store , memoryPoolMXBean , memPoolName ) ; } catch ( UnsupportedOperationException ignored ) { } } for ( String attribute : PlatformMBeanConstants . MEMORY_POOL_READ_WRITE_ATTRIBUTES ) { final ModelNode store = result . get ( attribute ) ; try { MemoryPoolMXBeanAttributeHandler . storeResult ( attribute , store , memoryPoolMXBean , memPoolName ) ; } catch ( UnsupportedOperationException ignored ) { } } for ( String attribute : PlatformMBeanConstants . MEMORY_POOL_METRICS ) { final ModelNode store = result . get ( attribute ) ; try { MemoryPoolMXBeanAttributeHandler . storeResult ( attribute , store , memoryPoolMXBean , memPoolName ) ; } catch ( UnsupportedOperationException ignored ) { } } if ( ( PlatformMBeanUtil . JVM_MAJOR_VERSION ) > 6 ) { final ModelNode store = result . get ( OBJECT_NAME ) ; MemoryPoolMXBeanAttributeHandler . storeResult ( OBJECT_NAME , store , memoryPoolMXBean , memPoolName ) ; } <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class WifiActivity extends Activity { private static final String TAG = WifiActivity . class . getSimpleName ( ) ; private WifiManager wifiManager ; private TextView statusView ; private ConnectedReceiver connectedReceiver ; public enum NetworkType { NETWORK_WEP , NETWORK_WPA , NETWORK_NOPASS , NETWORK_INVALID ; } private int changeNetwork ( NetworkSetting setting ) { } private int doError ( int resource_string ) { } private WifiConfiguration changeNetworkCommon ( NetworkSetting input ) { <START_BUG> statusView . setText ( "Creating<seq2seq4repair_space>settings..." ) ; <END_BUG> Log . d ( WifiActivity . TAG , ( ( ( "Adding<seq2seq4repair_space>new<seq2seq4repair_space>configuration:<seq2seq4repair_space>\nSSID:<seq2seq4repair_space>" + ( input . getSsid ( ) ) ) + "\nType:<seq2seq4repair_space>" ) + ( input . getNetworkType ( ) ) ) ) ; WifiConfiguration config = new WifiConfiguration ( ) ; config . allowedAuthAlgorithms . clear ( ) ; config . allowedGroupCiphers . clear ( ) ; config . allowedKeyManagement . clear ( ) ; config . allowedPairwiseCiphers . clear ( ) ; config . allowedProtocols . clear ( ) ; config . SSID = NetworkUtil . convertToQuotedString ( input . getSsid ( ) ) ; config . hiddenSSID = true ; return config ; } private int requestNetworkChange ( WifiConfiguration config ) { } private int changeNetworkWEP ( NetworkSetting input ) { } private int changeNetworkWPA ( NetworkSetting input ) { } private int changeNetworkUnEncrypted ( NetworkSetting input ) { } private WifiConfiguration findNetworkInExistingConfig ( String ssid ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onDestroy ( ) { } private int updateNetwork ( WifiConfiguration config , boolean disableOthers ) { } }

Fix:
statusView . setText ( wifi_creating_network ) ;
Buggy code:
final class ProjectAnalyzer extends Job { private final IJavaProject project ; private ResourceSet rs ; private Map < IStorage , Resource > mapping ; private Map < String , EPackage > packages ; public ProjectAnalyzer ( final IJavaProject project ) { } @ Override protected IStatus run ( final IProgressMonitor monitor ) { } @ SuppressWarnings ( "restriction" ) private void loadMetamodelsForProject ( final IJavaProject javaProject , final ResourceSet rs , final IProgressMonitor monitor ) { } private void loadModelFromStorage ( final ResourceSet rs , final IStorage storage ) { } private void registerEPackages ( final ResourceSet rs , final Resource r , boolean overwrite ) { } private void registerPackage ( final EPackage pack , ResourceSet rs , boolean overwrite ) { Registry packageRegistry = rs . getPackageRegistry ( ) ; <START_BUG> if ( ( ! overwrite ) && ( packageRegistry . containsKey ( pack . getNsURI ( ) ) ) ) { <END_BUG> if ( EmfToolsPlugin . trace ) { System . out . println ( ( ( "Did<seq2seq4repair_space>not<seq2seq4repair_space>register<seq2seq4repair_space>'" + ( pack . getName ( ) ) ) + "<seq2seq4repair_space>because<seq2seq4repair_space>an<seq2seq4repair_space>EPackage<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>nsURI<seq2seq4repair_space>has<seq2seq4repair_space>already<seq2seq4repair_space>been<seq2seq4repair_space>registered." ) ) ; } } else { packageRegistry . put ( pack . getNsURI ( ) , pack ) ; packages . put ( pack . getNsURI ( ) , pack ) ; } for ( final EPackage p : pack . getESubpackages ( ) ) { registerPackage ( p , rs , overwrite ) ; } } public Map < String , EPackage > getNamedEPackageMap ( ) { } }

Fix:
if ( ( ! overwrite ) && ( packages . containsKey ( pack . getNsURI ( ) ) ) ) {
Buggy code:
public class Traits extends BlockJUnit4ClassRunner { public Traits ( Class < ? > testClass ) throws InitializationError { } @ Override protected List < FrameworkMethod > computeTestMethods ( ) { } private void addTraitTestingMethods ( List < FrameworkMethod > testMethods ) { List < FrameworkMethod > traitTestSubjectCreationMethods = getTestClass ( ) . getAnnotatedMethods ( TestTraits . class ) ; for ( FrameworkMethod traitTestSubjectCreationMethod : traitTestSubjectCreationMethods ) try { Object testSubject = traitTestSubjectCreationMethod . invokeExplosively ( createTest ( ) ) ; for ( Class < ? extends Trait > traitClass : traitTestSubjectCreationMethod . getAnnotation ( TestTraits . class ) . value ( ) ) { <START_BUG> TraitFrameworkMethod traitFrameworkMethod = TraitFrameworkMethod . synthesize ( traitClass , testSubject ) ; <END_BUG> testMethods . remove ( traitFrameworkMethod ) ; testMethods . add ( traitFrameworkMethod ) ; } } catch ( Throwable t ) { t . printStackTrace ( ) ; throw new AssertionError ( "Couldn't<seq2seq4repair_space>create<seq2seq4repair_space>a<seq2seq4repair_space>test<seq2seq4repair_space>subject" ) ; } } }

Fix:
TraitFrameworkMethod traitFrameworkMethod = TraitFrameworkMethod . synthesize ( traitClass , traitTestSubjectCreationMethod , testSubject ) ;
Buggy code:
@ XmlRootElement ( name = "parameterspace" ) public class ParameterGraph { @ XmlIDREF public AndNode startNode ; public Set < Node > nodes ; public Set < Parameter > parameters ; public List < Edge > edges ; private Map < Node , List < Edge > > adjacent_edges ; private Set < Parameter > fixedParameters ; private ParameterGraph ( ) { } public ParameterGraph ( Set < Node > nodes , List < Edge > edges , Set < Parameter > parameters , AndNode startNode ) { } public void setFixedParameters ( Set < Parameter > parameters ) { } public Map < String , Parameter > getParameterMap ( ) { } public Set < Parameter > getParameterSet ( ) { } public void buildAdjacencyList ( ) { } private Set < Node > adjacentNodes ( Node node ) { } private Set < Node > preceedingNodes ( OrNode node ) { } private OrNode preceedingNode ( AndNode node ) { } private List < Edge > incomingEdges ( Node node ) { } private Set < OrNode > getOrNodes ( ) { } private Set < AndNode > getAndNodes ( ) { } private boolean incomingEdgesDone ( Node node , Set < AndNode > doneAndNodes ) { } private < T > T randomElement ( Set < T > set , Random rng ) { } private boolean valuesEqual ( Object v1 , Object v2 ) { if ( ( v1 instanceof Double ) || ( v1 instanceof Float ) ) { if ( ! ( v2 instanceof Number ) ) return false ; <START_BUG> double cur_val = ( ( Double ) ( v2 ) ) ; <END_BUG> double val = ( ( Double ) ( v1 ) ) ; if ( ( ( cur_val - 1.0E-8 ) < val ) && ( val < ( cur_val + 1.0E-8 ) ) ) return true ; } return v1 . equals ( v2 ) ; } private int colorDFS ( Node currentNode , int color , Map < Node , Integer > colors ) { } public ParameterConfiguration getRandomConfiguration ( Random rng ) { } public List < ParameterConfiguration > getConstrainedNeighbourhood ( ParameterConfiguration config ) { } public List < ParameterConfiguration > getNeighbourhood ( ParameterConfiguration config ) { } public List < ParameterConfiguration > getGaussianNeighbourhood ( ParameterConfiguration config , Random rng , float stdDevFactor , int numSamples , boolean gaussianOrdinal ) { } public ParameterConfiguration getRandomNeighbour ( ParameterConfiguration config , Random rng ) { } public ParameterConfiguration getGaussianRandomNeighbour ( ParameterConfiguration config , Random rng , float stdDevFactor , int numSamples , boolean gaussianOrdinal ) { } public void mutateParameterConfiguration ( Random rng , ParameterConfiguration config , float stdDevFactor , float mutationProb ) { } public void mutateParameterConfiguration ( Random rng , ParameterConfiguration config ) { } public Pair < ParameterConfiguration , ParameterConfiguration > crossover ( ParameterConfiguration config1 , ParameterConfiguration config2 , Random rng ) { } public Pair < ParameterConfiguration , ParameterConfiguration > crossover2Point ( ParameterConfiguration config1 , ParameterConfiguration config2 , Random rng ) { } public boolean validateParameterConfiguration ( ParameterConfiguration config ) { } }

Fix:
double cur_val = ( ( Number ) ( v2 ) ) . doubleValue ( ) ;
Buggy code:
public class XPathExtractorGui extends AbstractPostProcessorGui { private static final long serialVersionUID = 240L ; private final JLabeledTextField defaultField = new JLabeledTextField ( JMeterUtils . getResString ( "default_value_field" ) ) ; private final JLabeledTextField xpathQueryField = new JLabeledTextField ( JMeterUtils . getResString ( "xpath_extractor_query" ) ) ; private final JLabeledTextField refNameField = new JLabeledTextField ( JMeterUtils . getResString ( "ref_name_field" ) ) ; private final JCheckBox getFragment = new JCheckBox ( JMeterUtils . getResString ( "xpath_extractor_fragment" ) ) ; private final XMLConfPanel xml = new XMLConfPanel ( ) ; @ Override public String getLabelResource ( ) { } public XPathExtractorGui ( ) { } @ Override public void configure ( TestElement el ) { } @ Override public TestElement createTestElement ( ) { } @ Override public void modifyTestElement ( TestElement extractor ) { } @ Override public void clearGui ( ) { } private void init ( ) { setLayout ( new BorderLayout ( ) ) ; setBorder ( makeBorder ( ) ) ; Box box = Box . createVerticalBox ( ) ; box . add ( makeTitlePanel ( ) ) ; <START_BUG> box . add ( createScopePanel ( true ) ) ; <END_BUG> xml . setBorder ( BorderFactory . createTitledBorder ( BorderFactory . createEtchedBorder ( ) , JMeterUtils . getResString ( "xpath_assertion_option" ) ) ) ; box . add ( xml ) ; box . add ( getFragment ) ; box . add ( makeParameterPanel ( ) ) ; add ( box , BorderLayout . NORTH ) ; } private JPanel makeParameterPanel ( ) { } private void addField ( JPanel panel , JLabeledTextField field , GridBagConstraints gbc ) { } private void resetContraints ( GridBagConstraints gbc ) { } private void initConstraints ( GridBagConstraints gbc ) { } }

Fix:
box . add ( createScopePanel ( true , false , false ) ) ;
Buggy code:
public class ResourceBase { private static final String CLASS_FILE_NAME = "ResourceBase.class" ; public static String getLocation ( ) { URL directory = ResourceBase . class . getResource ( "." ) ; if ( directory != null ) return directory . getFile ( ) ; <START_BUG> return ResourceBase . class . getResource ( ResourceBase . CLASS_FILE_NAME ) . getFile ( ) . replace ( ResourceBase . CLASS_FILE_NAME , "" ) ; <END_BUG> } }

Fix:
return ResourceBase . class . getResource ( ResourceBase . CLASS_FILE_NAME ) . getFile ( ) . replace ( ( "//" + ( ResourceBase . CLASS_FILE_NAME ) ) , "" ) ;
Buggy code:
public class MutableObject < T > implements Serializable , Mutable < T > { private static final long serialVersionUID = 86241875189L ; private T value ; public MutableObject ( ) { } public MutableObject ( final T value ) { } @ Override public T getValue ( ) { } @ Override public void setValue ( final T value ) { } @ Override public boolean equals ( final Object obj ) { if ( obj == null ) { return false ; } if ( ( this ) == obj ) { return true ; } if ( ( this . getClass ( ) ) == ( obj . getClass ( ) ) ) { <START_BUG> MutableObject < ? > that = ( ( MutableObject < ? > ) ( obj ) ) ; <END_BUG> return this . value . equals ( that . value ) ; } else { return false ; } } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } }

Fix:
final MutableObject < ? > that = ( ( MutableObject < ? > ) ( obj ) ) ;
Buggy code:
public class InaccessibleBaseClassTest { @ Test ( expected = InitializationError . class ) public void inaccessibleBaseClassIsCaughtAtValidation ( ) throws InitializationError { MethodValidator methodValidator = new MethodValidator ( Sub . class ) ; <START_BUG> methodValidator . validateAllMethods ( ) ; <END_BUG> methodValidator . assertValid ( ) ; } }

Fix:
methodValidator . validateMethodsForDefaultRunner ( ) ;
Buggy code:
public class Java15ReflectionBasedReferenceTypeDelegate extends ReflectionBasedReferenceTypeDelegate { private AjType < ? > myType ; private ResolvedType [ ] annotations ; private ResolvedMember [ ] pointcuts ; private ResolvedMember [ ] methods ; private ResolvedMember [ ] fields ; private TypeVariable [ ] typeVariables ; private ResolvedType superclass ; private ResolvedType [ ] superInterfaces ; private String genericSignature = null ; private JavaLangTypeToResolvedTypeConverter typeConverter ; private Java15AnnotationFinder annotationFinder = null ; private ArgNameFinder argNameFinder = null ; public Java15ReflectionBasedReferenceTypeDelegate ( ) { } @ Override public void initialize ( ReferenceType aType , Class aClass , ClassLoader classLoader , World aWorld ) { super . initialize ( aType , aClass , classLoader , aWorld ) ; myType = AjTypeSystem . getAjType ( aClass ) ; annotationFinder = new Java15AnnotationFinder ( ) ; argNameFinder = annotationFinder ; <START_BUG> annotationFinder . setClassLoader ( classLoader ) ; <END_BUG> this . typeConverter = new JavaLangTypeToResolvedTypeConverter ( aWorld ) ; } public ReferenceType buildGenericType ( ) { } public AnnotationX [ ] getAnnotations ( ) { } public ResolvedType [ ] getAnnotationTypes ( ) { } public boolean hasAnnotation ( UnresolvedType ofType ) { } public ResolvedMember [ ] getDeclaredFields ( ) { } public String getDeclaredGenericSignature ( ) { } public ResolvedType [ ] getDeclaredInterfaces ( ) { } public ResolvedType getSuperclass ( ) { } public TypeVariable [ ] getTypeVariables ( ) { } public ResolvedMember [ ] getDeclaredMethods ( ) { } public ResolvedType getGenericResolvedType ( ) { } private ResolvedMember createGenericMethodMember ( Method forMethod ) { } private ResolvedMember createGenericConstructorMember ( Constructor forConstructor ) { } private ResolvedMember createGenericFieldMember ( Field forField ) { } public ResolvedMember [ ] getDeclaredPointcuts ( ) { } private String [ ] tryToDiscoverParameterNames ( Pointcut pcut ) { } public boolean isAnnotation ( ) { } public boolean isAnnotationStyleAspect ( ) { } public boolean isAnnotationWithRuntimeRetention ( ) { } public boolean isAspect ( ) { } public boolean isEnum ( ) { } public boolean isGeneric ( ) { } @ Override public boolean isAnonymous ( ) { } }

Fix:
annotationFinder . setClassLoader ( this . classLoader ) ;
Buggy code:
public class Time { public static Logger LOG = Logger . getLogger ( Time . class ) ; private static AtomicBoolean simulating = new AtomicBoolean ( false ) ; private static Map < Thread , AtomicLong > threadSleepTimes ; private static final Object sleepTimesLock = new Object ( ) ; private static AtomicLong simulatedCurrTimeMs ; public static void startSimulating ( ) { } public static void stopSimulating ( ) { } public static boolean isSimulating ( ) { } public static void sleepUntil ( long targetTimeMs ) throws InterruptedException { } public static void sleep ( long ms ) throws InterruptedException { } public static long currentTimeMillis ( ) { } public static void advanceTime ( long ms ) { } public static boolean isThreadWaiting ( Thread t ) { if ( ! ( Time . simulating . get ( ) ) ) throw new IllegalStateException ( "Must<seq2seq4repair_space>be<seq2seq4repair_space>in<seq2seq4repair_space>simulation<seq2seq4repair_space>mode" ) ; AtomicLong time ; synchronized ( Time . sleepTimesLock ) { time = Time . threadSleepTimes . get ( t ) ; } <START_BUG> return ( time != null ) && ( ( Time . currentTimeMillis ( ) ) < ( time . longValue ( ) ) ) ; <END_BUG> } }

Fix:
return ( ! ( t . isAlive ( ) ) ) || ( ( time != null ) && ( ( Time . currentTimeMillis ( ) ) < ( time . longValue ( ) ) ) ) ;
Buggy code:
final class JFaceUtil { private JFaceUtil ( ) { } public static void initializeJFace ( ) { SafeRunnable . setRunner ( new ISafeRunnableRunner ( ) { public void run ( ISafeRunnable code ) { Platform . run ( code ) ; } } ) ; Policy . setLog ( new ILogger ( ) { public void log ( IStatus status ) { if ( ( ( status . getSeverity ( ) ) == ( IStatus . WARNING ) ) || ( ( status . getSeverity ( ) ) == ( IStatus . ERROR ) ) ) { StatusManager . getManager ( ) . handle ( status ) ; } else { WorkbenchPlugin . log ( status ) ; } } } ) ; Policy . setStatusHandler ( new StatusHandler ( ) { public void show ( IStatus status , String title ) { StatusAdapter statusAdapter = new StatusAdapter ( status ) ; statusAdapter . setProperty ( TITLE_PROPERTY , title ) ; <START_BUG> StatusManager . getManager ( ) . handle ( statusAdapter , BLOCK ) ; <END_BUG> } } ) ; if ( "true" . equalsIgnoreCase ( Platform . getDebugOption ( "//debug" ) ) ) { Policy . DEBUG_DIALOG_NO_PARENT = "true" . equalsIgnoreCase ( Platform . getDebugOption ( ( ( Policy . JFACE ) + "//debug//dialog//noparent" ) ) ) ; Policy . TRACE_ACTIONS = "true" . equalsIgnoreCase ( Platform . getDebugOption ( ( ( Policy . JFACE ) + "//trace//actions" ) ) ) ; Policy . TRACE_TOOLBAR = "true" . equalsIgnoreCase ( Platform . getDebugOption ( ( ( Policy . JFACE ) + "//trace//toolbarDisposal" ) ) ) ; InternalPolicy . DEBUG_LOG_REENTRANT_VIEWER_CALLS = "true" . equalsIgnoreCase ( Platform . getDebugOption ( ( ( Policy . JFACE ) + "//debug//viewers//reentrantViewerCalls" ) ) ) ; } } public static void initializeJFacePreferences ( ) { } }

Fix:
StatusManager . getManager ( ) . handle ( statusAdapter , SHOW ) ;
Buggy code:
public class PageWithCustomLoading extends WicketExamplePage implements IMarkupCacheKeyProvider , IMarkupResourceStreamProvider { public PageWithCustomLoading ( ) { } public IResourceStream getMarkupResourceStream ( final MarkupContainer container , final Class containerClass ) { } <START_BUG> public CharSequence getCacheKey ( MarkupContainer container , Class containerClass ) { <END_BUG> return null ; } }

Fix:
public String getCacheKey ( MarkupContainer container , Class containerClass ) {
Buggy code:
public class CountStatistics_java extends CountStatistics { public boolean seekingClassname = false ; public boolean seekingTypename = false ; public boolean seekingObjname = false ; public List < String > classList ; public boolean isobjdecl ; public Set < String > javaVarType ; public String typename ; public Map < String , String > classobj ; public List < String > callerList ; public boolean inname ; public boolean seekingCallername ; public boolean hasCaller ; public int numLocalCall ; public CountStatistics_java ( Boolean saveop ) { } @ Override public void startUnit ( String fileName ) { } public void startClass ( ) { } public void startConstructor ( ) { } public void startTry ( ) { } public void startCatch ( ) { } public void startThrow ( ) { } public void startType ( ) { intype = true ; <START_BUG> if ( indeclstmt ) { <END_BUG> seekingTypename = true ; } } public void startName ( ) { } public void seekCallername ( ) { } public void endName ( ) { } public void addClassname ( ) { } public void addObjname ( ) { } public List < String > getClassList ( ) { } public List < String > getCallerList ( ) { } public void endType ( ) { } public int getNumLocalCall ( ) { } No newline ; at end ; of file ; }

Fix:
if ( indecl ) {
Buggy code:
public class Dump extends Configured implements Tool { public static void main ( String [ ] args ) throws Exception { } public int run ( String [ ] args ) throws Exception { String usage = "Usage:<seq2seq4repair_space>Dump<seq2seq4repair_space><mapfile|sequencefile>" ; if ( ( args . length ) != 1 ) { System . err . println ( usage ) ; return 1 ; } String in = args [ 0 ] ; Configuration conf = new Configuration ( ) ; <START_BUG> FileSystem fs = FileSystem . getLocal ( conf ) ; <END_BUG> MapFile . Reader mapReader = null ; SequenceFile . Reader seqReader = null ; try { mapReader = new MapFile . Reader ( fs , in , conf ) ; } catch ( IOException ioe ) { } if ( mapReader != null ) { WritableComparable key = ( ( WritableComparable ) ( ReflectionUtils . newInstance ( mapReader . getKeyClass ( ) , conf ) ) ) ; Writable value = ( ( Writable ) ( ReflectionUtils . newInstance ( mapReader . getValueClass ( ) , conf ) ) ) ; while ( mapReader . next ( key , value ) ) { System . out . println ( ( ( ( ( "[" + key ) + "]<seq2seq4repair_space>[" ) + value ) + "]" ) ) ; } } else { try { seqReader = new SequenceFile . Reader ( fs , new Path ( in ) , conf ) ; } catch ( IOException ioe ) { throw new IOException ( ( "Cannot<seq2seq4repair_space>open<seq2seq4repair_space>file:<seq2seq4repair_space>" + in ) ) ; } WritableComparable key = ( ( WritableComparable ) ( ReflectionUtils . newInstance ( seqReader . getKeyClass ( ) , conf ) ) ) ; Writable value = ( ( Writable ) ( ReflectionUtils . newInstance ( seqReader . getValueClass ( ) , conf ) ) ) ; while ( seqReader . next ( key , value ) ) { System . out . println ( ( ( ( ( "[" + key ) + "]<seq2seq4repair_space>[" ) + value ) + "]" ) ) ; } } return 0 ; } }

Fix:
FileSystem fs = FileSystem . get ( conf ) ;