nus-yam/ex-repair huggingface dataset:
Buggy code:
@ Slf4j @ Configuration @ Order ( ManagementServerProperties . ACCESS_OVERRIDE_ORDER ) public class SecurityConfiguration extends WebSecurityConfigurerAdapter { @ Resource private SecurityProperties security ; @ Resource private Alien4CloudAccessDeniedHandler accessDeniedHandler ; @ Resource private Alien4CloudAuthenticationProvider authenticationProvider ; @ Autowired private Environment env ; @ Bean public Alien4CloudAuthenticationProvider authenticationProvider ( ) { } @ Bean @ Profile ( "security-demo" ) public DaoAuthenticationProvider demoAuthenticationProvider ( ) { } public List < UserDetails > getUsers ( String [ ] usernames , String [ ] roles ) { } @ Override protected void configure ( AuthenticationManagerBuilder auth ) throws Exception { } @ Override protected void configure ( HttpSecurity http ) throws Exception { } @ Override public void configure ( WebSecurity web ) throws Exception { log . debug ( "Configure<seq2seq4repair_space>ignore<seq2seq4repair_space>path" ) ; <START_BUG> web . ignoring ( ) . antMatchers ( "//api-docs//**" , "//data//**" , "//bower_components//**" , "//images//**" , "//js-lib//**" , "//scripts//**" , "//styles//**" , "//views//**" ) ; <END_BUG> } }

