nus-yam/ex-repair huggingface dataset:
Buggy code:
public class VBoxSvc implements Parcelable { protected static final int TIMEOUT = 60000 ; public static final String BUNDLE = "vmgr" ; public static final String NAMESPACE = "http:////www.virtualbox.org//" ; protected String _url ; protected IVirtualBox _vbox ; protected HttpTransportSE _transport ; public VBoxSvc ( String url ) { } public VBoxSvc ( VBoxSvc copy ) { } protected < T > T getProxy ( Class < T > clazz , String id ) { } protected < T > T getProxy ( Class < T > clazz , String id , Map < String , Object > cache ) { } public IVirtualBox logon ( String username , String password ) throws IOException , XmlPullParserException { } public Map < String , Map < String , Object > > queryMetricsData ( String object , String ... metrics ) throws IOException { } public IVirtualBox getVBox ( ) { } public String getURL ( ) { } public class KSOAPInvocationHandler implements InvocationHandler { private String uiud ; private Class < ? > type ; private Map < String , Object > _cache = new HashMap < String , Object > ( ) ; public KSOAPInvocationHandler ( String id , Class < ? > type , Map < String , Object > cache ) { } @ Override public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { } @ SuppressWarnings ( "unchecked" ) public < T extends Annotation > T getAnnotation ( Class < T > clazz , Annotation [ ] a ) { } private void marshal ( SoapObject request , KSOAP ksoap , Class < ? > clazz , Type gType , Object obj ) { } } public class SerializationEnvelope extends SoapSerializationEnvelope { public SerializationEnvelope ( ) { } public Object getResponse ( Class < ? > returnType , Type genericType ) throws SoapFault { } private Object unmarshal ( Class < ? > returnType , Type genericType , Object ret ) { if ( ret == null ) return null ; if ( ( returnType . isArray ( ) ) && ( returnType . getComponentType ( ) . equals ( byte . class ) ) ) <START_BUG> Base64 . decode ( ret . toString ( ) . getBytes ( ) , DEFAULT ) ; <END_BUG> if ( returnType . equals ( Boolean . class ) ) return Boolean . valueOf ( ret . toString ( ) ) ; else if ( returnType . equals ( Integer . class ) ) return Integer . valueOf ( ret . toString ( ) ) ; else if ( returnType . equals ( Long . class ) ) return Long . valueOf ( ret . toString ( ) ) ; else if ( returnType . equals ( String . class ) ) return ret . toString ( ) ; else if ( IManagedObjectRef . class . isAssignableFrom ( returnType ) ) return getProxy ( returnType , ret . toString ( ) ) ; else if ( returnType . isEnum ( ) ) { for ( Object element : returnType . getEnumConstants ( ) ) if ( element . toString ( ) . equals ( ret . toString ( ) ) ) return element ; } return ret ; } } public static final Parcelable . Creator < VBoxSvc > CREATOR ; @ Override public int describeContents ( ) { } @ Override public void writeToParcel ( Parcel dest , int flags ) { } No newline ; at end ; of file ; }

