nus-yam/ex-repair huggingface dataset:
Buggy code:
public class AnnotationBean extends AbstractConfig implements DisposableBean , BeanFactoryPostProcessor , BeanPostProcessor , ApplicationContextAware { private static final long serialVersionUID = - 7582802454287589552L ; private static final Logger logger = LoggerFactory . getLogger ( Logger . class ) ; private String annotationPackage ; private String [ ] annotationPackages ; private final Set < ServiceConfig < ? > > serviceConfigs = new com . alibaba . dubbo . common . utils . ConcurrentHashSet < ServiceConfig < ? > > ( ) ; private final ConcurrentMap < String , ReferenceBean < ? > > referenceConfigs = new ConcurrentHashMap < String , ReferenceBean < ? > > ( ) ; public String getPackage ( ) { } public void setPackage ( String annotationPackage ) { } private ApplicationContext applicationContext ; public void setApplicationContext ( ApplicationContext applicationContext ) throws BeansException { } public void postProcessBeanFactory ( ConfigurableListableBeanFactory beanFactory ) throws BeansException { } public void destroy ( ) throws Exception { } public Object postProcessAfterInitialization ( Object bean , String beanName ) throws BeansException { } public Object postProcessBeforeInitialization ( Object bean , String beanName ) throws BeansException { } private Object refer ( Reference reference , Class < ? > referenceClass ) { } private boolean isMatchPackage ( Object bean ) { } private boolean isProxyBean ( Object bean ) { <START_BUG> return ( ( AopUtils . isAopProxy ( bean ) ) || ( AopUtils . isCglibProxy ( bean ) ) ) || ( AopUtils . isJdkDynamicProxy ( bean ) ) ; <END_BUG> } }

