nus-yam/ex-repair huggingface dataset:
Buggy code:
public class EjbJar extends MatchingTask { private EjbJar . Config config = new EjbJar . Config ( ) ; private String genericJarSuffix = "-generic.jar" ; private ArrayList deploymentTools = new ArrayList ( ) ; private File destDir ; public void setBasejarname ( String inValue ) { } public void setBasenameterminator ( String inValue ) { } public void setClasspath ( Path classpath ) { } public void setDescriptordir ( File inDir ) { } public void setDestdir ( File inDir ) { } public void setFlatdestdir ( boolean inValue ) { } public void setGenericjarsuffix ( String inString ) { } public void setManifest ( File manifest ) { } public void setNaming ( EjbJar . NamingScheme namingScheme ) { } public void setSrcdir ( File inDir ) { } public BorlandDeploymentTool createBorland ( ) { } public Path createClasspath ( ) { if ( ( config . classpath ) == null ) { <START_BUG> config . classpath = new Path ( project ) ; <END_BUG> } return config . classpath . createPath ( ) ; } public EjbJar . DTDLocation createDTD ( ) { } public IPlanetDeploymentTool createIplanet ( ) { } public JbossDeploymentTool createJboss ( ) { } public FileSet createSupport ( ) { } public WeblogicDeploymentTool createWeblogic ( ) { } public WeblogicTOPLinkDeploymentTool createWeblogictoplink ( ) { } public WebsphereDeploymentTool createWebsphere ( ) { } public void execute ( ) throws TaskException { } private void validateConfig ( ) { } public static class DTDLocation { private String publicId = null ; private String location = null ; public void setLocation ( String location ) { } public void setPublicId ( String publicId ) { } public String getLocation ( ) { } public String getPublicId ( ) { } } public static class NamingScheme extends EnumeratedAttribute { public static final String EJB_NAME = "ejb-name" ; public static final String DIRECTORY = "directory" ; public static final String DESCRIPTOR = "descriptor" ; public static final String BASEJARNAME = "basejarname" ; public String [ ] getValues ( ) { } } static class Config { public String baseNameTerminator = "-" ; public boolean flatDestDir = false ; public List supportFileSets = new ArrayList ( ) ; public ArrayList dtdLocations = new ArrayList ( ) ; public String baseJarName ; public Path classpath ; public File descriptorDir ; public File manifest ; public EjbJar . NamingScheme namingScheme ; public File srcDir ; } }

Fix:
config . classpath = new Path ( getProject ( ) ) ;
Buggy code:
public class CodeSnippetMessageSend extends MessageSend implements ProblemReasons , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; public CodeSnippetMessageSend ( EvaluationContext evaluationContext ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { if ( ! ( flowInfo . isReachable ( ) ) ) return ; this . codegenBinding = this . binding . original ( ) ; if ( ( this . codegenBinding ) != ( this . binding ) ) { if ( this . codegenBinding . returnType . isTypeVariable ( ) ) { TypeVariableBinding variableReturnType = ( ( TypeVariableBinding ) ( this . codegenBinding . returnType ) ) ; if ( ( variableReturnType . firstBound ) != ( this . binding . returnType ) ) { this . genericCast = this . binding . returnType ; } } } <START_BUG> if ( ( ( ( this . binding . declaringClass ) != ( this . qualifyingType ) ) && ( ! ( this . qualifyingType . isArrayType ( ) ) ) ) && ( ( ( ( ( currentScope . environment ( ) . options . targetJDK ) >= ( ClassFileConstants . JDK1_2 ) ) && ( ( ! ( this . receiver . isImplicitThis ( ) ) ) || ( ! ( this . codegenBinding . isStatic ( ) ) ) ) ) && ( ( this . binding . declaringClass . id ) != ( T_Object ) ) ) || ( ! ( this . binding . declaringClass . canBeSeenBy ( currentScope ) ) ) ) ) { <END_BUG> this . codegenBinding = currentScope . enclosingSourceType ( ) . getUpdatedMethodBinding ( this . codegenBinding , ( ( ReferenceBinding ) ( this . qualifyingType . erasure ( ) ) ) ) ; } } public TypeBinding resolveType ( BlockScope scope ) { } }

