nus-yam/ex-repair huggingface dataset:
Buggy code:
class CSVLexer1306663 extends Lexer { public CSVLexer1306663 ( final CSVFormat format , final ExtendedBufferedReader in ) { } @ Override Token nextToken ( final Token tkn ) throws IOException { } private Token simpleTokenLexer ( final Token tkn , int c ) throws IOException { } private Token encapsulatedTokenLexer ( final Token tkn ) throws IOException { <START_BUG> final int startLineNumber = getLineNumber ( ) ; <END_BUG> int c ; while ( true ) { c = in . read ( ) ; if ( isEscape ( c ) ) { tkn . content . append ( ( ( char ) ( readEscape ( ) ) ) ) ; } else if ( isEncapsulator ( c ) ) { if ( isEncapsulator ( in . lookAhead ( ) ) ) { c = in . read ( ) ; tkn . content . append ( ( ( char ) ( c ) ) ) ; } else { while ( true ) { c = in . read ( ) ; if ( isDelimiter ( c ) ) { tkn . type = Type . TOKEN ; return tkn ; } else if ( isEndOfFile ( c ) ) { tkn . type = Type . EOF ; tkn . isReady = true ; return tkn ; } else if ( isEndOfLine ( c ) ) { tkn . type = Type . EORECORD ; return tkn ; } else if ( ! ( isWhitespace ( c ) ) ) { throw new IOException ( ( ( "(line<seq2seq4repair_space>" + ( getLineNumber ( ) ) ) + ")<seq2seq4repair_space>invalid<seq2seq4repair_space>char<seq2seq4repair_space>between<seq2seq4repair_space>encapsulated<seq2seq4repair_space>token<seq2seq4repair_space>and<seq2seq4repair_space>delimiter" ) ) ; } } } } else if ( isEndOfFile ( c ) ) { throw new IOException ( ( ( "(startline<seq2seq4repair_space>" + startLineNumber ) + ")<seq2seq4repair_space>EOF<seq2seq4repair_space>reached<seq2seq4repair_space>before<seq2seq4repair_space>encapsulated<seq2seq4repair_space>token<seq2seq4repair_space>finished" ) ) ; } else { tkn . content . append ( ( ( char ) ( c ) ) ) ; } } } }

Fix:
final long startLineNumber = getLineNumber ( ) ;
Buggy code:
class BlockStack { public static final int MAX_SIZE = 28 ; public static final int DEFAULT_SIZE = 6 ; private int iSize = BlockStack . DEFAULT_SIZE ; private int accessCounter = 0 ; private int iTop = 3 ; private char [ ] acStack = new char [ ] { 'a' , 'b' , 'c' , 'd' , '$' , '$' } ; public char [ ] getAcStack ( ) { } public int getAccessCounter ( ) { } public int getISize ( ) { } public int getITop ( ) { } public boolean isEmpty ( ) { } public BlockStack ( ) { } public BlockStack ( final int piSize ) { } public char pick ( ) throws MyException { } public char getAt ( final int piPosition ) throws MyException { } public void push ( final char pcBlock ) throws Exception { ( accessCounter ) ++ ; <START_BUG> if ( ( ( iSize ) - 1 ) != ( iTop ) ) { <END_BUG> if ( isEmpty ( ) ) this . acStack [ ( ++ ( this . iTop ) ) ] = acStack [ 0 ] ; else this . acStack [ ( ++ ( this . iTop ) ) ] = pcBlock ; } else throw new MyException ( "Stack<seq2seq4repair_space>is<seq2seq4repair_space>full" ) ; } public char pop ( ) throws MyException { } }