Fix:
return Base64 . decode ( ret . toString ( ) . getBytes ( ) , DEFAULT ) ;
Buggy code:
public class IfStatement extends Statement { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( IfStatement . class , "expression" , Expression . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; public static final ChildPropertyDescriptor THEN_STATEMENT_PROPERTY = new ChildPropertyDescriptor ( IfStatement . class , "thenStatement" , Statement . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; public static final ChildPropertyDescriptor ELSE_STATEMENT_PROPERTY = new ChildPropertyDescriptor ( IfStatement . class , "elseStatement" , Statement . class , ASTNode . OPTIONAL , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Expression expression = null ; private Statement thenStatement = null ; private Statement optionalElseStatement = null ; IfStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { IfStatement result = new IfStatement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . copyLeadingComment ( this ) ; result . setExpression ( ( ( Expression ) ( getExpression ( ) . clone ( target ) ) ) ) ; result . setThenStatement ( ( ( Statement ) ( getThenStatement ( ) . clone ( target ) ) ) ) ; result . setElseStatement ( ( ( Statement ) ( ASTNode . copySubtree ( target , getElseStatement ( ) ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } public Statement getThenStatement ( ) { } public void setThenStatement ( Statement statement ) { } public Statement getElseStatement ( ) { } public void setElseStatement ( Statement statement ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public final class ThreadFactoryAdd extends AbstractThreadsSubsystemUpdate < Void > { private static final long serialVersionUID = 1935521612404501853L ; private final Map < String , String > properties = new HashMap < String , String > ( ) ; private final String name ; private String groupName ; private String threadNamePattern ; private Integer priority ; public ThreadFactoryAdd ( final String name ) { } public ThreadFactoryRemove getCompensatingUpdate ( final ThreadsSubsystemElement original ) { } protected < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > handler , final P param ) { final ThreadFactoryService service = new ThreadFactoryService ( ) ; service . setNamePattern ( threadNamePattern ) ; service . setPriority ( priority ) ; service . setThreadGroupName ( groupName ) ; final UpdateResultHandler . ServiceStartListener < P > listener = new UpdateResultHandler . ServiceStartListener < P > ( handler , param ) ; final BatchBuilder batchBuilder = updateContext . getBatchBuilder ( ) ; <START_BUG> final BatchServiceBuilder < ThreadFactory > builder = batchBuilder . addService ( Services . threadFactoryName ( name ) , service ) ; <END_BUG> builder . addListener ( listener ) ; builder . setInitialMode ( IMMEDIATE ) ; try { batchBuilder . install ( ) ; } catch ( ServiceRegistryException e ) { handler . handleFailure ( e , param ) ; } } protected void applyUpdate ( final ThreadsSubsystemElement element ) throws UpdateFailedException { } public String getGroupName ( ) { } public void setGroupName ( final String groupName ) { } public String getThreadNamePattern ( ) { } public void setThreadNamePattern ( final String threadNamePattern ) { } public Integer getPriority ( ) { } public void setPriority ( final Integer priority ) { } public Map < String , String > getProperties ( ) { } }

Fix:
final BatchServiceBuilder < ThreadFactory > builder = batchBuilder . addService ( ThreadsServices . threadFactoryName ( name ) , service ) ;
Buggy code:
public final class MarkovInfo extends Object { public static final double EXP = 1.0E-5 ; public static final double TIME_STEP = Double . MAX_VALUE ; public static final int MAX_REDO_COUNT = 1 ; public static final int MAX_TERMINATE_COUNT = 1 ; public static final int MAX_REPLACE_COUNT = 1 ; public static final int S_UNKNOWN = 1 ; public static final int S_FAILED = 2 ; public static final int S_SUCCEED = 3 ; public static final int S_PRICE_UP = 4 ; public static final int S_DELAYED = 5 ; public static final int A_NO_ACTION = 17 ; public static final int A_TERMINATE = 18 ; public static final int A_RE_DO = 19 ; public static final int A_REPLACE = 20 ; public static final int A_RE_COMPOSITE = 21 ; private static long stateid = 0 ; private static Map < BaseAction , Integer > reDoActionMap = new HashMap < BaseAction , Integer > ( ) ; private static Map < BaseAction , Integer > terminateActionMap = new HashMap < BaseAction , Integer > ( ) ; private static Map < Integer , Integer > replaceActionMap = new HashMap < Integer , Integer > ( ) ; public static long getNextFreeStateID ( ) { } private static boolean isReDoActionCanDo ( BaseAction action ) { } private static void addReDoActionUsedCount ( BaseAction action ) { } private static boolean isTerminateActionCanDo ( BaseAction action ) { } private static void addTerminateActionUsedCount ( BaseAction action ) { } private static boolean isReplaceActionCanDo ( int replaceActivityNumber ) { if ( ( MarkovInfo . replaceActionMap . get ( replaceActivityNumber ) ) == null ) { MarkovInfo . replaceActionMap . put ( replaceActivityNumber , 0 ) ; return true ; } <START_BUG> return ( MarkovInfo . replaceActionMap . get ( replaceActivityNumber ) ) < ( MarkovInfo . MAX_TERMINATE_COUNT ) ; <END_BUG> } private static void addReplaceActionUsedCount ( int replaceActivityNumber ) { } public static List < MarkovRecord > noAction ( MarkovState state ) { } public static List < MarkovRecord > redo ( MarkovState state ) { } public static List < MarkovRecord > terminate ( MarkovState state ) { } public static List < MarkovRecord > replace ( MarkovState state ) { } }

Fix:
return ( MarkovInfo . replaceActionMap . get ( replaceActivityNumber ) ) < ( MarkovInfo . MAX_REPLACE_COUNT ) ;
Buggy code:
public class TestPlanGui extends AbstractJMeterGuiComponent { private JCheckBox functionalMode ; private JCheckBox serializedMode ; private ArgumentsPanel argsPanel ; private JTextArea commentPanel ; FileListPanel browseJar = null ; public TestPlanGui ( ) { } public JPopupMenu createPopupMenu ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement plan ) { super . configureTestElement ( plan ) ; if ( plan instanceof TestPlan ) { TestPlan tp = ( ( TestPlan ) ( plan ) ) ; tp . setFunctionalMode ( functionalMode . isSelected ( ) ) ; tp . setSerialized ( serializedMode . isSelected ( ) ) ; tp . setUserDefinedVariables ( ( ( Arguments ) ( argsPanel . createTestElement ( ) ) ) ) ; tp . setProperty ( COMMENTS , commentPanel . getText ( ) ) ; <START_BUG> tp . setTestPlanClasspath ( browseJar . getFiles ( ) ) ; <END_BUG> } } public String getLabelResource ( ) { } public Collection getMenuCategories ( ) { } public void configure ( TestElement el ) { } private JPanel createVariablePanel ( ) { } private Container createCommentPanel ( ) { } protected Container createClassPathPanel ( ) { } private void init ( ) { } }

Fix:
tp . setTestPlanClasspathArray ( browseJar . getFiles ( ) ) ;
Buggy code:
public abstract class AbstractValidator implements IValidator { private FormComponent component ; public void error ( ) { } public void error ( final String resourceKey , final IModel resourceModel ) { } public void error ( final String resourceKey , final Map map ) { } public void error ( final Map map ) { } public FormComponent getComponent ( ) { } public String getInput ( ) { <START_BUG> return component . getRequestString ( ) ; <END_BUG> } public abstract void onValidate ( ) { } public final synchronized void validate ( final FormComponent component ) { } protected Map messageModel ( ) { } protected String resourceKey ( ) { } }

Fix:
return component . getInput ( ) ;
Buggy code:
public class AddressbookMain implements IComponentPlugin { private static final Logger LOG = Logger . getLogger ( "org.columba.addressbook.main" ) ; private static final String RESOURCE_PATH = "org.columba.addressbook.i18n.global" ; public AddressbookMain ( ) { } public void handleCommandLineParameters ( CommandLine commandLine ) { if ( commandLine . hasOption ( "addressbook" ) ) { try { FrameManager . getInstance ( ) . openView ( "Addressbook" ) ; <START_BUG> Main . getInstance ( ) . setRestoreLastSession ( false ) ; <END_BUG> } catch ( PluginLoadingFailedException e ) { AddressbookMain . LOG . severe ( e . getLocalizedMessage ( ) ) ; } } } public void init ( ) { } public void postStartup ( ) { } public void registerCommandLineArguments ( ) { } }

Fix:
ColumbaCmdLineParser . getInstance ( ) . setRestoreLastSession ( false ) ;
Buggy code:
class MemoryMXBeanAttributeHandler extends AbstractPlatformMBeanAttributeHandler { static final MemoryMXBeanAttributeHandler INSTANCE = new MemoryMXBeanAttributeHandler ( ) ; private MemoryMXBeanAttributeHandler ( ) { } @ Override protected void executeReadAttribute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final String name = operation . require ( NAME ) . asString ( ) ; <START_BUG> if ( ( ( PlatformMBeanUtil . JVM_MAJOR_VERSION ) > 6 ) && ( OBJECT_NAME . getName ( ) . equals ( name ) ) ) { <END_BUG> context . getResult ( ) . set ( ManagementFactory . MEMORY_MXBEAN_NAME ) ; } else if ( OBJECT_PENDING_FINALIZATION_COUNT . equals ( name ) ) { context . getResult ( ) . set ( ManagementFactory . getMemoryMXBean ( ) . getObjectPendingFinalizationCount ( ) ) ; } else if ( HEAP_MEMORY_USAGE . equals ( name ) ) { final ModelNode mu = PlatformMBeanUtil . getDetypedMemoryUsage ( ManagementFactory . getMemoryMXBean ( ) . getHeapMemoryUsage ( ) ) ; context . getResult ( ) . set ( mu ) ; } else if ( NON_HEAP_MEMORY_USAGE . equals ( name ) ) { final ModelNode mu = PlatformMBeanUtil . getDetypedMemoryUsage ( ManagementFactory . getMemoryMXBean ( ) . getNonHeapMemoryUsage ( ) ) ; context . getResult ( ) . set ( mu ) ; } else if ( VERBOSE . equals ( name ) ) { context . getResult ( ) . set ( ManagementFactory . getMemoryMXBean ( ) . isVerbose ( ) ) ; } else if ( ( MEMORY_METRICS . contains ( name ) ) || ( MEMORY_READ_WRITE_ATTRIBUTES . contains ( name ) ) ) { throw ROOT_LOGGER . badReadAttributeImpl ( name ) ; } else { throw unknownAttribute ( operation ) ; } } @ Override protected void executeWriteAttribute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } }

Fix:
if ( OBJECT_NAME . getName ( ) . equals ( name ) ) {
Buggy code:
@ SuppressWarnings ( { "unchecked" } ) public class GeneralFragment extends Fragment { public static ListView listv ; public static Button send_btn ; public static EditText text_field ; public static ArrayList < BtMessage > messages ; public static ItemAdapter adapter ; final String TAG = "GeneralFragment" ; View rootView ; SharedPreferences SP ; public GeneralFragment ( ) { } public static void refresh ( ) { if ( ( GeneralFragment . messages ) != null ) { GeneralFragment . messages . clear ( ) ; <START_BUG> GeneralFragment . adapter . notifyDataSetChanged ( ) ; <END_BUG> GeneralFragment . messages . addAll ( DBHelper . recoverMessages ( db ) ) ; GeneralFragment . adapter . notifyDataSetChanged ( ) ; } } public static boolean isBlank ( String str ) { } public void onCreate ( Bundle savedInstanceState ) { } public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void onDetach ( ) { } }

Fix:
GeneralFragment . adapter . notifyDataSetInvalidated ( ) ;
Buggy code:
public class SourceMethod extends NamedMember implements IMethod { protected String [ ] parameterTypes ; protected SourceMethod ( JavaElement parent , String name , String [ ] parameterTypes ) { } protected void closing ( Object info ) throws JavaModelException { } public boolean equals ( Object o ) { } public int getElementType ( ) { } public String [ ] getExceptionTypes ( ) throws JavaModelException { } protected void getHandleMemento ( StringBuffer buff ) { } protected char getHandleMementoDelimiter ( ) { } public String getKey ( ) { try { <START_BUG> return getKey ( this , true , false ) ; <END_BUG> } catch ( JavaModelException e ) { return null ; } } public int getNumberOfParameters ( ) { } public String [ ] getParameterNames ( ) throws JavaModelException { } public String [ ] getParameterTypes ( ) { } public ITypeParameter getTypeParameter ( String typeParameterName ) { } public ITypeParameter [ ] getTypeParameters ( ) throws JavaModelException { } public String [ ] getTypeParameterSignatures ( ) throws JavaModelException { } public IJavaElement getPrimaryElement ( boolean checkOwner ) { } public String getReturnType ( ) throws JavaModelException { } public String getSignature ( ) throws JavaModelException { } public int hashCode ( ) { } public boolean isConstructor ( ) throws JavaModelException { } public boolean isMainMethod ( ) throws JavaModelException { } public boolean isResolved ( ) { } public boolean isSimilar ( IMethod method ) { } public String readableName ( ) { } public JavaElement resolved ( Binding binding ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { } protected void toStringName ( StringBuffer buffer ) { } protected void toStringName ( StringBuffer buffer , int flags ) { } }

Fix:
return getKey ( this , false ) ;
Buggy code:
public final class TransactionsExtension implements Extension { public static final String NAMESPACE = "urn:jboss:domain:transactions:1.0" ; static final SubsystemFactory < TransactionsSubsystemElement > FACTORY = new SubsystemFactory < TransactionsSubsystemElement > ( ) { public TransactionsSubsystemElement createSubsystemElement ( ) { } } ; public void initialize ( ExtensionContext context ) { <START_BUG> context . registerSubsystem ( TransactionsExtension . NAMESPACE , TransactionsExtension . FACTORY , TransactionSubsystemElementParser . getInstance ( ) ) ; <END_BUG> } public void activate ( final ServiceActivatorContext context ) { } }

Fix:
context . registerSubsystem ( TransactionsExtension . NAMESPACE , TransactionSubsystemElementParser . getInstance ( ) ) ;
Buggy code:
public class ItemFoodAppleMagic extends ItemFood { private boolean hasEffect = false ; private ArrayList < Integer > potionIds ; private ArrayList < Integer > potionDurations ; private ArrayList < Integer > potionAmplifiers ; public ItemFoodAppleMagic ( int fillsHunger , boolean has_effect ) { } public ItemFoodAppleMagic addEffect ( int potionId , int potionDuration , int potionAmplifier ) { } @ Override protected void onFoodEaten ( ItemStack par1ItemStack , World par2World , EntityPlayer par3EntityPlayer ) { } @ Override public boolean hasEffect ( ItemStack par1ItemStack ) { } @ Override @ SideOnly ( Side . CLIENT ) public EnumRarity getRarity ( ItemStack par1ItemStack ) { } public static int timeShort = 90 ; public static int timeLong = 8 * 60 ; public static int hungerSmall = 1 ; public static int hungerLarge = 4 ; public static void addRecipe ( ItemFoodAppleMagic apple , ItemStack ingredient ) { GameRegistry . addRecipe ( new ItemStack ( apple ) , "lll" , "lal" , "lll" , 'l' , ingredient , 'a' , apple ) ; if ( cfg . uncraftGeneral ) <START_BUG> GameRegistry . addSmelting ( apple , new ItemStack ( ingredient . getItem ( ) , 8 ) , 0 ) ; <END_BUG> } @ Override public void addInformation ( ItemStack held , EntityPlayer player , List list , boolean par4 ) { } }

Fix:
GameRegistry . addSmelting ( apple , new ItemStack ( ingredient . getItem ( ) , 8 , ingredient . getMetadata ( ) ) , 0 ) ;
Buggy code:
public class XtendComponent extends AbstractExpressionsUsingWorkflowComponent { private String _invokeExpression ; String _extensionFile = null ; private String _expression = null ; private String _outputSlot = WorkflowContext . DEFAULT_SLOT ; private String _fileEncoding = null ; public void setFileEncoding ( String fileEncoding ) { } @ Override public String getLogMessage ( ) { } public void setInvoke ( String invoke ) { } public void setOutputSlot ( String outputSlot ) { } @ Override public void invokeInternal2 ( final WorkflowContext ctx , final ProgressMonitor monitor , final Issues issues ) { } private boolean extensionFileExists ( ) { } @ Override public void checkConfigurationInternal ( Issues issues ) { <START_BUG> super . checkConfiguration ( issues ) ; <END_BUG> String compPrefix = ( ( getId ( ) ) != null ) ? ( getId ( ) ) + ":<seq2seq4repair_space>" : "" ; if ( ( ( _invokeExpression ) == null ) || ( ( _invokeExpression . trim ( ) . length ( ) ) == 0 ) ) { issues . addError ( ( compPrefix + "Property<seq2seq4repair_space>'invoke'<seq2seq4repair_space>not<seq2seq4repair_space>specified." ) ) ; return ; } if ( ( _extensionFile ) == null ) { issues . addError ( ( compPrefix + "Error<seq2seq4repair_space>parsing<seq2seq4repair_space>property<seq2seq4repair_space>'invoke':<seq2seq4repair_space>Could<seq2seq4repair_space>not<seq2seq4repair_space>extract<seq2seq4repair_space>name<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>extension<seq2seq4repair_space>file." ) ) ; return ; } if ( ( ! ( extensionFileExists ( ) ) ) || ( ( _expression ) == null ) ) { issues . addError ( ( ( ( compPrefix + "Property<seq2seq4repair_space>'invoke'<seq2seq4repair_space>not<seq2seq4repair_space>specified<seq2seq4repair_space>properly.<seq2seq4repair_space>Extension<seq2seq4repair_space>file<seq2seq4repair_space>'" ) + ( _extensionFile ) ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>found." ) ) ; return ; } if ( ( _expression ) == null ) { issues . addError ( ( ( ( compPrefix + "Error<seq2seq4repair_space>parsing<seq2seq4repair_space>property<seq2seq4repair_space>'invoke':<seq2seq4repair_space>Could<seq2seq4repair_space>not<seq2seq4repair_space>extract<seq2seq4repair_space>the<seq2seq4repair_space>expression<seq2seq4repair_space>to<seq2seq4repair_space>invoke<seq2seq4repair_space>in<seq2seq4repair_space>extension<seq2seq4repair_space>file<seq2seq4repair_space>'" ) + ( _extensionFile ) ) + "'." ) ) ; return ; } } }

Fix:
super . checkConfigurationInternal ( issues ) ;
Buggy code:
public class AddAliasCommand implements OperationStepHandler { public static final AddAliasCommand INSTANCE = new AddAliasCommand ( ) ; private final ParametersValidator nameValidator = new ParametersValidator ( ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } protected boolean requiresRuntime ( OperationContext context ) { <START_BUG> return ( ( context . getType ( ) ) == ( Type . SERVER ) ) && ( ! ( context . isBooting ( ) ) ) ; <END_BUG> } private ModelNode addNewAliasToList ( ModelNode list , String alias ) { } }

Fix:
return ( context . getProcessType ( ) . isServer ( ) ) && ( ! ( context . isBooting ( ) ) ) ;
Buggy code:
public class DeleteMessageAction extends AbstractColumbaAction implements SelectionListener { public DeleteMessageAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { FolderCommandReference r = ( ( org . columba . mail . gui . frame . MailFrameMediator ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ; r . setMarkVariant ( MARK_AS_EXPUNGED ) ; MessageFolder folder = ( ( MessageFolder ) ( r . getFolder ( ) ) ) ; int uid = folder . getConfiguration ( ) . getInteger ( "uid" ) ; MessageFolder trash = ( ( MessageFolder ) ( ( ( org . columba . mail . folder . RootFolder ) ( folder . getRootFolder ( ) ) ) . getTrashFolder ( ) ) ) ; if ( uid == ( trash . getUid ( ) ) ) { processor . addOp ( new org . columba . mail . folder . command . MarkMessageCommand ( r ) ) ; processor . addOp ( new org . columba . mail . folder . command . ExpungeFolderCommand ( r ) ) ; } else { MessageFolder destFolder = trash ; FolderCommandReference result = ( ( org . columba . mail . gui . frame . MailFrameMediator ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ; result . setDestinationFolder ( destFolder ) ; MoveMessageCommand c = new MoveMessageCommand ( result ) ; processor . addOp ( c ) ; } if ( ( getFrameMediator ( ) ) instanceof MessageFrameController ) { <START_BUG> getFrameMediator ( ) . close ( ) ; <END_BUG> } } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
getFrameMediator ( ) . getContainer ( ) . close ( ) ;
Buggy code:
public class TapActivity extends Activity implements TapView . TapListener { public enum LOGGING_TYPE { PEBBLE , WEAR ; } public static final String TOUCH_BOXES = "com.sri.csl.cortical.watchauth.TOUCH_BOXES" ; private static final String TAG = "TapActivity" ; public static TapActivity . LOGGING_TYPE loggingType = null ; private TapView view ; private TrialPlayer player ; private TextView prompt ; private TapLogger tapLogger ; private AndroidAccelLogger accelLogger ; private SensorLogger sensorLogger ; private Handler handler ; private Runnable waitForSensor ; private Runnable launchNext = null ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } protected void onResume ( ) { } protected void onPause ( ) { } @ Override public void onTap ( TouchBox box ) { player . hitTarget ( box . touchedRect ) ; tapLogger . recordTap ( box , player ) ; if ( ( player . done ( ) ) && ( ( launchNext ) == null ) ) { <START_BUG> Activity act = this ; <END_BUG> launchNext = new Runnable ( ) { public void run ( ) { Intent intent = new Intent ( act , FinishedActivity . class ) ; startActivity ( intent ) ; } } ; handler . postDelayed ( launchNext , 1000 ) ; } updateView ( ) ; } private void updateView ( ) { } @ Override public void onMotionEvent ( MotionEvent event ) { } void loadTrial ( ) throws IOException { } public void goImmersive ( ) { } }

Fix:
final Activity act = this ;
Buggy code:
public class ComponentInstantiationAuthorizer implements IComponentInstantiationListener { public ComponentInstantiationAuthorizer ( ) { } public void onInstantiation ( Component component ) { <START_BUG> if ( ! ( Session . get ( ) . getAuthorizationStrategy ( ) . authorizeInstantiation ( component . getClass ( ) ) ) ) { <END_BUG> throw new UnauthorizedInstantiationException ( component . getClass ( ) ) ; } } }

Fix:
if ( ! ( Session . get ( ) . getAuthorizationStrategy ( ) . isInstantiationAuthorized ( component . getClass ( ) ) ) ) {
Buggy code:
public abstract class AbstractDataCacheInstrument extends AbstractInstrument implements DataCacheInstrument { public static final long NO_STATS = - 1 ; private DataCache _dc = null ; private String _configID = null ; private String _configRef = null ; public void setDataCache ( DataCache dc ) { } public void setConfigId ( String cid ) { } public void setContextRef ( String cref ) { } public long getHitCount ( ) { } public long getHitCount ( String className ) throws ClassNotFoundException { } public long getReadCount ( ) { } public long getReadCount ( String className ) throws ClassNotFoundException { } public long getTotalHitCount ( ) { } public long getTotalHitCount ( String className ) throws ClassNotFoundException { } public long getTotalReadCount ( ) { } public long getTotalReadCount ( String className ) throws ClassNotFoundException { } public long getTotalWriteCount ( ) { } public long getTotalWriteCount ( String className ) throws ClassNotFoundException { } public long getWriteCount ( ) { } public long getWriteCount ( String className ) throws ClassNotFoundException { } public void reset ( ) { } public Date sinceDate ( ) { } public Date startDate ( ) { } public long getEvictionCount ( ) { } public long getTotalEvictionCount ( ) { } public String getConfigId ( ) { } public String getContextRef ( ) { } public String getCacheName ( ) { } private CacheStatistics getStatistics ( ) { } private long getWriteCount ( Class < ? > c ) { } private long getTotalWriteCount ( Class < ? > c ) { } private long getTotalReadCount ( Class < ? > c ) { } private long getTotalHitCount ( Class < ? > c ) { } private long getReadCount ( Class < ? > c ) { CacheStatistics stats = getStatistics ( ) ; if ( stats != null ) <START_BUG> stats . getReadCount ( c ) ; <END_BUG> return AbstractDataCacheInstrument . NO_STATS ; } private long getHitCount ( Class < ? > c ) { } public InstrumentationLevel getLevel ( ) { } }

Fix:
return stats . getReadCount ( c ) ;
Buggy code:
public class VAJImport extends VAJTask { protected Vector filesets = new Vector ( ) ; protected boolean importSources = true ; protected boolean importResources = true ; protected boolean importClasses = false ; protected String importProject = null ; protected boolean useDefaultExcludes = true ; public void setProject ( String projectName ) { } public void addFileset ( FileSet set ) { } public void setImportClasses ( boolean importClasses ) { } public void setImportResources ( boolean importResources ) { } public void setImportSources ( boolean importSources ) { } public void setDefaultexcludes ( boolean useDefaultExcludes ) { } public void execute ( ) throws BuildException { } protected void importFileset ( FileSet fileset ) { <START_BUG> DirectoryScanner ds = fileset . getDirectoryScanner ( this . project ) ; <END_BUG> if ( ( ds . getIncludedFiles ( ) . length ) == 0 ) { return ; } String [ ] includes = null ; String [ ] excludes = null ; try { Class directoryScanner = ds . getClass ( ) ; Field includesField = directoryScanner . getDeclaredField ( "includes" ) ; includesField . setAccessible ( true ) ; includes = ( ( String [ ] ) ( includesField . get ( ds ) ) ) ; Field excludesField = directoryScanner . getDeclaredField ( "excludes" ) ; excludesField . setAccessible ( true ) ; excludes = ( ( String [ ] ) ( excludesField . get ( ds ) ) ) ; } catch ( NoSuchFieldException nsfe ) { throw new BuildException ( ( "DirectoryScanner.includes<seq2seq4repair_space>or<seq2seq4repair_space>.excludes<seq2seq4repair_space>missing" + ( nsfe . getMessage ( ) ) ) ) ; } catch ( IllegalAccessException iae ) { throw new BuildException ( "Access<seq2seq4repair_space>to<seq2seq4repair_space>DirectoryScanner.includes<seq2seq4repair_space>or<seq2seq4repair_space>.excludes<seq2seq4repair_space>not<seq2seq4repair_space>allowed" ) ; } getUtil ( ) . importFiles ( importProject , ds . getBasedir ( ) , includes , excludes , importClasses , importResources , importSources , useDefaultExcludes ) ; } }

Fix:
DirectoryScanner ds = fileset . getDirectoryScanner ( this . getProject ( ) ) ;
Buggy code:
public class ConsumerContainerSelector extends AbstractConsumerContainerSelector implements IConsumerContainerSelector { private boolean autoCreateContainer = false ; public ConsumerContainerSelector ( boolean autoCreateContainer ) { } public IRemoteServiceContainer selectConsumerContainer ( EndpointDescription endpointDescription ) { trace ( "selectConsumerContainers" , ( "endpointDescription=" + endpointDescription ) ) ; ID endpointID = IDUtil . createContainerID ( endpointDescription ) ; List < String > remoteSupportedConfigsList = endpointDescription . getConfigurationTypes ( ) ; <START_BUG> String [ ] remoteSupportedConfigs = ( ( String [ ] ) ( remoteSupportedConfigsList . toArray ( ) ) ) ; <END_BUG> ID connectTargetID = endpointDescription . getConnectTargetID ( ) ; IRemoteServiceContainer rsContainer = selectExistingConsumerContainer ( endpointID , remoteSupportedConfigs , connectTargetID ) ; if ( ( rsContainer == null ) && ( autoCreateContainer ) ) rsContainer = createAndConfigureConsumerContainer ( remoteSupportedConfigs , endpointDescription . getProperties ( ) ) ; connectContainerToTarget ( rsContainer , connectTargetID ) ; return rsContainer ; } public void close ( ) { } }

Fix:
String [ ] remoteSupportedConfigs = ( ( String [ ] ) ( remoteSupportedConfigsList . toArray ( new String [ remoteSupportedConfigsList . size ( ) ] ) ) ) ;
Buggy code:
@ WebServlet ( "//LoginServlet" ) public class LoginServlet extends HttpServlet { private static final long serialVersionUID = 1L ; public LoginServlet ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { String username = request . getParameter ( "username" ) ; String password = request . getParameter ( "password" ) ; UserManager userManager = ( ( UserManager ) ( getServletContext ( ) . getAttribute ( "userManager" ) ) ) ; User matchingUser = userManager . getUser ( username ) ; String hashedPassword = userManager . generateHashedPassword ( password ) ; <START_BUG> if ( ( matchingUser == null ) && ( ! ( matchingUser . getPassword ( ) . equals ( hashedPassword ) ) ) ) { <END_BUG> request . setAttribute ( "attempt" , "invalid" ) ; RequestDispatcher dispatch = request . getRequestDispatcher ( "login-page.jsp" ) ; dispatch . forward ( request , response ) ; } else { request . setAttribute ( "currentUser" , matchingUser ) ; } } }

Fix:
if ( ( matchingUser == null ) || ( ! ( matchingUser . getPassword ( ) . equals ( hashedPassword ) ) ) ) {
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class NativeApiPatchingTestCase extends AbstractPatchingTestCase { private static final Logger logger = Logger . getLogger ( CliUtilsForPatching . class ) ; @ Test public void testApplyOneoff ( ) throws Exception { } private ModelControllerClient getControllerClient ( ) throws UnknownHostException { <START_BUG> return Factory . create ( System . getProperty ( "node0" , "127.0.0.1" ) , 9999 ) ; <END_BUG> } }

Fix:
return Factory . create ( "http-remoting" , System . getProperty ( "node0" , "127.0.0.1" ) , 9990 ) ;
Buggy code:
@ Service public class VerificationProviderEmployeeServiceImpl implements VerificationProviderEmployeeService { Logger logger = Logger . getLogger ( VerificationProviderEmployeeServiceImpl . class ) ; @ Autowired private VerificationRepository verificationRepository ; @ Autowired private UserRepository userRepository ; @ Autowired MailService mailService ; @ Transactional public void assignProviderEmployee ( String verificationId , User providerEmployee ) { } @ Override @ Transactional public void removeProviderEmployee ( String verificationId , User providerEmployee ) { } @ Transactional public void assignProviderEmployeeForNotStandardVerification ( String verificationId , User providerEmployee ) { Verification verification = verificationRepository . findOne ( verificationId ) ; if ( ( verification != null ) && ( verification . getProvider ( ) . getId ( ) . equals ( providerEmployee . getOrganization ( ) . getId ( ) ) ) ) { verification . setProviderEmployee ( providerEmployee ) ; if ( providerEmployee == null ) { verification . setStatus ( SENT_TO_PROVIDER ) ; } else { <START_BUG> if ( ( verification . getProviderFromBBI ( ) ) == null ) { <END_BUG> verification . setStatus ( IN_PROGRESS ) ; } else { verification . setStatus ( TEST_COMPLETED ) ; } } verification . setProviderFromBBI ( verification . getProvider ( ) ) ; verification . setExpirationDate ( null ) ; verificationRepository . save ( verification ) ; } } @ Override public boolean isAdmin ( User user ) { } @ Transactional ( readOnly = true ) public User getProviderEmployeeById ( String idVerification ) { } @ Transactional ( readOnly = true ) public List < Verification > getVerificationListByProviderEmployee ( String username ) { } @ Transactional ( readOnly = true ) public List < Verification > getVerificationListByCalibratorEmployee ( String username ) { } @ Transactional ( readOnly = true ) public List < Verification > getVerificationListByStateVerificatorEmployee ( String username ) { } @ Transactional public Long countByProviderEmployeeTasks ( String username ) { } @ Transactional public Long countByCalibratorEmployeeTasks ( String username ) { } @ Transactional public Long countByStateVerificatorEmployeeTasks ( String username ) { } @ Transactional ( readOnly = true ) public User oneProviderEmployee ( String username ) { } }

Fix:
if ( ( verification . getVerificationTime ( ) ) == null ) {
Buggy code:
@ ManagedBean ( name = "mngsession" ) @ SessionScoped public class Session implements Serializable { private String userid ; private String password ; HttpServletRequest request ; FacesContext fc = FacesContext . getCurrentInstance ( ) ; ConfigurableNavigationHandler nav = ( ( ConfigurableNavigationHandler ) ( fc . getApplication ( ) . getNavigationHandler ( ) ) ) ; public Session ( ) { } public String getUserid ( ) { } public void setUserid ( String userid ) { } public String getPassword ( ) { } public void setPassword ( String password ) { } public String login ( ) throws ServletException { } public String logout ( ) { HttpSession session = ( ( HttpSession ) ( FacesContext . getCurrentInstance ( ) . getExternalContext ( ) . getSession ( true ) ) ) ; session . invalidate ( ) ; <START_BUG> return "//index?faces-redirect=true" ; <END_BUG> } public void methodInManagedBean ( ) throws IOException , ClassNotFoundException , SQLException { } public void createAdmin ( ) throws ClassNotFoundException , SQLException { } private String sha256 ( String base ) { } }

Fix:
return "//Login?faces-redirect=true" ;
Buggy code:
public class StorageParser { public StorageParser ( ) { } public Recipe convertStringToRecipe ( String title , String author , String description ) { List < Step > newSteps = new ArrayList < Step > ( ) ; String [ ] strArray = ( description . isEmpty ( ) ) ? new String [ 0 ] : description . split ( "\n" ) ; for ( String step : strArray ) { int trailIndex = ( step . indexOf ( "mDescription='" ) ) + ( "mDescription='" . length ( ) ) ; int forwardIndex = step . indexOf ( "',<seq2seq4repair_space>mTime=" ) ; String mDescription = step . substring ( trailIndex , forwardIndex ) ; trailIndex = forwardIndex + ( "',<seq2seq4repair_space>mTime=" . length ( ) ) ; forwardIndex = step . indexOf ( ",<seq2seq4repair_space>mIngredients=" ) ; <START_BUG> Duration time = Duration . standardMinutes ( Integer . valueOf ( step . substring ( trailIndex , forwardIndex ) ) ) ; <END_BUG> trailIndex = forwardIndex + ( ",<seq2seq4repair_space>mIngredients=" . length ( ) ) ; forwardIndex = step . indexOf ( ",<seq2seq4repair_space>mSimultaneous=" ) ; List < String > ingredients = StorageParser . toArrayList ( step . substring ( trailIndex , forwardIndex ) ) ; trailIndex = forwardIndex + ( ",<seq2seq4repair_space>mSimultaneous=" . length ( ) ) ; forwardIndex = step . indexOf ( "}" ) ; boolean simul = step . substring ( trailIndex , forwardIndex ) . equals ( "true" ) ; newSteps . add ( new Step ( ingredients , mDescription , time , simul ) ) ; } return new Recipe ( title , author , newSteps ) ; } public static List < String > toArrayList ( String str ) { } public String convertRecipeToString ( Recipe r ) { } }

Fix:
Duration time = Duration . millis ( Long . valueOf ( step . substring ( trailIndex , forwardIndex ) ) ) ;
Buggy code:
public class MainActivity extends AppCompatActivity implements NavigationView . OnNavigationItemSelectedListener { private List < Event > attendingEventList ; private List < Event > createdEventList ; private FacebookManager fbManager = null ; private FloatingActionButton fab ; private Gson gson ; private ListView mainListView ; private EventAdapter adapter ; private User currentUser ; private boolean sortByTime ; private static final String TAG = "MainActivity" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void populateLeftDrawer ( ) { } public void setupListEvents ( List < Event > events ) { } private void setSortByTime ( EventAdapter adapter ) { } private void setSortByDistance ( EventAdapter adapter ) { } public void preSetupAttendingList ( int elementId , Set < String > events ) { } public void preSetupCreatedList ( int elementId , Set < String > events ) { } @ Override public void onBackPressed ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ SuppressWarnings ( "StatementWithEmptyBody" ) @ Override public boolean onNavigationItemSelected ( MenuItem item ) { } public void setListViewHeightBasedOnChildren ( ListView listView ) { } public Location getUserLocation ( ) { LocationManager lm = ( ( LocationManager ) ( getSystemService ( LOCATION_SERVICE ) ) ) ; if ( ( ( ( VERSION . SDK_INT ) >= 23 ) && ( ( ContextCompat . checkSelfPermission ( this , ACCESS_FINE_LOCATION ) ) != ( PackageManager . PERMISSION_GRANTED ) ) ) && ( ( ContextCompat . checkSelfPermission ( this , ACCESS_COARSE_LOCATION ) ) != ( PackageManager . PERMISSION_GRANTED ) ) ) { return null ; } Location location = lm . getLastKnownLocation ( GPS_PROVIDER ) ; double lng = - 122.3079 ; double lat = 47.6539 ; <START_BUG> if ( lm != null ) { <END_BUG> lng = location . getLongitude ( ) ; lat = location . getLatitude ( ) ; } Location userLoc = new Location ( "userLocation" ) ; userLoc . setLatitude ( lat ) ; userLoc . setLongitude ( lng ) ; return userLoc ; } private class AttendingUpdates extends AsyncTask < List < String > , Void , String > { @ Override protected String doInBackground ( List < String > ... params ) { } @ Override protected void onPostExecute ( String result ) { } private void setupNavLists ( int elementId ) { } } private class CreatedUpdates extends AsyncTask < List < String > , Void , String > { @ Override protected String doInBackground ( List < String > ... params ) { } @ Override protected void onPostExecute ( String result ) { } private void setupNavLists ( int elementId ) { } } }

Fix:
if ( location != null ) {
Buggy code:
class CLabelTab extends AlignableTab { CLabel label1 ; CLabel label2 ; CLabel label3 ; Group textLabelGroup ; Button shadowInButton ; Button shadowOutButton ; Button shadowNoneButton ; CLabelTab ( ControlExample instance ) { } void createExampleGroup ( ) { super . createExampleGroup ( ) ; textLabelGroup = new Group ( exampleGroup , SWT . NONE ) ; GridLayout gridLayout = new GridLayout ( ) ; textLabelGroup . setLayout ( gridLayout ) ; gridLayout . numColumns = 3 ; <START_BUG> textLabelGroup . setLayoutData ( new GridData ( ( ( ( GridData . GRAB_HORIZONTAL ) | ( GridData . HORIZONTAL_ALIGN_FILL ) ) | ( GridData . VERTICAL_ALIGN_FILL ) ) ) ) ; <END_BUG> textLabelGroup . setText ( ControlExample . getResourceString ( "Custom_Labels" ) ) ; } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } Control [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { } String getTabText ( ) { } void setExampleWidgetAlignment ( ) { } void setExampleWidgetState ( ) { } }

Fix:
textLabelGroup . setLayoutData ( new GridData ( SWT . FILL , SWT . FILL , true , true ) ) ;
Buggy code:
public class IndexSortingTest extends SorterTestBase { private static final Sort [ ] SORT = new Sort [ ] { new Sort ( new org . apache . lucene . search . SortField ( NUMERIC_DV_FIELD , Type . LONG ) ) , new Sort ( new org . apache . lucene . search . SortField ( null , Type . DOC , true ) ) } ; @ BeforeClass public static void beforeClassSorterUtilTest ( ) throws Exception { Bits liveDocs = reader . getLiveDocs ( ) ; List < Integer > values = new ArrayList < > ( ) ; for ( int i = 0 ; i < ( reader . maxDoc ( ) ) ; i ++ ) { if ( ( liveDocs == null ) || ( liveDocs . get ( i ) ) ) { values . add ( Integer . valueOf ( reader . document ( i ) . get ( ID_FIELD ) ) ) ; } } int idx = random ( ) . nextInt ( IndexSortingTest . SORT . length ) ; Sort sorter = IndexSortingTest . SORT [ idx ] ; if ( idx == 1 ) { Collections . reverse ( values ) ; } else { Collections . sort ( values ) ; if ( random ( ) . nextBoolean ( ) ) { sorter = new Sort ( new org . apache . lucene . search . SortField ( NUMERIC_DV_FIELD , Type . LONG , true ) ) ; Collections . reverse ( values ) ; } } sortedValues = values . toArray ( new Integer [ values . size ( ) ] ) ; if ( VERBOSE ) { System . out . println ( ( "sortedValues:<seq2seq4repair_space>" + ( sortedValues ) ) ) ; System . out . println ( ( "Sorter:<seq2seq4repair_space>" + sorter ) ) ; } Directory target = newDirectory ( ) ; IndexWriter writer = new IndexWriter ( target , newIndexWriterConfig ( TEST_VERSION_CURRENT , null ) ) ; reader = SortingAtomicReader . wrap ( reader , sorter ) ; writer . addIndexes ( reader ) ; <START_BUG> writer . close ( ) ; <END_BUG> reader . close ( ) ; dir . close ( ) ; dir = target ; TestUtil . checkIndex ( dir ) ; reader = SlowCompositeReaderWrapper . wrap ( DirectoryReader . open ( dir ) ) ; assertFalse ( "index<seq2seq4repair_space>should<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>deletions" , reader . hasDeletions ( ) ) ; } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class SimplePageParametersEncoder implements IPageParametersEncoder { public SimplePageParametersEncoder ( ) { } public PageParameters decodePageParameters ( Request request ) { PageParameters parameters = new PageParameters ( ) ; int i = 0 ; for ( String s : request . getUrl ( ) . getSegments ( ) ) { parameters . setIndexedParameter ( i , s ) ; ++ i ; } for ( QueryParameter p : request . getUrl ( ) . getQueryParameters ( ) ) { parameters . addNamedParameter ( p . getName ( ) , p . getValue ( ) ) ; } <START_BUG> return parameters ; <END_BUG> } public Url encodePageParameters ( PageParameters pageParameters ) { } }

Fix:
return parameters . isEmpty ( ) ? null : parameters ;
Buggy code:
public abstract class ClearCase extends Task { private static final String CLEARTOOL_EXE = "cleartool" ; public static final String COMMAND_UPDATE = "update" ; public static final String COMMAND_CHECKOUT = "checkout" ; public static final String COMMAND_CHECKIN = "checkin" ; public static final String COMMAND_UNCHECKOUT = "uncheckout" ; private String m_ClearToolDir = "" ; private String m_viewPath = null ; public final void setClearToolDir ( String dir ) { } public final void setViewPath ( String viewPath ) { } public String getViewPath ( ) { } protected final String getClearToolCommand ( ) { } protected int run ( Commandline cmd ) { try { Project aProj = getProject ( ) ; Execute exe = new Execute ( new org . apache . tools . ant . taskdefs . LogStreamHandler ( this , Project . MSG_INFO , Project . MSG_WARN ) ) ; exe . setAntRun ( aProj ) ; exe . setWorkingDirectory ( aProj . getBaseDir ( ) ) ; exe . setCommandline ( cmd . getCommandline ( ) ) ; return exe . execute ( ) ; } catch ( IOException e ) { <START_BUG> throw new BuildException ( e ) ; <END_BUG> } } }

Fix:
throw new BuildException ( "Error" , e ) ;
Buggy code:
public class Test_org_eclipse_swt_browser_ProgressAdapter extends SwtTestCase { public Test_org_eclipse_swt_browser_ProgressAdapter ( String name ) { } public static void main ( String [ ] args ) { } protected void setUp ( ) { } protected void tearDown ( ) { } public void test_Constructor ( ) { <START_BUG> ProgressAdapter adapter = new ProgressAdapter ( ) { } ; <END_BUG> } public void test_changedLorg_eclipse_swt_browser_ProgressEvent ( ) { } public void test_completedLorg_eclipse_swt_browser_ProgressEvent ( ) { } public static Test suite ( ) { } public static Vector methodNames ( ) { } protected void runTest ( ) throws Throwable { } }

Fix:
new ProgressAdapter ( ) { } ;
Buggy code:
public class TileMiningWell extends TileBasic { boolean working ; @ Override protected void C_recievePacket ( final byte id , final byte [ ] data , final EntityPlayer ep ) { } @ Override protected void G_renew_powerConfigure ( ) { byte pmp = 0 ; <START_BUG> if ( ( this . worldObj ) != null ) { <END_BUG> final TileEntity te = this . worldObj . getTileEntity ( ( ( this . xCoord ) + ( this . pump . offsetX ) ) , ( ( this . yCoord ) + ( this . pump . offsetY ) ) , ( ( this . zCoord ) + ( this . pump . offsetZ ) ) ) ; if ( te instanceof TilePump ) pmp = ( ( TilePump ) ( te ) ) . unbreaking ; else this . pump = ForgeDirection . UNKNOWN ; } if ( this . working ) PowerManager . configureW ( this , this . efficiency , this . unbreaking , pmp ) ; else PowerManager . configure0 ( this ) ; } @ Override public void updateEntity ( ) { } private boolean S_checkTarget ( final int depth ) { } @ Override public void readFromNBT ( final NBTTagCompound nbttc ) { } @ Override public void writeToNBT ( final NBTTagCompound nbttc ) { } @ Override public void G_reinit ( ) { } @ Override protected void G_destroy ( ) { } }

Fix:
if ( ( ( this . worldObj ) != null ) && ( ( this . pump ) != ( ForgeDirection . UNKNOWN ) ) ) {
Buggy code:
abstract class AbstractRegistry implements IRegistry { protected List contexts = Collections . EMPTY_LIST ; protected AbstractRegistry ( ) { } public List getContexts ( ) { <START_BUG> return Collections . unmodifiableList ( contexts ) ; <END_BUG> } }

Fix:
return contexts ;