Fix:
if ( ( ( ( this . binding . declaringClass ) != ( this . qualifyingType ) ) && ( ! ( this . qualifyingType . isArrayType ( ) ) ) ) && ( ( ( ( ( currentScope . environment ( ) . options . targetJDK ) >= ( ClassFileConstants . JDK1_2 ) ) && ( ( ! ( this . receiver . isImplicitThis ( ) ) ) || ( ! ( this . codegenBinding . isStatic ( ) ) ) ) ) && ( ( this . binding . declaringClass . id ) != ( T_Object ) ) ) || ( ! ( this . codegenBinding . declaringClass . canBeSeenBy ( currentScope ) ) ) ) ) {
Buggy code:
public class Arena implements Serializable { private static final long serialVersionUID = 1301968695579108833L ; int WH ; int WW ; private static int [ ] [ ] grad3 = new int [ ] [ ] { new int [ ] { 1 , 1 , 0 } , new int [ ] { - 1 , 1 , 0 } , new int [ ] { 1 , - 1 , 0 } , new int [ ] { - 1 , - 1 , 0 } , new int [ ] { 1 , 0 , 1 } , new int [ ] { - 1 , 0 , 1 } , new int [ ] { 1 , 0 , - 1 } , new int [ ] { - 1 , 0 , - 1 } , new int [ ] { 0 , 1 , 1 } , new int [ ] { 0 , - 1 , 1 } , new int [ ] { 0 , 1 , - 1 } , new int [ ] { 0 , - 1 , - 1 } } ; private int [ ] p = new int [ 256 ] ; private String worldstring ; private int [ ] perm = new int [ 512 ] ; float [ ] [ ] simplexnoise ; boolean f = true ; Sprite [ ] sprites = new Sprite [ 8 ] ; int zoom = 0 ; public Arena ( int WW , int WH , int [ ] p ) { } public Arena ( int WW , int WH ) { } public void generate ( ) { simplexnoise = new float [ WW ] [ WH ] ; <START_BUG> float frequency = 5.0F // ( ( float ) ( WH ) ) ; <END_BUG> for ( int i = 0 ; i < 512 ; i ++ ) { perm [ i ] = p [ ( i & 255 ) ] ; } for ( int x = 0 ; x < ( WH ) ; x ++ ) { for ( int y = 0 ; y < ( WH ) ; y ++ ) { simplexnoise [ x ] [ y ] = ( ( float ) ( noise ( ( x * frequency ) , ( y * frequency ) ) ) ) ; simplexnoise [ x ] [ y ] = ( ( ( ( simplexnoise [ x ] [ y ] ) + 1 ) // 2 ) * 10 ) - 2 ; if ( ( simplexnoise [ x ] [ y ] ) < 0 ) { simplexnoise [ x ] [ y ] = 0 ; } } } } public void render ( double dt , Game game , int xoffset , int yoffset ) { } private int fastfloor ( double x ) { } private double dot ( int [ ] g , double x , double y ) { } public double noise ( double xin , double yin ) { } public String getWorldString ( ) { } public int getWW ( ) { } public int getWH ( ) { } public void zoom ( int zoom ) { } public static void update ( ) { } }

Fix:
float frequency = 6.0F // ( ( float ) ( WH ) ) ;
Buggy code:
public class ZipArchiveEntry extends ZipEntry implements ArchiveEntry { private static Method c_setCompressedSizeMethod ; private static final Object c_lockReflection = new Object ( ) ; private static boolean c_triedToGetMethod ; private final ArrayList m_extraFields = new ArrayList ( ) ; private int m_internalAttributes ; private long m_externalAttributes ; private Long m_compressedSize ; public ZipArchiveEntry ( final String name ) { } public ZipArchiveEntry ( ZipEntry entry ) throws ZipException { } public ZipArchiveEntry ( final ZipArchiveEntry entry ) throws ZipException { } private static void checkSCS ( ) { } private static boolean haveSetCompressedSize ( ) { } private static void performSetCompressedSize ( final ZipArchiveEntry entry , final long size ) { } public void setComprSize ( final long size ) { } public void setExternalAttributes ( final long externalAttributes ) { } public void setExtra ( final byte [ ] extra ) throws RuntimeException { } public void setExtraFields ( final ZipExtraField [ ] fields ) { } public void setInternalAttributes ( final int value ) { } public byte [ ] getCentralDirectoryExtra ( ) { } public long getCompressedSize ( ) { } public long getExternalAttributes ( ) { } public ZipExtraField [ ] getExtraFields ( ) { } public int getInternalAttributes ( ) { } public byte [ ] getLocalFileDataExtra ( ) { } public void addExtraField ( final ZipExtraField extraField ) { } public Object clone ( ) { ZipArchiveEntry entry = null ; try { entry = new ZipArchiveEntry ( ( ( ZipEntry ) ( super . clone ( ) ) ) ) ; } catch ( final Exception e ) { e . printStackTrace ( ) ; <START_BUG> return null ; <END_BUG> } entry . setInternalAttributes ( getInternalAttributes ( ) ) ; entry . setExternalAttributes ( getExternalAttributes ( ) ) ; entry . setExtraFields ( getExtraFields ( ) ) ; return entry ; } public void removeExtraField ( final ZipShort type ) { } protected void setExtra ( ) { } }

Fix:
throw new RuntimeException ( e ) ;
Buggy code:
public class Composite extends Scrollable { Layout layout ; Control [ ] tabList ; int scrolledVisibleRgn ; int siblingsVisibleRgn ; int layoutCount = 0 ; Composite ( ) { } public Composite ( Composite parent , int style ) { } Control [ ] _getChildren ( ) { } Control [ ] _getTabList ( ) { } int callFocusEventHandler ( int nextHandler , int theEvent ) { } public void changed ( Control [ ] changed ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } protected void checkSubclass ( ) { } Control [ ] computeTabList ( ) { } void createHandle ( ) { } void createHandle ( int parentHandle ) { } void createScrolledHandle ( int parentHandle ) { } void drawBackground ( int control ) { } void enableWidget ( boolean enabled ) { } Composite findDeferredControl ( ) { } void fixTabList ( Control control ) { } public Control [ ] getChildren ( ) { } int getChildrenCount ( ) { } public Layout getLayout ( ) { } public boolean getLayoutDeferred ( ) { } public Control [ ] getTabList ( ) { } int getVisibleRegion ( int control , boolean clipChildren ) { } int kEventControlClick ( int nextHandler , int theEvent , int userData ) { } int kEventControlGetFocusPart ( int nextHandler , int theEvent , int userData ) { } int kEventControlSetFocusPart ( int nextHandler , int theEvent , int userData ) { } int kEventMouseDown ( int nextHandler , int theEvent , int userData ) { } int kEventRawKeyPressed ( int nextHandler , int theEvent , int userData ) { } int kEventTextInputUnicodeForKeyEvent ( int nextHandler , int theEvent , int userData ) { } boolean hooksKeys ( ) { } void invalidateChildrenVisibleRegion ( int control ) { } public boolean isLayoutDeferred ( ) { } boolean isTabGroup ( ) { } public void layout ( ) { } public void layout ( boolean changed ) { } public void layout ( boolean changed , boolean all ) { } public void layout ( Control [ ] changed ) { } void markLayout ( boolean changed , boolean all ) { } Point minimumSize ( int wHint , int Hint , boolean changed ) { } void releaseChildren ( boolean destroy ) { Control [ ] children = _getChildren ( ) ; for ( int i = 0 ; i < ( children . length ) ; i ++ ) { Control child = children [ i ] ; if ( ( child != null ) && ( ! ( child . isDisposed ( ) ) ) ) { <START_BUG> child . releaseChildren ( false ) ; <END_BUG> } } super . releaseChildren ( destroy ) ; } void releaseWidget ( ) { } void removeControl ( Control control ) { } void resetVisibleRegion ( int control ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } public boolean setFocus ( ) { } public void setLayout ( Layout layout ) { } public void setLayoutDeferred ( boolean defer ) { } boolean setScrollBarVisible ( ScrollBar bar , boolean visible ) { } boolean setTabGroupFocus ( ) { } public void setTabList ( Control [ ] tabList ) { } void setZOrder ( ) { } int traversalCode ( int key , int theEvent ) { } void updateLayout ( boolean all ) { } }

Fix:
child . release ( false ) ;
Buggy code:
@ Repository public class StaffDAOImpl implements StaffDAO { private static final Logger logger = LoggerFactory . getLogger ( StaffDAOImpl . class ) ; private DAOHelper daoHelper = new DAOHelper ( ) ; private SessionFactory sessionFactory ; public void setSessionFactory ( SessionFactory sessionFactory ) { } @ Override public void create ( Staff staff ) { } @ Override public Staff getByID ( long id ) { } @ Override public Staff getWithAllCollectionsByID ( long id ) { } @ Override public void update ( Staff staff ) { } @ Override public void delete ( long id ) { } @ SuppressWarnings ( "unchecked" ) public List < Staff > list ( Long companyID ) { } @ SuppressWarnings ( "unchecked" ) public List < Staff > listWithAllCollections ( Long companyID ) { } @ Override public void assignProjectManager ( ManagerAssignment assignment ) { } @ Override public void unassignProjectManager ( long projectID , long staffID ) { } @ Override public void unassignAllProjectManagers ( long projectID ) { } @ Override public void unassignTeam ( long teamID , long staffID ) { } @ Override public void unassignAllTeams ( long staffID ) { } @ Override public void assignTeam ( StaffTeamAssignment stAssign ) { } @ Override public String getNameByID ( long staffID ) { } @ SuppressWarnings ( "unchecked" ) @ Override <START_BUG> @ Cacheable ( value = "searchStaffCache" , key = "#root.targetClass" ) <END_BUG> public List < Staff > listFromCache ( Long companyID ) { Session session = this . sessionFactory . getCurrentSession ( ) ; List < Staff > list = this . daoHelper . getSelectQueryFilterCompany ( session , Staff . class . getName ( ) , companyID ) . list ( ) ; return list ; } }

Fix:
@ Cacheable ( value = "searchStaffCache" , key = "#root.methodName" )
Buggy code:
public class ContainerSeedAnalyzer extends ContainerAgricraft { public TileEntitySeedAnalyzer seedAnalyzer ; public int progress ; public static final int seedSlotId = 36 ; public static final int journalSlotId = 37 ; public ContainerSeedAnalyzer ( InventoryPlayer inventory , TileEntitySeedAnalyzer seedAnalyzer ) { } @ Override public void addCraftingToCrafters ( ICrafting crafting ) { } @ Override public void detectAndSendChanges ( ) { } @ Override public void putStackInSlot ( int slot , ItemStack stack ) { } @ Override @ SideOnly ( Side . CLIENT ) public void updateProgressBar ( int type , int newValue ) { } @ Override public ItemStack transferStackInSlot ( EntityPlayer player , int clickedSlot ) { ItemStack itemstack = null ; Slot slot = ( ( Slot ) ( this . inventorySlots . get ( clickedSlot ) ) ) ; if ( ( slot != null ) && ( slot . getHasStack ( ) ) ) { ItemStack itemstack1 = slot . getStack ( ) ; itemstack = itemstack1 . copy ( ) ; if ( ( clickedSlot == ( ContainerSeedAnalyzer . seedSlotId ) ) || ( clickedSlot == ( ContainerSeedAnalyzer . journalSlotId ) ) ) { <START_BUG> if ( ! ( this . mergeItemStack ( itemstack1 , 0 , inventorySlots . size ( ) , false ) ) ) { <END_BUG> return null ; } } else { if ( ( itemstack1 . getItem ( ) ) != null ) { if ( ( itemstack1 . getItem ( ) ) instanceof ItemSeeds ) { if ( ! ( SeedHelper . isValidSeed ( ( ( ItemSeeds ) ( itemstack1 . getItem ( ) ) ) , itemstack1 . getItemDamage ( ) ) ) ) { return null ; } if ( ! ( this . mergeItemStack ( itemstack1 , ContainerSeedAnalyzer . seedSlotId , ( ( ContainerSeedAnalyzer . seedSlotId ) + 1 ) , false ) ) ) { return null ; } } else if ( ( itemstack1 . getItem ( ) ) instanceof ItemJournal ) { if ( ! ( this . mergeItemStack ( itemstack1 , ContainerSeedAnalyzer . journalSlotId , ( ( ContainerSeedAnalyzer . journalSlotId ) + 1 ) , false ) ) ) { return null ; } } } } if ( ( itemstack1 . stackSize ) == 0 ) { slot . putStack ( null ) ; } else { slot . onSlotChanged ( ) ; } if ( ( itemstack1 . stackSize ) == ( itemstack . stackSize ) ) { return null ; } slot . onPickupFromSlot ( player , itemstack1 ) ; } return itemstack ; } @ Override protected boolean mergeItemStack ( ItemStack stack , int start , int stop , boolean backwards ) { } }

Fix:
if ( ! ( this . mergeItemStack ( itemstack1 , 0 , ( ( inventorySlots . size ( ) ) - 2 ) , false ) ) ) {
Buggy code:
public class PropPanelPackage extends PropPanelNamespace implements PluggablePropertyPanel { protected PropPanelButton _stereotypeButton ; public PropPanelPackage ( ) { } PropPanelPackage ( String name , ImageIcon icon , int columns ) { } public void addStereotype ( ) { } public void addActor ( ) { } public void addUseCase ( ) { } public void addGeneralization ( ) { } public void addAssociation ( ) { } public String formatElement ( MModelElement element ) { } public void addPackage ( MModelElement element ) { } public void addDataType ( MModelElement element ) { } public void addActor ( MModelElement element ) { } public void addInterface ( MModelElement element ) { } public void addUseCase ( MModelElement element ) { } public void addAssociation ( MModelElement element ) { } public void deleteElement ( MModelElement element ) { <START_BUG> UmlFactory . getFactory ( ) . remove ( element ) ; <END_BUG> TheInstance . getNavPane ( ) . forceUpdate ( ) ; } public void addStereotype ( MModelElement element ) { } public void openElement ( MModelElement element ) { } public void navigateElement ( MModelElement element ) { } public void addClass ( MModelElement element ) { } public void addGeneralization ( MModelElement element ) { } public void addRealization ( MModelElement element ) { } protected boolean isAcceptibleBaseMetaClass ( String baseClass ) { } public Class getClassForPanel ( ) { } public String getModuleName ( ) { } public String getModuleDescription ( ) { } public String getModuleAuthor ( ) { } public String getModuleVersion ( ) { } public String getModuleKey ( ) { } }

Fix:
element . remove ( ) ;
Buggy code:
public class ItemMixingBowlRenderer { public static HashMap < String , Integer > mixColors = new LinkedHashMap < String , Integer > ( ) ; public static int getColorAsInteger ( String mixType ) { } public static float [ ] getColorAsRGB ( String mixType ) { } public static float [ ] intAsFloatArray ( int color ) { } public static String getMixType ( ItemStack mixingBowlStack ) { } public static int getColorAsInteger ( ItemStack mixingBowlStack ) { } public static void initColors ( ) { ItemMixingBowlRenderer . mixColors . put ( "waffle_dough" , 16759638 ) ; ItemMixingBowlRenderer . mixColors . put ( "pancake_dough" , 16765813 ) ; ItemMixingBowlRenderer . mixColors . put ( "burger_bun_dough" , 16765813 ) ; ItemMixingBowlRenderer . mixColors . put ( "vanilla_ice_cream" , 16777215 ) ; ItemMixingBowlRenderer . mixColors . put ( "strawberry_ice_cream" , 16752542 ) ; ItemMixingBowlRenderer . mixColors . put ( "chocolate_ice_cream" , 13402193 ) ; ItemMixingBowlRenderer . mixColors . put ( "apple_ice_cream" , 15921084 ) ; <START_BUG> ItemMixingBowlRenderer . mixColors . put ( "pasta_dough" , 16770953 ) ; <END_BUG> } }

Fix:
ItemMixingBowlRenderer . mixColors . put ( "pasta_dough" , 15064887 ) ;
Buggy code:
@ TimeoutSuite ( millis = 80 * ( TimeUnits . HOUR ) ) @ Ignore ( "takes<seq2seq4repair_space>~<seq2seq4repair_space>30<seq2seq4repair_space>minutes" ) public class Test2BNumericDocValues extends LuceneTestCase { public void testNumerics ( ) throws Exception { BaseDirectoryWrapper dir = newFSDirectory ( createTempDir ( "2BNumerics" ) ) ; if ( dir instanceof MockDirectoryWrapper ) { ( ( MockDirectoryWrapper ) ( dir ) ) . setThrottling ( NEVER ) ; } IndexWriter w = new IndexWriter ( dir , new IndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setMaxBufferedDocs ( DISABLE_AUTO_FLUSH ) . setRAMBufferSizeMB ( 256.0 ) . setMergeScheduler ( new ConcurrentMergeScheduler ( ) ) . setMergePolicy ( newLogMergePolicy ( false , 10 ) ) . setOpenMode ( CREATE ) ) ; Document doc = new Document ( ) ; NumericDocValuesField dvField = new NumericDocValuesField ( "dv" , 0 ) ; doc . add ( dvField ) ; for ( int i = 0 ; i < ( Integer . MAX_VALUE ) ; i ++ ) { dvField . setLongValue ( i ) ; w . addDocument ( doc ) ; if ( ( i % 100000 ) == 0 ) { System . out . println ( ( "indexed:<seq2seq4repair_space>" + i ) ) ; System . out . flush ( ) ; } } w . forceMerge ( 1 ) ; <START_BUG> w . close ( ) ; <END_BUG> System . out . println ( "verifying..." ) ; System . out . flush ( ) ; DirectoryReader r = DirectoryReader . open ( dir ) ; long expectedValue = 0 ; for ( AtomicReaderContext context : r . leaves ( ) ) { AtomicReader reader = context . reader ( ) ; NumericDocValues dv = reader . getNumericDocValues ( "dv" ) ; for ( int i = 0 ; i < ( reader . maxDoc ( ) ) ; i ++ ) { assertEquals ( expectedValue , dv . get ( i ) ) ; expectedValue ++ ; } } r . close ( ) ; dir . close ( ) ; } }

Fix:
w . shutdown ( ) ;
Buggy code:
public class TestMnist { @ Test public void testMnistDataProvider ( ) { } @ Test public void test ( ) { boolean useOpenCL = true ; int batchSize = 100 ; int costType = 0 ; MnistDataProvider mnistTraining = new MnistDataProvider ( "test//train-images-idx3-ubyte" , "test//train-labels-idx1-ubyte" , batchSize , false ) ; MnistDataProvider mnistTest = new MnistDataProvider ( "test//t10k-images-idx3-ubyte" , "test//t10k-labels-idx1-ubyte" , 10000 , false ) ; NeuralNetwork mlp = new MultiLayerPerceptron ( new int [ ] { 784 , 300 , 10 } , true ) ; <START_BUG> mlp . train ( mnistTraining , costType , 0.005F , 0.9F , ( ( mnistTraining . getDatasetSize ( ) ) // ( mnistTraining . getBatchSize ( ) ) ) , 0.8F , 1 , useOpenCL ) ; <END_BUG> float errorRate = mlp . test ( mnistTest , useOpenCL ) ; assertEquals ( 0 , errorRate , 0.05 ) ; } }

Fix:
mlp . train ( mnistTraining , costType , 0.5F , 0.9F , ( ( mnistTraining . getDatasetSize ( ) ) // ( mnistTraining . getBatchSize ( ) ) ) , 0.8F , 1 , useOpenCL ) ;
Buggy code:
public class CalendarComponent implements IComponentPlugin { public static final String PLUGIN_ID = "org.columba.calendar.frenchvanilla" ; public CalendarComponent ( ) throws Exception { } public void init ( ) { try { PluginMetadata metadata = PluginManager . getInstance ( ) . getPluginMetadata ( CalendarComponent . PLUGIN_ID ) ; InputStream is = this . getClass ( ) . getResourceAsStream ( "//org//columba//calendar//action//action.xml" ) ; <START_BUG> PluginManager . getInstance ( ) . getHandler ( ORG_COLUMBA_CORE_ACTION ) . loadExternalExtensionsFromStream ( metadata , is ) ; <END_BUG> } catch ( PluginHandlerNotFoundException ex ) { } } public void postStartup ( ) { } public void registerCommandLineArguments ( ) { } public void handleCommandLineParameters ( CommandLine commandLine ) { } }

Fix:
PluginManager . getInstance ( ) . getExtensionHandler ( ORG_COLUMBA_CORE_ACTION ) . loadExternalExtensionsFromStream ( metadata , is ) ;
Buggy code:
public class ExecuteJava { private Commandline javaCommand = null ; private Path classpath = null ; private SysProperties sysProperties = null ; public void setJavaCommand ( Commandline javaCommand ) { } public void setClasspath ( Path p ) { } public void setSystemProperties ( CommandlineJava . SysProperties s ) { } public void execute ( Project project ) throws BuildException { final String classname = javaCommand . getExecutable ( ) ; final Object [ ] argument = new Object [ ] { javaCommand . getArguments ( ) } ; try { if ( ( sysProperties ) != null ) { <START_BUG> sysProperties . restoreSystem ( ) ; <END_BUG> } final Class [ ] param = new Class [ ] { Class . forName ( "[Ljava.lang.String;" ) } ; Class target = null ; if ( ( classpath ) == null ) { target = Class . forName ( classname ) ; } else { AntClassLoader loader = new AntClassLoader ( project , classpath ) ; target = loader . forceLoadClass ( classname ) ; } final Method main = target . getMethod ( "main" , param ) ; main . invoke ( null , argument ) ; } catch ( NullPointerException e ) { throw new BuildException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>main()<seq2seq4repair_space>method<seq2seq4repair_space>in<seq2seq4repair_space>" + classname ) ) ; } catch ( ClassNotFoundException e ) { throw new BuildException ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>" + classname ) + ".<seq2seq4repair_space>Make<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>have<seq2seq4repair_space>it<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>classpath" ) ) ; } catch ( InvocationTargetException e ) { Throwable t = e . getTargetException ( ) ; if ( ! ( t instanceof SecurityException ) ) { throw new BuildException ( t ) ; } } catch ( Exception e ) { throw new BuildException ( e ) ; } finally { if ( ( sysProperties ) != null ) { sysProperties . restoreSystem ( ) ; } } } }

Fix:
sysProperties . setSystem ( ) ;
Buggy code:
public abstract class AbstractFile implements DeletableResource , DigestResource , MoveableResource , PropFindableResource , Resource , Serializable { protected static transient Logger log = Logger . getLogger ( AbstractFile . class ) ; protected String id ; protected String name ; protected Date modDate ; protected Date createdDate ; protected String parentId ; public AbstractFile ( String name , String parentId ) { } public String getParentId ( ) { } public void setParentId ( String parentId ) { } public void setName ( String name ) { } @ Override public void moveTo ( CollectionResource folder , String name ) { } @ Override public Object authenticate ( String user , String requestedPassword ) { } @ Override public Object authenticate ( DigestResponse digestRequest ) { } @ Override public String getUniqueId ( ) { } @ Override public String checkRedirect ( Request request ) { } @ Override public String getName ( ) { } @ Override public boolean authorise ( Request request , Method method , Auth auth ) { } @ Override public boolean isDigestAllowed ( ) { <START_BUG> return false ; <END_BUG> } @ Override public String getRealm ( ) { } @ Override public Date getModifiedDate ( ) { } @ Override public Date getCreateDate ( ) { } }

Fix:
return true ;
Buggy code:
public class TestRF12488 extends AbstractWebDriverTest { private static final int OFFSET = 1 ; private static final int TOLERANCE = 5 ; @ FindBy ( css = "div[id$=contextMenu1]" ) private RichFacesContextMenu contextMenu1 ; @ FindBy ( css = "div[id$=contextMenu2]" ) private RichFacesContextMenu contextMenu2 ; @ FindBy ( css = "[id$=menuDetached]" ) private WebElement menuDetached ; @ Override public String getComponentTestPagePath ( ) { } @ Test <START_BUG> @ RegressionTest ( "https:////issues.jboss.org//browse//RF-12048" ) <END_BUG> public void testDetachedContextMenuShouldShowOnCorrectPositionAndStayVisible ( ) { contextMenu1 . advanced ( ) . waitUntilIsNotVisible ( ) . perform ( ) ; contextMenu2 . advanced ( ) . waitUntilIsNotVisible ( ) . perform ( ) ; Locations l = Utils . getLocations ( menuDetached ) ; Point topLeft = l . getTopLeft ( ) ; new org . richfaces . fragment . common . Actions ( driver ) . moveToElement ( menuDetached , TestRF12488 . OFFSET , TestRF12488 . OFFSET ) . click ( ) . perform ( ) ; contextMenu2 . advanced ( ) . waitUntilIsVisible ( ) . perform ( ) ; Locations popupLocation = Utils . getLocations ( contextMenu2 . advanced ( ) . getMenuPopup ( ) ) ; Utils . tolerantAssertPointEquals ( topLeft , popupLocation . getTopLeft ( ) , TestRF12488 . TOLERANCE , TestRF12488 . TOLERANCE , "Detached<seq2seq4repair_space>menu<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>displayed<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>top<seq2seq4repair_space>left<seq2seq4repair_space>corner<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>clicked<seq2seq4repair_space>element!" ) ; waiting ( 1500 ) ; contextMenu2 . advanced ( ) . waitUntilIsVisible ( ) . withTimeout ( 1 , TimeUnit . SECONDS ) . withMessage ( "Detached<seq2seq4repair_space>menu<seq2seq4repair_space>should<seq2seq4repair_space>stay<seq2seq4repair_space>displayed<seq2seq4repair_space>after<seq2seq4repair_space>1.5<seq2seq4repair_space>s." ) . perform ( ) ; getMetamerPage ( ) . getResponseDelayElement ( ) . click ( ) ; contextMenu2 . advanced ( ) . waitUntilIsNotVisible ( ) . perform ( ) ; } }

Fix:
@ RegressionTest ( "https:////issues.jboss.org//browse//RF-12488" )
Buggy code:
public class MainActivity extends ActionBarActivity implements MainView , PageNavigationFragment . NavigationDrawerCallbacks { public static String [ ] pagesList = new String [ ] { "ciao" , "balcky" , "furlan" } ; private String title ; private MainPresenter presenter ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onStart ( ) { } @ Override public void onRestart ( ) { } @ Override public void onPause ( ) { } @ Override public void onResume ( ) { } @ Override public void onStop ( ) { } @ Override public void onDestroy ( ) { } @ Override public void onBackPressed ( ) { } public void setTitle ( String title ) { } public void showDialog ( ) { <START_BUG> presenter . showDialog ( this ) ; <END_BUG> } public void showGraphs ( ) { } public void onGraphSelected ( ) { } public void onSettingsSelected ( ) { } public PageNavigationFragment getFragment ( int id ) { } public DrawerLayout findDrawer ( int id ) { } public FragmentManager getSupportManager ( ) { } public void setMainView ( ) { } @ Override public void onNavigationDrawerItemSelected ( int position ) { } public static class PlaceholderFragment extends Fragment implements AdapterView . OnItemClickListener { private ListView listView ; private MainActivity . ChartAdapter adapter ; private PageModel pageModel ; private List < MainActivity . ChartDescription > graphsList = new ArrayList < MainActivity . ChartDescription > ( ) ; private static final String ARG_SECTION_NUMBER = "section_number" ; public static MainActivity . PlaceholderFragment newInstance ( int sectionNumber , PageModel p ) { } public PlaceholderFragment ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onItemClick ( AdapterView < ? > adapter , View view , int position , long id ) { } private List < MainActivity . ChartDescription > generateDescriptions ( ) { } } public static class ChartAdapter extends ArrayAdapter < MainActivity . ChartDescription > { public ChartAdapter ( Context context , int resource , List < MainActivity . ChartDescription > objects ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { } private class ViewHolder { TextView name ; TextView type ; FrameLayout chartLayout ; } } public enum ChartType { LINE_CHART , COLUMN_CHART , PREVIEW_LINE_CHART , MAP_CHART , TABLE , OTHER ; } public static class ChartDescription { private String name ; private String type ; private String url ; private MainActivity . ChartType chartType ; public String getUrl ( ) { } public String getName ( ) { } public String getType ( ) { } public ChartDescription ( String text1 , String text2 , String url , MainActivity . ChartType chartType ) { } } }

Fix:
presenter . showDialog ( this , presenter ) ;
Buggy code:
@ Component ( "newCertifiedProductHandler2014" ) public class NewCertifiedProductHandler2014 extends NewCertifiedProductHandler { private static final Logger logger = LogManager . getLogger ( NewCertifiedProductHandler2014 . class ) ; public PendingCertifiedProductEntity handle ( ) { } public List < CQMCriterion > getApplicableCqmCriterion ( List < CQMCriterion > allCqms ) { List < CQMCriterion > criteria = new ArrayList < CQMCriterion > ( ) ; for ( CQMCriterion criterion : allCqms ) { <START_BUG> if ( criterion . getNumber ( ) . startsWith ( "CMS" ) ) { <END_BUG> criteria . add ( criterion ) ; } } return criteria ; } protected List < PendingCqmCriterionEntity > handleCqmCmsCriterion ( String criterionNum , int column ) throws InvalidArgumentsException { } }

Fix:
if ( ( ! ( StringUtils . isEmpty ( criterion . getCmsId ( ) ) ) ) && ( criterion . getCmsId ( ) . startsWith ( "CMS" ) ) ) {
Buggy code:
public class ReportTreeListener implements KeyListener , MouseListener , MouseMotionListener , TreeSelectionListener { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private TreePath currentPath ; private ActionListener actionHandler ; private ReportTreeModel model ; private JTree tree ; private boolean dragging = false ; private ReportTreeNode [ ] draggedNodes ; private JLabel dragIcon = new JLabel ( JMeterUtils . getImage ( "leafnode.gif" ) ) ; public ReportTreeListener ( ReportTreeModel model ) { } public ReportTreeListener ( ) { } public void setModel ( ReportTreeModel m ) { } public void setActionHandler ( ActionListener ah ) { } public void setJTree ( JTree tree ) { } public void setEndWindow ( Container window ) { } public JTree getJTree ( ) { } public ReportTreeNode getCurrentNode ( ) { } public ReportTreeNode [ ] getSelectedNodes ( ) { } public TreePath removedSelectedNode ( ) { } @ Override public void valueChanged ( TreeSelectionEvent e ) { } @ Override public void mouseClicked ( MouseEvent ev ) { } @ Override public void mouseReleased ( MouseEvent e ) { } public ReportTreeNode [ ] getDraggedNodes ( ) { } private boolean isValidDragAction ( ReportTreeNode [ ] source , ReportTreeNode dest ) { } @ Override public void mouseEntered ( MouseEvent e ) { } private void changeSelectionIfDragging ( MouseEvent e ) { } private boolean contains ( Object [ ] container , Object item ) { } @ Override public void mousePressed ( MouseEvent e ) { } @ Override public void mouseDragged ( MouseEvent e ) { } @ Override public void mouseMoved ( MouseEvent e ) { } @ Override public void mouseExited ( MouseEvent ev ) { } @ Override public void keyPressed ( KeyEvent e ) { } @ Override public void keyReleased ( KeyEvent e ) { } @ Override public void keyTyped ( KeyEvent e ) { } private boolean isRightClick ( MouseEvent e ) { } private void displayPopUp ( MouseEvent e ) { } private void displayPopUp ( MouseEvent e , JPopupMenu popup ) { ReportTreeListener . log . warn ( "Shouldn't<seq2seq4repair_space>be<seq2seq4repair_space>here" ) ; if ( popup != null ) { popup . pack ( ) ; popup . show ( tree , e . getX ( ) , e . getY ( ) ) ; popup . setVisible ( true ) ; <START_BUG> popup . requestFocus ( ) ; <END_BUG> } } }

Fix:
popup . requestFocusInWindow ( ) ;
Buggy code:
public class DeleteElementsOperation extends MultiOperation { protected Map fChildrenToRemove ; protected DOMFactory fFactory ; public DeleteElementsOperation ( IJavaElement [ ] elementsToDelete , boolean force ) { } protected String getMainTaskName ( ) { } protected void groupElements ( ) throws JavaModelException { } protected void processElement ( IJavaElement element ) throws JavaModelException { ICompilationUnit cu = ( ( ICompilationUnit ) ( element ) ) ; int numberOfImports = cu . getImports ( ) . length ; IBuffer buffer = cu . getBuffer ( ) ; if ( buffer == null ) return ; JavaElementDelta delta = new JavaElementDelta ( cu ) ; IJavaElement [ ] cuElements = ( ( IRegion ) ( fChildrenToRemove . get ( cu ) ) ) . getElements ( ) ; for ( int i = 0 , length = cuElements . length ; i < length ; i ++ ) { IJavaElement e = cuElements [ i ] ; if ( e . exists ( ) ) { char [ ] contents = buffer . getCharacters ( ) ; if ( contents == null ) continue ; IDOMCompilationUnit cuDOM = fFactory . createCompilationUnit ( contents , cu . getElementName ( ) ) ; DOMNode node = ( ( DOMNode ) ( ( ( JavaElement ) ( e ) ) . findNode ( cuDOM ) ) ) ; Assert . isTrue ( ( node != null ) , Util . bind ( "element.cannotLocate" , e . getElementName ( ) , cuDOM . getName ( ) ) ) ; int startPosition = node . getStartPosition ( ) ; buffer . replace ( startPosition , ( ( ( node . getEndPosition ( ) ) - startPosition ) + 1 ) , CharOperation . NO_CHAR ) ; delta . removed ( e ) ; if ( ( e . getElementType ( ) ) == ( IJavaElement . IMPORT_DECLARATION ) ) { numberOfImports -- ; if ( numberOfImports == 0 ) { delta . removed ( cu . getImportContainer ( ) ) ; } } } } if ( ( delta . getAffectedChildren ( ) . length ) > 0 ) { cu . save ( getSubProgressMonitor ( 1 ) , fForce ) ; if ( ! ( cu . isWorkingCopy ( ) ) ) { addDelta ( delta ) ; <START_BUG> this . setAttribute ( "hasModifiedResource" , "true" ) ; <END_BUG> } } } protected void processElements ( ) throws JavaModelException { } protected void verify ( IJavaElement element ) throws JavaModelException { } }

Fix:
this . setAttribute ( JavaModelOperation . HAS_MODIFIED_RESOURCE_ATTR , JavaModelOperation . TRUE ) ;
Buggy code:
public class SqRtRenderer implements GLSurfaceView . Renderer { public static FrameBuffer fb = null ; private World world = null ; private Light sun ; private RGBColor back = new RGBColor ( 170 , 200 , 255 ) ; private boolean iscreated ; private Context context ; private SqRtGLSurfaceView srglsv ; public SqRtRenderer ( SqRtGLSurfaceView srglsv , SquareRootActivity context ) { } @ Override public void onDrawFrame ( GL10 arg0 ) { } @ Override public void onSurfaceChanged ( GL10 gl , int w , int h ) { if ( ( SqRtRenderer . fb ) != null ) { SqRtRenderer . fb . dispose ( ) ; } SqRtRenderer . fb = new FrameBuffer ( w , h ) ; if ( ! ( SquareRootActivity . rendererinitialized ) ) { Texture . defaultToKeepPixels ( true ) ; world = new World ( ) ; world . setAmbientLight ( 50 , 50 , 50 ) ; world . setClippingPlanes ( 1 , 5000 ) ; sun = new Light ( world ) ; sun . setIntensity ( 255 , 255 , 240 ) ; <START_BUG> sun . setPosition ( new SimpleVector ( ( - 2 ) , ( - 2 ) , ( - 12 ) ) ) ; <END_BUG> Shaders . setupShaders ( ) ; Textures . setupTextures ( SqRtRenderer . fb ) ; Camera cam = world . getCamera ( ) ; Controls . setup ( cam ) ; Game . setup ( world ) ; Controls . setupLevel ( level , w , h ) ; activity . world = world ; SquareRootActivity . rendererinitialized = true ; } else { world = activity . world ; } } @ Override public void onSurfaceCreated ( GL10 arg0 , EGLConfig arg1 ) { } public void onStop ( ) { } public void onPause ( ) { } public void onResume ( ) { } }

Fix:
sun . setPosition ( new SimpleVector ( ( - 6 ) , ( - 6 ) , ( - 12 ) ) ) ;
Buggy code:
public class PumpStreamHandler implements ExecuteStreamHandler { private Thread outputThread ; private Thread errorThread ; private StreamPumper inputPump ; private OutputStream out ; private OutputStream err ; private InputStream input ; public PumpStreamHandler ( OutputStream out , OutputStream err , InputStream input ) { } public PumpStreamHandler ( OutputStream out , OutputStream err ) { } public PumpStreamHandler ( OutputStream outAndErr ) { } public PumpStreamHandler ( ) { } public void setProcessOutputStream ( InputStream is ) { } public void setProcessErrorStream ( InputStream is ) { } public void setProcessInputStream ( OutputStream os ) { } public void start ( ) { } public void stop ( ) { } private static final long JOIN_TIMEOUT = 200 ; protected final void finish ( Thread t ) { } protected OutputStream getErr ( ) { } protected OutputStream getOut ( ) { } protected void createProcessOutputPump ( InputStream is , OutputStream os ) { } protected void createProcessErrorPump ( InputStream is , OutputStream os ) { } protected Thread createPump ( InputStream is , OutputStream os ) { } protected Thread createPump ( InputStream is , OutputStream os , boolean closeWhenExhausted ) { } StreamPumper createInputPump ( InputStream is , OutputStream os , boolean closeWhenExhausted ) { <START_BUG> StreamPumper pumper = new StreamPumper ( is , os , closeWhenExhausted , false ) ; <END_BUG> pumper . setAutoflush ( true ) ; return pumper ; } protected static class ThreadWithPumper extends Thread { private final StreamPumper pumper ; public ThreadWithPumper ( StreamPumper p ) { } protected StreamPumper getPumper ( ) { } } }

Fix:
StreamPumper pumper = new StreamPumper ( is , os , closeWhenExhausted , true ) ;
Buggy code:
public abstract class AbstractFeatureSpecification implements SourceAwareSpecification { private static final Object DUMMY_SOURCE = new Object ( ) ; private static final String DUMMY_SOURCE_NAME = "dummySource" ; protected Class < ? extends FeatureSpecificationExecutor > executorType ; private Object source = AbstractFeatureSpecification . DUMMY_SOURCE ; private String sourceName = AbstractFeatureSpecification . DUMMY_SOURCE_NAME ; protected AbstractFeatureSpecification ( Class < ? extends FeatureSpecificationExecutor > executorType ) { } public final boolean validate ( ProblemReporter problemReporter ) { } protected abstract void doValidate ( ProblemCollector problems ) { } public AbstractFeatureSpecification source ( Object source ) { } public Object source ( ) { } public AbstractFeatureSpecification sourceName ( String sourceName ) { } public String sourceName ( ) { } public void execute ( SpecificationContext specificationContext ) { <START_BUG> FeatureSpecificationExecutor executor = BeanUtils . instantiateClass ( this . executorType , FeatureSpecificationExecutor . class ) ; <END_BUG> executor . execute ( this , specificationContext ) ; } }

Fix:
FeatureSpecificationExecutor executor = BeanUtils . instantiateClass ( this . executorType ) ;
Buggy code:
public abstract class Scrollable extends Control { int scrolledHandle ; ScrollBar horizontalBar ; ScrollBar verticalBar ; Scrollable ( ) { } public Scrollable ( Composite parent , int style ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } ScrollBar createScrollBar ( int style ) { } ScrollBar createStandardBar ( int style ) { } void createWidget ( ) { } void deregister ( ) { } void destroyScrollBar ( ScrollBar bar ) { } int findStandardBar ( int style ) { } public int getBorderWidth ( ) { } public Rectangle getClientArea ( ) { } public ScrollBar getHorizontalBar ( ) { } public ScrollBar getVerticalBar ( ) { } void hookEvents ( ) { } boolean hooksKeys ( ) { } Rect inset ( ) { } boolean isTrimHandle ( int trimHandle ) { } int kEventMouseWheelMoved ( int nextHandler , int theEvent , int userData ) { int vPosition = ( ( verticalBar ) == null ) ? 0 : verticalBar . getSelection ( ) ; int hPosition = ( ( horizontalBar ) == null ) ? 0 : horizontalBar . getSelection ( ) ; int result = super . kEventMouseWheelMoved ( nextHandler , theEvent , userData ) ; boolean redraw = false ; if ( ( verticalBar ) != null ) { int position = verticalBar . getSelection ( ) ; if ( position != vPosition ) { Event event = new Event ( ) ; event . detail = ( position < vPosition ) ? SWT . PAGE_UP : SWT . PAGE_DOWN ; verticalBar . sendEvent ( Selection , event ) ; redraw = true ; } } if ( ( horizontalBar ) != null ) { int position = horizontalBar . getSelection ( ) ; if ( position != hPosition ) { Event event = new Event ( ) ; <START_BUG> event . detail = ( position < vPosition ) ? SWT . PAGE_UP : SWT . PAGE_DOWN ; <END_BUG> horizontalBar . sendEvent ( Selection , event ) ; redraw = true ; } } if ( redraw ) redrawBackgroundImage ( ) ; return result ; } void redrawBackgroundImage ( ) { } void register ( ) { } void releaseHandle ( ) { } void releaseChildren ( boolean destroy ) { } void resetVisibleRegion ( int control ) { } void resizeClientArea ( ) { } boolean sendMouseWheel ( short wheelAxis , int wheelDelta ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } boolean setScrollBarVisible ( ScrollBar bar , boolean visible ) { } void setZOrder ( ) { } int topHandle ( ) { } }

Fix:
event . detail = ( position < hPosition ) ? SWT . PAGE_UP : SWT . PAGE_DOWN ;
Buggy code:
class SubQ extends AbstractVal implements Subquery { private final ClassMapping _candidate ; private final boolean _subs ; private final String _alias ; private final SelectConstructor _cons = new SelectConstructor ( ) ; private Class _type = null ; private ClassMetaData _meta = null ; private QueryExpressions _exps = null ; public SubQ ( ClassMapping candidate , boolean subs , String alias ) { } public ClassMapping getCandidate ( ) { } public Class getType ( ) { } public void setImplicitType ( Class type ) { } public ClassMetaData getMetaData ( ) { } public void setMetaData ( ClassMetaData meta ) { } public String getCandidateAlias ( ) { } public void setQueryExpressions ( QueryExpressions query ) { } public ExpState initialize ( Select sel , ExpContext ctx , int flags ) { } public Object toDataStoreValue ( Select sel , ExpContext ctx , ExpState state , Object val ) { } public void select ( Select sel , ExpContext ctx , ExpState state , boolean pks ) { } public void selectColumns ( Select sel , ExpContext ctx , ExpState state , boolean pks ) { } public void groupBy ( Select sel , ExpContext ctx , ExpState state ) { } public void orderBy ( Select sel , ExpContext ctx , ExpState state , boolean asc ) { <START_BUG> sel . orderBy ( newSQLBuffer ( sel , ctx , state ) , asc , false ) ; <END_BUG> } private SQLBuffer newSQLBuffer ( Select sel , ExpContext ctx , ExpState state ) { } public Object load ( ExpContext ctx , ExpState state , Result res ) throws SQLException { } public void calculateValue ( Select sel , ExpContext ctx , ExpState state , Val other , ExpState otherState ) { } public int length ( Select sel , ExpContext ctx , ExpState state ) { } public void appendTo ( Select sel , ExpContext ctx , ExpState state , SQLBuffer sql , int index ) { } private void appendTo ( Select sel , ExpContext ctx , ExpState state , SQLBuffer sql , int index , boolean size ) { } public void appendIsEmpty ( Select sel , ExpContext ctx , ExpState state , SQLBuffer sql ) { } public void appendIsNotEmpty ( Select sel , ExpContext ctx , ExpState state , SQLBuffer sql ) { } public void appendSize ( Select sel , ExpContext ctx , ExpState state , SQLBuffer sql ) { } public void acceptVisit ( ExpressionVisitor visitor ) { } }

Fix:
sel . orderBy ( newSQLBuffer ( sel , ctx , state ) , asc , false , getSelectAs ( ) ) ;
Buggy code:
public interface GeoRentingService { @ POST ( "users//auth" ) Observable < SessionToken > auth ( @ Body User user ) { } @ DELETE ( "users//auth" ) Observable < SessionToken > deAuth ( ) { } @ POST ( "users//me//gcm" ) Call < Void > registerGcmToken ( @ Body GcmToken token ) { } @ GET ( "fences" ) <START_BUG> List < GeoFence > getFencesNear ( @ Query ( "latitude" ) <END_BUG> double latitude , @ Query ( "longitude" ) double longitude , @ Query ( "radius" ) int radius ) ; @ GET ( "fences" ) Observable < List < GeoFence > > getFencesBy ( @ Query ( "user" ) String user ) { } @ POST ( "fences//{fenceId}//visit" ) Observable < Object > visitFence ( @ Path ( "fenceId" ) String fenceId ) { } }

Fix:
Call < List < GeoFence > > getFencesNear ( @ Query ( "latitude" )
Buggy code:
public class SiriJsonSerializer { private static class CustomValueObjectSerializer extends BeanSerializerBase { private String fieldName = null ; protected CustomValueObjectSerializer ( BeanSerializer src , String fieldName ) { } @ Override public void serialize ( Object bean , JsonGenerator jgen , SerializerProvider provider ) throws IOException , JsonGenerationException { } } private static class CustomBeanSerializerModifier extends BeanSerializerModifier { @ Override public JsonSerializer < ? > modifySerializer ( SerializationConfig config , BasicBeanDescription beanDesc , JsonSerializer < ? > serializer ) { } } private static class JacksonModule extends Module { private static final Version VERSION = new Version ( 1 , 0 , 0 , null ) ; @ Override public String getModuleName ( ) { } @ Override public Version version ( ) { } @ Override public void setupModule ( SetupContext context ) { } } private static class RFC822SimpleDateFormat extends SimpleDateFormat { private static final long serialVersionUID = 1L ; public RFC822SimpleDateFormat ( ) { } @ Override public StringBuffer format ( Date date , StringBuffer toAppendTo , FieldPosition pos ) { } } public String getJson ( Siri siri ) throws Exception { } public String getJson ( Siri siri , String callback ) throws Exception { ObjectMapper mapper = new ObjectMapper ( ) ; mapper . setSerializationInclusion ( NON_NULL ) ; <START_BUG> mapper . configure ( INDENT_OUTPUT , true ) ; <END_BUG> mapper . configure ( WRAP_ROOT_VALUE , true ) ; mapper . setDateFormat ( new SiriJsonSerializer . RFC822SimpleDateFormat ( ) ) ; AnnotationIntrospector introspector = new JaxbAnnotationIntrospector ( ) ; SerializationConfig config = mapper . getSerializationConfig ( ) . withAnnotationIntrospector ( introspector ) ; mapper . setSerializationConfig ( config ) ; mapper . registerModule ( new SiriJsonSerializer . JacksonModule ( ) ) ; String output = "" ; if ( callback != null ) output = callback + "(" ; output += mapper . writeValueAsString ( siri ) ; if ( callback != null ) output += ")" ; return output ; } No newline ; at end ; of file ; }

Fix:
mapper . configure ( INDENT_OUTPUT , false ) ;
Buggy code:
public class TVActorFilter extends AbstractFilter { public boolean checkFilterCondition ( Event event , Object ... args ) { } public boolean containsActor ( Event event , String actor ) { <START_BUG> return ( event . getProperty ( "actors" ) . contains ( actor ) ) && ( ( event . getProperty ( "actors" ) ) != null ) ; <END_BUG> } }

Fix:
return ( ( event . getProperty ( "actors" ) ) != null ) && ( event . getProperty ( "actors" ) . contains ( actor ) ) ;