Fix:
if ( ( iTop ) < ( iSize ) ) {
Buggy code:
public class ComboBoxItem extends FormItem < String > { private ComboBox comboBox ; private boolean defaultToFirst ; private InputElementWrapper wrapper ; public ComboBoxItem ( String name , String title ) { } @ Override public String getValue ( ) { } @ Override public void resetMetaData ( ) { } @ Override public void setValue ( String value ) { } public void selectItem ( int i ) { } @ Override public Widget asWidget ( ) { } public void clearSelection ( ) { } public void setDefaultToFirstOption ( boolean b ) { } public void setValueMap ( String [ ] values ) { } public void setValueMap ( Collection < String > values ) { } @ Override public void setEnabled ( boolean b ) { } @ Override public String getErrMessage ( ) { } @ Override public boolean validate ( String value ) { } @ Override public void setErroneous ( boolean b ) { } @ Override public void clearValue ( ) { <START_BUG> if ( defaultToFirst ) <END_BUG> selectItem ( 0 ) ; else comboBox . clearSelection ( ) ; } public void addValueChangeHandler ( ValueChangeHandler < String > handler ) { } }

Fix:
if ( ( defaultToFirst ) && ( ( comboBox . getItemCount ( ) ) > 0 ) )
Buggy code:
public final class TestDenseVector extends AbstractVectorTest < DenseVector > { @ Override Vector generateTestVector ( int cardinality ) { } @ Override public void testSize ( ) { <START_BUG> assertEquals ( "size" , 7 , getTestVector ( ) . getNumNondefaultElements ( ) ) ; <END_BUG> } @ Override public DenseVector vectorToTest ( int size ) { } }

Fix:
assertEquals ( "size" , 3 , getTestVector ( ) . getNumNondefaultElements ( ) ) ;
Buggy code:
public class DeferredElementNSImpl extends ElementNSImpl implements DeferredNode { static final long serialVersionUID = - 5001885145370927385L ; protected transient int fNodeIndex ; DeferredElementNSImpl ( DeferredDocumentImpl ownerDoc , int nodeIndex ) { } public final int getNodeIndex ( ) { } protected final void synchronizeData ( ) { needsSyncData ( false ) ; DeferredDocumentImpl ownerDocument = ( ( DeferredDocumentImpl ) ( this . ownerDocument ) ) ; boolean orig = ownerDocument . mutationEvents ; ownerDocument . mutationEvents = false ; name = ownerDocument . getNodeName ( fNodeIndex ) ; int index = name . indexOf ( ':' ) ; if ( index < 0 ) { localName = name ; } else { localName = name . substring ( ( index + 1 ) ) ; } namespaceURI = ownerDocument . getNodeURI ( fNodeIndex ) ; <START_BUG> if ( ( namespaceURI . length ( ) ) == 0 ) { <END_BUG> namespaceURI = null ; } setupDefaultAttributes ( ) ; int attrIndex = ownerDocument . getNodeExtra ( fNodeIndex ) ; if ( attrIndex != ( - 1 ) ) { NamedNodeMap attrs = getAttributes ( ) ; do { NodeImpl attr = ( ( NodeImpl ) ( ownerDocument . getNodeObject ( attrIndex ) ) ) ; attrs . setNamedItem ( attr ) ; attrIndex = ownerDocument . getPrevSibling ( attrIndex ) ; } while ( attrIndex != ( - 1 ) ) ; } ownerDocument . mutationEvents = orig ; } protected final void synchronizeChildren ( ) { } }

Fix:
if ( ( ( namespaceURI ) != null ) && ( ( namespaceURI . length ( ) ) == 0 ) ) {
Buggy code:
public class NetworkThread implements Runnable { public static final int PORT_NO = 4040 ; public final int RATE = 100 ; public static final String JOB_MSGID = "1" ; public static final String MON_MSGID = "2" ; public static final String JOBCMP_MSGID = "3" ; public static final String STARTUP_MSGID = "4" ; public static final String MSG_DEL = ":" ; private boolean isRunning = false ; private boolean isMaster = false ; private int id = 0 ; private Socket socket ; private DataOutputStream out ; private BufferedReader in ; private String ip ; private int port = NetworkThread . PORT_NO ; private ArrayList < String > outgoingQueue ; private NetworkListenerThread nlt = null ; private Thread nltThread = null ; private static ServerSocket welcomeSocket = null ; public NetworkThread ( String ip ) { } public NetworkThread ( int id , String ip ) { } public void stop ( ) { } @ Override public void run ( ) { if ( ( isMaster ) == true ) { try { log ( "Accepting<seq2seq4repair_space>connections." ) ; if ( ( NetworkThread . welcomeSocket ) == null ) { NetworkThread . welcomeSocket = new ServerSocket ( port ) ; } socket = NetworkThread . welcomeSocket . accept ( ) ; in = new BufferedReader ( new InputStreamReader ( socket . getInputStream ( ) ) ) ; out = new DataOutputStream ( socket . getOutputStream ( ) ) ; ip = socket . getRemoteSocketAddress ( ) . toString ( ) ; log ( ( "Starting<seq2seq4repair_space>connection<seq2seq4repair_space>from<seq2seq4repair_space>" + ( socket . getRemoteSocketAddress ( ) ) ) ) ; } catch ( Exception ex ) { Logger . getLogger ( NetworkThread . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; stop ( ) ; return ; } } else { int attempts = 1 ; <START_BUG> while ( ( ( tryConnect ( ) ) == false ) && ( attempts < 10 ) ) { <END_BUG> try { Thread . sleep ( 1000 ) ; attempts += 1 ; log ( ( "trying<seq2seq4repair_space>to<seq2seq4repair_space>connect,<seq2seq4repair_space>attempt" + attempts ) ) ; } catch ( Exception e ) { } } } if ( ( in ) == null ) { stop ( ) ; return ; } log ( "Starting<seq2seq4repair_space>up..." ) ; isRunning = true ; this . nlt = new NetworkListenerThread ( this . in ) ; this . nltThread = new Thread ( this . nlt ) ; this . nltThread . start ( ) ; try { String s = null ; while ( isRunning ) { Thread . sleep ( RATE ) ; sendAllMessages ( ) ; } } catch ( Exception ex ) { stop ( ) ; Logger . getLogger ( NetworkThread . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } log ( "terminating..." ) ; } private boolean tryConnect ( ) { } public synchronized void appendMessage ( String message ) { } private synchronized void sendAllMessages ( ) { } public synchronized String readTopMessage ( ) { } public synchronized ArrayList < String > readAllMessages ( ) { } public void log ( String message ) { } public boolean isRunning ( ) { } }

Fix:
while ( ( ( tryConnect ( ) ) == false ) && ( attempts < 100 ) ) {
Buggy code:
public class MainLoop { private GLFWErrorCallback errorCallback ; private GLFWKeyCallback keyCallback ; private long window ; private WindowInitalizer windowInitalizer ; private WindowInitalizer recreateInitalizer ; public void create ( WindowInitalizer windowInitalizer ) { } public void recreate ( WindowInitalizer windowInitalizer ) { } private void runLoop ( WindowInitalizer windowInitalizer ) { } private void init ( ) { glfwSetErrorCallback ( ( errorCallback = errorCallbackPrint ( System . err ) ) ) ; if ( ( glfwInit ( ) ) != ( GL11 . GL_TRUE ) ) throw new IllegalStateException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>initialize<seq2seq4repair_space>GLFW" ) ; glfwDefaultWindowHints ( ) ; glfwWindowHint ( GLFW_VISIBLE , GL_FALSE ) ; glfwWindowHint ( GLFW_RESIZABLE , ( windowInitalizer . resizeable ? GL_TRUE : GL_FALSE ) ) ; window = glfwCreateWindow ( windowInitalizer . width , windowInitalizer . height , windowInitalizer . windowName , NULL , NULL ) ; if ( ( window ) == ( NULL ) ) throw new RuntimeException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>the<seq2seq4repair_space>GLFW<seq2seq4repair_space>window" ) ; glfwSetKeyCallback ( window , ( keyCallback = new GLFWKeyCallback ( ) { @ Override public void invoke ( long window , int key , int scancode , int action , int mods ) { if ( ( key == ( GLFW_KEY_ESCAPE ) ) && ( action == ( GLFW_RELEASE ) ) ) glfwSetWindowShouldClose ( window , GL_TRUE ) ; } } ) ) ; ByteBuffer vidmode = glfwGetVideoMode ( glfwGetPrimaryMonitor ( ) ) ; <START_BUG> glfwSetWindowPos ( window , ( ( ( GLFWvidmode . width ( vidmode ) ) - ( windowInitalizer . height ) ) // 2 ) , ( ( ( GLFWvidmode . height ( vidmode ) ) - ( windowInitalizer . width ) ) // 2 ) ) ; <END_BUG> glfwMakeContextCurrent ( window ) ; glfwSwapInterval ( ( windowInitalizer . vSync ? 1 : 0 ) ) ; glfwShowWindow ( window ) ; } private void loop ( ) { } public void dispose ( ) { } No newline ; at end ; of file ; }

Fix:
glfwSetWindowPos ( window , ( ( ( GLFWvidmode . width ( vidmode ) ) - ( windowInitalizer . width ) ) // 2 ) , ( ( ( GLFWvidmode . height ( vidmode ) ) - ( windowInitalizer . height ) ) // 2 ) ) ;
Buggy code:
public final class ResourceUseChecker implements ActionListener , Runnable , ListSelectionListener { private static final Pattern RESREFPATTERN = Pattern . compile ( "\\w{3,8}" ) ; private static final String [ ] FILETYPES = new String [ ] { "2DA" , "ARE" , "BCS" , "BS" , "CHR" , "CHU" , "CRE" , "DLG" , "EFF" , "INI" , "ITM" , "PRO" , "SPL" , "STO" , "VEF" , "VVC" , "WED" , "WMP" } ; private static final String [ ] CHECKTYPES = new String [ ] { "ARE" , "BCS" , "CRE" , "DLG" , "EFF" , "ITM" , "PRO" , "SPL" , "STO" , "TIS" , "VEF" , "VVC" , "WAV" , "WED" } ; private final ChildFrame selectframe = new ChildFrame ( "Find<seq2seq4repair_space>unused<seq2seq4repair_space>files" , true ) ; private final JButton bstart = new JButton ( "Search" , Icons . getIcon ( "Find16.gif" ) ) ; private final JButton bcancel = new JButton ( "Cancel" , Icons . getIcon ( "Delete16.gif" ) ) ; private final JRadioButton [ ] typeButtons ; private final List < ResourceEntry > checkList = new ArrayList < ResourceEntry > ( ) ; private ChildFrame resultFrame ; private JButton bopen ; private JButton bopennew ; private JButton bsave ; private SortableTable table ; private String checkType ; public ResourceUseChecker ( Component parent ) { } @ Override public void actionPerformed ( ActionEvent event ) { } @ Override public void valueChanged ( ListSelectionEvent event ) { } @ Override public void run ( ) { } private void checkDialog ( DlgResource dialog ) { <START_BUG> List < StructEntry > flatList = dialog . getFlatList ( ) ; <END_BUG> for ( int i = 0 ; i < ( flatList . size ( ) ) ; i ++ ) { if ( ( flatList . get ( i ) ) instanceof ResourceRef ) { ResourceRef ref = ( ( ResourceRef ) ( flatList . get ( i ) ) ) ; if ( ref . getType ( ) . equalsIgnoreCase ( checkType ) ) { for ( Iterator < ResourceEntry > j = checkList . iterator ( ) ; j . hasNext ( ) ; ) if ( j . next ( ) . toString ( ) . equalsIgnoreCase ( ref . getResourceName ( ) ) ) { j . remove ( ) ; break ; } } } else if ( ( flatList . get ( i ) ) instanceof AbstractCode ) { AbstractCode code = ( ( AbstractCode ) ( flatList . get ( i ) ) ) ; try { String compiled = Compiler . getInstance ( ) . compileDialogCode ( code . toString ( ) , ( code instanceof Action ) ) ; if ( code instanceof Action ) Decompiler . decompileDialogAction ( compiled , true ) ; else Decompiler . decompileDialogTrigger ( compiled , true ) ; Set < ResourceEntry > resourcesUsed = Decompiler . getResourcesUsed ( ) ; for ( final ResourceEntry resourceEntry : resourcesUsed ) checkList . remove ( resourceEntry ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } } } private void checkScript ( BcsResource script ) { } private void checkStruct ( AbstractStruct struct ) { } private void checkTextfile ( PlainTextResource text ) { } private static final class UnusedFileTableItem implements TableItem { private final ResourceEntry file ; private UnusedFileTableItem ( ResourceEntry file ) { } @ Override public Object getObjectAt ( int columnIndex ) { } @ Override public String toString ( ) { } } }

Fix:
List < StructEntry > flatList = dialog . getList ( ) ;
Buggy code:
public class ProjectCapabilityPropertyPage extends PropertyPage { private static final int SIZING_WIZARD_WIDTH = 500 ; private static final int SIZING_WIZARD_HEIGHT = 500 ; private IProject project ; private ProjectCapabilitySelectionGroup capabilityGroup ; public ProjectCapabilityPropertyPage ( ) { } protected Control createContents ( Composite parent ) { <START_BUG> WorkbenchHelp . setHelp ( parent , PROJECT_CAPABILITY_PROPERTY_PAGE ) ; <END_BUG> noDefaultAndApplyButton ( ) ; CapabilityRegistry reg = WorkbenchPlugin . getDefault ( ) . getCapabilityRegistry ( ) ; String instructions ; if ( reg . hasCapabilities ( ) ) instructions = WorkbenchMessages . getString ( "ProjectCapabilityPropertyPage.chooseCapabilities" ) ; else instructions = WorkbenchMessages . getString ( "ProjectCapabilityPropertyPage.noCapabilities" ) ; Label label = new Label ( parent , SWT . LEFT ) ; label . setFont ( parent . getFont ( ) ) ; label . setText ( instructions ) ; Capability [ ] caps = reg . getProjectCapabilities ( getProject ( ) ) ; Capability [ ] disabledCaps = reg . getProjectDisabledCapabilities ( getProject ( ) ) ; ICategory [ ] cats = new ICategory [ 0 ] ; capabilityGroup = new ProjectCapabilitySelectionGroup ( cats , caps , disabledCaps , reg ) ; return capabilityGroup . createContents ( parent ) ; } IProject getProject ( ) { } public boolean performOk ( ) { } }

Fix:
WorkbenchHelp . setHelp ( getControl ( ) , PROJECT_CAPABILITY_PROPERTY_PAGE ) ;
Buggy code:
public class AliasIPDAOImpl implements AliasIPDAO { private static Logger logger = LoggerFactory . getLogger ( AliasIPDAOImpl . class ) ; @ Override public void save ( AliasIP alias ) { } @ Override public AliasIP findByPlayerAndIp ( Long player , String ip ) { } private void loadAlias ( AliasIP alias , ResultSet rs ) throws SQLException { } @ Override public List < AliasIP > findByPlayer ( Long player , int offset , int limit , int [ ] count ) { } @ Override public List < AliasIP > findByIP ( String query , int offset , int limit , int [ ] count ) { <START_BUG> String sqlCount = "select<seq2seq4repair_space>count(id)<seq2seq4repair_space>from<seq2seq4repair_space>aliasip<seq2seq4repair_space>where<seq2seq4repair_space>ip<seq2seq4repair_space>between<seq2seq4repair_space>?<seq2seq4repair_space>and<seq2seq4repair_space>?<seq2seq4repair_space>group<seq2seq4repair_space>by<seq2seq4repair_space>playerid" ; <END_BUG> String sql = "select<seq2seq4repair_space>*<seq2seq4repair_space>from<seq2seq4repair_space>aliasip<seq2seq4repair_space>where<seq2seq4repair_space>ip<seq2seq4repair_space>between<seq2seq4repair_space>?<seq2seq4repair_space>and<seq2seq4repair_space>?<seq2seq4repair_space>group<seq2seq4repair_space>by<seq2seq4repair_space>playerid<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>updated<seq2seq4repair_space>desc<seq2seq4repair_space>limit<seq2seq4repair_space>?,?" ; Connection conn = null ; List < AliasIP > list = new ArrayList < AliasIP > ( ) ; try { conn = ConnectionFactory . getSecondaryConnection ( ) ; Long [ ] range = Functions . getIpRange ( query ) ; PreparedStatement stC = conn . prepareStatement ( sqlCount ) ; stC . setLong ( 1 , range [ 0 ] ) ; stC . setLong ( 2 , range [ 1 ] ) ; ResultSet rsC = stC . executeQuery ( ) ; if ( rsC . next ( ) ) { count [ 0 ] = rsC . getInt ( 1 ) ; } PreparedStatement st = conn . prepareStatement ( sql ) ; st . setLong ( 1 , range [ 0 ] ) ; st . setLong ( 2 , range [ 1 ] ) ; st . setInt ( 3 , offset ) ; st . setInt ( 4 , limit ) ; ResultSet rs = st . executeQuery ( ) ; while ( rs . next ( ) ) { AliasIP alias = new AliasIP ( ) ; loadAlias ( alias , rs ) ; list . add ( alias ) ; } } catch ( SQLException e ) { AliasIPDAOImpl . logger . error ( "findByIP:<seq2seq4repair_space>{}" , e ) ; } catch ( IOException e ) { AliasIPDAOImpl . logger . error ( "findByIP:<seq2seq4repair_space>{}" , e ) ; } finally { try { if ( conn != null ) conn . close ( ) ; } catch ( Exception e ) { } } return list ; } }

Fix:
String sqlCount = "select<seq2seq4repair_space>count(1)<seq2seq4repair_space>from<seq2seq4repair_space>(select<seq2seq4repair_space>1<seq2seq4repair_space>from<seq2seq4repair_space>aliasip<seq2seq4repair_space>where<seq2seq4repair_space>ip<seq2seq4repair_space>between<seq2seq4repair_space>?<seq2seq4repair_space>and<seq2seq4repair_space>?<seq2seq4repair_space>group<seq2seq4repair_space>by<seq2seq4repair_space>playerid)<seq2seq4repair_space>c" ;
Buggy code:
@ TargetApi ( 19 ) public class Printer extends CordovaPlugin { @ Override public boolean execute ( String action , JSONArray args , CallbackContext callbackContext ) throws JSONException { } private void isServiceAvailable ( CallbackContext ctx ) { } private void print ( final JSONArray args , CallbackContext ctx ) { <START_BUG> final KitKatPrinter self = this ; <END_BUG> cordova . getActivity ( ) . runOnUiThread ( new Runnable ( ) { public void run ( ) { String content = args . optString ( 0 , "<html><//html>" ) ; WebView controller = self . getPrintController ( ) ; self . loadContentIntoPrintController ( content , controller ) ; self . startPrinterApp ( controller ) ; } } ) ; } private WebView getPrintController ( ) { } private void loadContentIntoPrintController ( String content , WebView webview ) { } private void startPrinterApp ( WebView webview ) { } }

Fix:
final Printer self = this ;
Buggy code:
@ RestController @ RequestMapping ( "//quartz//triggers" ) public class Triggers { private final QuartzFiredTriggersRepository quartzFiredTriggersRepository ; private final QuartzTriggersRepository quartzTriggersRepository ; private final QuartzCronTriggersRepository quartzCronTriggersRepository ; private final QuartzSimpleTriggerRepository quartzSimpleTriggerRepository ; @ Autowired public Triggers ( QuartzFiredTriggersRepository quartzFiredTriggersRepository , QuartzTriggersRepository quartzTriggersRepository , QuartzCronTriggersRepository quartzCronTriggersRepository , QuartzSimpleTriggerRepository quartzSimpleTriggerRepository ) { } @ RequestMapping ( method = RequestMethod . GET ) public List < QuartzTriggers > getAllTriggers ( ) { } @ ApiOperation ( "Currently<seq2seq4repair_space>running<seq2seq4repair_space>trigger" ) @ RequestMapping ( value = "//fired" , method = RequestMethod . GET ) public List < QuartzFiredTriggers > getAllFiredTriggers ( ) { } @ RequestMapping ( value = "//cron" , method = RequestMethod . GET ) public List < QuartzCronTriggers > getAllCronTriggers ( ) { } <START_BUG> @ RequestMapping ( value = "//cron//{scheduler}//{triggergroup}//{triggername}}" , method = RequestMethod . GET ) <END_BUG> public QuartzCronTriggers getQuartzTrigger ( @ PathVariable String scheduler , @ PathVariable String triggergroup , @ PathVariable String triggername ) { return quartzCronTriggersRepository . findOne ( new QuartzTriggersId ( ) . schedulerName ( scheduler ) . triggerGroup ( triggergroup ) . triggerName ( triggername ) ) ; } @ RequestMapping ( value = "//simple" , method = RequestMethod . GET ) public List < QuartzSimpleTriggers > getAllSimpleTriggers ( ) { } @ RequestMapping ( value = "//simple//{scheduler}//{triggergroup//{triggername}}" , method = RequestMethod . GET ) public QuartzSimpleTriggers getSimpleTrigger ( @ PathVariable String scheduler , @ PathVariable String triggergroup , @ PathVariable String triggerName ) { } @ RequestMapping ( value = "//blob" , method = RequestMethod . GET ) public String getAllBlob ( ) { } }

Fix:
@ RequestMapping ( value = "//cron//{scheduler}//{triggergroup}//{triggername}" , method = RequestMethod . GET )
Buggy code:
public class EmailTask extends Task { private static final int SMTP_PORT = 25 ; public static final String AUTO = "auto" ; public static final String MIME = "mime" ; public static final String UU = "uu" ; public static final String PLAIN = "plain" ; public static class Encoding extends EnumeratedAttribute { public String [ ] getValues ( ) { } } private String encoding = EmailTask . AUTO ; private String host = "localhost" ; private Integer port = null ; private String subject = null ; private Message message = null ; private boolean failOnError = true ; private boolean includeFileNames = false ; private String messageMimeType = null ; private EmailAddress from = null ; private Vector replyToList = new Vector ( ) ; private Vector toList = new Vector ( ) ; private Vector ccList = new Vector ( ) ; private Vector bccList = new Vector ( ) ; private Vector headers = new Vector ( ) ; private Path attachments = null ; private String charset = null ; private String user = null ; private String password = null ; private boolean ssl = false ; private boolean starttls = false ; private boolean ignoreInvalidRecipients = false ; public void setUser ( String user ) { } public void setPassword ( String password ) { } public void setSSL ( boolean ssl ) { } public void setEnableStartTLS ( boolean b ) { } public void setEncoding ( EmailTask . Encoding encoding ) { } public void setMailport ( int port ) { <START_BUG> this . port = Integer . valueOf ( port ) ; <END_BUG> } public void setMailhost ( String host ) { } public void setSubject ( String subject ) { } public void setMessage ( String message ) { } public void setMessageFile ( File file ) { } public void setMessageMimeType ( String type ) { } public void addMessage ( Message message ) throws BuildException { } public void addFrom ( EmailAddress address ) { } public void setFrom ( String address ) { } public void addReplyTo ( EmailAddress address ) { } public void setReplyTo ( String address ) { } public void addTo ( EmailAddress address ) { } public void setToList ( String list ) { } public void addCc ( EmailAddress address ) { } public void setCcList ( String list ) { } public void addBcc ( EmailAddress address ) { } public void setBccList ( String list ) { } public void setFailOnError ( boolean failOnError ) { } public void setFiles ( String filenames ) { } public void addFileset ( FileSet fs ) { } public Path createAttachments ( ) { } public Header createHeader ( ) { } public void setIncludefilenames ( boolean includeFileNames ) { } public boolean getIncludeFileNames ( ) { } public void setIgnoreInvalidRecipients ( boolean b ) { } public void execute ( ) { } private void logBuildException ( String reason , BuildException e ) { } public void setCharset ( String charset ) { } public String getCharset ( ) { } }

Fix:
this . port = new Integer ( port ) ;
Buggy code:
public class TestFramework { static class MyScheduler implements Scheduler { int launchedTasks = 0 ; int finishedTasks = 0 ; final int totalTasks ; public MyScheduler ( ) { } public MyScheduler ( int numTasks ) { } @ Override public void registered ( SchedulerDriver driver , FrameworkID frameworkId ) { } @ Override public void resourceOffers ( SchedulerDriver driver , List < Offer > offers ) { } @ Override public void offerRescinded ( SchedulerDriver driver , OfferID offerId ) { } @ Override public void statusUpdate ( SchedulerDriver driver , TaskStatus status ) { } @ Override public void frameworkMessage ( SchedulerDriver driver , SlaveID slaveId , ExecutorID executorId , byte [ ] data ) { } @ Override public void slaveLost ( SchedulerDriver driver , SlaveID slaveId ) { } @ Override public void error ( SchedulerDriver driver , int code , String message ) { } } private static void usage ( ) { <START_BUG> String name = TestMultipleExecutorsFramework . class . getName ( ) ; <END_BUG> System . err . println ( ( ( "Usage:<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>master<seq2seq4repair_space><tasks>" ) ) ; } public static void main ( String [ ] args ) throws Exception { } }

Fix:
String name = TestFramework . class . getName ( ) ;
Buggy code:
public final class ZLAndroidPaintContext extends ZLPaintContext { private final Canvas myCanvas ; private final Paint myTextPaint = new Paint ( ) ; private final Paint myLinePaint = new Paint ( ) ; private final Paint myFillPaint = new Paint ( ) ; private final Paint myOutlinePaint = new Paint ( ) ; private final int myWidth ; private final int myHeight ; private final int myScrollbarWidth ; private ZLColor myBackgroundColor = new ZLColor ( 0 , 0 , 0 ) ; private HashMap < String , Typeface [ ] > myTypefaces = new HashMap < String , Typeface [ ] > ( ) ; ZLAndroidPaintContext ( Canvas canvas , int width , int height , int scrollbarWidth ) { } private static ZLFile ourWallpaperFile ; private static Bitmap ourWallpaper ; @ Override public void clear ( ZLFile wallpaperFile , boolean doMirror ) { } @ Override public void clear ( ZLColor color ) { } @ Override public ZLColor getBackgroundColor ( ) { } public void fillPolygon ( int [ ] xs , int [ ] ys ) { } public void drawPolygonalLine ( int [ ] xs , int [ ] ys ) { } public void drawOutline ( int [ ] xs , int [ ] ys ) { } protected void setFontInternal ( String family , int size , boolean bold , boolean italic , boolean underline ) { } @ Override public void setTextColor ( ZLColor color ) { } @ Override public void setLineColor ( ZLColor color , int style ) { } @ Override public void setLineWidth ( int width ) { } @ Override public void setFillColor ( ZLColor color , int alpha , int style ) { } public int getWidth ( ) { } public int getHeight ( ) { } public int getStringWidth ( char [ ] string , int offset , int length ) { boolean containsSoftHyphen = false ; for ( int i = offset ; i < ( offset + length ) ; ++ i ) { if ( ( string [ i ] ) == ( ( char ) ( 173 ) ) ) { containsSoftHyphen = true ; break ; } } if ( ! containsSoftHyphen ) { <START_BUG> return ( ( int ) ( ( myTextPaint . measureText ( string , offset , length ) ) + 0.5F ) ) ; <END_BUG> } else { final char [ ] corrected = new char [ length ] ; int len = 0 ; for ( int o = offset ; o < ( offset + length ) ; ++ o ) { final char chr = string [ o ] ; if ( chr != ( ( char ) ( 173 ) ) ) { corrected [ ( len ++ ) ] = chr ; } } return ( ( int ) ( ( myTextPaint . measureText ( corrected , 0 , len ) ) + 0.5F ) ) ; } } protected int getSpaceWidthInternal ( ) { } protected int getStringHeightInternal ( ) { } protected int getDescentInternal ( ) { } public void drawString ( int x , int y , char [ ] string , int offset , int length ) { } public int imageWidth ( ZLImageData imageData ) { } public int imageHeight ( ZLImageData imageData ) { } public void drawImage ( int x , int y , ZLImageData imageData ) { } public void drawLine ( int x0 , int y0 , int x1 , int y1 ) { } public void fillRectangle ( int x0 , int y0 , int x1 , int y1 ) { } public void drawFilledCircle ( int x , int y , int r ) { } public String realFontFamilyName ( String fontFamily ) { } protected void fillFamiliesList ( ArrayList < String > families ) { } }

Fix:
return ( ( int ) ( ( myTextPaint . measureText ( new String ( string , offset , length ) ) ) + 0.5F ) ) ;
Buggy code:
public class Village implements Serializable , Comparable < Village > { private static final long serialVersionUID = - 8934307394308919420L ; private VillageType myType ; private int gold ; private int wood ; private Region myRegion ; private Tile myTile ; private Player owner ; private int HP ; private Village . VillageStatus myStatus ; public Village ( Player owner , Region region , Tile tile ) { } public boolean shoot ( ) { } public VillageType getType ( ) { } public Region getRegion ( ) { } public Tile getTile ( ) { } public int getGold ( ) { } public int getWood ( ) { } public Player getOwner ( ) { } public void setType ( VillageType type ) { } public void addGold ( int goldToAdd ) { } public boolean removeGold ( int goldToRemove ) { <START_BUG> if ( ( ( this . gold ) - goldToRemove ) > 0 ) { <END_BUG> this . gold = ( this . gold ) - goldToRemove ; return true ; } return false ; } public void addWood ( int woodToAdd ) { } public void removeWood ( int woodToRemove ) { } public Village merge ( Village village ) { } @ Override public int compareTo ( Village v ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } public boolean higherThan ( VillageType v ) { } public Village . VillageStatus getStatus ( ) { } public void updateStatus ( Village . VillageStatus status ) { } public void upgradeVillageType ( ) { } public enum VillageStatus { VillageReady , StartUpgrading , StillUpgrading ; } public int HP ( ) { } }

Fix:
if ( ( ( this . gold ) - goldToRemove ) >= 0 ) {
Buggy code:
public class SecurityLogFilter implements LogFilter { private MyPolly myPolly ; private User executer ; public SecurityLogFilter ( MyPolly myPolly , User executer ) { } @ Override public boolean accept ( LogEntry log ) { <START_BUG> return this . myPolly . irc ( ) . isOnChannel ( log . getChannel ( ) , this . executer . getCurrentNickName ( ) ) ; <END_BUG> } }

Fix:
return ( this . myPolly . irc ( ) . isOnChannel ( log . getChannel ( ) , this . executer . getCurrentNickName ( ) ) ) || ( ( log . getType ( ) ) == ( LogEntry . TYPE_UNKNOWN ) ) ;
Buggy code:
public class MutableFloat extends Number implements Comparable < MutableFloat > , Mutable < Number > { private static final long serialVersionUID = 5787169186L ; private float value ; public MutableFloat ( ) { } public MutableFloat ( final float value ) { } public MutableFloat ( final Number value ) { } public MutableFloat ( final String value ) throws NumberFormatException { } @ Override public Float getValue ( ) { } public void setValue ( final float value ) { } @ Override public void setValue ( final Number value ) { } public boolean isNaN ( ) { } public boolean isInfinite ( ) { } public void increment ( ) { } public void decrement ( ) { } public void add ( final float operand ) { } public void add ( final Number operand ) { } public void subtract ( final float operand ) { } public void subtract ( final Number operand ) { } @ Override public int intValue ( ) { } @ Override public long longValue ( ) { } @ Override public float floatValue ( ) { } @ Override public double doubleValue ( ) { } public Float toFloat ( ) { } @ Override public boolean equals ( final Object obj ) { } @ Override public int hashCode ( ) { } @ Override public int compareTo ( final MutableFloat other ) { <START_BUG> float anotherVal = other . value ; <END_BUG> return Float . compare ( value , anotherVal ) ; } @ Override public String toString ( ) { } }

Fix:
final float anotherVal = other . value ;
Buggy code:
public class FuzzyKMeansMapper extends Mapper < WritableComparable < ? > , VectorWritable , Text , ClusterObservations > { private static final Logger log = LoggerFactory . getLogger ( FuzzyKMeansMapper . class ) ; private final List < SoftCluster > clusters = new ArrayList < SoftCluster > ( ) ; private FuzzyKMeansClusterer clusterer ; @ Override protected void map ( WritableComparable < ? > key , VectorWritable point , Context context ) throws IOException , InterruptedException { } @ Override protected void setup ( Context context ) throws IOException , InterruptedException { super . setup ( context ) ; Configuration job = context . getConfiguration ( ) ; clusterer = new FuzzyKMeansClusterer ( job ) ; FuzzyKMeansMapper . log . info ( "In<seq2seq4repair_space>Mapper<seq2seq4repair_space>Configure:" ) ; String clusterPath = job . get ( CLUSTER_PATH_KEY ) ; if ( ( clusterPath != null ) && ( ( clusterPath . length ( ) ) > 0 ) ) { FuzzyKMeansUtil . configureWithClusterInfo ( new Path ( clusterPath ) , clusters ) ; } if ( clusters . isEmpty ( ) ) { <START_BUG> throw new IllegalStateException ( "Cluster<seq2seq4repair_space>is<seq2seq4repair_space>empty!!!" ) ; <END_BUG> } } void config ( List < SoftCluster > clusters ) { } }

Fix:
throw new IllegalStateException ( "No<seq2seq4repair_space>clusters<seq2seq4repair_space>found.<seq2seq4repair_space>Check<seq2seq4repair_space>your<seq2seq4repair_space>-c<seq2seq4repair_space>path." ) ;
Buggy code:
@ RunWith ( SpringJUnit4ClassRunner . class ) @ ContextConfiguration ( classes = TestConfig . class , loader = AnnotationConfigWebContextLoader . class ) @ WebAppConfiguration public class OQuteApplicationControllerTest { @ Autowired private OQuteApplicationController oQuteApplicationController ; @ Test public void testDefaultSettings ( ) throws Exception { <START_BUG> assertThat ( oQuteApplicationController . handle ( ) ) . isEqualTo ( "Dmitry" ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
assertThat ( oQuteApplicationController . handle ( 1L ) ) . isEqualTo ( "Dmitry" ) ;
Buggy code:
public class ListSelectionDialog extends SelectionDialog { private Object inputElement ; private ILabelProvider labelProvider ; private IStructuredContentProvider contentProvider ; CheckboxTableViewer listViewer ; private static final int SIZING_SELECTION_WIDGET_HEIGHT = 250 ; private static final int SIZING_SELECTION_WIDGET_WIDTH = 300 ; public ListSelectionDialog ( Shell parentShell , Object input , IStructuredContentProvider contentProvider , ILabelProvider labelProvider , String message ) { } private void addSelectionButtons ( Composite composite ) { Composite buttonComposite = new Composite ( composite , SWT . RIGHT ) ; GridLayout layout = new GridLayout ( ) ; layout . numColumns = 2 ; buttonComposite . setLayout ( layout ) ; GridData data = new GridData ( ( ( GridData . HORIZONTAL_ALIGN_END ) | ( GridData . GRAB_HORIZONTAL ) ) ) ; data . grabExcessHorizontalSpace = true ; <START_BUG> composite . setData ( data ) ; <END_BUG> Button selectButton = createButton ( buttonComposite , SELECT_ALL_ID , SELECT_ALL_TITLE , false ) ; SelectionListener listener = new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { listViewer . setAllChecked ( true ) ; } } ; selectButton . addSelectionListener ( listener ) ; Button deselectButton = createButton ( buttonComposite , DESELECT_ALL_ID , DESELECT_ALL_TITLE , false ) ; listener = new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { listViewer . setAllChecked ( false ) ; } } ; deselectButton . addSelectionListener ( listener ) ; } private void checkInitialSelections ( ) { } protected void configureShell ( Shell shell ) { } protected Control createDialogArea ( Composite parent ) { } protected CheckboxTableViewer getViewer ( ) { } private void initializeViewer ( ) { } protected void okPressed ( ) { } }

Fix:
buttonComposite . setLayoutData ( data ) ;
Buggy code:
@ Tps ( nbhours = 17 ) public class Combat extends Thread { protected Terrain terrain ; protected Climat climat ; protected PokemonCombat [ ] equipe1 ; protected PokemonCombat [ ] equipe2 ; protected PokemonCombat [ ] pkmListe ; protected Scanner sc = new Scanner ( System . in ) ; protected String buffer = "" ; protected boolean bufferReady ; protected PokemonCombat pCourant ; protected int actflag = - 1 ; protected int act = - 1 ; protected int ind = - 1 ; protected int swapInd = - 1 ; protected boolean freeze = false ; public Combat ( ) { } public Combat ( Joueur j1 , Joueur j2 ) { } public Combat ( Joueur j , Dresseur d ) { } public int gagnant ( ) { } public PokemonCombat [ ] getPkmListe ( ) { } public void run ( ) { } public void initSolo ( Joueur j1 , Joueur j2 ) { } public void initSolo ( Joueur j , Dresseur d ) { equipe1 = new PokemonCombat [ j . teamsize ] ; equipe2 = new PokemonCombat [ d . getTeam ( ) . size ( ) ] ; pkmListe = new PokemonCombat [ 2 ] ; for ( int i = 0 ; i < ( j . teamsize ) ; i ++ ) { equipe1 [ i ] = new PokemonCombat ( j . team [ i ] , false , j ) ; equipe1 [ i ] . equipe = equipe1 ; } for ( int i = 0 ; i < ( d . getTeam ( ) . size ( ) ) ; i ++ ) { <START_BUG> equipe2 [ i ] = new PokemonCombat ( d . getTeam ( ) . elementAt ( i ) , false , d ) ; <END_BUG> equipe2 [ i ] . equipe = equipe2 ; } pkmListe [ 0 ] = equipe1 [ 0 ] ; pkmListe [ 1 ] = equipe2 [ 0 ] ; pkmListe [ 0 ] . adv [ 0 ] = pkmListe [ 1 ] ; pkmListe [ 0 ] . XpStack . add ( pkmListe [ 0 ] . adv [ 0 ] . pkm ) ; pkmListe [ 1 ] . adv [ 0 ] = pkmListe [ 0 ] ; pkmListe [ 1 ] . XpStack . add ( pkmListe [ 1 ] . adv [ 0 ] . pkm ) ; pkmListe [ 0 ] . listeIndice = 0 ; pkmListe [ 1 ] . listeIndice = 1 ; } public int combatsolo ( ) { } public void action ( PokemonCombat user , PokemonCombat cible ) { } public void ajoutXpStack ( PokemonCombat pkmc ) { } public void pokeswap ( PokemonCombat user ) { } public Terrain getTerrain ( ) { } public Climat getClimat ( ) { } public PokemonCombat [ ] getEquipe1 ( ) { } public PokemonCombat [ ] getEquipe2 ( ) { } public synchronized void ajoutBuffer ( String s ) { } public synchronized boolean bufferIsEmpty ( ) { } public synchronized boolean bufferIsReady ( ) { } public synchronized String readBuffer ( ) { } public synchronized void resetBuffer ( ) { } public synchronized void setBufferState ( boolean st ) { } public synchronized void getAct ( ) { } public synchronized void setAct ( int aflag , int act ) { } public synchronized void resetAct ( ) { } public synchronized void setfreeze ( boolean f ) { } public synchronized PokemonCombat getPCourant ( ) { } }

Fix:
equipe2 [ i ] = new PokemonCombat ( d . getTeam ( ) . elementAt ( i ) , true , d ) ;
Buggy code:
final class ModuleLoaderIntegration extends FrameworkModuleLoaderPlugin { private final InjectedValue < ServiceModuleLoader > injectedModuleLoader = new InjectedValue < ServiceModuleLoader > ( ) ; private ServiceContainer serviceContainer ; private ServiceTarget serviceTarget ; @ Override protected void addServiceDependencies ( ServiceBuilder < FrameworkModuleLoader > builder ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override protected FrameworkModuleLoader createServiceValue ( StartContext startContext ) { } class FrameworkModuleLoaderImpl implements FrameworkModuleLoader { @ Override public ModuleLoader getModuleLoader ( ) { } @ Override public ModuleIdentifier getModuleIdentifier ( XBundleRevision brev ) { XBundle bundle = brev . getBundle ( ) ; Deployment deployment = bundle . adapt ( Deployment . class ) ; ModuleIdentifier identifier = deployment . getAttachment ( IntegrationConstants . MODULE_IDENTIFIER_KEY ) ; if ( identifier == null ) { XIdentityCapability icap = brev . getIdentityCapability ( ) ; BundleRevisions brevs = bundle . adapt ( BundleRevisions . class ) ; int revsize = brevs . getRevisions ( ) . size ( ) ; <START_BUG> String name = icap . getSymbolicName ( ) ; <END_BUG> if ( revsize > 1 ) { name += "-rev" + ( revsize - 1 ) ; } identifier = ModuleIdentifier . create ( ( ( MODULE_PREFIX ) + name ) , ( "" + ( icap . getVersion ( ) ) ) ) ; } return identifier ; } @ Override public void addIntegrationDependencies ( ModuleSpecBuilderContext context ) { } @ Override public void addModuleSpec ( XBundleRevision brev , final ModuleSpec moduleSpec ) { } @ Override public void addModule ( XBundleRevision brev , final Module module ) { } @ Override public ServiceName createModuleService ( XBundleRevision brev , List < BundleWire > wires ) { } @ Override public void removeModule ( XBundleRevision brev ) { } @ Override public ServiceName getModuleServiceName ( ModuleIdentifier identifier ) { } private ServiceName getModuleSpecServiceName ( ModuleIdentifier identifier ) { } @ Override public String toString ( ) { } } }

Fix:
String name = icap . getName ( ) ;
Buggy code:
public class SelectExistingTournament extends ActionBarActivity { Vector < String > tournamentNamesVector = new Vector < String > ( ) ; String tournamentSelected = "" ; int tournamentID ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void createDisplay ( ) { } public void select ( View view ) { } public void GetTournaments ( ) { String myQuery = "SELECT<seq2seq4repair_space>COUNT(ROWID)<seq2seq4repair_space>FROM<seq2seq4repair_space>Tournament" ; Cursor myCursor = DatabaseCommunicator . CreateFetchQuery ( myQuery ) ; myCursor . moveToFirst ( ) ; int tourneyExists = myCursor . getInt ( 0 ) ; <START_BUG> if ( tourneyExists >= 1 ) { <END_BUG> myQuery = "SELECT<seq2seq4repair_space>TournamentName<seq2seq4repair_space>FROM<seq2seq4repair_space>Tournament" ; myCursor = DatabaseCommunicator . CreateFetchQuery ( myQuery ) ; Log . d ( "SelectExistingTourney" , "Query<seq2seq4repair_space>Complete" ) ; myCursor . moveToFirst ( ) ; tournamentNamesVector . add ( myCursor . getString ( 0 ) ) ; while ( myCursor . moveToNext ( ) ) { tournamentNamesVector . add ( myCursor . getString ( 0 ) ) ; } } else { Toast . makeText ( getApplicationContext ( ) , ( "No<seq2seq4repair_space>Tournaments<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>created<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>System<seq2seq4repair_space>yet.<seq2seq4repair_space>" + "Please<seq2seq4repair_space>create<seq2seq4repair_space>a<seq2seq4repair_space>Tournament<seq2seq4repair_space>first." ) , LENGTH_SHORT ) . show ( ) ; thread . start ( ) ; } } Thread thread = new Thread ( ) { @ Override public void run ( ) { } } ; }

Fix:
if ( tourneyExists > 0 ) {
Buggy code:
public class SynchronizeFolderListCommand extends Command { private Pattern delimiterPattern ; private IMAPRootFolder root ; private IMAPServer store ; private TreeNode node ; private String delimiter ; public SynchronizeFolderListCommand ( SubscribeCommandReference reference ) { } public void execute ( WorkerStatusController worker ) throws Exception { } private List fetchUnsubscribedFolders ( String reference ) throws Exception { } private TreeNode createTreeStructure ( ) throws Exception { ListInfo [ ] lsub = store . fetchSubscribedFolders ( ) ; List subscribedFolders = new ArrayList ( Arrays . asList ( lsub ) ) ; subscribedFolders . add ( new ListInfo ( "INBOX" , null , 0 ) ) ; List unsubscribedFolders = fetchUnsubscribedFolders ( "" ) ; ListTools . substract ( unsubscribedFolders , subscribedFolders ) ; DefaultMutableTreeNode root = new CheckableItemImpl ( ) ; <START_BUG> String pattern = ( ( ( "([^\\" + ( store . getDelimiter ( ) ) ) + "]+)\\" ) + ( store . getDelimiter ( ) ) ) + "?" ; <END_BUG> delimiterPattern = Pattern . compile ( pattern ) ; delimiter = store . getDelimiter ( ) ; Iterator it = unsubscribedFolders . iterator ( ) ; while ( it . hasNext ( ) ) { ListInfoTreeNode node = insertTreeNode ( ( ( ListInfo ) ( it . next ( ) ) ) , root ) ; node . setSelected ( false ) ; } it = subscribedFolders . iterator ( ) ; while ( it . hasNext ( ) ) { ListInfoTreeNode node = insertTreeNode ( ( ( ListInfo ) ( it . next ( ) ) ) , root ) ; node . setSelected ( true ) ; } return root ; } private ListInfoTreeNode insertTreeNode ( ListInfo listInfo , DefaultMutableTreeNode parent ) { } private DefaultMutableTreeNode ensureChild ( String name , String mailbox , DefaultMutableTreeNode parent ) { } public void updateGUI ( ) throws Exception { } }

Fix:
String pattern = ( ( ( "([^\\Q" + ( store . getDelimiter ( ) ) ) + "]+)\\E" ) + ( store . getDelimiter ( ) ) ) + "?" ;
Buggy code:
public class ThreadUtils { public static boolean isOnMain ( ) { } public static void ensureNotOnMain ( ) { } public static void runOnMain ( Runnable runnable ) { } public static void runInBackground ( @ NonNull final Runnable runnable ) { } public static int getId ( ) { <START_BUG> return Process . getThreadPriority ( Process . myTid ( ) ) ; <END_BUG> } public static class DispatchOnMainThreadException extends RuntimeException { } }

Fix:
return Process . myTid ( ) ;
Buggy code:
public class Wizard extends Composite { private static Wizard . WizardUiBinder uiBinder = GWT . create ( Wizard . WizardUiBinder . class ) ; interface WizardUiBinder extends UiBinder < Widget , Wizard > { } public static BookingInfo BOOKINGINFO = new BookingInfo ( ) ; public static List < BookingInfo > EXISTING_BOOKINGS_ON_ROUTE ; public static RouteInfo ROUTEINFO ; public static ProfilInfo PROFILINFO ; public static RatingInfo RATINGINFO ; public static boolean MOBILE = false ; public static int SCREEN_WIDTH ; public static int SCREEN_HEIGHT ; private final List < WizardStep > stepList ; private final Map < WizardStep , HTML > headers = Maps . newHashMap ( ) ; private int currentstep ; private WizardStep initstep ; @ UiField HTMLPanel mainPanel ; @ UiField HTMLPanel steps ; @ UiField FlowPanel header ; @ UiField HTML progressBar ; @ UiField Button prev ; @ UiField Button next ; public Wizard ( ) { } protected void initWidget ( ) { } public void add ( WizardStep step ) { } @ Override public void setHeight ( String height ) { } @ Override public void setWidth ( String width ) { } @ UiHandler ( "prev" ) public void onPrevClick ( ClickEvent event ) { } @ UiHandler ( "next" ) public void onNextClick ( ClickEvent event ) { } private void handleNextStep ( ) { if ( ( stepList . get ( currentstep ) ) instanceof ShareStep ) { <START_BUG> if ( ( Wizard . EXISTING_BOOKINGS_ON_ROUTE . size ( ) ) == 0 ) { <END_BUG> ( currentstep ) ++ ; } } if ( ( stepList . get ( currentstep ) ) instanceof CreditCardStep ) { if ( SHARE . equals ( Wizard . BOOKINGINFO . getOrderType ( ) ) ) { ( currentstep ) ++ ; } } } private void handlePreviousStep ( ) { } private void updateHeader ( int current ) { } public void init ( ) { } public void setInitialStep ( WizardStep initstep ) { } public void activateShareConfirmationStep ( ShareConfirmationStep step ) { } }

Fix:
if ( ( ( Wizard . EXISTING_BOOKINGS_ON_ROUTE ) == null ) || ( ( Wizard . EXISTING_BOOKINGS_ON_ROUTE . size ( ) ) == 0 ) ) {