nus-yam/ex-repair huggingface dataset:
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class DeploymentScannerTestCase extends AbstractCliTestBase { private static final String tempDir = System . getProperty ( "java.io.tmpdir" ) ; private static WebArchive war ; private static File warFile ; private static File deployDir ; @ ArquillianResource URL url ; @ Deployment public static Archive < ? > getDeployment ( ) { } @ BeforeClass public static void before ( ) throws Exception { } @ AfterClass public static void after ( ) throws Exception { } @ Test public void testAddRemoveDeploymentScanner ( ) throws Exception { } private void addDeploymentScanner ( ) throws Exception { } private void removeDeploymentScanner ( ) throws Exception { cli . sendLine ( "//subsystem=deployment-scanner//scanner=testScanner:remove()" , false ) ; <START_BUG> CLIOpResult result = cli . readAllAsOpResult ( WAIT_TIMEOUT ) ; <END_BUG> assertTrue ( result . isIsOutcomeSuccess ( ) ) ; assertTrue ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>delete<seq2seq4repair_space>deployed<seq2seq4repair_space>file." , DeploymentScannerTestCase . warFile . delete ( ) ) ; Thread . sleep ( 2000 ) ; String response = HttpRequest . get ( ( ( getBaseURL ( url ) ) + "SimpleServlet//SimpleServlet" ) , 10 , TimeUnit . SECONDS ) ; assertTrue ( ( "Invalid<seq2seq4repair_space>response:<seq2seq4repair_space>" + response ) , ( ( response . indexOf ( "SimpleServlet" ) ) >= 0 ) ) ; cli . sendLine ( "undeploy<seq2seq4repair_space>SimpleServlet.war" , true ) ; String line = cli . readLine ( 1000 ) ; assertTrue ( ( "Undeployment<seq2seq4repair_space>failed:" + line ) , ( ( line . indexOf ( "Successfully<seq2seq4repair_space>undeployed" ) ) >= 0 ) ) ; } }

Fix:
CLIOpResult result = cli . readAllAsOpResult ( WAIT_TIMEOUT , WAIT_LINETIMEOUT ) ;
Buggy code:
public class Snippet76 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; final Shell shell = new Shell ( display ) ; final TabFolder tabFolder = new TabFolder ( shell , SWT . BORDER ) ; for ( int i = 0 ; i < 6 ; i ++ ) { TabItem item = new TabItem ( tabFolder , SWT . NONE ) ; item . setText ( ( "TabItem<seq2seq4repair_space>" + i ) ) ; Button button = new Button ( tabFolder , SWT . PUSH ) ; button . setText ( ( "Page<seq2seq4repair_space>" + i ) ) ; item . setControl ( button ) ; } <START_BUG> tabFolder . setSize ( 400 , 200 ) ; <END_BUG> shell . pack ( ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
tabFolder . pack ( ) ;
Buggy code:
public class AttachmentView extends IconPanel { private AttachmentModel model ; public AttachmentView ( AttachmentModel model ) { } public AttachmentModel getModel ( ) { } public StreamableMimePart getSelectedMimePart ( ) { } public boolean setMimePartTree ( MimeTree collection ) { String contentType ; String contentSubtype ; <START_BUG> String text = new String ( ) ; <END_BUG> boolean output = false ; removeAll ( ) ; model . setCollection ( collection ) ; List displayedMimeParts = model . getDisplayedMimeParts ( ) ; for ( int i = 0 ; i < ( displayedMimeParts . size ( ) ) ; i ++ ) { StreamableMimePart mp = ( ( StreamableMimePart ) ( displayedMimeParts . get ( i ) ) ) ; contentType = mp . getHeader ( ) . getMimeType ( ) . getType ( ) ; contentSubtype = mp . getHeader ( ) . getMimeType ( ) . getSubtype ( ) ; if ( ( mp . getHeader ( ) . getFileName ( ) ) != null ) { text = mp . getHeader ( ) . getFileName ( ) ; } else { text = ( contentType + "//" ) + contentSubtype ; } ImageIcon icon = null ; icon = AttachmentImageIconLoader . getImageIcon ( mp . getHeader ( ) . getMimeType ( ) . getType ( ) , mp . getHeader ( ) . getMimeType ( ) . getSubtype ( ) ) ; add ( icon , text ) ; output = true ; } Dimension d = getSize ( ) ; return output ; } }

Fix:
String text = "" ;
Buggy code:
public abstract class AbstractPhone implements Phone { protected abstract RAN [ ] getRANs ( ) { } public RAN getRAN ( ) { RAN [ ] rans = getRANs ( ) ; int i = 0 ; for ( ; i < ( rans . length ) ; i ++ ) { if ( ( rans [ i ] . getThroughput ( ) ) > 0 ) { break ; } } <START_BUG> return rans [ i ] ; <END_BUG> } }

Fix:
return rans [ Math . min ( i , ( ( rans . length ) - 1 ) ) ] ;
Buggy code:
final class R_OSGiRemoteServiceContainer implements IContainer , IRemoteServiceContainerAdapter , RemoteServiceListener { private BundleContext context ; private RemoteOSGiService remoteService ; private ChannelEndpointManager endpointMgr ; private final List containerListeners = new ArrayList ( 0 ) ; R_OSGiID containerID ; private R_OSGiID connectedID ; private ServiceTracker remoteServicesTracker ; private Map remoteServicesRegs = new HashMap ( 0 ) ; private Map remoteServiceListeners = new HashMap ( 0 ) ; public R_OSGiRemoteServiceContainer ( ) throws IDCreateException { } public R_OSGiRemoteServiceContainer ( final ID containerID ) throws IDCreateException { } private void startRegTracker ( ) { } public void addRemoteServiceListener ( final IRemoteServiceListener listener ) { } public IRemoteService getRemoteService ( final IRemoteServiceReference reference ) { } public IRemoteServiceReference [ ] getRemoteServiceReferences ( final ID [ ] idFilter , final String clazz , final String filter ) throws InvalidSyntaxException { } public IRemoteServiceRegistration registerRemoteService ( final String [ ] clazzes , final Object service , final Dictionary properties ) { } public void removeRemoteServiceListener ( final IRemoteServiceListener listener ) { } public boolean ungetRemoteService ( IRemoteServiceReference reference ) { } public Object getAdapter ( final Class adapter ) { } public void addListener ( final IContainerListener listener ) { } public void connect ( final ID targetID , final IConnectContext connectContext ) throws ContainerConnectException { } public void disconnect ( ) { } public void dispose ( ) { } public Namespace getConnectNamespace ( ) { } public ID getConnectedID ( ) { } public void removeListener ( final IContainerListener listener ) { } public ID getID ( ) { } private void fireListeners ( final IContainerEvent event ) { } public void remoteServiceEvent ( final RemoteServiceEvent event ) { } private void checkImport ( final RemoteServiceReference ref ) { } private Hashtable clone ( final Dictionary props ) { } public IFuture asyncGetRemoteServiceReferences ( final ID [ ] idFilter , final String clazz , final String filter ) { <START_BUG> IExecutor executor = new ThreadExecutor ( ) ; <END_BUG> return executor . execute ( new IProgressRunnable ( ) { public Object run ( IProgressMonitor monitor ) throws Throwable { return getRemoteServiceReferences ( idFilter , clazz , filter ) ; } } , null ) ; } public Namespace getRemoteServiceNamespace ( ) { } public IRemoteFilter createRemoteFilter ( String filter ) throws InvalidSyntaxException { } }

Fix:
IExecutor executor = new ThreadsExecutor ( ) ;
Buggy code:
public class ExportXmlLog implements IProcessDataExport { private static final Logger logger = Logger . getLogger ( ExportXmlLog . class ) ; public void startExport ( Prozess p , String destination ) throws FileNotFoundException , IOException { } public void startExport ( Prozess p , File dest ) throws FileNotFoundException , IOException { } @ Override public void startExport ( Prozess process , OutputStream os , String xslt ) throws IOException { } public Document createDocument ( Prozess process , boolean addNamespace ) { } @ SuppressWarnings ( "unchecked" ) public List < Element > getMetsValues ( String expr , Object element , HashMap < String , Namespace > namespaces ) throws JaxenException { } public void XmlTransformation ( OutputStream out , Document doc , String filename ) throws IOException , XSLTransformException { <START_BUG> Document docTrans = new Document ( ) ; <END_BUG> if ( ( filename != null ) && ( filename . equals ( "" ) ) ) { XSLTransformer transformer ; transformer = new XSLTransformer ( filename ) ; docTrans = transformer . transform ( doc ) ; } else { docTrans = doc ; } Format format = Format . getPrettyFormat ( ) ; format . setEncoding ( "utf-8" ) ; XMLOutputter xmlOut = new XMLOutputter ( format ) ; xmlOut . output ( docTrans , out ) ; } public void startTransformation ( OutputStream out , Prozess p , String filename ) throws IOException , ConfigurationException , XSLTransformException { } public void startTransformation ( Prozess p , OutputStream out , String filename ) throws IOException , ConfigurationException , XSLTransformException { } private String replacer ( String in ) { } public void startExport ( Iterable < Prozess > processList , OutputStream outputStream , String xslt ) { } private HashMap < String , String > getMetsFieldsFromConfig ( boolean useAnchor ) { } private HashMap < String , String > getNamespacesFromConfig ( ) { } }

Fix:
Document docTrans ;
Buggy code:
public class AggregateBean extends AggregateMetaData implements BeanMetaData { private AggregateContainer container ; private AggregateMethod [ ] methods ; private AggregateMethod [ ] homeMethods ; private AggregateField [ ] fields ; private String name ; public AggregateBean ( String name ) { } public AggregateBean ( String name , BeanMetaData [ ] plugins ) { } public void addPlugin ( BeanMetaData plugin ) { } private static MethodMetaData getMethod ( Set source , String name , Class [ ] args ) { } private static FieldMetaData getField ( Set source , String name ) { } private static AggregateMethod [ ] mergeMethods ( Set incoming , AggregateMethod [ ] existing , MetaDataPlugin manager ) { } private static AggregateField [ ] mergeFields ( Set incoming , AggregateField [ ] existing , MetaDataPlugin manager ) { } public MethodMetaData getMethod ( String name , Class [ ] args ) { } public MethodMetaData getHomeMethod ( String name , Class [ ] args ) { for ( int i = 0 ; i < ( homeMethods . length ) ; i ++ ) if ( ( homeMethods [ i ] . getName ( ) . equals ( name ) ) && ( AggregateBean . paramsMatch ( homeMethods [ i ] . getParameterTypes ( ) , args ) ) ) <START_BUG> return methods [ i ] ; <END_BUG> throw new IllegalArgumentException ( "Method<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ; } public FieldMetaData getField ( String name ) { } public Set getMethods ( ) { } public Set getHomeMethods ( ) { } public Set getFields ( ) { } public String getName ( ) { } public ContainerMetaData getContainer ( ) { } private static boolean paramsMatch ( Class [ ] one , Class [ ] two ) { } }

Fix:
return homeMethods [ i ] ;
Buggy code:
public class HomeActivity extends BaseActivity implements NavigationDrawerFragment . NavigationDrawerCallbacks , SectionFragment . SectionFragmentParent { private NavigationDrawerFragment mNavigationDrawerFragment ; private CharSequence mTitle ; private SearchView mSearchView ; private String searchViewHint ; private FilterableFragment currentFragment ; private MenuItem mSearchItem ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void verifyLogin ( ) { } @ Override public void initModel ( ) { } public void initToolbar ( ) { } public void startRecordAppointmentActivity ( String appointmentId ) { } public void startRecordActivity ( int position ) { Intent intent = new Intent ( this , RecordActivity . class ) ; intent . putExtra ( APPOINTMENT_ID_EXTRA , "0" ) ; <START_BUG> intent . putExtra ( APPOINTMENT_RECORD_CATEGORY_ID , "Severity" ) ; <END_BUG> startActivity ( intent ) ; } public void startAddAppointmentActivity ( String appointmentId ) { } private void initDrawer ( ) { } @ Override public void onNavigationDrawerItemSelected ( int position ) { } private void replaceSearchHint ( int position ) { } private FilterableFragment createSectionFragment ( int position ) { } @ Override public void onSectionFragmentAttached ( int sectionNumber , String title ) { } public void restoreActionBar ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } public void closeSearchView ( ) { } private void updateSearch ( Menu menu ) { } public void setSearchViewHint ( String searchViewHint ) { } }

Fix:
intent . putExtra ( APPOINTMENT_RECORD_CATEGORY_ID , "2" ) ;
Buggy code:
public class NSEvent extends NSObject { public NSEvent ( ) { } public NSEvent ( int id ) { } public int CGEvent ( ) { } public int absoluteX ( ) { } public int absoluteY ( ) { } public int absoluteZ ( ) { } public int buttonMask ( ) { } public int buttonNumber ( ) { } public int capabilityMask ( ) { } public NSString characters ( ) { } public NSString charactersIgnoringModifiers ( ) { } public int clickCount ( ) { } public NSGraphicsContext context ( ) { } public int data1 ( ) { } public int data2 ( ) { } public float deltaX ( ) { } public float deltaY ( ) { } public float deltaZ ( ) { } public int deviceID ( ) { } public static NSEvent enterExitEventWithType ( int type , NSPoint location , int flags , double time , int wNum , NSGraphicsContext context , int eNum , int tNum , int data ) { } public int eventNumber ( ) { } public int eventRef ( ) { } public static NSEvent eventWithCGEvent ( int cgEvent ) { } public static NSEvent eventWithEventRef ( int eventRef ) { } public boolean isARepeat ( ) { } public boolean isEnteringProximity ( ) { } public static boolean isMouseCoalescingEnabled ( ) { } public short keyCode ( ) { } public static NSEvent keyEventWithType ( int type , NSPoint location , int flags , double time , int wNum , NSGraphicsContext context , NSString keys , NSString ukeys , boolean flag , short code ) { } public NSPoint locationInWindow ( ) { } public int modifierFlags ( ) { } public static NSEvent mouseEventWithType ( int type , NSPoint location , int flags , double time , int wNum , NSGraphicsContext context , int eNum , int cNum , float pressure ) { } public static NSPoint mouseLocation ( ) { NSPoint result = new NSPoint ( ) ; <START_BUG> OS . objc_msgSend_stret ( result , class_NSEvent , sel_mouseLocation ) ; <END_BUG> return result ; } public static NSEvent otherEventWithType ( int type , NSPoint location , int flags , double time , int wNum , NSGraphicsContext context , short subtype , int d1 , int d2 ) { } public int pointingDeviceID ( ) { } public int pointingDeviceSerialNumber ( ) { } public int pointingDeviceType ( ) { } public float pressure ( ) { } public float rotation ( ) { } public static void setMouseCoalescingEnabled ( boolean flag ) { } public static void startPeriodicEventsAfterDelay ( double delay , double period ) { } public static void stopPeriodicEvents ( ) { } public short subtype ( ) { } public int systemTabletID ( ) { } public int tabletID ( ) { } public float tangentialPressure ( ) { } public NSPoint tilt ( ) { } public double timestamp ( ) { } public NSTrackingArea trackingArea ( ) { } public int trackingNumber ( ) { } public int type ( ) { } public long uniqueID ( ) { } public int userData ( ) { } public id vendorDefined ( ) { } public int vendorID ( ) { } public int vendorPointingDeviceType ( ) { } public NSWindow window ( ) { } public int windowNumber ( ) { } }

Fix:
OS . objc_msgSend_struct ( result , class_NSEvent , sel_mouseLocation ) ;
Buggy code:
public class PreferencesDialog extends JDialog { private static final long serialVersionUID = 5636063419915325085L ; private static final ResourceBundle L10N = ResourceBundle . getBundle ( "colorfill-ui" ) ; private final PreferencesController controller ; private final MainWindow mainWindow ; private final JSpinner jspinWidth = new JSpinner ( ) ; private final JSpinner jspinHeight = new JSpinner ( ) ; private final JComboBox jcomboStartPos = new JComboBox ( ) ; private final JButton buttonOk = new JButton ( ) ; private final JButton buttonCancel = new JButton ( ) ; private final JRadioButton [ ] rbuttonsColors ; protected PreferencesDialog ( final PreferencesController controller , final MainWindow mainWindow ) { } private JSpinner makeJspinWidth ( ) { } private JSpinner makeJspinHeight ( ) { } private JComboBox makeJcomboStartPos ( ) { } private void makeColorButtons ( final DesignGridLayout layout , final Color [ ] [ ] allUiColors ) { } private JButton makeButtonOk ( ) { } private JButton makeButtonCancel ( ) { } protected void showDialog ( ) { } private void showDialogInternal ( ) { this . rbuttonsColors [ this . controller . getUiColorsNumber ( ) ] . setSelected ( true ) ; this . jspinWidth . setValue ( Integer . valueOf ( this . controller . getWidth ( ) ) ) ; this . jspinHeight . setValue ( Integer . valueOf ( this . controller . getHeight ( ) ) ) ; <START_BUG> this . jcomboStartPos . setSelectedItem ( this . controller . getStartPos ( ) ) ; <END_BUG> this . pack ( ) ; this . setLocationRelativeTo ( this . mainWindow ) ; this . setVisible ( true ) ; } private static class StartPosItem { private final StartPositionEnum spe ; private final String l10nString ; private StartPosItem ( StartPositionEnum spe ) { } @ Override public String toString ( ) { } } }

Fix:
this . jcomboStartPos . setSelectedIndex ( this . controller . getStartPos ( ) . ordinal ( ) ) ;
Buggy code:
public interface ServerStartupTransactionalProxyController extends TransactionalProxyController { String getName ( ) { } <START_BUG> void startServers ( DomainController domainController ) ; <END_BUG> void stopServers ( ) { } }

Fix:
void startServers ( DomainControllerSlave domainController ) ;
Buggy code:
@ FacesValidator ( "linkValidator" ) public class LinkValidator implements Validator { @ Override public void validate ( FacesContext context , UIComponent component , Object value ) throws ValidatorException { UIInput taglineInput = ( ( UIInput ) ( component . getAttributes ( ) . get ( "taglineInput" ) ) ) ; UIInput linkUrlInput = ( ( UIInput ) ( component . getAttributes ( ) . get ( "linkUrlInput" ) ) ) ; String taglineStr = ( ( String ) ( taglineInput . getSubmittedValue ( ) ) ) ; String urlStr = ( ( String ) ( linkUrlInput . getSubmittedValue ( ) ) ) ; FacesMessage msg = null ; if ( ( taglineStr . isEmpty ( ) ) && ( ! ( urlStr . isEmpty ( ) ) ) ) { <START_BUG> msg = new FacesMessage ( "tagline<seq2seq4repair_space>is<seq2seq4repair_space>required<seq2seq4repair_space>for<seq2seq4repair_space>Link<seq2seq4repair_space>Url." ) ; <END_BUG> msg . setSeverity ( SEVERITY_ERROR ) ; FacesContext . getCurrentInstance ( ) . addMessage ( taglineInput . getClientId ( ) , msg ) ; } if ( msg != null ) { throw new ValidatorException ( msg ) ; } } }

Fix:
msg = new FacesMessage ( "Tagline<seq2seq4repair_space>is<seq2seq4repair_space>required<seq2seq4repair_space>for<seq2seq4repair_space>Website." ) ;
Buggy code:
public class LocalRootFolder extends AbstractFolder implements RootFolder { public LocalRootFolder ( FolderItem item , String path ) { } public AbstractFolder getTrashFolder ( ) { } public AbstractFolder getInboxFolder ( ) { } <START_BUG> public boolean supportsAddFolder ( IFolder newFolder ) { <END_BUG> return true ; } }

Fix:
public boolean supportsAddFolder ( IMailFolder newFolder ) {
Buggy code:
public class ClassCodePiece extends NamedCodePiece { private CodePiece classDef ; private String name ; public ClassCodePiece ( CodePiece classDef , String name ) { } public StringBuffer getText ( ) { } public int getStartPosition ( ) { } public int getEndPosition ( ) { } public int getStartLine ( ) { } public int getEndLine ( ) { } public void write ( Writer writer , Stack parseStateStack , int column ) throws Exception { ParseState parseState = ( ( ParseState ) ( parseStateStack . peek ( ) ) ) ; MClass mClass = ( ( MClass ) ( parseState . newClassifier ( name ) ) ) ; if ( mClass == null ) { <START_BUG> mClass = UmlFactory . getFactory ( ) . getCore ( ) . createClass ( ) ; <END_BUG> writer . write ( "REMOVED<seq2seq4repair_space>" ) ; } parseStateStack . push ( new ParseState ( mClass ) ) ; StringBuffer sbText = GeneratorJava . getInstance ( ) . generateClassifierStart ( mClass ) ; if ( sbText != null ) { writer . write ( sbText . toString ( ) ) ; } } }

Fix:
mClass = UmlFactory . getFactory ( ) . getCore ( ) . buildClass ( ) ;
Buggy code:
public class CCUnCheckout extends ClearCase { private boolean m_Keep = false ; public void execute ( ) throws BuildException { Commandline commandLine = new Commandline ( ) ; Project aProj = getProject ( ) ; int result = 0 ; if ( ( getViewPath ( ) ) == null ) { setViewPath ( aProj . getBaseDir ( ) . getPath ( ) ) ; } commandLine . setExecutable ( getClearToolCommand ( ) ) ; commandLine . createArgument ( ) . setValue ( COMMAND_UNCHECKOUT ) ; checkOptions ( commandLine ) ; result = run ( commandLine ) ; if ( result != 0 ) { String msg = "Failed<seq2seq4repair_space>executing:<seq2seq4repair_space>" + ( commandLine . toString ( ) ) ; <START_BUG> throw new BuildException ( msg , location ) ; <END_BUG> } } private void checkOptions ( Commandline cmd ) { } public void setKeepCopy ( boolean keep ) { } public boolean getKeepCopy ( ) { } public static final String FLAG_KEEPCOPY = "-keep" ; public static final String FLAG_RM = "-rm" ; }

Fix:
throw new BuildException ( msg , getLocation ( ) ) ;
Buggy code:
public class LoginPage extends JFrame { UserDAO userDAO = new UserDAO ( ) ; TrackerDAO trackerDAO = new TrackerDAO ( ) ; public LoginPage ( ) { } @ SuppressWarnings ( "unchecked" ) private void initComponents ( ) { } private void btLoginActionPerformed ( ActionEvent evt ) { char [ ] pass = tbPasswordField . getPassword ( ) ; String password = new String ( pass ) ; if ( userDAO . UserLogin ( tbUsername . getText ( ) , password ) ) { String username = userDAO . getUsername ( ) ; System . out . println ( username ) ; int ID = userDAO . getID ( ) ; System . out . println ( ID ) ; System . out . println ( ) ; System . out . println ( ) ; trackerDAO . UpdateTotalHours ( ID ) ; <START_BUG> TrackerPage tp = new TrackerPage ( userDAO . getUsername ( ) , userDAO . getID ( ) , userDAO . getHours ( ) , userDAO . getMinutes ( ) ) ; <END_BUG> setVisible ( false ) ; dispose ( ) ; } else { lbErrorMsg . setText ( "Check<seq2seq4repair_space>your<seq2seq4repair_space>credentials." ) ; tbPasswordField . requestFocus ( ) ; tbPasswordField . setText ( "" ) ; } } private void tbUsernameActionPerformed ( ActionEvent evt ) { } public static void main ( String [ ] args ) { } private JButton btLogin ; private JLabel lbCopyright ; private JLabel lbErrorMsg ; private JLabel lbLogin ; private JLabel lbPassword ; private JLabel lbProgramVersion ; private JLabel lbUsername ; private JPasswordField tbPasswordField ; private JTextField tbUsername ; }

Fix:
TrackerPage tp = new TrackerPage ( userDAO . getUsername ( ) , userDAO . getID ( ) ) ;
Buggy code:
public class OutputFormatterTest { @ Test public void testSkipHidden ( ) { OutputFormatter formatter = new OutputFormatter ( ) ; Document doc = Jsoup . parse ( "<div><div<seq2seq4repair_space>style=\"display:none\">xy<//div>test<//div>" ) ; StringBuilder sb = new StringBuilder ( ) ; <START_BUG> formatter . appendTextSkipHidden ( doc , sb ) ; <END_BUG> assertEquals ( "test" , sb . toString ( ) ) ; } }

Fix:
formatter . appendTextSkipHidden ( doc , sb , 0 ) ;
Buggy code:
public class ContentNegotiationManagerFactoryBeanTests { private ContentNegotiationManagerFactoryBean factoryBean ; private NativeWebRequest webRequest ; private MockHttpServletRequest servletRequest ; @ Before public void setup ( ) { } @ Test public void defaultSettings ( ) throws Exception { } @ Test public void addMediaTypes ( ) throws Exception { } @ Test ( expected = HttpMediaTypeNotAcceptableException . class ) public void favorPathExtensionWithUnknownMediaType ( ) throws Exception { } @ Test public void favorParameter ( ) throws Exception { } @ Test ( expected = HttpMediaTypeNotAcceptableException . class ) public void favorParameterWithUnknownMediaType ( ) throws HttpMediaTypeNotAcceptableException { } @ Test public void ignoreAcceptHeader ( ) throws Exception { } @ Test public void setDefaultContentType ( ) throws Exception { } @ Test public void setDefaultContentTypeWithStrategy ( ) throws Exception { <START_BUG> this . factoryBean . setDefaultContentType ( new FixedContentNegotiationStrategy ( MediaType . APPLICATION_JSON ) ) ; <END_BUG> this . factoryBean . afterPropertiesSet ( ) ; ContentNegotiationManager manager = this . factoryBean . getObject ( ) ; assertEquals ( Arrays . asList ( APPLICATION_JSON ) , manager . resolveMediaTypes ( this . webRequest ) ) ; this . servletRequest . addHeader ( "Accept" , ALL_VALUE ) ; assertEquals ( Arrays . asList ( APPLICATION_JSON ) , manager . resolveMediaTypes ( this . webRequest ) ) ; } }

Fix:
this . factoryBean . setDefaultContentTypeStrategy ( new FixedContentNegotiationStrategy ( MediaType . APPLICATION_JSON ) ) ;
Buggy code:
public class DatabaseStatistics extends AbstractCmdlineTool { public static void main ( String [ ] argv ) throws IOException , SAXException { } public void run ( String [ ] argv ) throws IOException , SAXException { <START_BUG> argv = init ( argv , 1 , 1 ) ; <END_BUG> if ( ! ( ( database ) instanceof AbstractBlockingDatabase ) ) { System . out . println ( "ERR:<seq2seq4repair_space>Only<seq2seq4repair_space>blocking<seq2seq4repair_space>databases<seq2seq4repair_space>are<seq2seq4repair_space>supported." ) ; System . exit ( 2 ) ; } AbstractBlockingDatabase db = ( ( AbstractBlockingDatabase ) ( database ) ) ; for ( KeyFunction func : db . getKeyFunctions ( ) ) { System . out . println ( ( "\n=====<seq2seq4repair_space>" + func ) ) ; Map < Integer , DatabaseStatistics . Counter > sizes = new HashMap ( ) ; Map blocks = db . getBlocks ( func ) ; for ( Object block : blocks . values ( ) ) { int size ; if ( block instanceof String [ ] ) size = ( ( String [ ] ) ( block ) ) . length ; else if ( block instanceof MapDBBlockingDatabase . Block ) size = ( ( MapDBBlockingDatabase . Block ) ( block ) ) . getIds ( ) . length ; else throw new DukeException ( ( "Unknown<seq2seq4repair_space>block<seq2seq4repair_space>type:<seq2seq4repair_space>" + block ) ) ; DatabaseStatistics . Counter c = sizes . get ( size ) ; if ( c == null ) { c = new DatabaseStatistics . Counter ( size ) ; sizes . put ( size , c ) ; } c . count += 1 ; } List < DatabaseStatistics . Counter > counters = new ArrayList ( sizes . values ( ) ) ; Collections . sort ( counters ) ; for ( DatabaseStatistics . Counter c : counters ) System . out . println ( ( ( ( "" + ( c . size ) ) + ":<seq2seq4repair_space>" ) + ( c . count ) ) ) ; } } protected void usage ( ) { } static class Counter implements Comparable < DatabaseStatistics . Counter > { int size ; int count ; public Counter ( int size ) { } public int compareTo ( DatabaseStatistics . Counter c ) { } } }

Fix:
argv = init ( argv , 1 , 1 , null ) ;
Buggy code:
public abstract class JspLoader extends ClassLoader { protected ClassLoader parent ; protected Options options ; protected JspLoader ( ) { } public void setParentClassLoader ( ClassLoader cl ) { } public void setOptions ( Options options ) { } protected Vector jars = new Vector ( ) ; public void addJar ( String jarFileName ) throws IOException { if ( ! ( jars . contains ( jarFileName ) ) ) { <START_BUG> Constants . message ( "jsp.message.adding_jar" , new Object [ ] { jarFileName } , INFORMATION ) ; <END_BUG> jars . addElement ( jarFileName ) ; } } public String getClassPath ( ) { } }

Fix:
Constants . message ( "jsp.message.adding_jar" , new Object [ ] { jarFileName } , DEBUG ) ;
Buggy code:
public class SimpleTableTest extends TestCase { public SimpleTableTest ( ) { } public SimpleTableTest ( String arg0 ) { } public void testSimpleTable ( ) throws Exception { MockHttpApplication application = new MockHttpApplication ( null ) ; <START_BUG> application . getSettings ( ) . setHomePage ( SimpleTablePage . class ) ; <END_BUG> application . setupRequestAndResponse ( ) ; application . processRequestCycle ( ) ; SimpleTablePage page = ( ( SimpleTablePage ) ( application . getLastRenderedPage ( ) ) ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( validateDocument ( document ) ) ; } private boolean validateDocument ( String document ) { } }

Fix:
application . getPages ( ) . setHomePage ( SimpleTablePage . class ) ;
Buggy code:
public class EditingOptionPane extends AbstractOptionPane { public EditingOptionPane ( ) { } protected void _init ( ) { } protected void _save ( ) { } private JComboBox defaultMode ; private JTextField undoCount ; private EditingOptionPane . ModeProperties global ; private EditingOptionPane . ModeProperties [ ] modeProps ; private EditingOptionPane . ModeProperties current ; private JComboBox mode ; private JCheckBox useDefaults ; private JTextField filenameGlob ; private JTextField firstlineGlob ; private JTextField noWordSep ; private JComboBox folding ; private JTextField collapseFolds ; private JComboBox wrap ; private JComboBox maxLineLen ; private JComboBox tabSize ; private JComboBox indentSize ; private JCheckBox noTabs ; private void saveMode ( ) { } private void selectMode ( ) { } private void updateEnabled ( ) { } class ActionHandler implements ActionListener { public void actionPerformed ( ActionEvent evt ) { if ( ( evt . getSource ( ) ) == ( mode ) ) { saveMode ( ) ; selectMode ( ) ; } else if ( ( evt . getSource ( ) ) == ( useDefaults ) ) { <START_BUG> modeProps [ mode . getSelectedIndex ( ) ] . useDefaults = useDefaults . isSelected ( ) ; <END_BUG> updateEnabled ( ) ; } } } class ModeProperties { Mode mode ; boolean edited ; boolean loaded ; boolean useDefaults ; String filenameGlob ; String firstlineGlob ; String noWordSep ; String folding ; String collapseFolds ; String wrap ; String maxLineLen ; String tabSize ; String indentSize ; boolean noTabs ; ModeProperties ( ) { } ModeProperties ( Mode mode ) { } void load ( ) { } void save ( ) { } } }

Fix:
modeProps [ ( ( mode . getSelectedIndex ( ) ) - 1 ) ] . useDefaults = useDefaults . isSelected ( ) ;
Buggy code:
public class ClientXADataSource extends ClientDataSource implements XADataSource { public static final String className__ = "org.apache.derby.jdbc.ClientXADataSource" ; private static final long serialVersionUID = 7057075094707674880L ; public ClientXADataSource ( ) { } public XAConnection getXAConnection ( ) throws SQLException { <START_BUG> return getXAConnection ( user , password ) ; <END_BUG> } public XAConnection getXAConnection ( String user , String password ) throws SQLException { } }

Fix:
return getXAConnection ( getUser ( ) , getPassword ( ) ) ;
Buggy code:
public class DoStatement extends Statement { public Expression condition ; public Statement action ; private Label breakLabel ; private Label continueLabel ; int mergedInitStateIndex = - 1 ; public DoStatement ( Expression condition , Statement action , int s , int e ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { breakLabel = new Label ( ) ; continueLabel = new Label ( ) ; LoopingFlowContext loopingContext = new LoopingFlowContext ( flowContext , this , breakLabel , continueLabel , currentScope ) ; Constant conditionConstant = condition . constant ; <START_BUG> Constant conditionalConstant = condition . conditionalConstant ( ) ; <END_BUG> boolean isFalseCondition = ( ( conditionConstant != ( NotAConstant ) ) && ( ( conditionConstant . booleanValue ( ) ) == false ) ) || ( ( conditionalConstant != ( NotAConstant ) ) && ( ( conditionalConstant . booleanValue ( ) ) == false ) ) ; if ( ( ( action ) != null ) && ( ! ( action . isEmptyBlock ( ) ) ) ) { flowInfo = action . analyseCode ( currentScope , loopingContext , flowInfo . copy ( ) ) ; if ( ( flowInfo == ( DeadEnd ) ) || ( flowInfo . isFakeReachable ( ) ) ) { if ( ( ( loopingContext . initsOnContinue ) == ( DeadEnd ) ) || ( loopingContext . initsOnContinue . isFakeReachable ( ) ) ) { continueLabel = null ; } else { flowInfo = loopingContext . initsOnContinue ; if ( isFalseCondition ) { } else { loopingContext . complainOnFinalAssignmentsInLoop ( currentScope , flowInfo ) ; } } } else { if ( isFalseCondition ) { } else { loopingContext . complainOnFinalAssignmentsInLoop ( currentScope , flowInfo ) ; } } } LoopingFlowContext condLoopContext ; flowInfo = condition . analyseCode ( currentScope , ( condLoopContext = new LoopingFlowContext ( flowContext , this , null , null , currentScope ) ) , ( ( action ) == null ? flowInfo : flowInfo . mergedWith ( loopingContext . initsOnContinue ) ) ) ; condLoopContext . complainOnFinalAssignmentsInLoop ( currentScope , flowInfo ) ; FlowInfo mergedInfo ; if ( ( ( condition . constant ) != ( NotAConstant ) ) && ( ( condition . constant . booleanValue ( ) ) == true ) ) { mergedInfo = loopingContext . initsOnBreak ; mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( mergedInfo ) ; return mergedInfo ; } mergedInfo = flowInfo . initsWhenFalse ( ) . unconditionalInits ( ) . mergedWith ( loopingContext . initsOnBreak ) ; mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( mergedInfo ) ; return mergedInfo ; } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public void resetStateForCodeGeneration ( ) { } public void resolve ( BlockScope scope ) { } public String toString ( int tab ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
Constant conditionalConstant = condition . optimizedBooleanConstant ( ) ;
Buggy code:
public class Label extends Control { int frameHandle ; int labelHandle ; int imageHandle ; Image image ; String text ; public Label ( Composite parent , int style ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( int index ) { } void createWidget ( int index ) { } void deregister ( ) { } int eventHandle ( ) { } public int getAlignment ( ) { } public Image getImage ( ) { } String getNameText ( ) { } public String getText ( ) { } void hookEvents ( ) { } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } void register ( ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } void resizeHandle ( int width , int height ) { } public void setAlignment ( int alignment ) { } void setBackgroundColor ( GdkColor color ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { boolean fixWrap = ( resize && ( ( labelHandle ) != 0 ) ) && ( ( ( style ) & ( SWT . WRAP ) ) != 0 ) ; if ( fixWrap ) OS . gtk_widget_set_size_request ( labelHandle , ( - 1 ) , ( - 1 ) ) ; int result = super . setBounds ( x , y , width , height , move , resize ) ; <START_BUG> if ( fixWrap && ( ( result & ( RESIZED ) ) != 0 ) ) { <END_BUG> int labelWidth = OS . GTK_WIDGET_WIDTH ( handle ) ; int labelHeight = OS . GTK_WIDGET_HEIGHT ( handle ) ; OS . gtk_widget_set_size_request ( labelHandle , labelWidth , labelHeight ) ; int widgetHandle = ( ( frameHandle ) != 0 ) ? frameHandle : handle ; GtkRequisition requisition = new GtkRequisition ( ) ; OS . gtk_widget_size_request ( widgetHandle , requisition ) ; } return result ; } void setFontDescription ( int font ) { } void setForegroundColor ( GdkColor color ) { } void setOrientation ( ) { } public void setImage ( Image image ) { } public void setText ( String string ) { } void showWidget ( ) { } }

Fix:
if ( fixWrap ) {
Buggy code:
public class ShowViewMenu extends ContributionItem { private IWorkbenchWindow window ; private Comparator actionComparator = new Comparator ( ) { public int compare ( Object o1 , Object o2 ) { } } ; private Action showDlgAction = new Action ( WorkbenchMessages . getString ( "ShowView.title" ) ) { public void run ( ) { } } ; private Map actions = new HashMap ( 21 ) ; private Map openedViews = new HashMap ( ) ; private boolean dirty = true ; private IMenuListener menuListener = new IMenuListener ( ) { public void menuAboutToShow ( IMenuManager manager ) { } } ; private static Collator collator ; public ShowViewMenu ( IWorkbenchWindow window , String id ) { } public boolean isDirty ( ) { } public boolean isDynamic ( ) { } private void fillMenu ( IMenuManager innerMgr ) { innerMgr . removeAll ( ) ; IWorkbenchPage page = window . getActivePage ( ) ; if ( page == null ) return ; if ( ( page . getPerspective ( ) ) == null ) return ; List viewIds = new ArrayList ( ( ( WorkbenchPage ) ( page ) ) . getShowViewActionIds ( ) ) ; IObjectActivityManager objectManager = window . getWorkbench ( ) . getObjectActivityManager ( PL_VIEWS , false ) ; if ( objectManager != null ) { <START_BUG> viewIds . retainAll ( objectManager . getActiveObjects ( ) ) ; <END_BUG> } viewIds = addOpenedViews ( page , viewIds ) ; List actions = new ArrayList ( viewIds . size ( ) ) ; for ( Iterator i = viewIds . iterator ( ) ; i . hasNext ( ) ; ) { String id = ( ( String ) ( i . next ( ) ) ) ; IAction action = getAction ( id ) ; if ( action != null ) { actions . add ( action ) ; } } Collections . sort ( actions , actionComparator ) ; for ( Iterator i = actions . iterator ( ) ; i . hasNext ( ) ; ) { innerMgr . add ( ( ( IAction ) ( i . next ( ) ) ) ) ; } innerMgr . add ( new Separator ( ) ) ; innerMgr . add ( showDlgAction ) ; } private List addOpenedViews ( IWorkbenchPage page , List actions ) { } private IAction getAction ( String id ) { } private void showOther ( ) { } private ArrayList getParts ( IWorkbenchPage page ) { } public void fill ( Menu menu , int index ) { } }

Fix:
viewIds . retainAll ( objectManager . getEnabledObjects ( ) ) ;
Buggy code:
final class CommandLegacyWrapper implements ICommand { private final BindingManager bindingManager ; private final Command command ; private ParameterizedCommand parameterizedCommand ; CommandLegacyWrapper ( final Command command , final BindingManager bindingManager ) { } public final void addCommandListener ( final ICommandListener commandListener ) { } public final Object execute ( Map parameterValuesByName ) throws ExecutionException , NotHandledException { try { <START_BUG> return command . execute ( new ExecutionEvent ( ( parameterValuesByName == null ? Collections . EMPTY_MAP : parameterValuesByName ) , null , null ) ) ; <END_BUG> } catch ( final org . eclipse . core . commands . ExecutionException e ) { throw new ExecutionException ( e ) ; } catch ( final org . eclipse . core . commands . NotHandledException e ) { throw new NotHandledException ( e ) ; } } public final Map getAttributeValuesByName ( ) { } public final String getCategoryId ( ) throws NotDefinedException { } public final String getDescription ( ) throws NotDefinedException { } public final String getId ( ) { } public final List getKeySequenceBindings ( ) { } public final String getName ( ) throws NotDefinedException { } public final boolean isDefined ( ) { } public final boolean isHandled ( ) { } public final void removeCommandListener ( final ICommandListener commandListener ) { } public final int compareTo ( final Object o ) { } }

Fix:
return command . execute ( new ExecutionEvent ( command , ( parameterValuesByName == null ? Collections . EMPTY_MAP : parameterValuesByName ) , null , null ) ) ;
Buggy code:
public class TabDocs extends TabText { public TabDocs ( ) { } protected String genText ( ) { Object modelObject = _target ; if ( ! ( modelObject instanceof MElementImpl ) ) return null ; if ( ( _target ) instanceof FigNode ) modelObject = ( ( FigNode ) ( _target ) ) . getOwner ( ) ; if ( ( _target ) instanceof FigEdge ) modelObject = ( ( FigEdge ) ( _target ) ) . getOwner ( ) ; if ( modelObject == null ) return null ; <START_BUG> return DocumentationManager . getDocs ( modelObject ) ; <END_BUG> } protected void parseText ( String s ) { } }

Fix:
return DocumentationManager . getDocs ( modelObject , "" ) ;
Buggy code:
public class FileSystemProvider extends DocumentsProvider { public static final String ID = "com.mobilejazz.coltrane.provider.filesystem" ; private static final String [ ] DEFAULT_DOCUMENT_PROJECTION = new String [ ] { BaseColumns . _ID , Document . COLUMN_DOCUMENT_ID , Document . COLUMN_DISPLAY_NAME , Document . COLUMN_FLAGS , Document . COLUMN_MIME_TYPE , Document . COLUMN_SIZE , Document . COLUMN_LAST_MODIFIED } ; private FileAccessor mAccessor = new FileAccessor ( ) ; public FileSystemProvider ( Context context ) { } @ Override public List < Root > getRoots ( ) throws FileNotFoundException { } @ Override public String getName ( ) { } @ Override public int getIcon ( ) { } @ Override public Cursor queryChildDocuments ( String parentDocumentId , String [ ] projection , String sortOrder ) throws FileNotFoundException { } @ Override public Cursor queryDocument ( String documentId , String [ ] projection ) throws FileNotFoundException { } @ Override public ParcelFileDescriptor openDocument ( String documentId , String mode , CancellationSignal signal ) throws FileNotFoundException { } protected String getDocumentThumbnailId ( final String documentId , final Point sizeHint ) { } protected File getDocumentThumbnailFile ( final String documentId , final Point sizeHint ) throws FileNotFoundException { FileOutputStream out = null ; try { File cacheDir = getContext ( ) . getCacheDir ( ) ; File thumbnail = File . createTempFile ( getDocumentThumbnailId ( documentId , sizeHint ) , "" , cacheDir ) ; <START_BUG> String mimeType = new com . mobilejazz . coltrane . library . utils . DocumentCursor ( queryDocument ( documentId , new String [ ] { Document . COLUMN_MIME_TYPE } ) ) . getMimeType ( ) ; <END_BUG> Bitmap bitmap = Thumbnail . fromFile ( documentId , sizeHint , mimeType ) ; out = new FileOutputStream ( thumbnail ) ; bitmap . compress ( PNG , 90 , out ) ; return thumbnail ; } catch ( IOException e ) { Timber . e ( "Error<seq2seq4repair_space>writing<seq2seq4repair_space>thumbnail" , e ) ; return null ; } finally { if ( out != null ) try { out . close ( ) ; } catch ( IOException e ) { Timber . e ( "Error<seq2seq4repair_space>closing<seq2seq4repair_space>thumbnail" , e ) ; } } } @ Override public Uri getDocumentThumbnailUri ( String documentId , Point sizeHint , CancellationSignal signal ) throws UserRecoverableException , FileNotFoundException { } @ Override public String createDocument ( String parentDocumentId , String mimeType , String displayName ) throws FileNotFoundException { } @ Override public String getId ( ) { } public static void register ( Context context ) { } }

Fix:
String mimeType = mAccessor . getMimeType ( new File ( documentId ) ) ;
Buggy code:
public abstract class AbstractAutoCompleteBehavior extends AbstractDefaultAjaxBehavior { private static final PackageResourceReference AUTOCOMPLETE_JS = new PackageResourceReference ( AutoCompleteBehavior . class , "wicket-autocomplete.js" ) ; private static final long serialVersionUID = 1L ; protected void onRenderHeadInitContribution ( Response response ) { } protected void onComponentRendered ( ) { Response response = getComponent ( ) . getResponse ( ) ; final String id = getComponent ( ) . getMarkupId ( ) ; response . write ( SCRIPT_OPEN_TAG ) ; <START_BUG> response . write ( ( ( ( ( "new<seq2seq4repair_space>WicketAutoComplete('" + id ) + "','" ) + ( getCallbackUrl ( ) ) ) + "');" ) ) ; <END_BUG> response . write ( SCRIPT_CLOSE_TAG ) ; } protected void respond ( AjaxRequestTarget target ) { } protected abstract void onRequest ( String input , RequestCycle requestCycle ) { } }

Fix:
response . write ( ( ( ( ( "new<seq2seq4repair_space>Wicket.Ajax.AutoComplete('" + id ) + "','" ) + ( getCallbackUrl ( ) ) ) + "');" ) ) ;
Buggy code:
public class LoginActivity extends Activity { private EditText login_userNameEdt = null ; private EditText login_passwordEdt = null ; private Button login_submitBtn = null ; private Button login_clearBtn = null ; private JSONArray results ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void bindView ( ) { } private void initData ( ) { <START_BUG> if ( ( login_passwordEdt . getText ( ) . toString ( ) . equals ( "Admin" ) ) && ( login_passwordEdt . getText ( ) . toString ( ) . equals ( "123456" ) ) ) { <END_BUG> results = JSONArray . parseArray ( "[{\"code\"<seq2seq4repair_space>:<seq2seq4repair_space>200,<seq2seq4repair_space>\"message\"<seq2seq4repair_space>:<seq2seq4repair_space>\"login<seq2seq4repair_space>success!\"},{\"uid\"<seq2seq4repair_space>:<seq2seq4repair_space>1}]" ) ; } else { results = JSONArray . parseArray ( "[{\"code\"<seq2seq4repair_space>:<seq2seq4repair_space>201,<seq2seq4repair_space>\"message\"<seq2seq4repair_space>:<seq2seq4repair_space>\"username<seq2seq4repair_space>or<seq2seq4repair_space>password<seq2seq4repair_space>is<seq2seq4repair_space>wrong!\"}]" ) ; } } private void setListener ( ) { } }

Fix:
if ( ( login_userNameEdt . getText ( ) . toString ( ) . equals ( "Admin" ) ) && ( login_passwordEdt . getText ( ) . toString ( ) . equals ( "123456" ) ) ) {
Buggy code:
public abstract class AjaxFormComponentUpdatingBehavior extends AjaxEventBehavior { public AjaxFormComponentUpdatingBehavior ( final String event ) { } protected void onBind ( ) { } protected final FormComponent getFormComponent ( ) { } protected final CharSequence getEventHandler ( ) { <START_BUG> return getCallbackScript ( new AppendingStringBuffer ( "wicketAjaxPost('" ) . append ( getCallbackUrl ( ) ) . append ( ( ( "',<seq2seq4repair_space>wicketSerialize(document.getElementById('" + ( getComponent ( ) . getMarkupId ( ) ) ) + "'))" ) ) , null , null ) ; <END_BUG> } protected void onCheckEvent ( String event ) { } protected final void onEvent ( final AjaxRequestTarget target ) { } protected abstract void onUpdate ( AjaxRequestTarget target ) { } protected void onError ( AjaxRequestTarget target , RuntimeException e ) { } }

Fix:
return getCallbackScript ( new AppendingStringBuffer ( "wicketAjaxPost('" ) . append ( getCallbackUrl ( true , false ) ) . append ( ( ( "',<seq2seq4repair_space>wicketSerialize(document.getElementById('" + ( getComponent ( ) . getMarkupId ( ) ) ) + "'))" ) ) , null , null ) ;
Buggy code:
public final class FloatRangeTest extends AbstractRangeTest { public FloatRangeTest ( String name ) { } public static Test suite ( ) { } @ Override public void setUp ( ) { } @ Override protected Range createRange ( Integer integer1 , Integer integer2 ) { } @ Override protected Range createRange ( Integer integer ) { } public void testConstructor1a ( ) { } public void testConstructor1b ( ) { FloatRange nr = new FloatRange ( float8 ) ; assertSame ( float8 , nr . getMinimumNumber ( ) ) ; assertSame ( float8 , nr . getMaximumNumber ( ) ) ; <START_BUG> Range r = new FloatRange ( nonComparableNumber ) ; <END_BUG> try { new FloatRange ( null ) ; fail ( ) ; } catch ( IllegalArgumentException ex ) { } try { new FloatRange ( new Double ( Double . NaN ) ) ; fail ( ) ; } catch ( IllegalArgumentException ex ) { } } public void testConstructor2a ( ) { } public void testConstructor2b ( ) { } public void testContainsNumber ( ) { } @ Override public void testToString ( ) { } }

Fix:
new FloatRange ( nonComparableNumber ) ;
Buggy code:
public abstract class AHPlayerWrapper < T > extends AHBase < T > { public abstract Class < T > getClazz ( ) { } public IClassManager < T > getManager ( MPlugin p ) { } @ Override public T parse ( String str , String style , CommandSender sender , MPlugin p ) { this . error = null ; if ( str == null ) return null ; IClassManager < T > manager = this . getManager ( p ) ; T ret ; <START_BUG> if ( style . equals ( "match" ) ) { <END_BUG> ret = manager . getBestMatch ( str ) ; if ( ret != null ) { return ret ; } this . error = ( "<b>No<seq2seq4repair_space>player<seq2seq4repair_space>name<seq2seq4repair_space>begins<seq2seq4repair_space>with<seq2seq4repair_space>\"<p>" + str ) + "<b>\"." ; } else { ret = manager . get ( str ) ; if ( ret != null ) { return ret ; } this . error = ( "<b>No<seq2seq4repair_space>player<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>exact<seq2seq4repair_space>name<seq2seq4repair_space>\"<p>" + str ) + "<b>\"." ; } return null ; } }

Fix:
if ( ( style != null ) && ( style . equals ( "match" ) ) ) {