Fix:
return AopUtils . isAopProxy ( bean ) ;
Buggy code:
public class FileBasedSpellChecker extends AbstractLuceneSpellChecker { private static final Logger log = LoggerFactory . getLogger ( FileBasedSpellChecker . class ) ; public static final String SOURCE_FILE_CHAR_ENCODING = "characterEncoding" ; private String characterEncoding ; public static final String WORD_FIELD_NAME = "word" ; @ Override public String init ( NamedList config , SolrCore core ) { } @ Override public void build ( SolrCore core , SolrIndexSearcher searcher ) throws IOException { } @ Override protected IndexReader determineReader ( IndexReader reader ) { } private void loadExternalFileDictionary ( SolrCore core , SolrIndexSearcher searcher ) { try { IndexSchema schema = ( null == searcher ) ? core . getLatestSchema ( ) : searcher . getSchema ( ) ; if ( ( ( fieldTypeName ) != null ) && ( ( schema . getFieldTypeNoEx ( fieldTypeName ) ) != null ) ) { FieldType fieldType = schema . getFieldTypes ( ) . get ( fieldTypeName ) ; RAMDirectory ramDir = new RAMDirectory ( ) ; LogMergePolicy mp = new LogByteSizeMergePolicy ( ) ; mp . setMergeFactor ( 300 ) ; IndexWriter writer = new IndexWriter ( ramDir , new org . apache . lucene . index . IndexWriterConfig ( core . getSolrConfig ( ) . luceneMatchVersion , fieldType . getAnalyzer ( ) ) . setMaxBufferedDocs ( 150 ) . setMergePolicy ( mp ) . setOpenMode ( CREATE ) ) ; List < String > lines = core . getResourceLoader ( ) . getLines ( sourceLocation , characterEncoding ) ; for ( String s : lines ) { Document d = new Document ( ) ; d . add ( new org . apache . lucene . document . TextField ( FileBasedSpellChecker . WORD_FIELD_NAME , s , Store . NO ) ) ; writer . addDocument ( d ) ; } writer . forceMerge ( 1 ) ; <START_BUG> writer . close ( ) ; <END_BUG> dictionary = new org . apache . lucene . search . spell . HighFrequencyDictionary ( DirectoryReader . open ( ramDir ) , FileBasedSpellChecker . WORD_FIELD_NAME , 0.0F ) ; } else { if ( ( characterEncoding ) == null ) { dictionary = new PlainTextDictionary ( core . getResourceLoader ( ) . openResource ( sourceLocation ) ) ; } else { dictionary = new PlainTextDictionary ( new InputStreamReader ( core . getResourceLoader ( ) . openResource ( sourceLocation ) , characterEncoding ) ) ; } } } catch ( IOException e ) { FileBasedSpellChecker . log . error ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>spellings" , e ) ; } } public String getCharacterEncoding ( ) { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class OpenSpare extends Open { public OpenSpare ( PinCount firstRollPinfall ) { } @ Override public TenthFrame roll ( PinCount pinfall ) { } @ Override public String printSecondRollPinfall ( ) { } @ Override public PinCount secondRollPinfall ( ) { <START_BUG> return PinCount . TEN ; <END_BUG> } }

Fix:
return TEN . minus ( firstRollPinfall ) ;
Buggy code:
public class ClassLiteralAccess extends Expression { public TypeReference type ; public TypeBinding targetType ; FieldBinding syntheticField ; public ClassLiteralAccess ( int pos , TypeReference t ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { int pc = codeStream . position ; if ( valueRequired ) codeStream . generateClassLiteralAccessForType ( type . binding , syntheticField ) ; <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public TypeBinding resolveType ( BlockScope scope ) { } public String toStringExpression ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope blockScope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
public class CommandCraft extends BasicCommand { private final IRareItems4API api ; public CommandCraft ( IRareItems4API api ) { } @ Override boolean execute ( CommandSender cs , String [ ] args ) { if ( ( args . length ) < 1 ) { this . send ( cs , this . getUsage ( ) ) ; return true ; } if ( ! ( cs instanceof Player ) ) { this . sendError ( cs , COMMAND_NOT_FROM_CONSOLE ) ; return true ; } Player player = ( ( Player ) ( cs ) ) ; String propertyName = args [ 0 ] . replace ( "_" , "<seq2seq4repair_space>" ) ; IRareItemProperty property = this . api . getItemPropertyByDisplayName ( propertyName ) ; if ( property == null ) { this . sendError ( cs , COMMAND_VALUE_NOT_FOUND . replace ( "!value" , propertyName ) ) ; return true ; } int level = 1 ; if ( ( args . length ) > 1 ) { String sLevel = args [ 1 ] ; try { level = Integer . parseInt ( sLevel ) ; } catch ( NumberFormatException ex ) { this . sendError ( cs , COMMAND_INVALID_LEVEL . replace ( "!value" , sLevel ) ) ; return true ; } } ItemStack isInHand = player . getItemInHand ( ) ; if ( ( isInHand == null ) || ( isInHand . getType ( ) . equals ( AIR ) ) ) { this . sendError ( cs , COMMAND_MUST_HOLD_ITEM ) ; return true ; } IRareItem rareItem = this . api . getRareItem ( isInHand ) ; Map < IRareItemProperty , Integer > properties = new HashMap < > ( ) ; <START_BUG> properties . put ( property , 1 ) ; <END_BUG> if ( rareItem == null ) { rareItem = this . api . createRareItem ( player . getUniqueId ( ) , properties ) ; } else { properties . putAll ( rareItem . getProperties ( ) ) ; this . api . setRareItemProperties ( player . getUniqueId ( ) , rareItem . getId ( ) , properties ) ; } ItemMeta meta = isInHand . getItemMeta ( ) ; meta . setLore ( RI4Strings . getLore ( rareItem ) ) ; isInHand . setItemMeta ( meta ) ; this . send ( cs , COMMAND_ADDED_PROPERTY_TO_ITEM . replace ( "!property" , property . getDisplayName ( ) ) ) ; return true ; } }

Fix:
properties . put ( property , level ) ;
Buggy code:
public class EdgeNGramTokenFilterTest extends BaseTokenStreamTestCase { private TokenStream input ; @ Override public void setUp ( ) throws Exception { } public void testInvalidInput ( ) throws Exception { } public void testInvalidInput2 ( ) throws Exception { } public void testInvalidInput3 ( ) throws Exception { } public void testFrontUnigram ( ) throws Exception { } public void testBackUnigram ( ) throws Exception { } public void testOversizedNgrams ( ) throws Exception { } public void testFrontRangeOfNgrams ( ) throws Exception { } public void testBackRangeOfNgrams ( ) throws Exception { } public void testSmallTokenInStream ( ) throws Exception { input = new org . apache . lucene . analysis . WhitespaceTokenizer ( Version . LUCENE_CURRENT , new StringReader ( "abc<seq2seq4repair_space>de<seq2seq4repair_space>fgh" ) ) ; EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter ( input , Side . FRONT , 3 , 3 ) ; <START_BUG> assertTokenStreamContents ( tokenizer , new String [ ] { "abc" , "fgh" } , new int [ ] { 0 , 0 } , new int [ ] { 3 , 3 } ) ; <END_BUG> } public void testReset ( ) throws Exception { } }

Fix:
assertTokenStreamContents ( tokenizer , new String [ ] { "abc" , "fgh" } , new int [ ] { 0 , 7 } , new int [ ] { 3 , 10 } ) ;
Buggy code:
public class DumpServicesHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "dump-services" ; public static final DumpServicesHandler INSTANCE = new DumpServicesHandler ( ) ; private DumpServicesHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> ServiceController < ? > service = context . getServiceRegistry ( true ) . getRequiredService ( JBOSS_AS ) ; <END_BUG> ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; PrintStream print = new PrintStream ( out ) ; service . getServiceContainer ( ) . dumpServices ( print ) ; print . flush ( ) ; context . getResult ( ) . set ( new String ( out . toByteArray ( ) ) ) ; context . completeStep ( ) ; } } , RUNTIME ) ; context . completeStep ( ) ; } public ModelNode getModelDescription ( final Locale locale ) { } }

Fix:
ServiceController < ? > service = context . getServiceRegistry ( false ) . getRequiredService ( JBOSS_AS ) ;
Buggy code:
public class OpenMessageWithComposerCommand extends FolderCommand { ComposerController controller ; public OpenMessageWithComposerCommand ( FrameController frameController , DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { Folder folder = ( ( Folder ) ( ( ( org . columba . mail . command . FolderCommandReference ) ( getReferences ( ) [ 0 ] ) ) . getFolder ( ) ) ) ; Object [ ] uids = ( ( org . columba . mail . command . FolderCommandReference ) ( getReferences ( ) [ 0 ] ) ) . getUids ( ) ; Message message = new Message ( ) ; ColumbaHeader header = ( ( ColumbaHeader ) ( folder . getMessageHeader ( uids [ 0 ] , worker ) ) ) ; message . setHeader ( header ) ; MimePartTree mimePartTree = folder . getMimePartTree ( uids [ 0 ] , worker ) ; message . setMimePartTree ( mimePartTree ) ; String source = folder . getMessageSource ( uids [ 0 ] , worker ) ; message . setSource ( source ) ; controller = new ComposerController ( frameController ) ; <START_BUG> MessageBuilder . getInstance ( ) . openMessage ( message , controller . getModel ( ) ) ; <END_BUG> } public void undo ( Worker worker ) throws Exception { } public void redo ( Worker worker ) throws Exception { } }

Fix:
MessageBuilder . openMessage ( message , controller . getModel ( ) ) ;
Buggy code:
class Remove extends Change { private final Component component ; private final MarkupContainer container ; Remove ( final Component component ) { } void undo ( ) { <START_BUG> container . add ( component ) ; <END_BUG> } }

Fix:
container . internalAdd ( component ) ;
Buggy code:
public class EventDetail extends AppCompatActivity implements DateDialogAdapter , LocationDialogAdapter , TimeDialogAdapter { private RecyclerView memberList ; private Event event ; protected Time date ; protected Time time ; protected Location location ; private EventDetailInfo eventDetailCard ; private CardViewNative cardView ; ArrayList < DecisionCard > decisionCardList ; ArrayList < Card > cardList ; CardArrayRecyclerViewAdapter decisionArrayAdapter ; private boolean toggleAdmin ; private boolean isAdmin ; private static class MemberAdapter extends RecyclerView . Adapter < EventDetail . MemberAdapter . MViewHolder > { private LayoutInflater layoutInflater ; private List < String > imageResourceIds ; public class MViewHolder extends RecyclerView . ViewHolder { private CircleImageView circleImageView ; public MViewHolder ( View view ) { } } public MemberAdapter ( Context context , List < String > memberIds ) { } @ Override public EventDetail . MemberAdapter . MViewHolder onCreateViewHolder ( ViewGroup parent , int viewType ) { } @ Override public void onBindViewHolder ( EventDetail . MemberAdapter . MViewHolder holder , int position ) { } @ Override public int getItemCount ( ) { } } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override protected void onDestroy ( ) { } private void initLayout ( ) { } private void initDecisionList ( ) { } private void toggleAdmin ( MenuItem item ) { } public boolean isAdmin ( ) { } private void deleteDecisionCard ( int decisionId ) { } private void addDecisionCard ( Decision decision ) { } public void toggleAgree ( boolean isClicked , int decisionId ) { } public void toggleDisagree ( boolean isClicked , int decisionId ) { } @ Override public void refreshTimeInfo ( ) { } @ Override public void refreshDateInfo ( ) { } @ Override public void refreshLocationInfo ( ) { <START_BUG> if ( ( location . getInfo ( ) ) == null ) { <END_BUG> Decision decision = new Decision ( ) ; decision . setEventId ( event . getId ( ) ) ; decision . setSponsorId ( user . getId ( ) ) ; decision . setType ( TYPE_LOCA ) ; decision . setContent ( location . getInfo ( ) ) ; decision . setAgreePersonNum ( 0 ) ; decision . setRejectPersonNum ( 0 ) ; API . insertDecision ( decision ) ; addDecisionCard ( decision ) ; } } public static void actionStart ( Context context , Event event ) { } }

Fix:
if ( ( location . getInfo ( ) ) != null ) {
Buggy code:
public class XsltTransformer implements ITransformer { private static final String extension = "xsl" ; public XsltTransformer ( ) { } public CharSequence transform ( final Component component , final String output ) throws Exception { String filepath = ( ( component . findParentWithAssociatedMarkup ( ) . getClass ( ) . getPackage ( ) . getName ( ) . replace ( '.' , '//' ) ) + "//" ) + ( component . getId ( ) ) ; <START_BUG> IResourceStream resourceStream = Application . get ( ) . getResourceStreamLocator ( ) . locate ( getClass ( ) . getClassLoader ( ) , filepath , component . getStyle ( ) , component . getLocale ( ) , XsltTransformer . extension ) ; <END_BUG> if ( resourceStream == null ) { throw new FileNotFoundException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>XSLT<seq2seq4repair_space>resource<seq2seq4repair_space>for<seq2seq4repair_space>" + ( component . toString ( ) ) ) ) ; } try { TransformerFactory tFactory = TransformerFactory . newInstance ( ) ; Transformer transformer = tFactory . newTransformer ( new StreamSource ( resourceStream . getInputStream ( ) ) ) ; StringWriter writer = new StringWriter ( ) ; transformer . transform ( new StreamSource ( new StringReader ( output ) ) , new StreamResult ( writer ) ) ; return writer . getBuffer ( ) ; } finally { resourceStream . close ( ) ; } } }

Fix:
IResourceStream resourceStream = Application . get ( ) . getResourceSettings ( ) . getResourceStreamLocator ( ) . locate ( getClass ( ) . getClassLoader ( ) , filepath , component . getStyle ( ) , component . getLocale ( ) , XsltTransformer . extension ) ;
Buggy code:
final class MetricsEntityCodec { private static final long CACHE_EXPIRE_MINUTE = 10 ; private static final Pattern ENTITY_SPLITTER = Pattern . compile ( "\\." ) ; private static final String [ ] EMPTY_STRINGS = new String [ 0 ] ; private final EntityTable entityTable ; private final int contextDepth ; private final int metricDepth ; private final int tagDepth ; private final EnumMap < MetricsEntityType , LoadingCache < String , byte [ ] > > entityCaches ; MetricsEntityCodec ( EntityTable entityTable , int contextDepth , int metricDepth , int tagDepth ) { } public byte [ ] encode ( MetricsEntityType type , String entity ) { } public byte [ ] encodeWithoutPadding ( MetricsEntityType type , String entity ) { } public int getEntityPartsLength ( @ Nullable String entity ) { } public byte [ ] paddedEncode ( MetricsEntityType type , String entity , int padding ) { } private void paddedEncode ( MetricsEntityType type , String entity , int padding , byte [ ] result , int offset ) { } public byte [ ] paddedEncode ( String contextPrefix , String metricPrefix , String tagPrefix , int timeBase , String runId , int padding ) { int idSize = entityTable . getIdSize ( ) ; int totalDepth = ( ( ( getDepth ( CONTEXT ) ) + ( getDepth ( METRIC ) ) ) + ( getDepth ( TAG ) ) ) + ( getDepth ( RUN ) ) ; int sizeOfTimeBase = 4 ; byte [ ] result = new byte [ ( idSize * totalDepth ) + sizeOfTimeBase ] ; int offset = 0 ; paddedEncode ( CONTEXT , contextPrefix , padding , result , offset ) ; <START_BUG> offset += idSize * ( getDepth ( METRIC ) ) ; <END_BUG> paddedEncode ( METRIC , metricPrefix , padding , result , offset ) ; offset += idSize * ( getDepth ( METRIC ) ) ; paddedEncode ( TAG , tagPrefix , padding , result , offset ) ; offset += idSize * ( getDepth ( TAG ) ) ; System . arraycopy ( Bytes . toBytes ( timeBase ) , 0 , result , offset , sizeOfTimeBase ) ; offset += sizeOfTimeBase ; paddedEncode ( RUN , runId , padding , result , offset ) ; return result ; } public ImmutablePair < byte [ ] , byte [ ] > paddedFuzzyEncode ( MetricsEntityType type , String entity , int padding ) { } public String decode ( MetricsEntityType type , byte [ ] encoded ) { } public String decode ( MetricsEntityType type , byte [ ] encoded , int offset ) { } public int getEncodedSize ( MetricsEntityType type ) { } public int getIdSize ( ) { } private CacheLoader < String , byte [ ] > createCacheLoader ( final MetricsEntityType type ) { } private int getDepth ( MetricsEntityType type ) { } private void idToBytes ( long id , int idSize , byte [ ] bytes , int offset ) { } private long decodeId ( byte [ ] bytes , int offset , int idSize ) { } }

Fix:
offset += idSize * ( getDepth ( CONTEXT ) ) ;
Buggy code:
public class GoListToPosterToItem implements TreeModelPrereqs { public Object getRoot ( ) { } public void setRoot ( Object r ) { } public Object getChild ( Object parent , int index ) { } public int getChildCount ( Object parent ) { } public int getIndexOfChild ( Object parent , Object child ) { } public boolean isLeaf ( Object node ) { } public Vector getChildren ( Object parent ) { <START_BUG> Set allPosters = TheDesigner . getToDoList ( ) . getPosters ( ) ; <END_BUG> if ( parent instanceof ToDoList ) { return allPosters . asVector ( ) ; } Vector res = new Vector ( ) ; ToDoList list = TheDesigner . getToDoList ( ) ; util . Enumeration = list . elements ( ) ; } public void valueForPathChanged ( TreePath path , Object newValue ) { } public void addTreeModelListener ( TreeModelListener l ) { } public void removeTreeModelListener ( TreeModelListener l ) { } public Vector getPrereqs ( ) { } public Vector getProvidedTypes ( ) { } }

Fix:
VectorSet allPosters = TheDesigner . getToDoList ( ) . getPosters ( ) ;
Buggy code:
public class StringToCharacter implements Converter < String , Character > { public Character convert ( String source ) throws Exception { <START_BUG> if ( ( source . length ( ) ) > 1 ) { <END_BUG> throw new IllegalArgumentException ( ( ( "To<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>Character<seq2seq4repair_space>the<seq2seq4repair_space>String<seq2seq4repair_space>'" + source ) + "'<seq2seq4repair_space>must<seq2seq4repair_space>have<seq2seq4repair_space>a<seq2seq4repair_space>length<seq2seq4repair_space>of<seq2seq4repair_space>1" ) ) ; } return new Character ( source . charAt ( 0 ) ) ; } public String convertBack ( Character target ) throws Exception { } }

Fix:
if ( ( source . length ( ) ) != 1 ) {
Buggy code:
public class ServerStartup { static TCPServerSOContainerGroup [ ] serverGroups = null ; static final String SERVER_FILE_NAME = "ServerStartup.xml" ; static List servers = new ArrayList ( ) ; public ServerStartup ( ) throws Exception { } protected boolean isActive ( ) { } public void dispose ( ) { } protected synchronized void destroyServers ( ) { for ( Iterator i = ServerStartup . servers . iterator ( ) ; i . hasNext ( ) ; ) { TCPServerSOContainer s = ( ( TCPServerSOContainer ) ( i . next ( ) ) ) ; DiscoveryStartup . unregisterServer ( s ) ; if ( s != null ) { try { <START_BUG> s . dispose ( 5000 ) ; <END_BUG> } catch ( Exception e ) { ClientPlugin . log ( ( "Exception<seq2seq4repair_space>destroying<seq2seq4repair_space>server<seq2seq4repair_space>" + ( s . getConfig ( ) . getID ( ) ) ) ) ; } } } ServerStartup . servers . clear ( ) ; if ( ( ServerStartup . serverGroups ) != null ) { for ( int i = 0 ; i < ( ServerStartup . serverGroups . length ) ; i ++ ) { ServerStartup . serverGroups [ i ] . takeOffTheAir ( ) ; } ServerStartup . serverGroups = null ; } } protected synchronized void createServers ( InputStream ins ) throws Exception { } protected void registerServer ( ISharedObjectContainer cont ) throws URISyntaxException { } protected TCPServerSOContainerGroup makeServerGroup ( String name , int port ) { } protected TCPServerSOContainer makeServerContainer ( String id , TCPServerSOContainerGroup group , String path , int keepAlive ) throws IDInstantiationException { } }

Fix:
s . dispose ( ) ;
Buggy code:
public class CommunicationTaskUtils { private CommunicationTaskUtils ( ) { } public static boolean isAuthenticationFailed ( Throwable t ) { <START_BUG> return ( ( t != null ) && ( t instanceof HttpStatusCodeException ) ) && ( UNAUTHORIZED . equals ( ( ( HttpStatusCodeException ) ( t ) ) . getStatusCode ( ) ) ) ; <END_BUG> } }

Fix:
return ( t instanceof HttpStatusCodeException ) && ( UNAUTHORIZED . equals ( ( ( HttpStatusCodeException ) ( t ) ) . getStatusCode ( ) ) ) ;
Buggy code:
public class TransactionController extends GenericController implements Serializable , Controller , SampleListener { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private transient TransactionSampler transactionSampler ; private transient ListenerNotifier lnf ; private transient SampleResult res ; private transient int calls ; private transient int noFailingSamples ; private static final String PARENT = "TransactionController.parent" ; public TransactionController ( ) { } private Object readResolve ( ) { } public void setParent ( boolean _parent ) { } public boolean isParent ( ) { } public Sampler next ( ) { } public Sampler next1 ( ) { } protected Sampler nextIsAController ( Controller controller ) throws NextIsNullException { } public Sampler next2 ( ) { if ( isFirst ( ) ) { calls = 0 ; noFailingSamples = 0 ; res = new SampleResult ( ) ; res . setSampleLabel ( getName ( ) ) ; res . setSuccessful ( true ) ; res . sampleStart ( ) ; } Sampler returnValue = super . next ( ) ; if ( returnValue == null ) { if ( ( res ) != null ) { res . sampleEnd ( ) ; res . setResponseMessage ( ( ( ( "Number<seq2seq4repair_space>of<seq2seq4repair_space>samples<seq2seq4repair_space>in<seq2seq4repair_space>transaction<seq2seq4repair_space>:<seq2seq4repair_space>" + ( calls ) ) + ",<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>failing<seq2seq4repair_space>samples<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( noFailingSamples ) ) ) ; if ( res . isSuccessful ( ) ) { res . setResponseCodeOK ( ) ; } JMeterContext threadContext = getThreadContext ( ) ; JMeterVariables threadVars = threadContext . getVariables ( ) ; SamplePackage pack = ( ( SamplePackage ) ( threadVars . getObject ( PACKAGE_OBJECT ) ) ) ; if ( pack == null ) { TransactionController . log . warn ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>fetch<seq2seq4repair_space>SamplePackage" ) ; } else { <START_BUG> SampleEvent event = new SampleEvent ( res , getName ( ) ) ; <END_BUG> res = null ; lnf . notifyListeners ( event , pack . getSampleListeners ( ) ) ; } } } else { ( calls ) ++ ; } return returnValue ; } public void sampleOccurred ( SampleEvent se ) { } public void sampleStarted ( SampleEvent e ) { } public void sampleStopped ( SampleEvent e ) { } }

Fix:
SampleEvent event = new SampleEvent ( res , threadContext . getThreadGroup ( ) . getName ( ) ) ;
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 ) ) ; <START_BUG> ID endpointID = IDUtil . createContainerID ( endpointDescription ) ; <END_BUG> String [ ] remoteSupportedConfigs = null ; List < String > edConfigurationTypes = endpointDescription . getConfigurationTypes ( ) ; if ( ( ( edConfigurationTypes . size ( ) ) >= 1 ) && ( edConfigurationTypes . get ( 0 ) . equals ( ENDPOINT_SERVICE_IMPORTED_CONFIGS_VALUE ) ) ) { remoteSupportedConfigs = ( ( String [ ] ) ( endpointDescription . getProperties ( ) . get ( REMOTE_CONFIGS_SUPPORTED ) ) ) ; } else remoteSupportedConfigs = edConfigurationTypes . toArray ( new String [ edConfigurationTypes . size ( ) ] ) ; 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:
ID endpointID = IDUtil . createID ( endpointDescription ) ;
Buggy code:
public class PatchElementProviderImpl implements PatchElementProvider , PatchElementProvider . OneOffPatchTarget , IncompatibleWithCallback , RequiresCallback { private final String name ; private final boolean isAddOn ; private PatchType patchType ; private String cumulativeTarget = null ; private Collection < String > incompatibleWith = Collections . emptyList ( ) ; private Collection < String > requires = Collections . emptyList ( ) ; public PatchElementProviderImpl ( String name , boolean isAddOn ) { } @ Override public String getName ( ) { } @ Override public PatchType getPatchType ( ) { } @ Override public Collection < String > getRequires ( ) { } @ Override public Collection < String > getIncompatibleWith ( ) { } @ Override public String getCumulativePatchId ( ) { } @ Override public boolean isAddOn ( ) { } @ Override public LayerType getLayerType ( ) { } public void upgrade ( ) { } public void cumulativePatch ( ) { } public void oneOffPatch ( String target ) { } @ Override public PatchElementProviderImpl incompatibleWith ( final String patchID ) { } @ Override public PatchElementProviderImpl require ( String elementId ) { } @ Override public < T extends PatchElementProvider > T forType ( Patch . PatchType patchType , Class < T > clazz ) { if ( patchType != ( this . patchType ) ) { <START_BUG> throw new IllegalStateException ( ) ; <END_BUG> } if ( patchType == ( PatchType . ONE_OFF ) ) { if ( ( cumulativeTarget ) == null ) { throw new IllegalStateException ( ) ; } } return clazz . cast ( this ) ; } }

Fix:
throw new IllegalStateException ( ( ( ( this . patchType ) + "<seq2seq4repair_space>was:<seq2seq4repair_space>" ) + patchType ) ) ;
Buggy code:
public class AutoRun extends BroadcastReceiver { String mFilePath = "" ; int m_progress ; public SharedPreferences sharedpreferences ; private String getCurrentDirPath ( Context paramContext ) { } public boolean check_g_sensor_exists ( ) { } public boolean write_file_value ( String paramString1 , String paramString2 , int paramInt ) { } public void onReceive ( Context paramContext , Intent paramIntent ) { Log . d ( "AdjustSensorAutoRun" , "start" ) ; if ( check_g_sensor_exists ( ) ) { Log . d ( "AdjustSensorAutoRun" , "bma220<seq2seq4repair_space>exists!" ) ; this . mFilePath = getCurrentDirPath ( paramContext ) ; <START_BUG> sharedpreferences = paramContext . getSharedPreferences ( "offset_pref" , MODE_PRIVATE ) ; <END_BUG> this . m_progress = sharedpreferences . getInt ( "offset_x" , 0 ) ; if ( write_file_value ( "//sys//devices//platform//s3c2440-i2c.2//i2c-2//2-000a//" , "offset_x" , this . m_progress ) ) { Log . i ( "AdjustSensor" , ( ( "<seq2seq4repair_space>write<seq2seq4repair_space>offset_x<seq2seq4repair_space>=<seq2seq4repair_space>" + ( this . m_progress ) ) + "<seq2seq4repair_space>success!\n" ) ) ; } this . m_progress = sharedpreferences . getInt ( "offset_y" , 0 ) ; if ( write_file_value ( "//sys//devices//platform//s3c2440-i2c.2//i2c-2//2-000a//" , "offset_y" , this . m_progress ) ) { Log . i ( "AdjustSensor" , ( ( "<seq2seq4repair_space>write<seq2seq4repair_space>offset_y<seq2seq4repair_space>=<seq2seq4repair_space>" + ( this . m_progress ) ) + "<seq2seq4repair_space>success!\n" ) ) ; } this . m_progress = sharedpreferences . getInt ( "offset_z" , 0 ) ; if ( write_file_value ( "//sys//devices//platform//s3c2440-i2c.2//i2c-2//2-000a//" , "offset_y" , this . m_progress ) ) { Log . i ( "AdjustSensor" , ( ( "<seq2seq4repair_space>write<seq2seq4repair_space>offset_y<seq2seq4repair_space>=<seq2seq4repair_space>" + ( this . m_progress ) ) + "<seq2seq4repair_space>success!\n" ) ) ; } return ; } Log . d ( "AdjustSensorAutoRun" , "bma220<seq2seq4repair_space>not<seq2seq4repair_space>exists!" ) ; } No newline ; at end ; of file ; }

Fix:
sharedpreferences = paramContext . getSharedPreferences ( "offset_pref" , 0 ) ;
Buggy code:
@ Component public class TargetAPIService implements ProductDescriptionService { private static final Logger logger = LoggerFactory . getLogger ( TargetAPIService . class ) ; private static final String PRODUCT_COMPOSITE_RESPONSE = "product_composite_response" ; private static final String ITEMS = "items" ; private static final String GENERAL_DESCRIPTION = "general_description" ; private static String HOST = "api.target.com" ; private static String URI = "products//v3" ; private static String PARAMS = "fields=descriptions&id_type=TCIN&key=43cJWpLjH8Z8oR18KdrZDBKAgLLQKJjz" ; private static String URL_PATTERN = "http:////%s//%s//%s?%s" ; @ Autowired private RestTemplate restTemplate ; @ Override public String getProductDescription ( String productId ) { String URL = String . format ( TargetAPIService . URL_PATTERN , TargetAPIService . HOST , TargetAPIService . URI , productId , TargetAPIService . PARAMS ) ; TargetAPIService . logger . info ( ( "Calling<seq2seq4repair_space>Target<seq2seq4repair_space>API<seq2seq4repair_space>service<seq2seq4repair_space>for<seq2seq4repair_space>productId:<seq2seq4repair_space>" + productId ) ) ; String productDescription = null ; try { ResponseEntity < Map > responseEntity = restTemplate . getForEntity ( URL , Map . class ) ; HttpStatus statusCode = ( responseEntity != null ) ? responseEntity . getStatusCode ( ) : null ; TargetAPIService . logger . info ( ( "Target<seq2seq4repair_space>API<seq2seq4repair_space>service<seq2seq4repair_space>response<seq2seq4repair_space>status<seq2seq4repair_space>code:<seq2seq4repair_space>" + statusCode ) ) ; if ( statusCode == ( HttpStatus . OK ) ) { productDescription = ( ( String ) ( extractFirstValueFromJson ( responseEntity . getBody ( ) , new LinkedList ( Arrays . asList ( ( ( String [ ] ) ( new String [ ] { TargetAPIService . PRODUCT_COMPOSITE_RESPONSE , TargetAPIService . ITEMS , TargetAPIService . GENERAL_DESCRIPTION } ) ) ) ) ) ) ) ; } } catch ( Exception e ) { <START_BUG> TargetAPIService . logger . info ( ( "Trouble<seq2seq4repair_space>getting<seq2seq4repair_space>the<seq2seq4repair_space>product<seq2seq4repair_space>description<seq2seq4repair_space>for<seq2seq4repair_space>productId:<seq2seq4repair_space>" + productId ) , e ) ; <END_BUG> } return productDescription ; } private Object extractFirstValueFromJson ( Object value , Deque < String > keys ) { } }

Fix:
TargetAPIService . logger . error ( ( "Trouble<seq2seq4repair_space>getting<seq2seq4repair_space>the<seq2seq4repair_space>product<seq2seq4repair_space>description<seq2seq4repair_space>for<seq2seq4repair_space>productId:<seq2seq4repair_space>" + productId ) , e ) ;
Buggy code:
public class ClosedOutputStream extends OutputStream { public static final ClosedOutputStream CLOSED_OUTPUT_STREAM = new ClosedOutputStream ( ) ; @ Override <START_BUG> public void write ( int b ) throws IOException { <END_BUG> throw new IOException ( ( ( "write(" + b ) + ")<seq2seq4repair_space>failed:<seq2seq4repair_space>stream<seq2seq4repair_space>is<seq2seq4repair_space>closed" ) ) ; } }

Fix:
public void write ( final int b ) throws IOException {
Buggy code:
public final class ManifestDependencyProcessor implements DeploymentUnitProcessor { private static final String DEPENDENCIES_ATTR = "Dependencies" ; private static final String EXPORT_PARAM = "export" ; private static final String OPTIONAL_PARAM = "optional" ; private static final String SERVICES_PARAM = "services" ; private static final String ANNOTATIONS_PARAM = "annotations" ; private static final String META_INF = "meta-inf" ; public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ServiceModuleLoader deploymentModuleLoader = deploymentUnit . getAttachment ( SERVICE_MODULE_LOADER ) ; final List < ResourceRoot > allResourceRoots = DeploymentUtils . allResourceRoots ( deploymentUnit ) ; for ( final ResourceRoot resourceRoot : allResourceRoots ) { final Manifest manifest = resourceRoot . getAttachment ( MANIFEST ) ; if ( manifest == null ) continue ; final String dependencyString = manifest . getMainAttributes ( ) . getValue ( ManifestDependencyProcessor . DEPENDENCIES_ATTR ) ; if ( dependencyString == null ) continue ; final String [ ] dependencyDefs = dependencyString . split ( "," ) ; for ( final String dependencyDef : dependencyDefs ) { final String [ ] dependencyParts = dependencyDef . trim ( ) . split ( "<seq2seq4repair_space>" ) ; if ( ( dependencyParts . length ) == 0 ) { throw new RuntimeException ( ( "Invalid<seq2seq4repair_space>dependency:<seq2seq4repair_space>" + dependencyString ) ) ; } final ModuleIdentifier dependencyId = ModuleIdentifier . fromString ( dependencyParts [ 0 ] ) ; final boolean export = containsParam ( dependencyParts , ManifestDependencyProcessor . EXPORT_PARAM ) ; final boolean optional = containsParam ( dependencyParts , ManifestDependencyProcessor . OPTIONAL_PARAM ) ; final boolean services = containsParam ( dependencyParts , ManifestDependencyProcessor . SERVICES_PARAM ) ; final boolean annotations = containsParam ( dependencyParts , ManifestDependencyProcessor . ANNOTATIONS_PARAM ) ; final boolean metaInf = containsParam ( dependencyParts , ManifestDependencyProcessor . META_INF ) ; final ModuleLoader dependencyLoader ; if ( dependencyId . getName ( ) . startsWith ( "deployment." ) ) { dependencyLoader = deploymentModuleLoader ; } else { dependencyLoader = Module . getBootModuleLoader ( ) ; } if ( annotations ) { deploymentUnit . addToAttachmentList ( ADDITIONAL_ANNOTATION_INDEXES , dependencyId ) ; } <START_BUG> final ModuleDependency dependency = new ModuleDependency ( dependencyLoader , dependencyId , optional , export , services ) ; <END_BUG> if ( metaInf ) { dependency . addImportFilter ( PathFilters . getMetaInfSubdirectoriesFilter ( ) , true ) ; } deploymentUnit . addToAttachmentList ( MANIFEST_DEPENDENCIES , dependency ) ; } } } public void undeploy ( final DeploymentUnit context ) { } private boolean containsParam ( final String [ ] parts , final String expected ) { } }

Fix:
final ModuleDependency dependency = new ModuleDependency ( dependencyLoader , dependencyId , optional , export , services , true ) ;
Buggy code:
public class ReportGui extends AbstractJMeterGuiComponent { private JCheckBox serializedMode ; private ArgumentsPanel argsPanel ; private JTextArea commentPanel ; public ReportGui ( ) { } public JPopupMenu createPopupMenu ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement plan ) { } public String getLabelResource ( ) { <START_BUG> return "test_plan" ; <END_BUG> } public Collection getMenuCategories ( ) { } public void configure ( TestElement el ) { } private JPanel createVariablePanel ( ) { } private Container createCommentPanel ( ) { } private void init ( ) { } }

Fix:
return "report_plan" ;
Buggy code:
public class SplashScreen extends Activity { private static int TIME_OUT = 3000 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_splash_screen ) ; new Handler ( ) . postDelayed ( new Runnable ( ) { @ Override public void run ( ) { boolean myflag = false ; String myusername ; String mypassword ; String mylogin ; String logindata ; String filename = "session" ; File myFile = new File ( getApplicationContext ( ) . getFilesDir ( ) , filename ) ; if ( myFile . exists ( ) ) { FileInputStream inputStream ; try { inputStream = openFileInput ( filename ) ; byte [ ] login_test = new byte [ inputStream . available ( ) ] ; while ( ( inputStream . read ( login_test ) ) != ( - 1 ) ) { } logindata = new String ( login_test ) ; String [ ] separated = logindata . split ( ";" ) ; myusername = separated [ 0 ] ; mypassword = separated [ 1 ] ; <START_BUG> if ( ( myusername . matches ( "Admin" ) ) && ( mypassword . matches ( "gravelord" ) ) ) { <END_BUG> myflag = true ; } else { myflag = false ; } } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; Toast . makeText ( getApplicationContext ( ) , "FML" , LENGTH_LONG ) . show ( ) ; } catch ( IOException e ) { } } if ( myflag ) { Intent i = new Intent ( SplashScreen . this , MainActivity . class ) ; startActivity ( i ) ; } else { Intent i = new Intent ( SplashScreen . this , LoginActivity . class ) ; startActivity ( i ) ; } finish ( ) ; } } , SplashScreen . TIME_OUT ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
if ( ( myusername . matches ( "admin" ) ) && ( mypassword . matches ( "gravelord" ) ) ) {
Buggy code:
public class ParseException extends UserException { private static final Localizer _loc = Localizer . forPackage ( ParseException . class ) ; public ParseException ( Token currentTokenVal , int [ ] [ ] expectedTokenSequencesVal , String [ ] tokenImageVal ) { } public ParseException ( ) { } public ParseException ( String message ) { } public ParseException ( String message , Throwable t ) { } private static Message initMessage ( Token currentToken , int [ ] [ ] expectedTokenSequences , String [ ] tokenImage ) { TreeSet expected = new TreeSet ( ) ; int maxSize = 0 ; for ( int i = 0 ; i < ( expectedTokenSequences . length ) ; i ++ ) { if ( maxSize < ( expectedTokenSequences [ i ] . length ) ) maxSize = expectedTokenSequences [ i ] . length ; for ( int j = 0 ; j < ( expectedTokenSequences [ i ] . length ) ; j ++ ) expected . add ( tokenImage [ expectedTokenSequences [ i ] [ j ] ] ) ; } Token tok = currentToken . next ; StringBuffer curtokBuf = new StringBuffer ( ) ; for ( int i = 0 ; i < maxSize ; i ++ ) { if ( i != 0 ) curtokBuf . append ( "<seq2seq4repair_space>" ) ; if ( ( tok . kind ) == 0 ) { curtokBuf . append ( tokenImage [ 0 ] ) ; break ; } curtokBuf . append ( ParseException . escape ( tok . image ) ) ; tok = tok . next ; } String curtok = curtokBuf . toString ( ) ; <START_BUG> return ParseException . _loc . get ( "bad-parse" , new Object [ ] { curtok , new Integer ( currentToken . next . beginColumn ) , expected } ) ; <END_BUG> } private static String escape ( String str ) { } }

Fix:
return ParseException . _loc . get ( "bad-parse" , new Object [ ] { curtok , Integer . valueOf ( currentToken . next . beginColumn ) , expected } ) ;
Buggy code:
public class ActionSaveProject extends UMLAction { public static ActionSaveProject SINGLETON = new ActionSaveProject ( ) ; public ActionSaveProject ( ) { } public ActionSaveProject ( String title , boolean icon ) { } public void actionPerformed ( ActionEvent e ) { } public boolean trySave ( boolean overwrite ) { URL url = ProjectManager . getManager ( ) . getCurrentProject ( ) . getURL ( ) ; <START_BUG> return trySave ( overwrite , new File ( url . getFile ( ) ) ) ; <END_BUG> } public boolean trySave ( boolean overwrite , File file ) { } public boolean shouldBeEnabled ( ) { } }

Fix:
return url == null ? false : trySave ( overwrite , new File ( url . getFile ( ) ) ) ;
Buggy code:
class AppRequester { protected static final int MGR_LEVEL_UNKNOWN = - 1 ; protected static final int UNKNOWN_CLIENT = 0 ; protected static final int JCC_CLIENT = 1 ; protected static final int CCC_CLIENT = 2 ; protected static final int DNC_CLIENT = 3 ; private static final int [ ] MIN_MGR_LEVELS = new int [ ] { 3 , 4 , 3 , 4 , 5 , 1 , 3 , 4 , 1 , 6 , 1 , 5 , 1208 , 0 } ; protected String extnam ; protected String srvnam ; protected String srvrlslv ; protected String srvclsnm ; protected String spvnam ; protected String prdid ; private int [ ] managerLevels = new int [ MGR_CODEPOINTS . length ] ; private int clientType ; protected int versionLevel ; protected int releaseLevel ; protected int modifyLevel ; AppRequester ( ) { } protected int getManagerLevel ( int manager ) { } protected void setClientVersion ( String productId ) { } protected boolean supportsSecMecUSRSSBPWD ( ) { } protected final boolean supportsQryclsimpForLmtblkprc ( ) { } protected boolean greaterThanOrEqualTo ( int vLevel , int rLevel , int mLevel ) { } protected void setManagerLevel ( int manager , int managerLevel ) { } protected boolean equals ( AppRequester a ) { } private boolean notEquals ( Object a , Object b ) { } protected int supportedMessageParamLength ( ) { } protected int getClientType ( ) { } protected boolean isXARequester ( ) { } protected boolean supportsEXTDTAAbort ( ) { } protected boolean supportsUtf8Ccsid ( ) { } protected boolean supportsSessionDataCaching ( ) { } protected boolean supportsUDTs ( ) { } protected boolean supportsTimestampNanoseconds ( ) { } protected boolean supportsBooleanValues ( ) { } protected int getTimestampLength ( ) { <START_BUG> return supportsTimestampNanoseconds ( ) ? DRDAConstants . JDBC_TIMESTAMP_LENGTH : DRDAConstants . DRDA_TIMESTAMP_LENGTH ; <END_BUG> } }

Fix:
return supportsTimestampNanoseconds ( ) ? DRDAConstants . JDBC_TIMESTAMP_LENGTH : DRDAConstants . DRDA_OLD_TIMESTAMP_LENGTH ;
Buggy code:
public class BlockChorusFlower extends WrappedBlock { public static final BlockStateInteger AGE = BlockStateInteger . of ( "age" , 0 , 5 ) ; public BlockChorusFlower ( ) { } @ Override public Item getDropType ( IBlockData var1 , Random var2 , int var3 ) { } @ Override public void tick ( World world , BlockPosition position , IBlockData blockdata , Random random ) { } private static boolean a ( World world , BlockPosition position , EnumDirection direction ) { } @ Override public boolean isFullCube ( ) { } @ Override public boolean isOpaqueCube ( ) { } @ Override public boolean canPlace ( World world , BlockPosition position ) { } @ Override public void doPhysics ( World world , BlockPosition position , IBlockData blockdata , Block block ) { } public boolean isValid ( World world , BlockPosition position ) { } @ Override public void breakBlockNaturally ( World world , EntityHuman player , BlockPosition pos , IBlockData blockdata , TileEntity tile , ItemStack itemstack ) { } @ Override protected ItemStack createItemStack ( IBlockData blockdata ) { } @ Override public IBlockData fromLegacyData ( int meta ) { } @ Override public int toLegacyData ( IBlockData blockdata ) { } @ Override protected BlockStateList getStateList ( ) { } @ Override public void onPlace ( World world , BlockPosition var2 , IBlockData var3 ) { } public static void a ( World world , BlockPosition position , Random rnd , int var3 ) { } private static void a ( World var0 , BlockPosition var1 , Random var2 , BlockPosition var3 , int var4 , int var5 ) { int var6 = ( var2 . nextInt ( 4 ) ) + 1 ; if ( var5 == 0 ) { ++ var6 ; } for ( int var7 = 0 ; var7 < var6 ; ++ var7 ) { BlockPosition var8 = var1 . up ( ( var7 + 1 ) ) ; <START_BUG> if ( ! ( BlockChorusFlower . a ( var0 , var8 , null ) ) ) { <END_BUG> return ; } var0 . setTypeAndData ( var8 , CHORUS_PLANT . getBlockData ( ) , 2 ) ; } boolean var12 = false ; if ( var5 < 4 ) { int var13 = var2 . nextInt ( 4 ) ; if ( var5 == 0 ) { ++ var13 ; } for ( int var9 = 0 ; var9 < var13 ; ++ var9 ) { EnumDirection var10 = EnumDirectionLimitUtil . getRandomDirection ( HORIZONTAL , var2 ) ; BlockPosition var11 = var1 . up ( var6 ) . shift ( var10 ) ; if ( ( ( ( ( ( Math . abs ( ( ( var11 . getX ( ) ) - ( var3 . getX ( ) ) ) ) ) < var4 ) && ( ( Math . abs ( ( ( var11 . getZ ( ) ) - ( var3 . getZ ( ) ) ) ) ) < var4 ) ) && ( var0 . isEmpty ( var11 ) ) ) && ( var0 . isEmpty ( var11 . down ( ) ) ) ) && ( BlockChorusFlower . a ( var0 , var11 , var10 . opposite ( ) ) ) ) { var12 = true ; var0 . setTypeAndData ( var11 , CHORUS_PLANT . getBlockData ( ) , 2 ) ; BlockChorusFlower . a ( var0 , var11 , var2 , var3 , var4 , ( var5 + 1 ) ) ; } } } if ( ! var12 ) { var0 . setTypeAndData ( var1 . up ( var6 ) , CHORUS_FLOWER . getBlockData ( ) . set ( BlockChorusFlower . AGE , 5 ) , 2 ) ; } } }

Fix:
if ( ! ( BlockChorusFlower . a ( var0 , var8 , ( ( EnumDirection ) ( null ) ) ) ) ) {
Buggy code:
public class WrappedItemMeta implements IWrappedItemMeta , Repairable { private static final String DISPLAY_TAG = "display" ; private static final String NAME_TAG = "Name" ; private static final String LORE_TAG = "Lore" ; private static final String ENCHANTMENTS_TAG = "ench" ; private static final String ENCHANTMENT_ID_TAG = "id" ; private static final String ENCHANTMENT_LEVEL_TAG = "lvl" ; private static final String REPAIR_COST_TAG = "RepairCost" ; private static final String ITEM_FLAGS_TAG = "HideFlags" ; protected NBTTagCompound itemmetatag ; public WrappedItemMeta ( NBTTagCompound itemmetatag ) { } protected NBTTagCompound getTag ( ) { } @ Override public WrappedItemMeta clone ( ) { } @ Override public Map < String , Object > serialize ( ) { } protected NBTTagCompound getDispalyTag ( ) { } protected void saveDisplayTag ( NBTTagCompound display ) { } @ Override public boolean hasDisplayName ( ) { } @ Override public String getDisplayName ( ) { } @ Override public void setDisplayName ( String name ) { } @ Override public boolean hasLore ( ) { } @ SuppressWarnings ( "unchecked" ) @ Override public List < String > getLore ( ) { } @ Override public void setLore ( List < String > lore ) { } @ Override public boolean hasEnchants ( ) { } @ SuppressWarnings ( { "unchecked" , "deprecation" } ) @ Override public Map < Enchantment , Integer > getEnchants ( ) { } @ Override public boolean hasEnchant ( Enchantment ench ) { } @ Override public int getEnchantLevel ( Enchantment ench ) { } @ Override public boolean addEnchant ( Enchantment ench , int level , boolean unsafe ) { } @ Override public boolean removeEnchant ( Enchantment ench ) { Map < Enchantment , Integer > enchants = getEnchants ( ) ; <START_BUG> boolean had = ( enchants . remove ( enchants ) ) != null ; <END_BUG> saveEnchants ( enchants ) ; return had ; } @ SuppressWarnings ( "deprecation" ) private void saveEnchants ( Map < Enchantment , Integer > enchants ) { } @ Override public boolean hasConflictingEnchant ( Enchantment otherench ) { } @ Override public Spigot spigot ( ) { } @ Override public Set < ItemFlag > getItemFlags ( ) { } @ Override public boolean hasItemFlag ( ItemFlag flag ) { } @ Override public void addItemFlags ( ItemFlag ... addflags ) { } @ Override public void removeItemFlags ( ItemFlag ... removeflags ) { } private void saveItemFlags ( Set < ItemFlag > flags ) { } @ Override public boolean hasRepairCost ( ) { } @ Override public int getRepairCost ( ) { } @ Override public void setRepairCost ( int cost ) { } public void applyToBukkit ( ItemMeta bukkit ) { } public void copyFromBukkit ( ItemMeta bukkit ) { } }

Fix:
boolean had = ( enchants . remove ( ench ) ) != null ;