Fix:
web . ignoring ( ) . antMatchers ( "//api-doc//**" , "//api-docs//**" , "//data//**" , "//bower_components//**" , "//images//**" , "//js-lib//**" , "//scripts//**" , "//styles//**" , "//views//**" ) ;
Buggy code:
public class ConditionalExpression extends OperatorExpression { public Expression condition ; public Expression valueIfTrue ; public Expression valueIfFalse ; private int returnTypeSlotSize = 1 ; int thenInitStateIndex = - 1 ; int elseInitStateIndex = - 1 ; int mergedInitStateIndex = - 1 ; public ConditionalExpression ( Expression condition , Expression valueIfTrue , Expression valueIfFalse ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { <START_BUG> Constant conditionConstant = condition . optimizedBooleanConstant ( ) ; <END_BUG> flowInfo = condition . analyseCode ( currentScope , flowContext , flowInfo , ( conditionConstant == ( NotAConstant ) ) ) ; if ( conditionConstant != ( NotAConstant ) ) { if ( ( conditionConstant . booleanValue ( ) ) == true ) { FlowInfo resultInfo = valueIfTrue . analyseCode ( currentScope , flowContext , flowInfo . initsWhenTrue ( ) . unconditionalInits ( ) ) ; valueIfFalse . analyseCode ( currentScope , flowContext , flowInfo . initsWhenFalse ( ) . copy ( ) . unconditionalInits ( ) . markAsFakeReachable ( true ) ) ; mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( resultInfo ) ; return resultInfo ; } else { valueIfTrue . analyseCode ( currentScope , flowContext , flowInfo . initsWhenTrue ( ) . copy ( ) . unconditionalInits ( ) . markAsFakeReachable ( true ) ) ; FlowInfo mergeInfo = valueIfFalse . analyseCode ( currentScope , flowContext , flowInfo . initsWhenFalse ( ) . unconditionalInits ( ) ) ; mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( mergeInfo ) ; return mergeInfo ; } } FlowInfo trueInfo = flowInfo . initsWhenTrue ( ) ; thenInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( trueInfo ) ; FlowInfo falseInfo = flowInfo . initsWhenFalse ( ) ; elseInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( falseInfo ) ; trueInfo = valueIfTrue . analyseCode ( currentScope , flowContext , trueInfo . copy ( ) ) ; falseInfo = valueIfFalse . analyseCode ( currentScope , flowContext , falseInfo . copy ( ) ) ; FlowInfo mergedInfo = FlowInfo . conditional ( trueInfo . initsWhenTrue ( ) . copy ( ) . unconditionalInits ( ) . mergedWith ( falseInfo . initsWhenTrue ( ) . copy ( ) . unconditionalInits ( ) ) , trueInfo . initsWhenFalse ( ) . unconditionalInits ( ) . mergedWith ( falseInfo . initsWhenFalse ( ) . unconditionalInits ( ) ) ) ; mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( mergedInfo ) ; return mergedInfo ; } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateOptimizedBoolean ( BlockScope currentScope , CodeStream codeStream , Label trueLabel , Label falseLabel , boolean valueRequired ) { } public TypeBinding resolveType ( BlockScope scope ) { } public String toStringExpressionNoParenthesis ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
Constant conditionConstant = condition . constant ;
Buggy code:
public class ExitCommand implements Command { private static final Set < String > commands = new HashSet < String > ( ) ; public ExitCommand ( ) { } public Set < String > getActionNames ( ) { } public void doAction ( ActionEvent e ) { ActionRouter . getInstance ( ) . doActionNow ( new ActionEvent ( e . getSource ( ) , e . getID ( ) , ActionNames . CHECK_DIRTY ) ) ; if ( GuiPackage . getInstance ( ) . isDirty ( ) ) { int chosenOption = JOptionPane . showConfirmDialog ( GuiPackage . getInstance ( ) . getMainFrame ( ) , JMeterUtils . getResString ( "cancel_exit_to_save" ) , JMeterUtils . getResString ( "save?" ) , JOptionPane . YES_NO_CANCEL_OPTION , JOptionPane . QUESTION_MESSAGE ) ; if ( chosenOption == ( JOptionPane . NO_OPTION ) ) { System . exit ( 0 ) ; } else if ( chosenOption == ( JOptionPane . YES_OPTION ) ) { <START_BUG> ActionRouter . getInstance ( ) . doActionNow ( new ActionEvent ( e . getSource ( ) , e . getID ( ) , ActionNames . SAVE_ALL_AS ) ) ; <END_BUG> if ( ! ( GuiPackage . getInstance ( ) . isDirty ( ) ) ) { System . exit ( 0 ) ; } } } else { System . exit ( 0 ) ; } } }

Fix:
ActionRouter . getInstance ( ) . doActionNow ( new ActionEvent ( e . getSource ( ) , e . getID ( ) , ActionNames . SAVE ) ) ;
Buggy code:
public abstract class MimePartRenderer { private static final int BOUNDARY_LENGTH = 32 ; public abstract String getRegisterString ( ) { } public abstract String render ( MimePart part ) { } protected void appendHeader ( StringBuffer result , MimeHeader header ) { } private void appendParameters ( StringBuffer result , Hashtable parameters ) { } protected String createUniqueBoundary ( ) { Random random = new Random ( ) ; byte [ ] bytes = new byte [ MimePartRenderer . BOUNDARY_LENGTH ] ; Base64Encoder encoder = new Base64Encoder ( ) ; random . nextBytes ( bytes ) ; try { <START_BUG> return encoder . encode ( new String ( bytes ) , null ) ; <END_BUG> } catch ( UnsupportedEncodingException e ) { } return null ; } }

Fix:
return encoder . encode ( new String ( bytes ) , "US-ASCII" ) ;
Buggy code:
public class PatternLayout extends Layout { public static final String DEFAULT_CONVERSION_PATTERN = "%m%n" ; public static final String TTCC_CONVERSION_PATTERN = "%r<seq2seq4repair_space>[%t]<seq2seq4repair_space>%p<seq2seq4repair_space>%c<seq2seq4repair_space>%x<seq2seq4repair_space>-<seq2seq4repair_space>%m%n" ; private String conversionPattern ; private PatternConverter head ; private HashMap ruleRegistry = null ; private boolean handlesExceptions ; public PatternLayout ( ) { } public PatternLayout ( String pattern ) { } public void addConversionRule ( String conversionWord , String converterClass ) { } public HashMap getRuleRegistry ( ) { } public void setConversionPattern ( String conversionPattern ) { } public String getConversionPattern ( ) { } public void activateOptions ( ) { PatternParser patternParser = new PatternParser ( conversionPattern ) ; patternParser . setConverterRegistry ( ruleRegistry ) ; head = patternParser . parse ( ) ; <START_BUG> handlesExceptions = PatternConverter . chainHandlesTrowable ( head ) ; <END_BUG> } public void format ( Writer output , LoggingEvent event ) throws IOException { } public boolean ignoresThrowable ( ) { } }

Fix:
handlesExceptions = PatternConverter . chainHandlesThrowable ( head ) ;
Buggy code:
public class RemoteServiceContainer extends TCPClientSOContainer implements IRemoteServiceContainer { private static final String REGISTRY_ID = ( RemoteServiceContainer . class . getName ( ) ) + ".registry" ; protected List serviceListener = new ArrayList ( ) ; protected RegistrySharedObject registrySharedObject ; protected RegistrySharedObject createAndAddRegistry ( ) { } public RemoteServiceContainer ( ISharedObjectContainerConfig config ) { } public RemoteServiceContainer ( ISharedObjectContainerConfig config , int ka ) { } public void addRemoteServiceListener ( IRemoteServiceListener listener ) { } public IRemoteService getRemoteService ( IRemoteServiceReference ref ) throws ECFException { } public IRemoteServiceReference [ ] getRemoteServiceReferences ( ID [ ] idFilter , String clazz , String filter ) throws ECFException { } public IRemoteServiceRegistration registerRemoteService ( String [ ] clazzes , Object service , Dictionary properties ) throws ECFException { } public void removeRemoteServiceListener ( IRemoteServiceListener listener ) { <START_BUG> registrySharedObject . remoteRemoteServiceListener ( listener ) ; <END_BUG> } public boolean ungetRemoteService ( IRemoteServiceReference ref ) { } }

Fix:
registrySharedObject . removeRemoteServiceListener ( listener ) ;
Buggy code:
@ RestController @ RequestMapping ( "//api//tags" ) public class TagApiController { @ Autowired TagRepository tags ; @ Autowired MongoConfiguration mongo ; private List < Tag > search ( String name ) throws Exception { } @ RequestMapping ( "//autocomplete" ) public List < TagResult > autocompleteData ( ) throws Exception { MongoTemplate tem = mongo . mongoTemplate ( ) ; Aggregation agg = newAggregation ( project ( ) . and ( "name" ) . as ( "text" ) ) ; <START_BUG> AggregationResults < TagResult > results = tem . aggregate ( agg , "event" , TagResult . class ) ; <END_BUG> List < TagResult > mappedResult = results . getMappedResults ( ) ; return mappedResult ; } @ RequestMapping ( method = RequestMethod . GET ) public Iterable < Tag > list ( @ RequestParam ( value = "name" , required = false ) String tagName ) throws Exception { } @ RequestMapping ( value = "//{id}" , method = RequestMethod . GET ) public Tag get ( @ PathVariable ( "id" ) String id ) { } @ RequestMapping ( method = RequestMethod . POST ) public Tag create ( @ RequestBody @ Valid Tag tag ) { } @ RequestMapping ( value = "//{id}" , method = RequestMethod . PUT ) public Tag update ( @ PathVariable ( "id" ) String id , @ RequestBody @ Valid Tag tag ) { } @ RequestMapping ( value = "//{id}" , method = RequestMethod . DELETE ) public ResponseEntity < Boolean > delete ( @ PathVariable ( "id" ) String id ) { } }

Fix:
AggregationResults < TagResult > results = tem . aggregate ( agg , "tag" , TagResult . class ) ;
Buggy code:
public class TLSClient { String cKsPath ; String cKsPass ; String cKeyPass ; String ctrustPath ; String ctrustPass ; String sIP ; int sPort ; Thread shutdownHook ; public TLSClient ( String sIP , int sPort , String cKsPath , String cKsPass , String cKeyPass , String ctrustPath , String ctrustPass ) { } public void run ( ) { SSLContext sslContext = Auth . getSSLContext ( "TLS" , "JKS" , cKsPath , cKsPass , cKeyPass , ctrustPath , ctrustPass ) ; SSLSocketFactory socketFactory = sslContext . getSocketFactory ( ) ; SSLSocket socket = null ; ClientLogic logic = null ; try { socket = ( ( SSLSocket ) ( socketFactory . createSocket ( sIP , sPort ) ) ) ; shutdownHook = new ClientShutdownHook ( socket ) ; Runtime . getRuntime ( ) . addShutdownHook ( shutdownHook ) ; socket . startHandshake ( ) ; logic = new ClientLogic ( socket . getInputStream ( ) , socket . getOutputStream ( ) ) ; logic . perform ( ) ; } catch ( UnknownHostException e ) { System . out . println ( ( ( "Host<seq2seq4repair_space>" + ( sIP ) ) + "<seq2seq4repair_space>unreachable" ) ) ; } catch ( IOException e ) { <START_BUG> System . out . println ( "Cannot<seq2seq4repair_space>create<seq2seq4repair_space>SSL<seq2seq4repair_space>socket" ) ; <END_BUG> } finally { System . out . println ( "Close<seq2seq4repair_space>socket" ) ; if ( socket != null ) try { socket . close ( ) ; } catch ( IOException e ) { System . out . println ( "Cannot<seq2seq4repair_space>close<seq2seq4repair_space>socket" ) ; } } } public static void main ( String [ ] args ) throws Exception { } }

Fix:
System . out . println ( "Cannot<seq2seq4repair_space>create<seq2seq4repair_space>SSL<seq2seq4repair_space>socket,<seq2seq4repair_space>perhaps<seq2seq4repair_space>server<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>running?" ) ;
Buggy code:
public abstract class AjaxFormChoiceComponentUpdatingBehavior extends AbstractDefaultAjaxBehavior { private static final long serialVersionUID = 1L ; public AjaxFormChoiceComponentUpdatingBehavior ( ) { } @ Override public void renderHead ( IHeaderResponse response ) { } protected abstract void onUpdate ( AjaxRequestTarget target ) { } protected void onError ( AjaxRequestTarget target , RuntimeException e ) { } @ Override protected void onBind ( ) { } protected final FormComponent < ? > getFormComponent ( ) { } protected final CharSequence getEventHandler ( ) { <START_BUG> return generateCallbackScript ( new AppendingStringBuffer ( "wicketAjaxPost('" ) . append ( getCallbackUrl ( ) ) . append ( ( ( "',<seq2seq4repair_space>wicketSerializeForm(document.getElementById('" + ( getComponent ( ) . getMarkupId ( ) ) ) + "',false))" ) ) ) ; <END_BUG> } @ Override protected final void respond ( final AjaxRequestTarget target ) { } }

Fix:
return generateCallbackScript ( new AppendingStringBuffer ( "wicketAjaxPost('" ) . append ( getCallbackUrl ( true ) ) . append ( ( ( "',<seq2seq4repair_space>wicketSerializeForm(document.getElementById('" + ( getComponent ( ) . getMarkupId ( ) ) ) + "',false))" ) ) ) ;
Buggy code:
<START_BUG> public class InjectedBaseActivityTest extends ActivityInstrumentationTestCase2 { <END_BUG> @ Inject Api mockApi ; public InjectedBaseActivityTest ( Class activityClass ) { } @ Override protected void setUp ( ) throws Exception { super . setUp ( ) ; App app = ( ( App ) ( getInstrumentation ( ) . getTargetContext ( ) . getApplicationContext ( ) ) ) ; app . setMockMode ( true ) ; app . graph ( ) . inject ( this ) ; } @ Override protected void tearDown ( ) throws Exception { } }

Fix:
public class InjectedBaseActivityTest extends ActivityInstrumentationTestCase2 < BaseActivity > {
Buggy code:
public class TestSynchronizedSortedSet < E > extends AbstractTestSortedSet < E > { public TestSynchronizedSortedSet ( String testName ) { } public static Test suite ( ) { } @ Override public SortedSet < E > makeObject ( ) { <START_BUG> return SynchronizedSortedSet . decorate ( new TreeSet < E > ( ) ) ; <END_BUG> } @ Override public String getCompatibilityVersion ( ) { } }

Fix:
return SynchronizedSortedSet . synchronizedSortedSet ( new TreeSet < E > ( ) ) ;
Buggy code:
public class VjoJstMethodValidator extends VjoSemanticValidator implements IVjoValidationPostAllChildrenListener , IVjoValidationPreAllChildrenListener { private static List < Class < ? extends IJstNode > > s_targetTypes ; private static final String [ ] VJO_KEYWORDS = new String [ ] { "vj$" , "base" , "_getBase" , "constructs" } ; private static final String [ ] VJO_KEYWORDS_4_ETYPE = new String [ ] { "vj$" , "base" , "_getBase" , "name" , "ordinal" , "values" , "constructs" } ; @ Override public List < Class < ? extends IJstNode > > getTargetNodeTypes ( ) { } @ Override public void onPreAllChildrenEvent ( final IVjoValidationVisitorEvent event ) { } @ Override public void onPostAllChildrenEvent ( final IVjoValidationVisitorEvent event ) { } protected void validateAfter ( final JstMethod jstMethod , final VjoValidationCtx ctx ) { } protected void validateBefore ( final VjoValidationCtx ctx , final JstMethod jstMethod ) { } private void validateMethod ( final VjoValidationCtx ctx , final JstMethod jstMethod ) { } private void validateReturnType ( final VjoValidationCtx ctx , final IJstMethod jstMethod , JstVariantType rtnType ) { } private void validateReturnType ( final VjoValidationCtx ctx , final IJstMethod jstMethod , JstMixedType rtnType ) { } private void validateReturnType ( final VjoValidationCtx ctx , final IJstMethod jstMethod , IJstType rtnType ) { if ( rtnType != null ) { if ( ( getKnownType ( ctx , jstMethod . getOwnerType ( ) , rtnType ) ) == null ) { <START_BUG> if ( ( ( rtnType . getPackage ( ) ) == null ) && ( ! ( "void" . equals ( rtnType . getName ( ) ) ) ) ) { <END_BUG> if ( ! ( ctx . getMissingImportTypes ( ) . contains ( rtnType ) ) ) { ctx . addMissingImportType ( rtnType ) ; } final BaseVjoSemanticRuleCtx ruleCtx = new BaseVjoSemanticRuleCtx ( jstMethod . getName ( ) , ctx . getGroupId ( ) , new String [ ] { rtnType . getName ( ) } ) ; satisfyRule ( ctx , VjoSemanticRuleRepo . getInstance ( ) . UNKNOWN_TYPE_MISSING_IMPORT , ruleCtx ) ; } } if ( ( rtnType != null ) && ( rtnType instanceof JstTypeWithArgs ) ) { validateJstWithArgs ( jstMethod . getOwnerType ( ) , jstMethod . getName ( ) , jstMethod . getName ( ) . getName ( ) , ctx , ( ( JstTypeWithArgs ) ( rtnType ) ) ) ; } } } protected String [ ] getVjoKeywords ( final IJstMethod jstMethod ) { } private void validateOverloading ( final VjoValidationCtx ctx , final IJstMethod hostMtd , final List < IJstMethod > overloads ) { } public boolean checkAmbiguityBetween ( final List < JstArg > selfParameters , final List < JstArg > otherParameters , final IJstType selfRtnType , final IJstType otherRtnType ) { } private boolean typeEquals ( final IJstType a , final IJstType b ) { } }

Fix:
if ( ( ( rtnType . getPackage ( ) . getName ( ) ) == "" ) && ( ! ( "void" . equals ( rtnType . getName ( ) ) ) ) ) {
Buggy code:
public class SqlTimeConverter extends AbstractConverter < Time > { private static final long serialVersionUID = 1L ; <START_BUG> public Time convertToObject ( String value , Locale locale ) { <END_BUG> if ( value == null ) { return null ; } if ( locale == null ) { locale = Locale . getDefault ( ) ; } DateFormat format = DateFormat . getTimeInstance ( DateFormat . SHORT , locale ) ; try { Date date = format . parse ( value ) ; return new Time ( date . getTime ( ) ) ; } catch ( ParseException e ) { throw new ConversionException ( ( ( ( "Cannot<seq2seq4repair_space>parse<seq2seq4repair_space>'" + value ) + "'<seq2seq4repair_space>using<seq2seq4repair_space>format<seq2seq4repair_space>" ) + format ) ) . setSourceValue ( value ) . setTargetType ( getTargetType ( ) ) . setConverter ( this ) . setLocale ( locale ) ; } } @ Override public String convertToString ( final Time time , Locale locale ) { } @ Override protected Class < Time > getTargetType ( ) { } }

Fix:
public Time convertToObject ( final String value , Locale locale ) {
Buggy code:
final class BcelMethod extends ResolvedMember { private Method method ; private boolean isAjSynthetic ; private ShadowMunger associatedShadowMunger ; private ResolvedPointcutDefinition preResolvedPointcut ; private ResolvedTypeX [ ] annotationTypes = null ; private AnnotationX [ ] annotations = null ; private EffectiveSignatureAttribute effectiveSignature ; private MethodDeclarationLineNumberAttribute declarationLineNumber ; private ResolvedTypeX [ ] resolvedAnnotations ; private World world ; BcelMethod ( BcelObjectType declaringType , Method method ) { } private void unpackJavaAttributes ( ) { } private void unpackAjAttributes ( World world ) { associatedShadowMunger = null ; List as = BcelAttributes . readAjAttributes ( getDeclaringType ( ) . getClassName ( ) , method . getAttributes ( ) , getSourceContext ( world ) , world . getMessageHandler ( ) ) ; processAttributes ( world , as ) ; <START_BUG> as = AtAjAttributes . readAj5MethodAttributes ( method , world . resolve ( getDeclaringType ( ) ) , preResolvedPointcut , getSourceContext ( world ) , world . getMessageHandler ( ) ) ; <END_BUG> processAttributes ( world , as ) ; } private void processAttributes ( World world , List as ) { } public boolean isAjSynthetic ( ) { } public ShadowMunger getAssociatedShadowMunger ( ) { } public EffectiveSignatureAttribute getEffectiveSignature ( ) { } public boolean hasDeclarationLineNumberInfo ( ) { } public int getDeclarationLineNumber ( ) { } public ISourceLocation getSourceLocation ( ) { } public Kind getKind ( ) { } public boolean hasAnnotation ( TypeX ofType ) { } public AnnotationX [ ] getAnnotations ( ) { } public ResolvedTypeX [ ] getAnnotationTypes ( ) { } public void addAnnotation ( AnnotationX annotation ) { } private void ensureAnnotationTypesRetrieved ( ) { } }

Fix:
as = AtAjAttributes . readAj5MethodAttributes ( method , this , world . resolve ( getDeclaringType ( ) ) , preResolvedPointcut , getSourceContext ( world ) , world . getMessageHandler ( ) ) ;
Buggy code:
public class Server extends JFrame { ServerSocket ss = null ; private Socket s ; public static final int portNumber = 6789 ; public ChatServer chatServer ; Database d ; public Vector < OrbitServerThread > clients = new Vector < OrbitServerThread > ( ) ; public static Vector < User > activeUsers = new Vector < User > ( ) ; public HashMap < String , OrbitServerThread > usernameToThreadMap = new HashMap < String , OrbitServerThread > ( ) ; public LinkedList < OrbitServerThread > readyClients = new LinkedList < OrbitServerThread > ( ) ; JLabel serverStatus ; JLabel connectionStatus ; JLabel lastConnection ; JLabel numConnections ; JPanel mainPanel ; public Server ( ) { } private Database initializeDatabase ( String filename ) { } private void startServer ( ) { } private void destruct ( ) { } public synchronized void addToReady ( OrbitServerThread ost ) { if ( ! ( readyClients . contains ( ost ) ) ) { readyClients . add ( ost ) ; if ( ( readyClients . size ( ) ) >= 2 ) { ArrayList < User > users = new ArrayList < User > ( ) ; ArrayList < String > ips = new ArrayList < String > ( ) ; Pair < ArrayList < User > , ArrayList < String > > opponents = new Pair < ArrayList < User > , ArrayList < String > > ( users , ips ) ; for ( OrbitServerThread c : readyClients ) { users . add ( c . getUser ( ) ) ; <START_BUG> ips . add ( c . s . getInetAddress ( ) . toString ( ) ) ; <END_BUG> c . opponents = opponents ; } } } } public static void main ( String [ ] args ) { } }

Fix:
ips . add ( c . s . getInetAddress ( ) . toString ( ) . substring ( 1 ) ) ;
Buggy code:
public class FieldReferencePattern extends MultipleSearchPattern { protected char [ ] name ; protected char [ ] declaringQualification ; protected char [ ] declaringSimpleName ; protected char [ ] typeQualification ; protected char [ ] typeSimpleName ; protected char [ ] decodedName ; private static char [ ] [ ] TAGS = new char [ ] [ ] { FIELD_REF , REF } ; public char [ ] [ ] [ ] allSuperDeclaringTypeNames ; public FieldReferencePattern ( char [ ] name , int matchMode , boolean isCaseSensitive , char [ ] declaringQualification , char [ ] declaringSimpleName , char [ ] typeQualification , char [ ] typeSimpleName ) { } public void decodeIndexEntry ( IEntryResult entryResult ) { } public void feedIndexRequestor ( IIndexSearchRequestor requestor , int detailLevel , int [ ] references , IndexInput input , IJavaSearchScope scope ) throws IOException { } protected char [ ] [ ] getPossibleTags ( ) { } protected boolean hasNextQuery ( ) { } public char [ ] indexEntryPrefix ( ) { } protected int matchContainer ( ) { } protected boolean matchIndexEntry ( ) { } protected void matchReportReference ( AstNode reference , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { <START_BUG> locator . reportQualifiedReference ( reference . sourceStart , reference . sourceEnd , new char [ ] [ ] { this . name } , element , accuracy ) ; <END_BUG> } private boolean needsResolve ( ) { } protected void resetQuery ( ) { } public String toString ( ) { } public boolean initializeFromLookupEnvironment ( LookupEnvironment env ) { } public int matchLevel ( AstNode node , boolean resolve ) { } private int matchLevel ( FieldReference fieldRef , boolean resolve ) { } private int matchLevel ( NameReference nameRef , boolean resolve ) { } private int matchLevel ( TypeBinding receiverType , boolean isSuperAccess , FieldBinding binding ) { } }

Fix:
locator . reportAccurateReference ( reference . sourceStart , reference . sourceEnd , new char [ ] [ ] { this . name } , element , accuracy ) ;
Buggy code:
public class ArgsAnnotationPointcut extends NameBindingPointcut { private AnnotationPatternList arguments ; public ArgsAnnotationPointcut ( AnnotationPatternList arguments ) { } public Set couldMatchKinds ( ) { } public FuzzyBoolean fastMatch ( FastMatchInfo info ) { } protected FuzzyBoolean matchInternal ( Shadow shadow ) { } protected void resolveBindings ( IScope scope , Bindings bindings ) { } protected void resolveBindingsFromRTTI ( ) { } protected Pointcut concretize1 ( ResolvedTypeX inAspect , IntMap bindings ) { } protected Test findResidueInternal ( Shadow shadow , ExposedState state ) { int len = shadow . getArgCount ( ) ; int numArgsMatchedByEllipsis = ( len + ( arguments . ellipsisCount ) ) - ( arguments . size ( ) ) ; if ( numArgsMatchedByEllipsis < 0 ) return Literal . FALSE ; if ( ( numArgsMatchedByEllipsis > 0 ) && ( ( arguments . ellipsisCount ) == 0 ) ) { return Literal . FALSE ; } Test ret = Literal . TRUE ; int argsIndex = 0 ; for ( int i = 0 ; i < ( arguments . size ( ) ) ; i ++ ) { if ( ( arguments . get ( i ) ) == ( AnnotationTypePattern . ELLIPSIS ) ) { argsIndex += numArgsMatchedByEllipsis ; } else if ( ( arguments . get ( i ) ) == ( AnnotationTypePattern . ANY ) ) { argsIndex ++ ; } else { ExactAnnotationTypePattern ap = ( ( ExactAnnotationTypePattern ) ( arguments . get ( i ) ) ) ; TypeX argType = shadow . getArgType ( argsIndex ) ; ResolvedTypeX rArgType = argType . resolve ( shadow . getIWorld ( ) ) ; if ( rArgType == ( ResolvedTypeX . MISSING ) ) { IMessage msg = new org . aspectj . bridge . Message ( WeaverMessages . format ( CANT_FIND_TYPE_ARG_TYPE , argType . getName ( ) ) , "" , IMessage . ERROR , shadow . getSourceLocation ( ) , null , new ISourceLocation [ ] { getSourceLocation ( ) } ) ; } if ( ap . matches ( rArgType ) . alwaysTrue ( ) ) { argsIndex ++ ; continue ; } else { ResolvedTypeX rAnnType = ap . annotationType . resolve ( shadow . getIWorld ( ) ) ; if ( ap instanceof BindingAnnotationTypePattern ) { BindingAnnotationTypePattern btp = ( ( BindingAnnotationTypePattern ) ( ap ) ) ; Var annvar = shadow . getArgAnnotationVar ( argsIndex , rAnnType ) ; <START_BUG> state . set ( argsIndex , annvar ) ; <END_BUG> ret = Test . makeAnd ( ret , Test . makeHasAnnotation ( shadow . getArgVar ( argsIndex ) , rAnnType ) ) ; argsIndex ++ ; } else { ret = Test . makeAnd ( ret , Test . makeHasAnnotation ( shadow . getArgVar ( argsIndex ) , rAnnType ) ) ; argsIndex ++ ; } } } } return ret ; } public List getBindingAnnotationTypePatterns ( ) { } public List getBindingTypePatterns ( ) { } public void write ( DataOutputStream s ) throws IOException { } public static Pointcut read ( VersionedDataInputStream s , ISourceContext context ) throws IOException { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } public String toString ( ) { } }

Fix:
state . set ( btp . getFormalIndex ( ) , annvar ) ;
Buggy code:
public class TaxonTreeDescription { private List < Taxonomy > tree = new ArrayList < Taxonomy > ( ) ; public static TaxonTreeDescription createInstance ( String json ) throws IOException { if ( ( json == null ) || ( json . isEmpty ( ) ) ) { throw new IllegalArgumentException ( "json<seq2seq4repair_space>is<seq2seq4repair_space>empty<seq2seq4repair_space>or<seq2seq4repair_space>null" ) ; } if ( ( json . startsWith ( "[" ) ) && ( json . endsWith ( "]" ) ) ) { JsonSerializer serializer = new JsonSerializer ( ) ; <START_BUG> return ( ( TaxonTreeDescription ) ( serializer . fromJson ( ( ( "{\"tree\"=" + json ) + "}" ) , TaxonTreeDescription . class ) ) ) ; <END_BUG> } else if ( ( json . startsWith ( "{" ) ) && ( json . endsWith ( "}" ) ) ) { JsonSerializer serializer = new JsonSerializer ( ) ; return ( ( TaxonTreeDescription ) ( serializer . fromJson ( json , TaxonTreeDescription . class ) ) ) ; } else { throw new IOException ( "cannot<seq2seq4repair_space>create<seq2seq4repair_space>instance<seq2seq4repair_space>from<seq2seq4repair_space>wrong<seq2seq4repair_space>json<seq2seq4repair_space>format" ) ; } } public TaxonTreeDescription ( ) { } @ JsonProperty ( "tree" ) public void addTaxonomyTree ( List < Taxonomy > tree ) { } @ JsonIgnore public void addTaxonomy ( Taxonomy tax ) { } @ JsonProperty ( "tree" ) public List < Taxonomy > getTaxonomyTree ( ) { } @ JsonIgnore public String getLowestRank ( ) { } @ JsonIgnore public String getLowestRank ( int idx ) { } @ JsonIgnore public synchronized String toJson ( ) throws IOException { } @ JsonIgnore public synchronized void saveTo ( File file ) throws IOException { } }

Fix:
return ( ( TaxonTreeDescription ) ( serializer . fromJson ( ( ( "{\"tree\":" + json ) + "}" ) , TaxonTreeDescription . class ) ) ) ;
Buggy code:
public class NetHandlerServer extends NetHandler { @ Override public boolean isServer ( ) { } @ Override public void handleNetworkShutdown ( String reason , Object [ ] info ) { } @ Override public void handleChat ( Packet3Chat packet ) { } @ Override public void handleNameChange ( Packet5NameChange packet ) { <START_BUG> if ( ( User . find ( packet . name ) ) == null ) { <END_BUG> User . globalPacket ( new Packet4UserList ( user . username , false ) ) ; User . globalPacket ( new Packet4UserList ( packet . name , true ) ) ; String changeMsg = new StringBuilder ( user . username ) . append ( "<seq2seq4repair_space>is<seq2seq4repair_space>now<seq2seq4repair_space>known<seq2seq4repair_space>as<seq2seq4repair_space>" ) . append ( packet . name ) . append ( '.' ) . toString ( ) ; System . out . println ( changeMsg ) ; User . globalMessage ( changeMsg ) ; user . username = packet . name ; netManager . queuePacket ( new Packet5NameChange ( packet . name , true ) ) ; } else netManager . queuePacket ( new Packet5NameChange ( packet . name , false ) ) ; } @ Override public void handleDisconnect ( Packet255Disconnect packet ) { } }

Fix:
if ( ( User . findExact ( packet . name ) ) == null ) {
Buggy code:
@ RestController public class EmployeeSearchContoller { private static final Logger logger = Logger . getLogger ( EmployeeSearchContoller . class ) ; @ Autowired ( required = true ) EmployeeService employeeService ; @ Autowired private UserService userServices ; @ RequestMapping ( value = "//employeeSearch" , method = RequestMethod . GET , produces = { "application//xml" , "application//json" } ) @ ResponseBody public List < CustomUser > getEmployees ( ) { List < CustomUser > employeesList = new ArrayList < CustomUser > ( ) ; try { List < User > userList = userServices . getEntityList ( ) ; for ( User user : userList ) { CustomUser customUser = new CustomUser ( ) ; if ( null != ( user . getIsActive ( ) ) ) { int isActive = Integer . parseInt ( user . getIsActive ( ) ) ; if ( isActive == 1 ) { <START_BUG> customUser . setEmp_id ( user . getEmpId ( ) ) ; <END_BUG> customUser . setName ( user . getName ( ) ) ; setUserAddress ( user , customUser ) ; setUserPhooneNo ( user , customUser ) ; } } employeesList . add ( customUser ) ; } } catch ( TechnicalException e ) { EmployeeSearchContoller . logger . error ( ( "Exception<seq2seq4repair_space>in<seq2seq4repair_space>method<seq2seq4repair_space>...<seq2seq4repair_space>EmployeeSearchContoller.getEmployees" + e ) ) ; } return employeesList ; } private void setUserPhooneNo ( User user , CustomUser customUser ) { } private void setUserAddress ( User user , CustomUser customUser ) { } }

Fix:
customUser . setEmpId ( user . getEmpId ( ) ) ;
Buggy code:
public class WebVirtualHostRemove extends AbstractWebSubsystemUpdate < Void > { private static final long serialVersionUID = 8956517548114021696L ; private final String name ; public WebVirtualHostRemove ( String name ) { } protected void applyUpdate ( WebSubsystemElement element ) throws UpdateFailedException { } protected < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { <START_BUG> final ServiceController < ? > service = updateContext . getServiceContainer ( ) . getService ( JBOSS_WEB_HOST . append ( name ) ) ; <END_BUG> if ( service == null ) { resultHandler . handleSuccess ( null , param ) ; } else { service . addListener ( new UpdateResultHandler . ServiceRemoveListener < P > ( resultHandler , param ) ) ; } } public AbstractSubsystemUpdate < WebSubsystemElement , ? > getCompensatingUpdate ( WebSubsystemElement original ) { } }

Fix:
final ServiceController < ? > service = updateContext . getServiceRegistry ( ) . getService ( JBOSS_WEB_HOST . append ( name ) ) ;
Buggy code:
public class SelectPerspectiveDialog extends Dialog implements ISelectionChangedListener { private static final int LIST_HEIGHT = 300 ; private static final int LIST_WIDTH = 300 ; private TableViewer list ; private Button okButton ; private IPerspectiveDescriptor perspDesc ; private IPerspectiveRegistry perspReg ; private ActivityViewerFilter activityViewerFilter = new ActivityViewerFilter ( ) ; private Button showAllButton ; public SelectPerspectiveDialog ( Shell parentShell , IPerspectiveRegistry perspReg ) { } protected void cancelPressed ( ) { } protected void configureShell ( Shell shell ) { } protected void createButtonsForButtonBar ( Composite parent ) { } protected Control createDialogArea ( Composite parent ) { } private boolean needsShowAllButton ( ) { } private void createShowAllButton ( Composite parent ) { showAllButton = new Button ( parent , SWT . CHECK ) ; <START_BUG> showAllButton . setText ( ActivityMessages . getString ( "Perspective.showAll" ) ) ; <END_BUG> showAllButton . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { if ( showAllButton . getSelection ( ) ) { list . resetFilters ( ) ; } else { list . addFilter ( activityViewerFilter ) ; } } } ) ; } private void createViewer ( Composite parent ) { } public IPerspectiveDescriptor getSelection ( ) { } protected void handleDoubleClickEvent ( ) { } private void layoutTopControl ( Control control ) { } public void selectionChanged ( SelectionChangedEvent event ) { } protected void updateButtons ( ) { } protected void updateSelection ( SelectionChangedEvent event ) { } protected void okPressed ( ) { } }

Fix:
showAllButton . setText ( Perspective_showAll ) ;
Buggy code:
public class SpatiotemporalModeStates extends SpatiotemporalMode { public SpatiotemporalModeStates ( ) { } public SpatiotemporalModeStates ( final OcelotlCore ocelotlCore ) { } @ SuppressWarnings ( "unchecked" ) protected void computeProportions ( EventProducerNode node ) { } public MainEvent getMainEvent ( EventProducerNode epn , int start , int end ) { double max = 0.0 ; MainEvent maj = new MainEvent ( Void , max ) ; <START_BUG> for ( String state : getAllEvents ( ) ) { <END_BUG> double amp = 0.0 ; for ( int i = start ; i < end ; i ++ ) amp += proportions . get ( epn ) . get ( i ) . get ( state ) ; amp //= end - start ; if ( amp > max ) { maj = new MainEvent ( state , amp ) ; max = amp ; } } return maj ; } }

Fix:
for ( String state : getEvents ( ) ) {
Buggy code:
public interface CacheStatistics extends Serializable { public long getReadCount ( ) { } public long getHitCount ( ) { } public long getWriteCount ( ) { } public long getTotalReadCount ( ) { } public long getTotalHitCount ( ) { } public long getTotalWriteCount ( ) { } public long getReadCount ( Class c ) { } public long getHitCount ( Class c ) { } public long getWriteCount ( Class c ) { } public long getTotalReadCount ( Class c ) { } public long getTotalHitCount ( Class c ) { } public long getTotalWriteCount ( Class c ) { } public Date since ( ) { } public Date start ( ) { } public void reset ( ) { } public static class Default implements CacheStatistics { private long [ ] astat = new long [ 3 ] ; private long [ ] stat = new long [ 3 ] ; private Map < Class , long [ ] > stats = new HashMap < Class , long [ ] > ( ) ; private Map < Class , long [ ] > astats = new HashMap < Class , long [ ] > ( ) ; private Date start = new Date ( ) ; private Date since = new Date ( ) ; private static final int READ = 0 ; private static final int HIT = 1 ; private static final int WRITE = 2 ; public long getReadCount ( ) { } public long getHitCount ( ) { } public long getWriteCount ( ) { } public long getTotalReadCount ( ) { } public long getTotalHitCount ( ) { } public long getTotalWriteCount ( ) { } public long getReadCount ( Class c ) { } public long getHitCount ( Class c ) { } public long getWriteCount ( Class c ) { } public long getTotalReadCount ( Class c ) { } public long getTotalHitCount ( Class c ) { } public long getTotalWriteCount ( Class c ) { } private long getCount ( Map < Class , long [ ] > target , Class c , int index ) { long [ ] row = target . get ( c ) ; <START_BUG> return row == null ? 0 : row [ CacheStatistics . Default . WRITE ] ; <END_BUG> } public Date since ( ) { } public Date start ( ) { } public void reset ( ) { } void newGet ( Class cls , boolean hit ) { } void newPut ( Class cls ) { } private void addSample ( Class c , int index ) { } private void addSample ( Map < Class , long [ ] > target , Class c , int index ) { } } }

Fix:
return row == null ? 0 : row [ index ] ;
Buggy code:
public class MainActivity extends ActionBarActivity implements ServiceRequestFragment . OnServiceRequestListChanged { private static final String TAG = "MainActivity" ; AutoCompleteTextView omniField ; Button omniButton ; OmniBarInputHandler omniHandler ; ServiceRequestFragment requestFragment ; ListView tripList ; TripPopulator populator ; StopNameSQLHelper stopNames ; OmniAutoCompleteAdapter autoCompleteAdapter ; LocationRetriever locationService ; SettingFieldSaver fieldSaver ; Tracker t ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void setupFieldSaver ( ) { } private void setupLocation ( ) { } private void setupOmniBar ( ) { } private void setupActionBar ( ) { } protected void linkViewReferences ( ) { } protected void setupActionListeners ( ) { } private void initializeStaticData ( ) { } protected OnItemClickListener tripClickListener = new OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { } } ; private void makeServiceRequest ( String stopID ) { } private void makeServiceRequest ( String stopID , String displayName ) { } protected void startAnalytics ( ) { } protected void setupDefaults ( Intent bundle ) { } @ Override protected void onStart ( ) { } @ Override protected void onStop ( ) { } @ Override protected void onResume ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { if ( item . getTitle ( ) . equals ( "Stop<seq2seq4repair_space>Arrival<seq2seq4repair_space>Notification" ) ) { NotifyServiceManager . stopNotifyService ( this ) ; } else <START_BUG> if ( item . getTitle ( ) . equals ( "Clear<seq2seq4repair_space>Fields" ) ) { <END_BUG> clearOmniBar ( ) ; } return true ; } private void clearOmniBar ( ) { } @ Override public TripPopulator getTripPopulator ( ) { } @ Override public FieldSaver getFieldSaver ( ) { } }

Fix:
if ( item . getTitle ( ) . equals ( "Clear<seq2seq4repair_space>Entry<seq2seq4repair_space>Bar" ) ) {
Buggy code:
public class JawboneApi extends DefaultApi20 { public static final String CONSUMER_KEY = "jawbone_consumer_key" ; public static final String CONSUMER_SECRET = "jawbone_consumer_secret" ; public static final String USER_TOKEN = "jawbone_user_token" ; public String getAccessTokenEndpoint ( ) { } @ SuppressWarnings ( "deprecation" ) public String getAuthorizationUrl ( OAuthConfig arg0 ) { } public static JSONObject fetch ( Context context , Uri uri , String userAgent ) { AndroidHttpClient androidClient = AndroidHttpClient . newInstance ( userAgent , context ) ; HostnameVerifier hostnameVerifier = SSLSocketFactory . ALLOW_ALL_HOSTNAME_VERIFIER ; SchemeRegistry registry = new SchemeRegistry ( ) ; registry . register ( new org . apache . http . conn . scheme . Scheme ( "http" , PlainSocketFactory . getSocketFactory ( ) , 80 ) ) ; SSLSocketFactory socketFactory = SSLSocketFactory . getSocketFactory ( ) ; registry . register ( new org . apache . http . conn . scheme . Scheme ( "https" , socketFactory , 443 ) ) ; HttpParams params = androidClient . getParams ( ) ; HttpConnectionParams . setConnectionTimeout ( params , 180000 ) ; HttpConnectionParams . setSoTimeout ( params , 180000 ) ; ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager ( params , registry ) ; HttpClient httpClient = new org . apache . http . impl . client . DefaultHttpClient ( mgr , params ) ; HttpsURLConnection . setDefaultHostnameVerifier ( hostnameVerifier ) ; <START_BUG> HttpGet httpGet = new HttpGet ( "https:////jawbone.com//nudge//api//v.1.1//users//@me//goals" ) ; <END_BUG> httpGet . addHeader ( "Authorization" , ( "Bearer<seq2seq4repair_space>" + ( Keystore . get ( JawboneApi . USER_TOKEN ) ) ) ) ; httpGet . addHeader ( "Accept" , "application//json" ) ; httpGet . addHeader ( "X-Target-URI" , "https:////jawbone.com" ) ; httpGet . addHeader ( "X-HostCommonName" , "jawbone.com" ) ; try { HttpResponse response = httpClient . execute ( httpGet ) ; HttpEntity httpEntity = response . getEntity ( ) ; String result = EntityUtils . toString ( httpEntity ) ; return new JSONObject ( result ) ; } catch ( ClientProtocolException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } catch ( JSONException e ) { e . printStackTrace ( ) ; } finally { androidClient . close ( ) ; } return null ; } }

Fix:
HttpGet httpGet = new HttpGet ( uri . toString ( ) ) ;
Buggy code:
public class mod_MineFactory extends BaseModMp { private static mod_MineFactory instance ; public mod_MineFactory ( ) { } @ Override public String Version ( ) { } @ Override public void ModsLoaded ( ) { } public static void registerPlantable ( IFactoryPlantable plantable ) { } public static void registerHarvestable ( IFactoryHarvestable harvestable ) { } public static void registerFertilizable ( IFactoryFertilizable fertilizable ) { } public static void registerFertilizerItem ( int itemId ) { } public static void registerRanchable ( IFactoryRanchable ranchable ) { } public class ServerProxy implements IMFRProxy { @ Override public boolean isClient ( World world ) { } @ Override public boolean isServer ( ) { } @ Override public void movePlayerToCoordinates ( EntityPlayer e , double x , double y , double z ) { } @ Override public int getBlockDamageDropped ( Block block , int metadata ) { } @ Override public int getRenderId ( ) { } @ Override public boolean fertilizeGiantMushroom ( World world , int x , int y , int z ) { int blockId = world . getBlockId ( x , y , z ) ; <START_BUG> return ( ( BlockMushroom ) ( Block . blocksList [ blockId ] ) ) . fertilizeMushrom ( world , x , y , z , world . rand ) ; <END_BUG> } @ Override public void fertilizeStemPlant ( World world , int x , int y , int z ) { } @ Override public String getConfigPath ( ) { } @ Override public Packet getTileEntityPacket ( TileEntity te , int [ ] dataInt , float [ ] dataFloat , String [ ] dataString ) { } @ Override public void sendPacketToAll ( Packet230ModLoader p ) { } } }

Fix:
return ( ( BlockMushroom ) ( Block . blocksList [ blockId ] ) ) . fertilizeMushroom ( world , x , y , z , world . rand ) ;
Buggy code:
public class DecryptForExternalUse { public static void main ( String [ ] args ) throws Exception { ApplicationContext context = new ClassPathXmlApplicationContext ( "orcid-core-context.xml" ) ; EncryptionManager encyrptionManager = ( ( EncryptionManager ) ( context . getBean ( "encryptionManager" ) ) ) ; <START_BUG> System . out . println ( encyrptionManager . decryptForExternalUse ( new String ( Base64 . decodeBase64 ( args [ 0 ] ) , "UTF-8" ) ) ) ; <END_BUG> } }

Fix:
System . out . println ( ( ( "'" + ( encyrptionManager . decryptForExternalUse ( new String ( Base64 . decodeBase64 ( args [ 0 ] ) , "UTF-8" ) ) ) ) + "'" ) ) ;
Buggy code:
public class JSLPServiceInfo extends ServiceInfo implements IServiceInfo { private static final long serialVersionUID = 6828789192986625259L ; public JSLPServiceInfo ( URI anURI , IServiceID serviceID , int priority , int weight , IServiceProperties props ) { } public JSLPServiceInfo ( IServiceID serviceID ) { } public JSLPServiceInfo ( IServiceInfo aSI ) throws SecurityException , IDCreateException { } public JSLPServiceInfo ( ServiceURLAdapter anAdapter , int priority , int weight , ServiceProperties serviceProperties ) { } public ServiceURL getServiceURL ( ) throws ServiceLocationException { IServiceTypeID stid = getServiceID ( ) . getServiceTypeID ( ) ; <START_BUG> return new ServiceURL ( ( ( ( ( ( ( ( stid . getInternal ( ) ) + ":////" ) + ( getLocation ( ) . getScheme ( ) ) ) + ":////" ) + ( getLocation ( ) . getHost ( ) ) ) + ":" ) + ( getLocation ( ) . getPort ( ) ) ) , ServiceURL . LIFETIME_PERMANENT ) ; <END_BUG> } }

Fix:
return new ServiceURL ( ( ( ( ( ( stid . getInternal ( ) ) + ":////" ) + ( getLocation ( ) . getScheme ( ) ) ) + ":////" ) + ( getLocation ( ) . getAuthority ( ) ) ) , ServiceURL . LIFETIME_PERMANENT ) ;
Buggy code:
public class PsiHelper { public static int findMethodStart ( @ NotNull Editor editor , int offset , int count ) { } public static int findMethodEnd ( @ NotNull Editor editor , int offset , int count ) { } private static int findMethodOrClass ( @ NotNull Editor editor , int offset , int count , boolean isStart ) { PsiFile file = PsiHelper . getFile ( editor ) ; if ( file == null ) { return - 1 ; } StructureViewBuilder structureViewBuilder = INSTANCE . getStructureViewBuilder ( file ) ; if ( ! ( structureViewBuilder instanceof TreeBasedStructureViewBuilder ) ) return - 1 ; TreeBasedStructureViewBuilder builder = ( ( TreeBasedStructureViewBuilder ) ( structureViewBuilder ) ) ; <START_BUG> StructureViewModel model = builder . createStructureViewModel ( ) ; <END_BUG> TIntArrayList navigationOffsets = new TIntArrayList ( ) ; PsiHelper . addNavigationElements ( model . getRoot ( ) , navigationOffsets , isStart ) ; navigationOffsets . sort ( ) ; int index = navigationOffsets . size ( ) ; for ( int i = 0 ; i < ( navigationOffsets . size ( ) ) ; i ++ ) { if ( ( navigationOffsets . get ( i ) ) > offset ) { index = i ; if ( count > 0 ) count -- ; break ; } else if ( ( navigationOffsets . get ( i ) ) == offset ) { index = i ; break ; } } int resultIndex = index + count ; if ( resultIndex < 0 ) { resultIndex = 0 ; } else if ( resultIndex >= ( navigationOffsets . size ( ) ) ) { resultIndex = ( navigationOffsets . size ( ) ) - 1 ; } return navigationOffsets . get ( resultIndex ) ; } private static void addNavigationElements ( @ NotNull TreeElement root , @ NotNull TIntArrayList navigationOffsets , boolean start ) { } @ Nullable private static PsiFile getFile ( @ NotNull Editor editor ) { } }

Fix:
StructureViewModel model = builder . createStructureViewModel ( editor ) ;