nus-yam/ex-repair huggingface dataset:
Buggy code:
public class WarClassloadingDependencyProcessor implements DeploymentUnitProcessor { private static final ModuleIdentifier JAVAX_EE_API = ModuleIdentifier . create ( "javaee.api" ) ; private static final ModuleIdentifier APACHE_XERCES = ModuleIdentifier . create ( "org.apache.xerces" ) ; private static final ModuleIdentifier JSF_IMPL = ModuleIdentifier . create ( "com.sun.jsf-impl" ) ; private static final ModuleIdentifier BEAN_VALIDATION = ModuleIdentifier . create ( "org.hibernate.validator" ) ; private static final ModuleIdentifier JBOSS_WEB = ModuleIdentifier . create ( "org.jboss.as.web" ) ; private static final ModuleIdentifier LOG = ModuleIdentifier . create ( "org.jboss.logging" ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; if ( ! ( DeploymentTypeMarker . isType ( WAR , deploymentUnit ) ) ) { return ; } final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; moduleSpecification . addDependency ( new ModuleDependency ( moduleLoader , WarClassloadingDependencyProcessor . JAVAX_EE_API , false , false , false ) ) ; moduleSpecification . addDependency ( new ModuleDependency ( moduleLoader , WarClassloadingDependencyProcessor . APACHE_XERCES , false , false , true ) ) ; ModuleDependency jsf = new ModuleDependency ( moduleLoader , WarClassloadingDependencyProcessor . JSF_IMPL , false , false , false ) ; jsf . addImportFilter ( PathFilters . getMetaInfFilter ( ) , true ) ; moduleSpecification . addDependency ( jsf ) ; moduleSpecification . addDependency ( new ModuleDependency ( moduleLoader , WarClassloadingDependencyProcessor . BEAN_VALIDATION , false , false , true ) ) ; <START_BUG> moduleSpecification . addDependency ( new ModuleDependency ( moduleLoader , WarClassloadingDependencyProcessor . JBOSS_WEB , false , false , false ) ) ; <END_BUG> moduleSpecification . addDependency ( new ModuleDependency ( moduleLoader , WarClassloadingDependencyProcessor . LOG , false , false , false ) ) ; } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
moduleSpecification . addDependency ( new ModuleDependency ( moduleLoader , WarClassloadingDependencyProcessor . JBOSS_WEB , false , false , true ) ) ;
Buggy code:
public class PersonWrapper extends AbstractPersonWrapper { public PersonWrapper ( Person target ) { } public String getTelephoneContact ( ) { } public void setTelephoneContact ( String value ) { } public String getEmailAddress ( ) { } public void setEmailAddress ( String value ) { } public String getFatherName ( ) { } public void setFatherName ( String value ) { } public String getNationalId ( ) { } public void setNationalId ( String value ) { } public String getPlaceOfBirth ( ) { } public void setPlaceOfBirth ( String value ) { } public String getEntrySourceId ( ) { } public void setEntrySourceId ( String value ) { } public void setCurrentTownshipTBNumber ( String value ) { } public String getCurrentTownshipTBNumber ( ) { } public void setPreviousTownshipTBNumber ( String value ) { <START_BUG> setAsAttribute ( CURRENT_TOWNSHIP_NUMBER , value ) ; <END_BUG> } public String getPreviousTownshipTBNumber ( ) { } public String getGenSampleId ( ) { } public void setGenSampleId ( String value ) { } public String getGenSpecificationDate ( ) { } public void setGenSpecificationDate ( String value ) { } public String getGenSpecificationPlace ( ) { } public void setGenSpecificationPlace ( String value ) { } No newline ; at end ; of file ; }

Fix:
setAsAttribute ( PREVIOUS_TOWNSHIP_NUMBER , value ) ;
Buggy code:
public class OrderInversionMapper extends Mapper < LongWritable , Text , WordPair , IntWritable > { private static final int NEIGHBOR_WIN = 2 ; private void mapWindow ( String [ ] tokens , int i , Context context ) throws IOException , InterruptedException { int left = i - ( OrderInversionMapper . NEIGHBOR_WIN ) ; left = ( left >= 0 ) ? left : 0 ; int right = i + ( OrderInversionMapper . NEIGHBOR_WIN ) ; right = ( right < ( tokens . length ) ) ? right : ( tokens . length ) - 1 ; WordPair pairStar = new WordPair ( tokens [ i ] , "*" ) ; int countStar = 0 ; <START_BUG> for ( int j = left ; j < right ; j ++ ) { <END_BUG> if ( tokens [ i ] . equals ( tokens [ j ] ) ) { continue ; } WordPair pair = new WordPair ( tokens [ i ] , tokens [ j ] ) ; context . write ( pair , new IntWritable ( 1 ) ) ; countStar ++ ; } context . write ( pairStar , new IntWritable ( countStar ) ) ; } @ Override public void map ( LongWritable key , Text value , Context context ) throws IOException , InterruptedException { } }

Fix:
for ( int j = left ; j <= right ; j ++ ) {
Buggy code:
public final class DefaultClassResolver implements IClassResolver { private ConcurrentReaderHashMap classes = new ConcurrentReaderHashMap ( ) ; public final Class resolveClass ( final String classname ) { try { Class clz = ( ( Class ) ( classes . get ( classname ) ) ) ; if ( clz == null ) { synchronized ( classes ) { ClassLoader loader = Thread . currentThread ( ) . getContextClassLoader ( ) ; if ( loader == null ) { loader = DefaultClassResolver . class . getClassLoader ( ) ; } clz = loader . loadClass ( classname ) ; classes . put ( classname , clz ) ; } } return clz ; } catch ( ClassNotFoundException ex ) { <START_BUG> throw new WicketRuntimeException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>class<seq2seq4repair_space>with<seq2seq4repair_space>name:<seq2seq4repair_space>" + classname ) ) ; <END_BUG> } } }

Fix:
throw new WicketRuntimeException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>class<seq2seq4repair_space>with<seq2seq4repair_space>name:<seq2seq4repair_space>" + classname ) , ex ) ;
Buggy code:
public class SelectPage extends WicketExamplePage { private static final List < String > MANY_CHOICES = Arrays . asList ( new String [ ] { "Choice1" , "Choice2" , "Choice3" , "Choice4" , "Choice5" , "Choice6" , "Choice7" , "Choice8" , "Choice9" } ) ; public SelectPage ( ) { } private static class Input implements Serializable { public String site = new String ( "sd" ) ; public List < String > choices = new ArrayList < String > ( ) ; public Input ( ) { } @ Override public String toString ( ) { } <START_BUG> private String listAsString ( List list ) { <END_BUG> StringBuffer b = new StringBuffer ( ) ; for ( Iterator i = list . iterator ( ) ; i . hasNext ( ) ; ) { b . append ( i . next ( ) ) ; if ( i . hasNext ( ) ) { b . append ( ",<seq2seq4repair_space>" ) ; } } return b . toString ( ) ; } } @ Override protected void explain ( ) { } }

Fix:
private String listAsString ( final List list ) {
Buggy code:
public class Snippet258 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new GridLayout ( 2 , false ) ) ; final Text text = new Text ( shell , ( ( SWT . SEARCH ) | ( SWT . CANCEL ) ) ) ; Image image = null ; if ( ( ( text . getStyle ( ) ) & ( SWT . CANCEL ) ) == 0 ) { <START_BUG> image = new Image ( display , Snippet258 . class . getResourceAsStream ( "cancel.gif" ) ) ; <END_BUG> ToolBar toolBar = new ToolBar ( shell , SWT . FLAT ) ; ToolItem item = new ToolItem ( toolBar , SWT . PUSH ) ; item . setImage ( image ) ; item . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { text . setText ( "" ) ; System . out . println ( "Search<seq2seq4repair_space>cancelled" ) ; } } ) ; } text . setLayoutData ( new GridData ( GridData . FILL_HORIZONTAL ) ) ; text . setText ( "Search<seq2seq4repair_space>text" ) ; text . addSelectionListener ( new SelectionAdapter ( ) { public void widgetDefaultSelected ( SelectionEvent e ) { if ( ( e . detail ) == ( SWT . CANCEL ) ) { System . out . println ( "Search<seq2seq4repair_space>cancelled" ) ; } else { System . out . println ( ( ( "Searching<seq2seq4repair_space>for:<seq2seq4repair_space>" + ( text . getText ( ) ) ) + "..." ) ) ; } } } ) ; shell . pack ( ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } if ( image != null ) image . dispose ( ) ; display . dispose ( ) ; } }

Fix:
image = display . getSystemImage ( ICON_ERROR ) ;
Buggy code:
class CTabFolderLayout extends Layout { protected Point computeSize ( Composite composite , int wHint , int hHint , boolean flushCache ) { CTabFolder folder = ( ( CTabFolder ) ( composite ) ) ; CTabItem [ ] items = folder . items ; int tabW = 0 ; GC gc = new GC ( folder ) ; for ( int i = 0 ; i < ( items . length ) ; i ++ ) { if ( folder . single ) { tabW = Math . max ( tabW , items [ i ] . preferredWidth ( gc , true , false ) ) ; } else { tabW += items [ i ] . preferredWidth ( gc , ( i == ( folder . selectedIndex ) ) , false ) ; } } gc . dispose ( ) ; tabW += 3 ; if ( folder . showMax ) tabW += CTabFolder . BUTTON_SIZE ; if ( folder . showMin ) tabW += CTabFolder . BUTTON_SIZE ; if ( folder . single ) tabW += ( 3 * ( CTabFolder . BUTTON_SIZE ) ) // 2 ; if ( ( folder . topRight ) != null ) { Point pt = folder . topRight . computeSize ( DEFAULT , folder . tabHeight , flushCache ) ; <START_BUG> tabW += pt . x ; <END_BUG> } if ( ( ! ( folder . single ) ) && ( ! ( folder . simple ) ) ) tabW += ( folder . curveWidth ) - ( 2 * ( folder . curveIndent ) ) ; int controlW = 0 ; int controlH = 0 ; for ( int i = 0 ; i < ( items . length ) ; i ++ ) { Control control = items [ i ] . getControl ( ) ; if ( ( control != null ) && ( ! ( control . isDisposed ( ) ) ) ) { Point size = control . computeSize ( wHint , hHint , flushCache ) ; controlW = Math . max ( controlW , size . x ) ; controlH = Math . max ( controlH , size . y ) ; } } int minWidth = Math . max ( tabW , controlW ) ; int minHeight = ( folder . minimized ) ? 0 : controlH ; if ( minWidth == 0 ) minWidth = CTabFolder . DEFAULT_WIDTH ; if ( minHeight == 0 ) minHeight = CTabFolder . DEFAULT_HEIGHT ; if ( wHint != ( SWT . DEFAULT ) ) minWidth = wHint ; if ( hHint != ( SWT . DEFAULT ) ) minHeight = hHint ; return new Point ( minWidth , minHeight ) ; } protected boolean flushCache ( Control control ) { } protected void layout ( Composite composite , boolean flushCache ) { } }

Fix:
tabW += 3 + ( pt . x ) ;
Buggy code:
public class ItemType implements Serializable { private Material type ; private short damage ; private String lore ; public ItemType ( Material type , short damage , String lore ) { } public ItemType ( ItemStack item ) { } public String toString ( ) { } @ Override public boolean equals ( Object obj ) { if ( obj instanceof ItemType ) { logger . info ( "checking<seq2seq4repair_space>if<seq2seq4repair_space>they<seq2seq4repair_space>equal" ) ; ItemType other = ( ( ItemType ) ( obj ) ) ; <START_BUG> return ( ( ( other . lore ) == ( lore ) ) && ( ( other . type ) == ( type ) ) ) && ( ( other . damage ) == ( damage ) ) ; <END_BUG> } return super . equals ( obj ) ; } @ Override public int hashCode ( ) { } }

Fix:
return ( ( other . lore . equals ( lore ) ) && ( ( other . type ) == ( type ) ) ) && ( ( other . damage ) == ( damage ) ) ;
Buggy code:
public class MakeUrlTest extends BuildFileTest { public MakeUrlTest ( String s ) { } public void setUp ( ) { } public void testEmpty ( ) { } public void testNoProperty ( ) { } public void testNoFile ( ) { } public void testValidation ( ) { } public void testWorks ( ) { } public void testIllegalChars ( ) { } public void testRoundTrip ( ) throws IOException { } public void testIllegalCombinations ( ) { } public void testFileset ( ) { } public void testFilesetSeparator ( ) { } public void testPath ( ) { executeTarget ( "testPath" ) ; <START_BUG> assertPropertyContains ( "testPath" , "to-url.xml" ) ; <END_BUG> } private void assertPropertyEndsWith ( String property , String ending ) { } protected void assertPropertyContains ( String property , String contains ) { } protected String getProperty ( String property ) { } }

Fix:
assertPropertyContains ( "testPath" , "makeurl.xml" ) ;
Buggy code:
public class TernModulesPropertyPage extends AbstractTernPropertyPage implements IWorkbenchPreferencePage , IWorkingCopyListener { public static final String PAGE_ID = "tern.eclipse.ide.ui.properties.modules" ; private TernModulesBlock modulesBlock ; public TernModulesPropertyPage ( ) { } @ Override public void init ( IWorkbench workbench ) { } @ Override protected Control createContents ( Composite ancestor ) { } public void refreshModules ( ) { try { IWorkingCopy workingCopy = getWorkingCopy ( ) ; workingCopy . addWorkingCopyListener ( this ) ; <START_BUG> modulesBlock . refresh ( getTernProject ( ) . getAllModules ( ) , workingCopy . getCheckedModules ( ) ) ; <END_BUG> } catch ( Throwable e ) { Trace . trace ( SEVERE , "Error<seq2seq4repair_space>while<seq2seq4repair_space>loading<seq2seq4repair_space>tern<seq2seq4repair_space>project" , e ) ; } } @ Override public boolean performOk ( ) { } @ Override public void moduleSelectionChanged ( ITernModule module , boolean selected ) { } @ Override public void dispose ( ) { } }

Fix:
modulesBlock . refresh ( workingCopy . getAllModules ( ) , workingCopy . getCheckedModules ( ) ) ;
Buggy code:
public class Main { private static World gameWorld ; private static Renderer gameRenderer ; private static Player player ; private static Camera gameCam ; private static ArrayList < Input > rawInputs = new ArrayList < Input > ( ) ; private static TextManager textManager = TextManager . getInstance ( ) ; private static TextBox playerPosition ; public static void main ( String [ ] args ) { } public static void updateTextOnScreen ( ) { } public static void setupPlayer ( ) { } public static void setupWorld ( ) { Fog worldFog = new Fog ( true ) ; <START_BUG> Context context = new Context ( "Skybox<seq2seq4repair_space>Test" , 512 , 512 , 3 , 3 , false , 60 ) ; <END_BUG> Main . gameCam = new Camera ( new Vector3f ( 0.0F , 0.0F , 5.0F ) ) ; Main . gameRenderer = new Renderer ( context , Main . gameCam , worldFog ) ; Main . gameWorld = new World ( Main . gameRenderer ) ; List < String > files = new ArrayList < > ( ) ; files . add ( "miramar_ft.png" ) ; files . add ( "miramar_bk.png" ) ; files . add ( "miramar_up.png" ) ; files . add ( "miramar_dn.png" ) ; files . add ( "miramar_rt.png" ) ; files . add ( "miramar_lf.png" ) ; Skybox sb = null ; try { Texture sbTex = TextureLoader . loadCubeMapTexture ( files , "miramar" ) ; sb = new Skybox ( sbTex ) ; } catch ( IOException e1 ) { e1 . printStackTrace ( ) ; } catch ( IllegalArgumentException e2 ) { e2 . printStackTrace ( ) ; } if ( sb != null ) { Main . gameRenderer . addSkybox ( sb ) ; } try { PhysicsModelProperties bProperties = new PhysicsModelProperties ( ) ; bProperties . setProperty ( "mass" , 10.0F ) ; bProperties . setProperty ( "restitution" , 0.2F ) ; ModelInt a = ModelFactory . loadObjModel ( new File ( "res//obj//ATAT.obj" ) , new Vector3f ( 5 , 0 , 5 ) ) ; ModelInt b = ModelFactory . loadObjModel ( new File ( "res//obj//sphere.obj" ) , new Vector3f ( ( - 5 ) , 0 , ( - 5 ) ) , bProperties ) ; Ground ground = new Ground ( 1000 , 1000 ) ; ground . translate ( new Vector3f ( 0 , ( - 5 ) , 0 ) ) ; Main . gameWorld . addModel ( a ) ; Main . gameWorld . addModel ( b ) ; Main . gameWorld . addModel ( ground ) ; ParticleEmitter p = new ParticleEmitter ( Main . gameWorld , new Vector3f ( 0 , 2 , 0 ) ) ; Main . gameWorld . addDynamicWorldObject ( p ) ; p . start ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } No newline ; at end ; of file ; }

Fix:
Context context = new Context ( "Skybox<seq2seq4repair_space>Test" , 1000 , 1000 , 3 , 3 , false , 60 ) ;
Buggy code:
public class InstanceCreator extends BuildWrapper { @ Deprecated private String cloud ; @ Deprecated private String workspace ; @ Deprecated private String box ; @ Deprecated private String profile ; @ Deprecated private String variables ; @ Deprecated private String boxVersion ; private ProjectSlaveConfiguration slaveConfiguration ; private transient ElasticBoxSlave ebSlave ; @ DataBoundConstructor public InstanceCreator ( ProjectSlaveConfiguration slaveConfiguration ) { } public ProjectSlaveConfiguration getSlaveConfiguration ( ) { } @ Override public Environment setUp ( AbstractBuild build , Launcher launcher , BuildListener listener ) throws IOException , InterruptedException { } protected Object readResolve ( ) { } @ Extension public static class DescriptorImpl extends BuildWrapperDescriptor { @ Override public boolean isApplicable ( AbstractProject < ? , ? > item ) { } @ Override public String getDisplayName ( ) { <START_BUG> return "ElasticBox<seq2seq4repair_space>On-Demand<seq2seq4repair_space>Slave<seq2seq4repair_space>Creation" ; <END_BUG> } @ Override public BuildWrapper newInstance ( StaplerRequest req , JSONObject formData ) throws FormException { } } public static class ConverterImpl extends RetentionTimeConverter < InstanceCreator > { @ Override protected void fixZeroRetentionTime ( InstanceCreator obj ) { } } }

Fix:
return "Launch<seq2seq4repair_space>dedicated<seq2seq4repair_space>slave<seq2seq4repair_space>via<seq2seq4repair_space>ElasticBox" ;
Buggy code:
public class SelectTag extends AbstractHtmlInputElementTag { public static final String LIST_VALUE_PAGE_ATTRIBUTE = "org.springframework.web.servlet.tags.form.SelectTag.listValue" ; private static final Object EMPTY = new Object ( ) ; private Object items ; private String itemValue ; private String itemLabel ; private String size ; private Object multiple = Boolean . FALSE ; private TagWriter tagWriter ; public void setItems ( Object items ) { } protected Object getItems ( ) { } public void setItemValue ( String itemValue ) { } protected String getItemValue ( ) { } public void setItemLabel ( String itemLabel ) { } protected String getItemLabel ( ) { } public void setSize ( String size ) { } protected String getSize ( ) { } public void setMultiple ( Object multiple ) { } protected Object getMultiple ( ) { } @ Override protected int writeTagContent ( TagWriter tagWriter ) throws JspException { tagWriter . startTag ( "select" ) ; writeDefaultAttributes ( tagWriter ) ; if ( isMultiple ( ) ) { tagWriter . writeAttribute ( "multiple" , "multiple" ) ; } tagWriter . writeOptionalAttributeValue ( "size" , getDisplayString ( evaluate ( "size" , getSize ( ) ) ) ) ; Object items = getItems ( ) ; if ( items != null ) { if ( items != ( SelectTag . EMPTY ) ) { <START_BUG> Object itemsObject = ( items instanceof String ) ? evaluate ( "items" , ( ( String ) ( items ) ) ) : items ; <END_BUG> if ( itemsObject != null ) { String valueProperty = ( ( getItemValue ( ) ) != null ) ? ObjectUtils . getDisplayString ( evaluate ( "itemValue" , getItemValue ( ) ) ) : null ; String labelProperty = ( ( getItemLabel ( ) ) != null ) ? ObjectUtils . getDisplayString ( evaluate ( "itemLabel" , getItemLabel ( ) ) ) : null ; OptionWriter optionWriter = new OptionWriter ( itemsObject , getBindStatus ( ) , valueProperty , labelProperty , isHtmlEscape ( ) ) ; optionWriter . writeOptions ( tagWriter ) ; } } tagWriter . endTag ( true ) ; writeHiddenTagIfNecessary ( tagWriter ) ; return SKIP_BODY ; } else { tagWriter . forceBlock ( ) ; this . tagWriter = tagWriter ; this . pageContext . setAttribute ( SelectTag . LIST_VALUE_PAGE_ATTRIBUTE , getBindStatus ( ) ) ; return EVAL_BODY_INCLUDE ; } } private void writeHiddenTagIfNecessary ( TagWriter tagWriter ) throws JspException { } private boolean isMultiple ( ) throws JspException { } private boolean forceMultiple ( ) throws JspException { } private static boolean typeRequiresMultiple ( Class type ) { } @ Override public int doEndTag ( ) throws JspException { } @ Override public void doFinally ( ) { } }

Fix:
Object itemsObject = evaluate ( "items" , items ) ;
Buggy code:
public class CommandBrush extends CommandBase { @ Override public String getName ( ) { } @ Override public String getCommandUsage ( ICommandSender sender ) { } @ Override public void execute ( ICommandSender sender , String [ ] args ) throws CommandException { CSTELogger . logDebug ( "Brush<seq2seq4repair_space>Command<seq2seq4repair_space>Recieved!" ) ; if ( sender instanceof EntityPlayer ) { EntityPlayer player = ( ( EntityPlayer ) ( sender ) ) ; if ( ( ( args . length ) != 0 ) && ( args [ 0 ] . equalsIgnoreCase ( "clear" ) ) ) { CSTELogger . logDebug ( "Clearing<seq2seq4repair_space>Brush" ) ; <START_BUG> selProcessor . wand = null ; <END_BUG> ChatMessenger . addMessageLocalized ( "cste.commands.brush.clear" ) ; } else if ( ( player . getHeldItem ( ) ) != null ) { Item item = player . getHeldItem ( ) . getItem ( ) ; CSTELogger . logDebug ( ( "Setting<seq2seq4repair_space>Brush:<seq2seq4repair_space>" + ( item . getUnlocalizedName ( ) ) ) ) ; brushProcessor . brush = item ; ChatMessenger . addMessageLocalized ( "cste.commands.brush.sel" , I18n . format ( ( ( item . getUnlocalizedName ( ) ) + ".name" ) ) ) ; } else { CSTELogger . logDebug ( "Brush<seq2seq4repair_space>unchanged,<seq2seq4repair_space>hand<seq2seq4repair_space>was<seq2seq4repair_space>empty" ) ; ChatMessenger . addMessageLocalized ( "cste.commands.brush.noitem" , RED ) ; } } } @ Override public int getRequiredPermissionLevel ( ) { } public List < ? > addTabCompletionOptions ( ICommandSender sender , String [ ] args , BlockPos pos ) { } }

Fix:
brushProcessor . brush = null ;
Buggy code:
public class FragmentAddField extends Fragment implements OnClickListener , OnCheckedChangeListener , ATKPolygonDrawListener { private EditText name ; private EditText acres ; private CheckBox autoAcres ; private FragmentAddField . FragmentAddFieldListener listener ; private float autoAcresValue ; private View layout ; private FieldView fieldview ; public boolean keyboardShowing = false ; private static float DECIMAL_ACRES_LIMIT = 3.0F ; public interface FragmentAddFieldListener { public void FragmentAddField_Undo ( ) { } public void FragmentAddField_Init ( ) { } public void FragmentAddField_Done ( FieldView field ) { } } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } public void init ( FieldView fieldView ) { } @ Override public void onAttach ( Activity activity ) { } public int getHeight ( ) { } @ Override public void onClick ( View v ) { if ( ( v . getId ( ) ) == ( id . add_field_done ) ) { Float fltAcres = 0.0F ; String strAcres = acres . getText ( ) . toString ( ) ; strAcres = strAcres . replace ( "<seq2seq4repair_space>" , "" ) ; strAcres = strAcres . replace ( "ac" , "" ) ; if ( ( strAcres . length ( ) ) > 0 ) { fltAcres = Float . parseFloat ( strAcres ) ; } this . fieldview . getField ( ) . setAcres ( fltAcres ) ; <START_BUG> this . fieldview . getField ( ) . setName ( name . getText ( ) . toString ( ) ) ; <END_BUG> fieldview . getPolygonView ( ) . setOnDrawListener ( null ) ; listener . FragmentAddField_Done ( this . fieldview ) ; } else if ( ( v . getId ( ) ) == ( id . add_field_undo ) ) { listener . FragmentAddField_Undo ( ) ; } else if ( ( v . getId ( ) ) == ( id . add_field_delete ) ) { new android . app . AlertDialog . Builder ( this . getActivity ( ) ) . setTitle ( "Delete<seq2seq4repair_space>Field" ) . setMessage ( "Are<seq2seq4repair_space>you<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>delete<seq2seq4repair_space>this<seq2seq4repair_space>field?" ) . setIcon ( ic_dialog_alert ) . setPositiveButton ( "Yes" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int whichButton ) { fieldview . getField ( ) . setDeleted ( true ) ; fieldview . getPolygonView ( ) . setOnDrawListener ( null ) ; listener . FragmentAddField_Done ( fieldview ) ; } } ) . setNegativeButton ( "No" , null ) . show ( ) ; } else { this . closeKeyboard ( ) ; } } public void autoAcres ( float acres ) { } @ Override public void onCheckedChanged ( CompoundButton buttonView , boolean isChecked ) { } @ Override public boolean beforeBoundaryChange ( ATKPolygonView polygonView ) { } @ Override public boolean afterBoundaryChange ( ATKPolygonView polygonView ) { } private void closeKeyboard ( ) { } }

Fix:
this . fieldview . getField ( ) . setName ( name . getText ( ) . toString ( ) . trim ( ) ) ;
Buggy code:
public class AopTest extends JavaXtendTest { private Collection < MetaModel > mms = new ArrayList < MetaModel > ( ) ; @ Before @ Override public void setUp ( ) throws Exception { } @ Test public void testAdvicedFunction ( ) { } @ Test public void testSomeAdvicedFunction ( ) { } @ Test public void testSomeSubPackageFunction ( ) { } @ Test public void testAdviceSubPackageFunction ( ) { } @ Test public void testOtherAdviceSubPackageFunction ( ) { } @ Test public void testSomeFunctionAdviceCtx ( ) { Map < String , Object > vars = new HashMap < String , Object > ( ) ; vars . put ( "param" , "TestParam" ) ; vars . put ( "p" , _person ) ; Object result = XtendBackendFacade . evaluateExpression ( "testSomeFunctionAdviceCtx(param,<seq2seq4repair_space>p)" , "org::eclipse::xtend::middleend::xtend::test::expressions" , "iso-8859-1" , mms , vars , new HashMap < String , Object > ( ) , Arrays . asList ( "org::eclipse::xtend::middleend::xtend::test::advices" ) ) ; <START_BUG> Assert . assertEquals ( "before1<seq2seq4repair_space>TestParam<seq2seq4repair_space>Testerossa<seq2seq4repair_space>TestParam<seq2seq4repair_space>after1<seq2seq4repair_space>name:<seq2seq4repair_space>org::eclipse::xtend::middleend::xtend::test::expressions::testSomeFunctionAdviceCtx<seq2seq4repair_space>paramNames:<seq2seq4repair_space>param,p<seq2seq4repair_space>paramTypes:<seq2seq4repair_space>String,org::eclipse::xtend::middleend::xtend::test::Person<seq2seq4repair_space>paramValues:<seq2seq4repair_space>TestParam,Person:<seq2seq4repair_space>Tester<seq2seq4repair_space>Testerossa" , result . toString ( ) ) ; <END_BUG> } }

Fix:
Assert . assertEquals ( "before1<seq2seq4repair_space>TestParam<seq2seq4repair_space>Testerossa<seq2seq4repair_space>TestParam<seq2seq4repair_space>Testerossa<seq2seq4repair_space>override<seq2seq4repair_space>after1<seq2seq4repair_space>name:<seq2seq4repair_space>org::eclipse::xtend::middleend::xtend::test::expressions::testSomeFunctionAdviceCtx<seq2seq4repair_space>paramNames:<seq2seq4repair_space>param,p<seq2seq4repair_space>paramTypes:<seq2seq4repair_space>String,org::eclipse::xtend::middleend::xtend::test::Person<seq2seq4repair_space>paramValues:<seq2seq4repair_space>TestParam,Person:<seq2seq4repair_space>Tester<seq2seq4repair_space>Testerossa" , result . toString ( ) ) ;
Buggy code:
public class FirstTimeInit extends AppCompatActivity implements OnClickListener , AuthenticationCheckTask . AuthenticationCheckListener { private String MalUser ; private String MalPass ; private Context context ; private ProgressDialog dialog ; private boolean loaded = false ; @ Bind ( id . edittext_malUser ) EditText malUser ; @ Bind ( id . edittext_malPass ) EditText malPass ; @ Bind ( id . viewFlipper ) ViewFlipper viewFlipper ; @ Bind ( id . button_connectToMal ) Button connectButton ; @ Bind ( id . registerButton ) Button registerButton ; @ Bind ( id . webview ) WebView webview ; @ Bind ( id . myanimelist ) TextView myanimelist ; @ Bind ( id . anilist ) TextView anilist ; @ SuppressLint ( "SetJavaScriptEnabled" ) @ Override public void onCreate ( Bundle savedInstanceState ) { } private void tryConnection ( ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onAuthenticationCheckFinished ( boolean result ) { try { if ( result ) { AccountService . getAccount ( ) ; <START_BUG> Theme . setCrashData ( "site" , accountType . toString ( ) ) ; <END_BUG> PrefManager . setForceSync ( true ) ; PrefManager . commitChanges ( ) ; Answers . getInstance ( ) . logLogin ( new LoginEvent ( ) . putMethod ( accountType . toString ( ) ) . putSuccess ( true ) ) ; dialog . dismiss ( ) ; Intent goHome = new Intent ( context , Home . class ) ; startActivity ( goHome ) ; finish ( ) ; } else { dialog . dismiss ( ) ; if ( MALApi . isNetworkAvailable ( this ) ) Theme . Snackbar ( this , toast_error_VerifyProblem ) ; else Theme . Snackbar ( this , toast_error_noConnectivity ) ; } } catch ( Exception e ) { Theme . logTaskCrash ( "FirstTimeInit" , "onAuthenticationCheckFinished" , e ) ; Answers . getInstance ( ) . logLogin ( new LoginEvent ( ) . putSuccess ( false ) ) ; Theme . Snackbar ( this , toast_error_VerifyProblem ) ; } } @ Override public void onBackPressed ( ) { } @ Override public void onClick ( View v ) { } }

Fix:
Theme . setCrashData ( "Site" , accountType . toString ( ) ) ;
Buggy code:
public class RenderNyxTeTransmutationAltar extends TileEntitySpecialRenderer { private EntityItem cat ; private EntityItem tar ; @ Override public void renderTileEntityAt ( TileEntity te , double x , double y , double z , float eh ) { GL11 . glPushMatrix ( ) ; GL11 . glTranslatef ( ( ( ( float ) ( x ) ) + 0.5F ) , ( ( float ) ( y ) ) , ( ( ( float ) ( z ) ) + 0.5F ) ) ; final NyxTeTransmutationAltar alt = ( ( NyxTeTransmutationAltar ) ( te ) ) ; if ( ( ( cat ) == null ) && ( ( alt . catalyst ) != null ) ) cat = new EntityItem ( Minecraft . getMinecraft ( ) . theWorld , 0.0 , 0.0 , 0.0 , alt . catalyst ) ; else if ( ( cat ) != null ) { if ( ( alt . catalyst ) == null ) cat = null ; else if ( ( alt . catalyst . getItem ( ) ) != ( cat . getEntityItem ( ) . getItem ( ) ) ) cat . setEntityItemStack ( alt . catalyst ) ; } if ( ( ( tar ) == null ) && ( ( alt . target ) != null ) ) tar = new EntityItem ( Minecraft . getMinecraft ( ) . theWorld , 0.0 , 0.0 , 0.0 , alt . target ) ; else if ( ( tar ) != null ) { if ( ( alt . target ) == null ) tar = null ; else if ( ( alt . target . getItem ( ) ) != ( tar . getEntityItem ( ) . getItem ( ) ) ) tar . setEntityItemStack ( alt . target ) ; } if ( ( cat ) != null ) { this . cat . hoverStart = 0.0F ; GL11 . glTranslatef ( 0.0F , 1.25F , 0.0F ) ; GL11 . glPushMatrix ( ) ; instance . renderEntityWithPosYaw ( this . cat , 0.0 , 0.0 , 0.0 , 0.0F , Minecraft . getMinecraft ( ) . theWorld . getTotalWorldTime ( ) ) ; GL11 . glPopMatrix ( ) ; GL11 . glTranslatef ( 0.0F , ( - 1.25F ) , 0.0F ) ; } if ( ( tar ) != null ) { this . tar . hoverStart = 0.0F ; RenderItem . renderInFrame = true ; GL11 . glPushMatrix ( ) ; if ( ( alt . target . getItem ( ) ) instanceof ItemBlock ) GL11 . glTranslatef ( 0.0F , 0.8F , ( - 0.175F ) ) ; else <START_BUG> GL11 . glTranslatef ( 0.0F , 0.8F , ( - 0.35F ) ) ; <END_BUG> GL11 . glRotatef ( 180 , 0 , 1 , 1 ) ; instance . renderEntityWithPosYaw ( this . tar , 0.0 , 0.0 , 0.0 , 0.0F , 0.0F ) ; GL11 . glPopMatrix ( ) ; RenderItem . renderInFrame = false ; } GL11 . glPopMatrix ( ) ; } }

Fix:
GL11 . glTranslatef ( 0.0F , 0.8F , ( - 0.225F ) ) ;
Buggy code:
public class TestICUTokenizer extends BaseTokenStreamTestCase { public void testHugeDoc ( ) throws IOException { } public void testHugeTerm2 ( ) throws IOException { } private Analyzer a = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { } } ; public void testArmenian ( ) throws Exception { } public void testAmharic ( ) throws Exception { } public void testArabic ( ) throws Exception { } public void testAramaic ( ) throws Exception { } public void testBengali ( ) throws Exception { } public void testFarsi ( ) throws Exception { } public void testGreek ( ) throws Exception { } public void testLao ( ) throws Exception { } public void testThai ( ) throws Exception { } public void testTibetan ( ) throws Exception { } public void testChinese ( ) throws Exception { } public void testEmpty ( ) throws Exception { } public void testLUCENE1545 ( ) throws Exception { } public void testAlphanumericSA ( ) throws Exception { } public void testDelimitersSA ( ) throws Exception { } public void testApostrophesSA ( ) throws Exception { } public void testNumericSA ( ) throws Exception { } public void testTextWithNumbersSA ( ) throws Exception { } public void testVariousTextSA ( ) throws Exception { } public void testKoreanSA ( ) throws Exception { } public void testReusableTokenStream ( ) throws Exception { } public void testOffsets ( ) throws Exception { } public void testTypes ( ) throws Exception { } public void testKorean ( ) throws Exception { } public void testJapanese ( ) throws Exception { } public void testRandomStrings ( ) throws Exception { } public void testRandomHugeStrings ( ) throws Exception { } public void testTokenAttributes ( ) throws Exception { <START_BUG> TokenStream ts = a . tokenStream ( "dummy" , new StringReader ( "This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>test" ) ) ; <END_BUG> ScriptAttribute scriptAtt = ts . addAttribute ( ScriptAttribute . class ) ; ts . reset ( ) ; while ( ts . incrementToken ( ) ) { assertEquals ( LATIN , scriptAtt . getCode ( ) ) ; assertEquals ( UScript . getName ( LATIN ) , scriptAtt . getName ( ) ) ; assertEquals ( UScript . getShortName ( LATIN ) , scriptAtt . getShortName ( ) ) ; assertTrue ( ts . reflectAsString ( false ) . contains ( "script=Latin" ) ) ; } ts . end ( ) ; ts . close ( ) ; } }

Fix:
TokenStream ts = a . tokenStream ( "dummy" , "This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>test" ) ;
Buggy code:
public abstract class Engine implements ITypeRequestor { public LookupEnvironment lookupEnvironment ; protected CompilationUnitScope unitScope ; protected ISearchableNameEnvironment nameEnvironment ; public AssistOptions options ; public CompilerOptions compilerOptions ; public Engine ( Map settings ) { } public void accept ( IBinaryType binaryType , PackageBinding packageBinding ) { } public void accept ( ICompilationUnit sourceUnit ) { } public void accept ( ISourceType [ ] sourceTypes , PackageBinding packageBinding ) { } public abstract AssistParser getParser ( ) { } protected boolean mustQualifyType ( char [ ] packageName , char [ ] typeName ) { } protected void parseMethod ( CompilationUnitDeclaration unit , int position ) { } private void parseMethod ( TypeDeclaration type , CompilationUnitDeclaration unit , int position ) { TypeDeclaration [ ] memberTypes = type . memberTypes ; if ( memberTypes != null ) { int length = memberTypes . length ; for ( int i = 0 ; i < length ; i ++ ) { TypeDeclaration memberType = memberTypes [ i ] ; if ( ( memberType . bodyStart ) > position ) continue ; if ( ( memberType . declarationSourceEnd ) >= position ) { parseMethod ( memberType , unit , position ) ; return ; } } } AbstractMethodDeclaration [ ] methods = type . methods ; if ( methods != null ) { int length = methods . length ; for ( int i = 0 ; i < length ; i ++ ) { AbstractMethodDeclaration method = methods [ i ] ; if ( ( method . bodyStart ) > position ) continue ; if ( ( method . declarationSourceEnd ) >= position ) { getParser ( ) . parseBlockStatements ( method , unit ) ; return ; } } } FieldDeclaration [ ] fields = type . fields ; if ( fields != null ) { int length = fields . length ; for ( int i = 0 ; i < length ; i ++ ) { if ( ! ( ( fields [ i ] ) instanceof Initializer ) ) continue ; Initializer initializer = ( ( Initializer ) ( fields [ i ] ) ) ; <START_BUG> if ( ( initializer . bodyStart ) > position ) <END_BUG> continue ; if ( ( initializer . declarationSourceEnd ) >= position ) { getParser ( ) . parseBlockStatements ( initializer , type , unit ) ; return ; } } } } protected void reset ( ) { } }

Fix:
if ( ( initializer . sourceStart ) > position )
Buggy code:
public class AtAjAnnotationGenTests extends XMLBasedAjcTestCase { public static Test suite ( ) { } protected File getSpecFile ( ) { <START_BUG> return new File ( "..//tests//src//org//aspectj//systemtest//ajc150//ataspectj//atajc150.xml" ) ; <END_BUG> } public void testSimpleAspect ( ) { } public void testSimpleAspectIn14Mode ( ) { } public void testAspectAlreadyAnnotated ( ) { } public void testPrivilegedAspect ( ) { } public void testPerThisAspect ( ) { } public void testPerTargetAspect ( ) { } public void testPerCflowAspect ( ) { } public void testPerCflowbelowAspect ( ) { } public void testPertypewithinAspect ( ) { } public void testInnerAspectOfClass ( ) { } public void testInnerAspectOfAspect ( ) { } public void testAdvice ( ) { } public void testSimplePointcut ( ) { } public void testPointcutModifiers ( ) { } public void testPointcutParams ( ) { } public void testPointcutRefs ( ) { } public void testBeforeWithBadReturn ( ) { } public void testTwoAnnotationsOnSameElement ( ) { } public void testBadPcutInAdvice ( ) { } public void testBadParameterBinding ( ) { } public void testSimpleAtPointcut ( ) { } public void testPointcutMedley ( ) { } public void testAdviceDeclaredInClass ( ) { } }

Fix:
return new File ( "..//tests//src//org//aspectj//systemtest//ajc150//ataspectj//annotationgen.xml" ) ;
Buggy code:
public class TestSpanQueryFilter extends LuceneTestCase { public TestSpanQueryFilter ( String s ) { } public void testFilterWorks ( ) throws Exception { Directory dir = new RAMDirectory ( ) ; IndexWriter writer = new IndexWriter ( dir , new SimpleAnalyzer ( ) , true , MaxFieldLength . LIMITED ) ; for ( int i = 0 ; i < 500 ; i ++ ) { Document document = new Document ( ) ; document . add ( new org . apache . lucene . document . Field ( "field" , ( ( ( English . intToEnglish ( i ) ) + "<seq2seq4repair_space>equals<seq2seq4repair_space>" ) + ( English . intToEnglish ( i ) ) ) , Store . NO , Index . ANALYZED ) ) ; writer . addDocument ( document ) ; } writer . close ( ) ; <START_BUG> IndexReader reader = IndexReader . open ( dir ) ; <END_BUG> SpanTermQuery query = new SpanTermQuery ( new org . apache . lucene . index . Term ( "field" , English . intToEnglish ( 10 ) . trim ( ) ) ) ; SpanQueryFilter filter = new SpanQueryFilter ( query ) ; SpanFilterResult result = filter . bitSpans ( reader ) ; DocIdSet docIdSet = result . getDocIdSet ( ) ; assertTrue ( "docIdSet<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>and<seq2seq4repair_space>it<seq2seq4repair_space>shouldn't<seq2seq4repair_space>be" , ( docIdSet != null ) ) ; assertContainsDocId ( "docIdSet<seq2seq4repair_space>doesn't<seq2seq4repair_space>contain<seq2seq4repair_space>docId<seq2seq4repair_space>10" , docIdSet , 10 ) ; List spans = result . getPositions ( ) ; assertTrue ( "spans<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>and<seq2seq4repair_space>it<seq2seq4repair_space>shouldn't<seq2seq4repair_space>be" , ( spans != null ) ) ; int size = getDocIdSetSize ( docIdSet ) ; assertTrue ( ( ( ( "spans<seq2seq4repair_space>Size:<seq2seq4repair_space>" + ( spans . size ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not:<seq2seq4repair_space>" ) + size ) , ( ( spans . size ( ) ) == size ) ) ; for ( Iterator iterator = spans . iterator ( ) ; iterator . hasNext ( ) ; ) { SpanFilterResult . PositionInfo info = ( ( SpanFilterResult . PositionInfo ) ( iterator . next ( ) ) ) ; assertTrue ( "info<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>and<seq2seq4repair_space>it<seq2seq4repair_space>shouldn't<seq2seq4repair_space>be" , ( info != null ) ) ; assertContainsDocId ( ( "docIdSet<seq2seq4repair_space>doesn't<seq2seq4repair_space>contain<seq2seq4repair_space>docId<seq2seq4repair_space>" + ( info . getDoc ( ) ) ) , docIdSet , info . getDoc ( ) ) ; assertTrue ( ( ( ( "info.getPositions()<seq2seq4repair_space>Size:<seq2seq4repair_space>" + ( info . getPositions ( ) . size ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not:<seq2seq4repair_space>" ) + 2 ) , ( ( info . getPositions ( ) . size ( ) ) == 2 ) ) ; } reader . close ( ) ; } int getDocIdSetSize ( DocIdSet docIdSet ) throws Exception { } public void assertContainsDocId ( String msg , DocIdSet docIdSet , int docId ) throws Exception { } }

Fix:
IndexReader reader = IndexReader . open ( dir , true ) ;
Buggy code:
public class Book { private Integer code ; private String title ; private String author ; private String yearPublished ; private boolean checkOut ; public Book ( ) { } public Book ( Integer code , String title , String author , String yearPublished , boolean checkOut ) { } public int getCode ( ) { } public String getAuthor ( ) { } public String getTitle ( ) { } public String getYearPublished ( ) { } public boolean isCheckOut ( ) { } public void setCheckOut ( boolean checkOut ) { } public String checkOutBookByAvailable ( List < Book > booksLibrary , Integer codeBookChoose ) { <START_BUG> List < Book > availableBooks = Books . getAvailableBooks ( booksLibrary ) ; <END_BUG> String result = "" ; try { for ( Book book : availableBooks ) { if ( codeBookChoose . equals ( book . getCode ( ) ) ) { book . setCheckOut ( true ) ; result = "Thank<seq2seq4repair_space>you!<seq2seq4repair_space>Enjoy<seq2seq4repair_space>the<seq2seq4repair_space>book." ; break ; } else { result = "That<seq2seq4repair_space>book<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>available." ; } } } catch ( Exception exc ) { System . out . println ( ( "That<seq2seq4repair_space>book<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>available.<seq2seq4repair_space>Error:<seq2seq4repair_space>" + ( exc . getMessage ( ) ) ) ) ; } return result ; } public String returnBookToLibrary ( List < Book > books , Integer codeBookReturn ) { } }

Fix:
List < Book > availableBooks = Books . getAvailableBooksToCheckout ( booksLibrary ) ;
Buggy code:
public class TileEntityCage extends TileEntity implements ISidedInventory { private ItemStack [ ] modules = new ItemStack [ 7 ] ; private int counter ; private int updateCounter ; private int tier ; private static final int [ ] slot = new int [ ] { 0 } ; private String entName ; private String owner ; private boolean redstoneActive ; private boolean initChecks ; private boolean active ; private String cageName ; public TileEntityCage ( ) { } public void cageName ( String string ) { } @ Override public void updateEntity ( ) { } private void setModule ( ) { if ( ( modules [ 1 ] ) != null ) { ItemStack itemstack = modules [ 1 ] ; ItemStack itemstack1 = itemstack . copy ( ) ; int var3 = ( itemstack . getItemDamage ( ) ) + 2 ; <START_BUG> if ( ( modules [ var3 ] ) != null ) { <END_BUG> this . modules [ var3 ] = itemstack1 ; this . modules [ 1 ] = null ; } } } public void checkRedstone ( ) { } private void setMetadata ( int meta ) { } private boolean canEntitySpawn ( EntityLiving ent ) { } private boolean isPlayerClose ( int x , int y , int z ) { } private boolean canSpawnInWorld ( EntityLiving ent ) { } private boolean canSpawnInLight ( EntityLiving ent ) { } private boolean canSpawnAtCoords ( EntityLiving ent ) { } @ SuppressWarnings ( "unchecked" ) private boolean hasReachedSpawnLimit ( EntityLiving ent ) { } private void spawnEntities ( EntityLiving [ ] ents ) { } public void invalidate ( ) { } public void readFromNBT ( NBTTagCompound nbt ) { } public void writeToNBT ( NBTTagCompound nbt ) { } public int getSizeInventory ( ) { } public ItemStack getStackInSlot ( int slot ) { } @ Override public ItemStack decrStackSize ( int var1 , int var2 ) { } public void setInventorySlotContents ( int slot , ItemStack stack ) { } @ Override public ItemStack getStackInSlotOnClosing ( int slot ) { } @ Override public String getInventoryName ( ) { } @ Override public boolean hasCustomInventoryName ( ) { } @ Override public int getInventoryStackLimit ( ) { } @ Override public boolean isUseableByPlayer ( EntityPlayer player ) { } @ Override public void openInventory ( ) { } @ Override public void closeInventory ( ) { } public int getTier ( ) { } public String getEntityName ( ) { } @ Override public boolean isItemValidForSlot ( int slot , ItemStack stack ) { } @ Override public void onDataPacket ( NetworkManager net , S35PacketUpdateTileEntity pkt ) { } @ Override public Packet getDescriptionPacket ( ) { } @ Override public int [ ] getAccessibleSlotsFromSide ( int var1 ) { } @ Override public boolean canInsertItem ( int var1 , ItemStack stack , int p_102007_3_ ) { } @ Override public boolean canExtractItem ( int p_102008_1_ , ItemStack p_102008_2_ , int p_102008_3_ ) { } No newline ; at end ; of file ; }

Fix:
if ( ( modules [ var3 ] ) == null ) {
Buggy code:
public class BindAndValidateLifecycle { private final Binder binder ; private final AlertContext alertContext ; private BindAndValidateLifecycle . ValidationDecider validationDecider = BindAndValidateLifecycle . ValidationDecider . ALWAYS_VALIDATE ; private Validator validator ; public BindAndValidateLifecycle ( Binder binder , AlertContext alertContext ) { } public void execute ( Map < String , ? extends Object > sourceValues ) { BindingResults bindingResults = binder . bind ( sourceValues ) ; if ( ( ( validator ) != null ) && ( validationDecider . shouldValidateAfter ( bindingResults ) ) ) { validator . validate ( binder . getModel ( ) , bindingResults . successes ( ) . properties ( ) ) ; } for ( BindingResult result : bindingResults . failures ( ) ) { <START_BUG> alertContext . add ( result . getAlert ( ) ) ; <END_BUG> } } interface ValidationDecider { boolean shouldValidateAfter ( BindingResults results ) { } static final BindAndValidateLifecycle . ValidationDecider ALWAYS_VALIDATE = new BindAndValidateLifecycle . ValidationDecider ( ) { public boolean shouldValidateAfter ( BindingResults results ) { } } ; } }

Fix:
alertContext . add ( result . getProperty ( ) , result . getAlert ( ) ) ;
Buggy code:
public class ModClusterRemoveMetric implements OperationStepHandler { static final ModClusterRemoveMetric INSTANCE = new ModClusterRemoveMetric ( ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { PathAddress parent = PathAddress . pathAddress ( SUBSYSTEM_PATH , CONFIGURATION_PATH , DYNAMIC_LOAD_PROVIDER ) ; String type = TYPE . resolveModelAttribute ( context , operation ) . asString ( ) ; String name = getMetricName ( context , type ) ; if ( name == null ) { context . setRollbackOnly ( ) ; return ; } ModelNode targetOperation = Util . createRemoveOperation ( parent . append ( PathElement . pathElement ( LOAD_METRIC . getKey ( ) , name ) ) ) ; context . addStep ( targetOperation , new ReloadRequiredRemoveStepHandler ( ) , IMMEDIATE ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } private String getMetricName ( OperationContext context , String type ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class KafkaSingleNodeStreamDeploymentIntegrationTests extends AbstractSingleNodeStreamDeploymentIntegrationTests { @ ClassRule public static KafkaTestSupport kafkaTestSupport = new KafkaTestSupport ( ) ; @ ClassRule public static ExternalResource initializeKafkaMessageBus = new ExternalResource ( ) { @ Override protected void before ( ) { } } ; @ BeforeClass public static void setUpAll ( ) { } @ AfterClass public static void clearAll ( ) { } @ Override protected void verifyOnDemandQueues ( MessageChannel y3 , MessageChannel z3 , Map < String , Object > initialTransportState ) { } private DefaultConnectionFactory getDefaultConnectionFactory ( ) { } @ Override protected Map < String , Object > readInitialQueueState ( String ... queueNames ) { } private String receiveFromTopicForQueue ( KafkaTemplate template , String topicName , Map < String , Object > initialTransportState ) { } private long getInitialOffset ( KafkaTemplate template , String topicName ) { try { Partition partition = new Partition ( KafkaMessageBus . escapeTopicName ( topicName ) , 0 ) ; BrokerAddress leader = template . getConnectionFactory ( ) . getLeader ( partition ) ; <START_BUG> return template . getConnectionFactory ( ) . connect ( leader ) . fetchInitialOffset ( OffsetRequest . LatestTime ( ) ) . getResult ( partition ) ; <END_BUG> } catch ( PartitionNotFoundException e ) { return 0 ; } } }

Fix:
return template . getConnectionFactory ( ) . connect ( leader ) . fetchInitialOffset ( OffsetRequest . LatestTime ( ) , partition ) . getResult ( partition ) ;